Browse Source

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

chenrui 1 year ago
parent
commit
4b1baad91f

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


+ 1 - 1
public/version.json

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

+ 19 - 14
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -6,7 +6,7 @@
         <template slot="subTitle">
           <a id="purchaseReturnEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <span style="margin: 0 15px;color: #666;">供应商名称:箭冠营销中心</span>
-          <span style="margin: 0 15px;color: #666;">退货类别:{{detailData&&detailData.goodFlagDictValue||'--'}}</span>
+          <span style="margin: 0 15px;color: #666;">退货类别:{{ detailData&&detailData.goodFlagDictValue||'--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_purchaseReturnApplyPrint')">
@@ -221,8 +221,11 @@
           <div><returnReason size="large" :goodFlag="goodFlag" v-model="plReturnReason"></returnReason></div>
         </div>
         <div style="line-height: 24px;margin-top:10px;">
+          <a-checkbox :checked="showEditRemarks" @change="e => showEditRemarks=!showEditRemarks">是否设置备注</a-checkbox>
+        </div>
+        <div style="line-height: 24px;margin-top:10px;" v-if="showEditRemarks">
           <div>备注</div>
-          <div><a-input size="large" :maxLength="10" placeholder="请输入备注(最多50字符)" v-model="plReturnRemark"></a-input></div>
+          <div><a-input size="large" :maxLength="50" placeholder="请输入备注(最多50字符)" v-model="plReturnRemark"></a-input></div>
         </div>
       </div>
     </commonModal>
@@ -310,7 +313,8 @@ export default {
       detailData: null,
       rowSelectionInfo: null,
       plReturnReason: undefined,
-      plReturnRemark: '',
+      plReturnRemark: undefined,
+      showEditRemarks: false,
       showPlModal: false
     }
   },
@@ -318,7 +322,8 @@ export default {
     showPlModal (newValue, oldValue) {
       if (!newValue) {
         this.plReturnReason = undefined
-        this.plReturnRemark = ''
+        this.plReturnRemark = undefined
+        this.showEditRemarks = false
       }
     }
   },
@@ -326,7 +331,7 @@ export default {
     selNums () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
     },
-    goodFlag() {
+    goodFlag () {
       return this.detailData && this.detailData.goodFlag || ''
     },
     columns () {
@@ -523,21 +528,21 @@ export default {
     },
     // 已选产品 退货原因修改
     returnReasonChange (val, record, type) {
-      console.log(val,record,type)
+      console.log(val, record, type)
       const params = {
         purchaseReturnApplyDetailSn: record.purchaseReturnApplyDetailSn,
         purchaseReturnApplySn: this.$route.params.sn,
         goodFlag: this.goodFlag
       }
       // 退货原因
-      if(type == 0){
+      if (type == 0) {
         const rows = this.returnReasonlist.find(item => item.code == val)
-        params.returnReasonCode = val||''
+        params.returnReasonCode = val || ''
         params.returnReason = rows ? rows.dispName : ''
-      }else{
+      } else {
         // 备注
         params.returnReasonRemarks = val.target.value
-        if(!params.returnReasonRemarks){
+        if (!params.returnReasonRemarks) {
           return
         }
       }
@@ -547,7 +552,7 @@ export default {
           this.$message.success(res.message)
           this.$refs.chooseTable.refresh()
         } else {
-          if(type == 0){
+          if (type == 0) {
             record.returnReasonCode = record.returnReasonBackups
           }
         }
@@ -596,14 +601,14 @@ export default {
     getDetail (flag) {
       purchaseReturnDetail({ sn: this.$route.params.sn }).then(res => {
         this.detailData = res.data ? res.data : null
-        if(res.data.goodFlag == 'DEFECTIVE_PRODUCT_RETURN'){
+        if (res.data.goodFlag == 'DEFECTIVE_PRODUCT_RETURN') {
           this.returnReasonlist = this.$store.state.app.defectiveReturnReason
         }
         // 良品
-        if(res.data.goodFlag == 'GOOD_PRODUCT_RETURN'){
+        if (res.data.goodFlag == 'GOOD_PRODUCT_RETURN') {
           this.returnReasonlist = this.$store.state.app.goodReturnReason
         }
-        if(flag){
+        if (flag) {
           this.$refs.chooseTable.refresh(true)
           this.resetSearchForm()
         }