| | |
| | | </div> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <div class="offerpay" v-if="showOffpayInstruct || showUploadBox"> |
| | | <OffpayInstruct |
| | | v-if="showOffpayInstruct" |
| | | @close="showOffpayInstruct = false" |
| | | :offerData="{ username: username, sum: sum, orderId: orderId }" |
| | | @confirm="confirmOrder" |
| | | ></OffpayInstruct> |
| | | <UploadBox |
| | | :orderId="orderId" |
| | | @close="showUploadBox = false" |
| | | @back="back" |
| | | v-if="showUploadBox" |
| | | > |
| | | </UploadBox> |
| | | </div> |
| | | |
| | | <div class="mask" v-if="showOffpayInstruct || showUploadBox"></div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getOrderById } from "@/api/product"; |
| | | import { resumePay } from "@/api/order"; |
| | | import OffpayInstruct from "@/views/productDetail/components/OffpayInstruct"; |
| | | import UploadBox from "@/views/productDetail/components/UploadBox"; |
| | | |
| | | export default { |
| | | props: { |
| | | orderId: {}, |
| | | }, |
| | | components: { |
| | | OffpayInstruct, |
| | | UploadBox, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | username: "", |
| | | offPayInstruVisible: false, |
| | | onlinePayVisible: false, |
| | | showOffpayInstruct: false, |
| | | showUploadBox: false, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | this.payWay = payway; |
| | | }, |
| | | forPay() { |
| | | if (!this.policyChecked) { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "请确认用户条款", |
| | | }); |
| | | return; |
| | | } |
| | | let orderId = this.orderId; |
| | | let payMethod = this.payWay; |
| | | let _this = this; |
| | | if (this.orderInfo.orderMoney == 0) { |
| | | resumePay({ orderId, payMethod: 5 }).then((res) => { |
| | | if (res.success) { |
| | | this.$router.replace("/Layout/ManageOrder"); |
| | | // this.$router.replace("/Layout/ManageOrder"); |
| | | } |
| | | }); |
| | | return; |
| | |
| | | resumePay({ orderId, payMethod: 1 }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.offPayInstruVisible = true; |
| | | this.showOffpayInstruct = true; |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | |
| | | }, |
| | | close() { |
| | | this.$emit("close"); |
| | | }, |
| | | confirmOrder() { |
| | | this.showOffpayInstruct = false; |
| | | this.showUploadBox = true; |
| | | }, |
| | | back() { |
| | | this.showOffpayInstruct = true; |
| | | this.showUploadBox = false; |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 20px; |
| | | bottom: 20px; |
| | | display: flex; |
| | | justify-content: end; |
| | | text-align: center; |
| | | line-height: 40px; |
| | | |
| | | .confirm { |
| | | margin-left: 10px; |
| | | width: 104px; |
| | | height: 40px; |
| | | background: #0065ff; |
| | | color: #fff; |
| | | } |
| | | |
| | | .cancel { |
| | | width: 104px; |
| | | height: 40px; |
| | | border: 1px solid #0065ff; |
| | | color: #0065ff; |
| | | } |
| | | } |
| | | |
| | | .offerpay { |
| | | position: fixed; |
| | | top: 50%; |
| | | left: 50%; |
| | | margin-top: -331px; |
| | | margin-left: -223px; |
| | | width: 446px; |
| | | height: 662px; |
| | | background: #ffffff; |
| | | z-index: 2; |
| | | } |
| | | |
| | | .mask { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background: #000000; |
| | | opacity: 0.2; |
| | | z-index: 1; |
| | | } |
| | | } |
| | | </style> |
| | | |