Bläddra i källkod

Merge branch 'pre-release' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh23

# Conflicts:
#	public/version.json
lilei 1 år sedan
förälder
incheckning
2eeddc244b

BIN
public/templ/采购退货申请单(其它)产品明细模板.xlsx


BIN
public/templ/采购退货申请单(良品)产品明细模板.xlsx


+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1690354362850
+  "version": 1090513318550
 }

+ 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: {

+ 15 - 8
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -129,7 +129,7 @@
               </div>
               <div>
                 <span style="margin-right: 10px;" v-if="selNums">已选{{ selNums }}项</span>
-                <a-button type="default" style="margin-right: 10px;" class="button-info" @click="openPlSetReason">批量设置退货原因</a-button>
+                <a-button v-if="editGoodFlag" type="default" style="margin-right: 10px;" class="button-info" @click="openPlSetReason">批量设置退货原因</a-button>
                 <a-button
                   type="primary"
                   id="purchaseReturnEdit-import-btn"
@@ -335,6 +335,9 @@ export default {
     goodFlag () {
       return this.detailData && this.detailData.goodFlag || ''
     },
+    editGoodFlag () {
+      return this.detailData && this.detailData.goodFlag == 'DEFECTIVE_PRODUCT_RETURN'
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -342,10 +345,12 @@ export default {
         { title: '产品名称', dataIndex: 'name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '20%', align: 'center' },
         { title: '单位', dataIndex: 'unit', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '申请退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' },
-        { title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: '申请退货数量', scopedSlots: { customRender: 'returnQty' }, width: '10%', align: 'center' }
       ]
+      if(this.editGoodFlag){
+        arr.push({ title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' })
+      }
+      arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' })
       return arr
     },
     chooseColumns () {
@@ -355,11 +360,13 @@ export default {
         { title: '产品名称', dataIndex: 'product.name', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '17%', align: 'center' },
         { title: '单位', dataIndex: 'product.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '申请退货数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' },
-        { title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' },
-        { title: '备注', scopedSlots: { customRender: 'returnRemarks' }, width: '10%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: '申请退货数量', scopedSlots: { customRender: 'qty' }, width: '10%', align: 'center' }
       ]
+      if(this.editGoodFlag){
+        arr.push({ title: '退货原因', scopedSlots: { customRender: 'returnReason' }, width: '10%', align: 'center' })
+      }
+      arr.push({ title: '备注', scopedSlots: { customRender: 'returnRemarks' }, width: '10%', align: 'center' })
+      arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' })
       return arr
     }
   },

+ 2 - 1
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
         }
       }
@@ -146,7 +147,7 @@ export default {
         this.$emit('close')
         this.resetSearchForm()
       }else{
-        this.filePath = location.protocol + '//' +location.host + (this.goodFlag==1 ? '/templ/采购退货申请单(良品)产品明细模板.xlsx' : '/templ/采购退货申请单(不良品)产品明细模板.xlsx')
+        this.filePath = location.protocol + '//' +location.host + (this.goodFlag==1 ? '/templ/采购退货申请单(其它)产品明细模板.xlsx' : '/templ/采购退货申请单(不良品)产品明细模板.xlsx')
       }
     }
   }

+ 2 - 2
src/views/purchasingManagement/purchaseReturnApplyForm/list.vue

@@ -189,7 +189,7 @@ export default {
         beginAuditDate: '', // 审核时间
         endAuditDate: ''
       },
-      goodFlag: undefined,
+      goodFlag: 'DEFECTIVE_PRODUCT_RETURN',
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0,
       // 加载数据方法 必须为 Promise 对象
@@ -301,7 +301,7 @@ export default {
     },
     closeCreatModal(){
       this.openTipsModal = false
-      this.goodFlag = undefined
+      this.goodFlag = 'DEFECTIVE_PRODUCT_RETURN'
     },
     creatReturnOrder(){
       const _this = this