linwenxin vor 8 Monaten
Ursprung
Commit
55f4b7ce4c

+ 24 - 21
src/views/partsManagement/accessoryWebsite/website-parts-shop-sales-manage/website-parts-shop-sales/components/pay-popup-window.vue

@@ -9,9 +9,9 @@
   >
     <div>
       <el-descriptions>
-        <el-descriptions-item label="支付单号">{{ data.outTradeNo }}</el-descriptions-item>
-        <el-descriptions-item label="配件费用">¥{{ data.payValue }}</el-descriptions-item>
-        <el-descriptions-item label="收款方">{{ data.subMchNo || data.mchNo || '' }}</el-descriptions-item>
+        <el-descriptions-item label="支付单号">{{ data.id }}</el-descriptions-item>
+        <el-descriptions-item label="配件费用">¥{{ data.payAmount }}</el-descriptions-item>
+        <el-descriptions-item label="收款方">{{ item.websitName }}</el-descriptions-item>
         <el-descriptions-item label="支付方式">
           <el-radio v-model="radio" label="wx">微信支付</el-radio>
           <el-radio v-if="partsIsCash" v-model="radio" label="xj">现金支付</el-radio>
@@ -81,24 +81,27 @@ export default {
     }
   },
   watch: {
-    visible(newVal) {
-      this.dialogVisible = newVal
-      if (newVal) {
-        this.$nextTick(() => {
-          if (this.item.websitId) {
-            adminWebsitPayConfigList({
-              status: true,
-              websitId: this.item.websitId,
-              category: 'P'
-            }).then(res => {
-              this.payConfigs = res.data
-              if (this.payConfigs.length > 0) {
-                this.payConfigId = this.payConfigs[0].id
-              }
-            })
-          }
-        })
-      }
+    visible: {
+      handler(newVal) {
+        this.dialogVisible = newVal
+        if (newVal) {
+          this.$nextTick(() => {
+            if (this.item.websitId) {
+              adminWebsitPayConfigList({
+                status: true,
+                websitId: this.item.websitId,
+                category: 'P'
+              }).then(res => {
+                this.payConfigs = res.data
+                if (this.payConfigs.length > 0) {
+                  this.payConfigId = this.payConfigs[0].id
+                }
+              })
+            }
+          })
+        }
+      },
+      immediate: true
     },
     payConfigId() {
       this.showPayQRCode = false

+ 1 - 0
src/views/partsManagement/accessoryWebsite/website-parts-shop-sales-manage/website-parts-shop-sales/components/website-parts-shop-sales-information.vue

@@ -442,6 +442,7 @@
       </el-row>
     </div>
     <pay-popup-window
+      v-if="visible"
       :item="form"
       :visible="visible"
       :partsIsCash="partsIsCash"

+ 12 - 3
src/views/partsManagement/accessoryWebsite/website-parts-shop-sales-manage/website-parts-shop-sales/index.vue

@@ -17,7 +17,9 @@
       @goBack="showFromBool = false"
     />
     <pay-popup-window
+      v-if="visible"
       :item="rowData"
+      :partsIsCash="partsIsCash"
       :visible="visible"
       @success="
         () => {
@@ -28,6 +30,7 @@
         bool => {
           visible = bool
           rowData = null
+          partsIsCash = true
         }
       "
     />
@@ -46,6 +49,7 @@ import {
   partsPartssalesorderSalesOrderShopExport
 } from '@/api/material-system/website/website-parts-shop-sales'
 import operation_mixin from '@/components/template/operation_mixin.js'
+import { getDepartmentDetail } from '@/api/setting'
 export default {
   components: {
     TemplatePage,
@@ -62,7 +66,8 @@ export default {
       showFromBool: false,
       fromPm: {},
       visible: false,
-      rowData: null
+      rowData: null,
+      partsIsCash: true
     }
   },
   computed: {
@@ -170,8 +175,12 @@ export default {
           },
           click: ({ row, index, column }) => {
             if (row.status == 'SUBMIT') {
-              this.rowData = row
-              this.visible = true
+              getDepartmentDetail({ id: row.websitId }).then(res => {
+                console.log(res.data)
+                this.partsIsCash = res.data.partsIsCash
+                this.rowData = row
+                this.visible = true
+              })
             } else if (row.status == 'EXCEPTION') {
               this.fromPm = {
                 type: 3,