lilei 2 rokov pred
rodič
commit
0978dec2c8

+ 17 - 7
src/views/salesReturnManagement/custConfirm/list.vue

@@ -9,7 +9,7 @@
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="custConfirm-cont">
-        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="searchForm">
           <a-form-item label="产品编码">
             <a-input id="custConfirm-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
           </a-form-item>
@@ -17,13 +17,14 @@
             <a-input id="custConfirm-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
           </a-form-item>
           <a-form-item>
-            <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="custConfirm-refresh">查询</a-button>
+            <a-button type="primary" class="button-info" @click="searchForm" :disabled="disabled" id="custConfirm-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="custConfirm-reset">重置</a-button>
           </a-form-item>
         </a-form>
         <div style="border-top:1px solid #eee;padding-top:10px;">
           <a-button type="primary" :loading="loading" class="button-info" @click="openProductModal=true">新增产品</a-button>
           <a-button type="primary" :loading="loading" class="button-error" @click="handlePlss">批量设置退货单价</a-button>
+          <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys&&rowSelectionInfo.selectedRowKeys.length">已选{{ rowSelectionInfo.selectedRowKeys.length }}项</span>
           <div style="float:right;color:#999;margin-top:8px;">说明:红色行表示收货时新增的产品;黄色表示客服确认时新增的产品</div>
         </div>
         <!-- 已选配件列表 -->
@@ -119,6 +120,7 @@
           <!-- 退货原因 -->
           <template slot="returnReason" slot-scope="text, record">
             <a-select
+              size="small"
               v-if="record.isEdit"
               style="width:100%;"
               v-model="record.returnReason"
