lilei 1 rok pred
rodič
commit
05b6d48f87

+ 24 - 12
src/views/purchasingManagement/purchaseReturnApplyForm/chooseImportModal.vue

@@ -85,28 +85,40 @@ export default {
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
-      nowColumns: [
+      loadData: [],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  computed: {
+    nowColumns () {
+      const arr = [
         { title: '序号', dataIndex: 'no', width: '7%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'product.unit', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'exprotQty', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      loadData: [],
-      nowUnColumns: [
+      ]
+      if(this.paramsData.goodFlag != 1){
+        arr.push({ title: '退货原因', dataIndex: 'returnReason', width: '14%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      arr.push({ title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } })
+      return arr
+    },
+    nowUnColumns () {
+      const arr = [
         { title: '序号', dataIndex: 'no', width: '7%', align: 'center' },
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'product.unit', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'exprotQty', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货原因', dataIndex: 'returnReason', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '错误说明', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      unLoadData: [],
-      loading: false
+      ]
+      if(this.paramsData.goodFlag != 1){
+        arr.push({ title: '退货原因', dataIndex: 'returnReason', width: '10%', align: 'center', customRender: function (text) { return text || '--' } })
+      }
+      arr.push({ title: '备注', dataIndex: 'returnReasonRemarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } })
+      arr.push({ title: '错误说明', dataIndex: 'remarks', width: '15%', align: 'center', customRender: function (text) { return text || '--' } })
+      return arr
     }
   },
   methods: {

+ 1 - 0
src/views/purchasingManagement/purchaseReturnApplyForm/importGuideModal.vue

@@ -119,6 +119,7 @@ export default {
         this.paramsData = {
           purchaseReturnApplySn: this.params.purchaseReturnApplySn || '',
           purchaseReturnApplyNo: this.params.purchaseReturnApplyNo || '',
+          goodFlag: this.goodFlag,
           path: file
         }
       }