2 Angajamente 22a0ab6d4b ... 213b9021dd

Autor SHA1 Permisiunea de a trimite mesaje. Dacă este dezactivată, utilizatorul nu va putea trimite nici un fel de mesaj Data
  xieyong 213b9021dd fix(goodsDetail): 更新收货逻辑,增加状态3的判断并传递detailType 1 zi în urmă
  xieyong 642b6a1a0e fix(goodsDetail): 更新发货和详情逻辑,调整detailType的值 1 zi în urmă

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

@@ -268,11 +268,11 @@
           id,
           detailType,
         }
-        if(this.type === 'send' || this.type === 'detail') {
-          obj.detailType = 1;
+        if(this.type === 'send') {
+          obj.detailType = 3;
         }
         if(this.type === 'detail'){
-          obj.status = 2;
+          obj.detailType = 2;
         }
         await pleaseEntrustGoodsDetail(obj).then((res) => {
           this.goodsList = [];

+ 14 - 7
src/views/entrust/components/goodsDetail.vue

@@ -41,7 +41,7 @@
         <el-input
           placeholder=""
           v-model="row.receiveQuantity"
-          :disabled="type == 'receipt' && itemData.sendStatus == 4"
+          :disabled="type == 'receipt' && (itemData.sendStatus == 4 || itemData.sendStatus == 3)"
         >
           <template slot="append">{{ row.measuringUnit }}</template>
         </el-input>
@@ -230,27 +230,34 @@
         return this.statusMap[Number(status)] || { label: '驳回', type: 'success' };
       },
 
-      open(item, type) {
+      open(item, type, detailType) {
         this.visible = true;
         this.type = type;
         this.title = this.type != 'receipt' ? '发货单' : '收货单';
         this.itemData = item;
         this.id = item.id;
-        this.getDetail(item.id);
+        this.getDetail(item.id, detailType);
       },
 
-      async getDetail(id) {
+      async getDetail(id, type) {
         let detailType = this.type == 'receipt' ? 2 : 1;
         const params = {
           id,
           detailType
         };
-        if(this.type === "detail" || this.type === "receipt") {
+        if(this.type === "detail") {
           params.detailType = 1;
         }
-        if(this.type === 'receipt') {
-          params.status = 2;
+
+        //用type来区分收货详情与收货 存在type则是收货
+        if(this.type === "receipt") {
+          params.detailType = 4;
+        }
+
+        if(this.type === 'receipt' && type) {
+          params.detailType = type;
         }
+
         await pleaseEntrustGoodsDetail(params).then(async (res) => {
           this.goodsList = [];
           res.data.forEach((item) => {

+ 3 - 3
src/views/entrust/index.vue

@@ -158,7 +158,7 @@
           <el-link
             type="primary"
             :underline="false"
-            @click="sendGoods(row, 'receipt')"
+            @click="sendGoods(row, 'receipt', 3)"
             v-if="row.approvalStatus == 2 && row.sendStatus == 3"
           >
             收货
@@ -695,8 +695,8 @@
         });
       },
 
-      sendGoods(item, type) {
-        this.$refs.goodsDetailRef.open(item, type);
+      sendGoods(item, type, detailType) {
+        this.$refs.goodsDetailRef.open(item, type, detailType);
       },
 
       fullscreenChange(fullscreen) {