| 
					
				 | 
			
			
				@@ -30,8 +30,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     <el-option v-for="(item,index) in item.dicData" :label="item.label" :value="item.value" :key="index"></el-option> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   </el-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                <selectComponent v-else-if="item.prop === 'corps'" v-model="form[item.prop]" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                 :configuration="configuration" style="width: 100%"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <crop-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-else-if="item.prop === 'corps'" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  v-model="form[item.prop]" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  :multiple="true" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  corpType="KH" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                  style="width: 100%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ></crop-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<!--                <selectComponent v-else-if="item.prop === 'corps'" v-model="form[item.prop]"--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<!--                                 :configuration="configuration" style="width: 100%"/>--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-input type="textarea" v-else-if="item.type === 'textarea'" v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" :disabled="item.disabled?item.disabled:false"></el-input> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               </el-form-item> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,6 +68,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <span> {{ row.code }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <template slot="corpId" slot-scope="{ row, index }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <crop-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                v-if="row.$cellEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                v-model="row.corpId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :cropIndex="index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                corpType="GYS" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @getCorpData="getcorpId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :disabled="detailData.seeDisabled" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              ></crop-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <span v-else>{{ row.corpName }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <template slot="menuLeft"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 type="primary" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -108,6 +126,17 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <span> {{ row.code }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <template slot="corpId" slot-scope="{ row, index }"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <crop-select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                v-if="row.$cellEdit" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                v-model="row.corpId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :cropIndex="index" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                corpType="GYS" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                @getCorpData="getcorpFeesId" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                :disabled="detailData.seeDisabled" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              ></crop-select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <span v-else>{{ row.corpName }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <template slot="menuLeft"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 type="primary" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -204,6 +233,7 @@ import { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   saveSell 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } from "@/api/basicData/customerInquiry"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import goodsOption from "./configuration/commodity.json"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { contrastObj, contrastList } from "@/util/contrastData"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: "detailsPage", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -363,22 +393,15 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 1特价 2买赠 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       salesType: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       reData: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      oldForm: {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      oldSpecialOffer: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      oldBuyFree: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   //初始化查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   created() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     if (this.detailData.id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      detail(this.detailData.id).then(res =>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.form = res.data.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (this.form.corpNameList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          this.configuration.dicData = this.form.corpNameList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        this.form.corps = this.form.corps.split(',') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (res.data.data.specialItemList) this.contactsData = res.data.data.specialItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (res.data.data.presentItemList) this.contactsDataBuyFree = res.data.data.presentItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        delete this.form.specialItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        delete this.form.presentItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.queryData(this.detailData.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.form = {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.contactsData = [] 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -395,6 +418,25 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    queryData(id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.openFullScreen(false, '正在努力的加载...'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      detail(id).then(res =>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.form = res.data.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (this.form.corpNameList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.configuration.dicData = this.form.corpNameList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.form.corps = this.form.corps.split(',') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (res.data.data.specialItemList) this.contactsData = res.data.data.specialItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (res.data.data.presentItemList) this.contactsDataBuyFree = res.data.data.presentItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.oldForm = Object.assign({}, this.form) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.oldSpecialOffer = this.deepClone(this.contactsData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.oldBuyFree = this.deepClone(this.contactsDataBuyFree) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete this.form.specialItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        delete this.form.presentItemList 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }).finally(() => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.openFullScreen(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     rePick(row, index,type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.reData = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ...row, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -502,6 +544,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (this.salesType == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.selectionList.forEach(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            console.log(item) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.contactsData.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               itemId: item.id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               code: item.code, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -509,6 +552,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               productCategory: item.goodsTypeName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               typeno: item.typeno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               brandItem: item.brandItem, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              corpId:item.corpId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              corpName:item.corpName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               purchasePrice: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               salesPrice: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               specialOffer: '', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -526,6 +571,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               productCategory: item.goodsTypeName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               typeno: item.typeno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               brandItem: item.brandItem, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              corpName:item.corpName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               purchasePrice: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               salesPrice: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               purchaseAmount: '', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -538,6 +584,7 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.dialogVisible = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      console.log(this.contactsData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //买赠列表信息保存触发 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     rowSaveBuyFree(row, done, loading) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -631,18 +678,19 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //修改提交触发 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     editCustomer() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      console.log(this.form) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs["form"].validate((valid) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.form.corps = this.form.corps.join(',') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.form.specialItemList = this.contactsData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.form.presentItemList = this.contactsDataBuyFree 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.openFullScreen(false, '正在努力的加载...'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           typeSave(this.form).then(res=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               type: "success", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               message: this.form.id ? "修改成功!" : "新增成功!" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            this.backToList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            // this.backToList() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            this.queryData(res.data.data.id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return false; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -652,11 +700,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //返回列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     backToList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$emit("goBack"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // this.$router.$avueRouter.closeTag(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // this.$router.push({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      //   path: '/maintenance/salesPolicy/index', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      //   query: {} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      // }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     async saveGoodsColumn() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // const inSave = await this.saveColumnData( 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -668,7 +711,23 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       //   //关闭窗口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       //   this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //遮罩层 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    openFullScreen(res, text) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const loading = this.$loading({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        lock: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        text: text, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        spinner: 'el-icon-loading', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        background: 'rgba(0, 0, 0, 0.7)' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (res === true) loading.close(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getcorpId(row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.contactsData[row.index].corpId = row.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    getcorpFeesId(row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.contactsDataBuyFree[row.index].corpId = row.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 |