| 
					
				 | 
			
			
				@@ -7,7 +7,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a id="custConfirm-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <span style="margin: 0 15px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <span style="margin: 0 10px;color: #666;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            退货类别:{{ordeDetail&&ordeDetail.goodFlagDictValue}} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            退货类别:{{ ordeDetail&&ordeDetail.goodFlagDictValue }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </a-page-header> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -30,7 +30,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-button style="margin-left:5px;" :loading="loading" @click="openPlSetReason">批量设置退货原因</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <span style="margin-left:10px;" v-if="selNums">已选{{ selNums }}项</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-button type="primary" :loading="loading" class="button-info" @click="setNewSalesRetrunOrder">生成新销退单</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <div style="float:right;color:#999;margin-top:8px;">说明:红色行表示收货时新增的产品;黄色表示客服确认时新增的产品;退货原因文字显示红色表示退货原因和退货类别不一致;</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <div style="float:right;color:#999;margin-top:8px;">说明:红色行表示收货时新增的产品;黄色行表示客服确认时新增的产品;退货原因文字显示红色表示退货原因和退货类别不一致;</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <!-- 已选配件列表 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <s-table 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -120,11 +120,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 退货原因 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="returnReason" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <returnReason v-if="record.isEdit" v-model="record.returnReasonCode"></returnReason> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span v-else>{{ record.returnReason||'--' }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span v-else title="退货原因和退货类别不一致" :style="{color:record.needHandleFlag==1?'red':''}">{{ record.returnReason||'--' }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 备注 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="remarks" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <a-input v-if="record.isEdit" size="small" :maxlength="50" v-model.trim="record.returnReasonRemarks" allowClear placeholder="请输入备注信息(最多50字符)"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <a-input 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-if="record.isEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              :maxlength="50" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-model.trim="record.returnReasonRemarks" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              allowClear 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              placeholder="请输入备注信息(最多50字符)"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <span v-else>{{ record.returnReasonRemarks||'--' }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 操作 --> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -203,6 +209,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <div><returnReason size="large" 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="50" placeholder="请输入备注(最多50字符)" v-model="plReturnRemark"></a-input></div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </div> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -237,6 +246,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       tableHeight: 0, // 表格高度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       orderSn: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       disabled: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      showEditRemarks: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ordeDetail: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       loading: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       queryParam: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -269,7 +279,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       returnReasonList: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       openProductModal: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       plReturnReason: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      plReturnRemark: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      plReturnRemark: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       showPlModal: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       labelCol: { span: 8 }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       wrapperCol: { span: 14 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -279,12 +289,13 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     showPlModal (newValue, oldValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       if (!newValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.plReturnReason = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.plReturnRemark = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.plReturnRemark = undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.showEditRemarks = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   computed: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    goodFlag() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    goodFlag () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return this.ordeDetail && this.ordeDetail.goodFlag || '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     selNums () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -336,7 +347,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           arr.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             snList.push(item.salesReturnDetailSn) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesReturnAgainCreate({ sourceBillSn: _this.orderSn,salesReturnBillDetailSnList: snList }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesReturnAgainCreate({ sourceBillSn: _this.orderSn, salesReturnBillDetailSnList: snList }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               _this.resetSearchForm(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -357,9 +368,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 添加产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     addProduct (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const a = this.$store.state.app.goodReturnReason.find(item => item.code == data.returnReasonCode) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const b = this.$store.state.app.defectiveReturnReason.find(item => item.code == data.returnReasonCode) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const goodFlag = a ? a.lookupCode : b.lookupCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const params = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         'salesReturnBillSn': this.orderSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         'salesReturnBillNo': this.ordeDetail.salesReturnBillNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        'goodFlag': goodFlag, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ...data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       insertByCustomerService(params).then(res => { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -411,10 +427,11 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         salesReturnDetailSetReason({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           salesReturnBillDetailSnList: snList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          salesReturnBillSn : this.orderSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          salesReturnBillSn: this.orderSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           returnReason: rows ? rows.dispName : '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           returnReasonCode: this.plReturnReason, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          returnReasonRemarks: this.plReturnRemark 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          returnReasonRemarks: this.plReturnRemark, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          goodFlag: rows.lookupCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.showPlModal = false 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -437,6 +454,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const rows = this.returnReasonlist.find(item => item.code == record.returnReasonCode) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       record.returnReason = rows ? rows.dispName : '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      record.goodFlag = rows.lookupCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       updateByCustomerService(record).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -481,8 +499,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getOrderDetail () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       salesReturnDetail({ sn: this.orderSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.ordeDetail = res.data || null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(res.data){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.returnReasonlist = [...this.$store.state.app.goodReturnReason,...this.$store.state.app.defectiveReturnReason] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (res.data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.returnReasonlist = [...this.$store.state.app.goodReturnReason, ...this.$store.state.app.defectiveReturnReason] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 |