| 
					
				 | 
			
			
				@@ -10,10 +10,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </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-item label="产品编码" prop="productCode"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-form-item label="产品编码"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-input id="custConfirm-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          <a-form-item label="产品名称" prop="productName"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <a-form-item label="产品名称"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-input id="custConfirm-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </a-form-item> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <a-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -44,7 +44,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 退货数量 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="qty" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-input-number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-if="record.addFlag == '0'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-if="record.isEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-model="record.qty" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :precision="0" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -52,12 +52,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :max="record.qty" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               placeholder="请输入" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               style="width: 100%;" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span v-else>--</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ record.qty }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 仓库实收数量 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="receiveQty" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-input-number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-if="record.addFlag == '0'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-if="record.isEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-model="record.receiveQty" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :precision="0" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -65,12 +67,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :max="999999" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               placeholder="请输入" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               style="width: 100%;" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span v-else>--</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ record.receiveQty }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 坏件数量 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="badQty" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-input-number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-if="record.addFlag == '0'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-if="record.isEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-model="record.badQty" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :precision="0" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -78,12 +82,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :max="999999" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               placeholder="请输入" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               style="width: 100%;" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span v-else>--</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ record.badQty }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 良品数量 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="goodQty" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-input-number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-if="record.addFlag == '0'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-if="record.isEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-model="record.goodQty" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :precision="0" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -91,12 +97,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :max="999999" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               placeholder="请输入" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               style="width: 100%;" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span v-else>--</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ record.goodQty }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 返库数量 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="backStockQty" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-input-number 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-if="record.addFlag == '0'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-if="record.isEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-model="record.backStockQty" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :precision="0" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -104,12 +112,14 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               :max="999999" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               placeholder="请输入" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               style="width: 100%;" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span v-else>--</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ record.backStockQty }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 退货原因 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="returnReason" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <a-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              v-if="record.addFlag == '0'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              v-if="record.isEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               style="width:100%;" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               v-model="record.returnReason" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               placeholder="请选择退货原因" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -118,22 +128,48 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 {{ item.dispName }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </a-select-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </a-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <span v-else>--</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <span v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {{ record.returnReasonDictValue||'--' }} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <!-- 操作 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <template slot="action" slot-scope="text, record"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              @click="handleEdit(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            >保存</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              @click="handleDel(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            >删除</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div v-if="record.isEdit"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :loading="loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @click="handleSave(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              >保存</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @click="handleCancel(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              >取消</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <div v-else> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @click="handleSetPrice(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              >设置退货单价</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                class="button-warning" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @click="handleEdit(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              >编辑</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :loading="loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type="link" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                class="button-error" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @click="handleDel(record)" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              >删除</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </s-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </a-card> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -148,64 +184,68 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         @click="handleSubmit()" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         id="salesReturn-handleSubmit">审核通过</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!-- 设置退货单价 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <setPriceModal 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ref="setPriceModal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      modalTit="设置退货单价" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :chooseData="chooseData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :openModal="showSetPriceModal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      @setOk="setPriceOk" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      @cancel="showSetPriceModal=false"></setPriceModal> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { commonMixin } from '@/utils/mixin' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { STable, VSelect } from '@/components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { salesReturnDetail, salesReturnCheck } from '@/api/salesReturn' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { salesReturnDetailList, updateByCustomerService, setReturnPrice } from '@/api/salesReturnDetail' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import setPriceModal from './setPriceModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { salesReturnDetail, customerServiceConfirm } from '@/api/salesReturn' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { salesReturnDetailList, updateByCustomerService, deleteByCustomerService } from '@/api/salesReturnDetail' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  name: 'SalesReturnCheck', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  name: 'CustConfirm', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   mixins: [commonMixin], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   components: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     STable, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    VSelect 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    VSelect, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    setPriceModal 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       spinning: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       tableHeight: 0, // 表格高度 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      orderId: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       orderSn: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      buyerSn: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       disabled: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      isInster: false, // 是否正在添加产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      ordeDetail: { discountAmount: 0 }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ordeDetail: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       loading: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // 已选产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      dataSource: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      productForm: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        salesReturnBillSn: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      queryParam: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        salesReturnBillSn: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        productName: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        productCode: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      chooseLoadData: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 加载数据方法 必须为 Promise 对象 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       loadData: parameter => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.disabled = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 查询总计 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.productForm.salesReturnBillSn = this.$route.params.sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return salesReturnDetailList(Object.assign(parameter, this.productForm)).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.queryParam.salesReturnBillSn = this.$route.params.sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return salesReturnDetailList(Object.assign(parameter, this.queryParam)).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           let data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             data = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             const no = (data.pageNo - 1) * data.pageSize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for (var i = 0; i < data.list.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               data.list[i].no = no + i + 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              data.list[i].isEdit = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               data.list[i].backStockQtyBackups = data.list[i].backStockQty 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.disabled = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.chooseLoadData = data.list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       rowSelectionInfo: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      queryParam: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        productCode: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        productName: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      returnReasonList: [] // 申请退货列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      returnReasonList: [], // 申请退货列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      showSetPriceModal: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      chooseData: [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   computed: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -224,7 +264,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '实际退货金额', dataIndex: 'totalAmount', align: 'center', width: '10%', customRender: function (text) { return ((text || text == 0) ? text : '--') } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '退货单价说明', dataIndex: 'priceRemark', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '退货原因', dataIndex: 'returnReason', width: '15%', align: 'center', scopedSlots: { customRender: 'returnReason' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       return arr 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -236,15 +276,16 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //  返回 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleBack () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$router.push({ name: 'receiveCheckList' }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$router.push({ name: 'salesReturnList', query: { closeLastOldTab: true } }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 添加 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleAdd (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 新增产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleAdd () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleDel (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 设置价格 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleSetPrice (record) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.chooseData = [record] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.showSetPriceModal = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 批量设置退货单价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handlePlss () { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -253,48 +294,63 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _this.$message.warning('请先选择产品!') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        content: '确认要批量设置退货单价吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          const obj = [] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRows.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            obj.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              salesReturnDetailSn: item.salesReturnDetailSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              backStockQty: item.qty 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.setPrice(obj) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.chooseData = _this.rowSelectionInfo.selectedRows 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.showSetPriceModal = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 保存编辑 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleEdit (record) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 设置价格成功 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    setPriceOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.showSetPriceModal = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.rowSelectionInfo = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.table.clearTable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.resetSearchForm(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 保存 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleSave (record) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!record.returnReason) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$message.warning('请先选择退货原因!') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.loading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       updateByCustomerService(record).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.resetSearchForm(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.loading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 设置退货单价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    setPrice (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.loading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      setReturnPrice(data).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.resetSearchForm(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 删除产品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleDel (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        content: '确认要删除吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        closable: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          _this.loading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          deleteByCustomerService({ salesReturnDetailSn: row.salesReturnDetailSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.resetSearchForm(true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _this.$message.info(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _this.loading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.loading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 编辑 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleEdit (record) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      record.isEdit = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 取消 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleCancel (record) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      record.isEdit = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.table.refresh() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 获取单据详细 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     getOrderDetail () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.rowSelectionInfo = null 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -302,35 +358,44 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.ordeDetail = res.data || null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //  重置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    resetSearchForm (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$refs.table.refresh(!!flag) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.getOrderDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 提交销售单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    // 审核销售单 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleSubmit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      salesReturnCheck({ salesReturnBillSn: this.orderSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.handleBack() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        content: '确认审核通过吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        closable: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          customerServiceConfirm({ salesReturnBillSn: _this.orderSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.handleBack() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //  重置 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    resetSearchForm (flag) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productName = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryParam.productCode = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.table.refresh(!!flag) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     pageInit () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$nextTick(() => { // 页面渲染完成后的回调 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         _this.setTableH() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.orderSn = this.$route.params.sn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.buyerSn = this.$route.params.buyerSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.rowSelectionInfo = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.table.clearTable() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.getOrderDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.returnReasonList = this.$store.state.app.returnReason 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.getOrderDetail() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     setTableH () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.tableHeight = window.innerHeight - 340 
			 |