Explorar o código

fix(goodsDetail): 统一detailType为1,通过status是否传入来判断为收货逻辑

xieyong hai 2 días
pai
achega
39ba3ef213

+ 3 - 0
src/views/beEntrusted/components/goodsDetail.vue

@@ -268,6 +268,9 @@
           id,
           detailType,
         }
+        if(this.type === 'send' || this.type === 'detail') {
+          obj.detailType = 1;
+        }
         if(this.type === 'detail'){
           obj.status = 2;
         }

+ 10 - 3
src/views/entrust/components/goodsDetail.vue

@@ -240,11 +240,18 @@
       },
 
       async getDetail(id) {
-        const detailType = this.type == 'receipt' ? 2 : 1;
-        await pleaseEntrustGoodsDetail({
+        let detailType = this.type == 'receipt' ? 2 : 1;
+        const params = {
           id,
           detailType
-        }).then(async (res) => {
+        };
+        if(this.type === "detail" || this.type === "receipt") {
+          params.detailType = 1;
+        }
+        if(this.type === 'receipt') {
+          params.status = 2;
+        }
+        await pleaseEntrustGoodsDetail(params).then(async (res) => {
           this.goodsList = [];
           res.data.forEach((item) => {
             if (this.type == 'receipt' && this.itemData.sendStatus != 4) {