|
@@ -266,7 +266,6 @@ import QRCode from 'qrcode'
|
|
|
import PerformanceBelongs from "@/views/create-order/components/performanceBelongs.vue";
|
|
|
import { calcSaleTableList } from "@/views/create-order/hooks/utils"
|
|
|
import SelectOrderDetailCard from "@/views/create-order/components/order-detail-submodule/SelectOrderDetailCard.vue";
|
|
|
-import { ajaxGetPayCode } from '@/api/modules'
|
|
|
export default {
|
|
|
name: 'new-d-model',
|
|
|
props: {
|
|
@@ -720,41 +719,40 @@ export default {
|
|
|
},
|
|
|
getPayOrderInfo(doType, money, payWay) {
|
|
|
this.paymentLoading = true
|
|
|
- console.log(this.data, 'orderDetail')
|
|
|
- ajaxGetPayCode({
|
|
|
- orderCode: this.data?.orderData?.order_code,
|
|
|
- money: money ? Math.round(Number(money) * 10000) / 100 : undefined,
|
|
|
- payWay: payWay ? Number(payWay) : undefined,
|
|
|
- doType
|
|
|
- }).then(res => {
|
|
|
- console.log(res,'res')
|
|
|
- if(res.error_code === 0 && res.data) {
|
|
|
+ this.$request('/order/getReturnOnline').data(
|
|
|
+ {
|
|
|
+ orderCode: this.orderDetail.order_code,
|
|
|
+ doType,
|
|
|
+ money: money ? Math.round(Number(money) * 10000) / 100 : undefined,
|
|
|
+ payWay: payWay ? Number(payWay) : undefined
|
|
|
+ }
|
|
|
+ ).success((res) => {
|
|
|
+ if (res.data) {
|
|
|
if(doType === 'query') {
|
|
|
- this.paymentForm.money = res.data.money / 100
|
|
|
- this.paymentForm.product = res.data.product
|
|
|
- this.paymentForm.account = res.data.account
|
|
|
- this.paymentForm.noPayment = res.data.money / 100
|
|
|
- this.getPayOrderInfo('getPay', this.paymentForm.money, this.paymentForm.mode)
|
|
|
- } else if (doType === 'getPay') {
|
|
|
- this.paymentLoading = false
|
|
|
- // this.paymentForm.imgCode = res.data.product
|
|
|
- this.paymentForm.expire = res.data.expire
|
|
|
- QRCode.toDataURL(res.data.product,{
|
|
|
- color: {
|
|
|
- dark:"#000000",
|
|
|
- light:"#FFFFFF"
|
|
|
- }
|
|
|
- }).then((url) => {
|
|
|
- // 获取到url后即可在页面使用--二维码图片
|
|
|
- this.paymentForm.imgCode = url
|
|
|
- }).catch((e) => {
|
|
|
- console.log('e', e)
|
|
|
- this.$toast('二维码转换失败')
|
|
|
- })
|
|
|
- }
|
|
|
+ this.paymentForm.money = res.data.money / 100
|
|
|
+ this.paymentForm.product = res.data.product
|
|
|
+ this.paymentForm.account = res.data.account
|
|
|
+ this.paymentForm.noPayment = res.data.money / 100
|
|
|
+ this.getPayOrderInfo('getPay', this.paymentForm.money, this.paymentForm.mode)
|
|
|
+ } else if (doType === 'getPay') {
|
|
|
+ this.paymentLoading = false
|
|
|
+ // this.paymentForm.imgCode = res.data.product
|
|
|
+ this.paymentForm.expire = res.data.expire
|
|
|
+ QRCode.toDataURL(res.data.product,{
|
|
|
+ color: {
|
|
|
+ dark:"#000000",
|
|
|
+ light:"#FFFFFF"
|
|
|
+ }
|
|
|
+ }).then((url) => {
|
|
|
+ // 获取到url后即可在页面使用--二维码图片
|
|
|
+ this.paymentForm.imgCode = url
|
|
|
+ }).catch((e) => {
|
|
|
+ console.log('e', e)
|
|
|
+ this.$toast('二维码转换失败')
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- })
|
|
|
-
|
|
|
+ }).error(() => { }).post()
|
|
|
},
|
|
|
onChangePayWay(val){
|
|
|
this.paymentForm.mode = val
|
|
@@ -1054,7 +1052,7 @@ export default {
|
|
|
return !(!this.paymentLoading && this.paymentForm.money && this.paymentForm.imgCode)
|
|
|
},
|
|
|
orderDetail () {
|
|
|
- return this.data?.orderData
|
|
|
+ return this.data.orderData
|
|
|
},
|
|
|
contractData () {
|
|
|
return this.data.contractRes
|