Explorar o código

2023年5月16日16:49:39

纪新园 %!s(int64=2) %!d(string=hai) anos
pai
achega
c8ea514475

+ 5 - 13
src/views/dealer/sales/detail.vue

@@ -813,14 +813,13 @@ export default {
       //lotNo 批次号
       let form = {};
       await getDetail(data).then(res => {
-        const a = res.data.data
-          ? res.data.data
-          : {
+        const a = res.data.data ? res.data.data : {
             stock: 0,
             balanceAmount: 0,
             surplusRouteQuantity: 0
           };
-        this.$set(form,"purchaseAmount",a.inQuantity ? a.inQuantity == 0 ? 0 : (Number(a.inAmount) / Number(a.inQuantity)).toFixed(2) : 0 );
+        // this.$set(form,"purchaseAmount",a.inQuantity ? a.inQuantity == 0 ? 0 : (Number(a.inAmount) / Number(a.inQuantity)).toFixed(2) : 0 );
+        this.$set(form,"purchaseAmount",a.stockPrice);
         this.$set(form, "stock", a.surplusRouteQuantity);
       })
         .finally(() => {
@@ -841,15 +840,8 @@ export default {
           balanceAmount: 0,
           balanceQuantity: 0
         };
-      this.$set(
-        form,
-        "purchaseAmount",
-        a.inQuantity
-          ? a.inQuantity == 0
-            ? 0
-            : (Number(a.inAmount) / Number(a.inQuantity)).toFixed(2)
-          : 0
-      );
+      // this.$set(form, "purchaseAmount", a.inQuantity ? a.inQuantity == 0 ? 0 : (Number(a.inAmount) / Number(a.inQuantity)).toFixed(2) : 0);
+      this.$set(form, "purchaseAmount", a.stockPrice);
       this.$set(form, "stock", a.balanceQuantity);
       return form;
     },

+ 1 - 1
src/views/dealer/stock/config/mainList.json

@@ -154,7 +154,7 @@
       "overHidden": true
     },{
       "label": "库存价",
-      "prop": "inAmount",
+      "prop": "stockPrice",
       "search": false,
       "index": 15,
       "width": 100,