@@ -317,7 +319,7 @@ export default {
       this.showSetPriceModal = false
       this.rowSelectionInfo = null
       this.$refs.table.clearTable()
-      this.resetSearchForm(true)
+      this.resetSearchForm(false)
     },
     // 保存
     handleSave (record) {
@@ -347,7 +349,7 @@ export default {
           _this.spinning = true
           deleteByCustomerService({ salesReturnDetailSn: row.salesReturnDetailSn }).then(res => {
             if (res.status == 200) {
-              _this.resetSearchForm(true)
+              _this.resetSearchForm(false)
             }
             _this.$message.info(res.message)
             _this.loading = false
@@ -396,9 +398,17 @@ export default {
     },
     //  重置
     resetSearchForm (flag) {
-      this.queryParam.productName = ''
-      this.queryParam.productCode = ''
-      this.$refs.table.refresh(!!flag)
+      if (flag) {
+        this.queryParam.productName = ''
+        this.queryParam.productCode = ''
+        this.rowSelectionInfo = null
+        this.$refs.table.clearSelected()
+      }
+      this.$refs.table.refresh(flag)
+    },
+    searchForm () {
+      this.$refs.table.refresh(true)
+      this.$refs.table.clearSelected()
     },
     pageInit () {
       const _this = this

+ 16 - 10
src/views/salesReturnManagement/receiveCheck/checking.vue

@@ -9,7 +9,7 @@
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="salesReturnCheck-cont">
-        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="searchForm">
           <a-form-item label="产品编码" prop="productCode">
             <a-input id="salesReturnCheck-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
           </a-form-item>
@@ -17,7 +17,7 @@
             <a-input id="salesReturnCheck-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
           </a-form-item>
           <a-form-item>
-            <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnCheck-refresh">查询</a-button>
+            <a-button type="primary" class="button-info" @click="searchForm" :disabled="disabled" id="salesReturnCheck-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnCheck-reset">重置</a-button>
           </a-form-item>
         </a-form>
@@ -204,6 +204,7 @@ export default {
       this.spinning = true
       fun(obj).then(res => {
         if (res.status == 200) {
+          this.$refs.table.clearSelected()
           this.$refs.table.refresh()
           this.$message.success(res.message)
         }
@@ -221,7 +222,7 @@ export default {
           goodQty: record.goodQty
         }]).then(res => {
           if (res.status == 200) {
-            this.$refs.table.refresh()
+            this.resetSearchForm(false)
             this.$message.success(res.message)
             record.goodQtyBackups = record.goodQty
           } else {
@@ -243,7 +244,7 @@ export default {
           backStockQty: record.backStockQty
         }]).then(res => {
           if (res.status == 200) {
-            this.$refs.table.refresh()
+            this.resetSearchForm(false)
             this.$message.success(res.message)
             record.backStockQtyBackups = record.backStockQty
           } else {
@@ -257,21 +258,26 @@ export default {
     },
     // 获取单据详细
     getOrderDetail () {
-      this.rowSelectionInfo = null
       salesReturnDetail({ sn: this.orderSn }).then(res => {
         this.ordeDetail = res.data || null
       })
     },
     //  重置
     resetSearchForm (flag) {
-      this.rowSelectionInfo = null
-      this.$refs.table.clearTable()
-      this.queryParam = {
-        productCode: '',
-        productName: ''
+      if (flag) {
+        this.rowSelectionInfo = null
+        this.$refs.table.clearSelected()
+        this.queryParam = {
+          productCode: '',
+          productName: ''
+        }
       }
       this.$refs.table.refresh(!!flag)
     },
+    searchForm () {
+      this.$refs.table.refresh(true)
+      this.$refs.table.clearSelected()
+    },
     // 提交品检
     handleSubmit () {
       const _this = this

+ 17 - 9
src/views/salesReturnManagement/receiveCheck/receiving.vue

@@ -9,7 +9,7 @@
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" class="salesReturnReceive-cont">
-        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" style="margin-bottom:10px;" @keyup.enter.native="searchForm">
           <a-form-item label="产品编码" prop="productCode">
             <a-input id="salesReturnReceive-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
           </a-form-item>
@@ -17,7 +17,7 @@
             <a-input id="salesReturnReceive-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
           </a-form-item>
           <a-form-item>
-            <a-button type="primary" class="button-info" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnReceive-refresh">查询</a-button>
+            <a-button type="primary" class="button-info" @click="searchForm" :disabled="disabled" id="salesReturnReceive-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="salesReturnReceive-reset">重置</a-button>
           </a-form-item>
         </a-form>
@@ -192,7 +192,7 @@ export default {
       }
       insertByReceive(params).then(res => {
         if (res.status == 200) {
-          this.resetSearchForm()
+          this.resetSearchForm(true)
           this.$message.info(res.message)
         }
         this.$refs.chooseProduct.resetLoading()
@@ -242,7 +242,7 @@ export default {
             if (res.status == 200) {
               _this.rowSelectionInfo = null
               _this.$refs.table.clearTable()
-              _this.resetSearchForm()
+              _this.resetSearchForm(false)
               _this.$message.success(res.message)
             }
             _this.loading = false
@@ -262,7 +262,7 @@ export default {
           receiveQty: val
         }).then(res => {
           if (res.status == 200) {
-            this.$refs.table.refresh()
+            this.resetSearchForm(false)
             this.$message.success(res.message)
           } else {
             record.receiveQty = record.receiveQtyBackups
@@ -283,7 +283,7 @@ export default {
         returnReason: record.returnReason
       }).then(res => {
         if (res.status == 200) {
-          this.$refs.table.refresh()
+          this.resetSearchForm(false)
           this.$message.success(res.message)
         } else {
           record.returnReason = record.returnReasonBackups
@@ -323,9 +323,17 @@ export default {
     },
     //  重置
     resetSearchForm (flag) {
-      this.queryParam.productName = ''
-      this.queryParam.productCode = ''
-      this.$refs.table.refresh(!!flag)
+      if (flag) {
+        this.queryParam.productName = ''
+        this.queryParam.productCode = ''
+        this.rowSelectionInfo = null
+        this.$refs.table.clearSelected()
+      }
+      this.$refs.table.refresh(flag)
+    },
+    searchForm () {
+      this.$refs.table.refresh(true)
+      this.$refs.table.clearSelected()
     },
     pageInit () {
       const _this = this

+ 3 - 3
src/views/salesReturnManagement/salesReturn/list.vue

@@ -28,7 +28,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户采退申请单号">
-                  <a-input id="salesReturn-purchaseReturnBillNo" v-model.trim="queryParam.purchaseReturnBillNo" allowClear placeholder="请输入客户采退申请单号"/>
+                  <a-input id="salesReturn-purchaseReturnApplyNo" v-model.trim="queryParam.purchaseReturnApplyNo" allowClear placeholder="请输入客户采退申请单号"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -230,7 +230,7 @@ export default {
         endAuditDate: '',
         buyerSn: undefined, //  客户名称
         salesReturnBillNo: undefined, //  总部销退单号
-        purchaseReturnBillNo: '',
+        purchaseReturnApplyNo: '',
         syncFlag: undefined, // 是否同步给客户
         billStatus: undefined, // 业务状态
         subareaSn: undefined,
@@ -386,7 +386,7 @@ export default {
       this.queryParam.buyerSn = undefined
       this.$refs.dealerSubareaScopeList.resetForm()
       this.queryParam.salesReturnBillNo = ''
-      this.queryParam.purchaseReturnBillNo = ''
+      this.queryParam.purchaseReturnApplyNo = ''
       this.queryParam.billStatus = undefined
       this.queryParam.subareaSn = undefined
       this.queryParam.syncFlag = undefined

+ 1 - 0
src/views/salesReturnManagement/salesReturn/queryPart.vue

@@ -52,6 +52,7 @@
       <template slot="returnReason" slot-scope="text, record">
         <div @dblclick.stop>
           <a-select
+            size="small"
             style="width:100%;"
             v-model="record.returnReason"
             placeholder="请选择退货原因"