| 
					
				 | 
			
			
				@@ -2,7 +2,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <div class="borderless"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <div class="customer-head"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <div class="customer-back"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    @click="backToList">返回列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </el-button> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -21,8 +20,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <basic-container style="margin-bottom: 10px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           <el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <el-col v-for="(item,index) in basicData.column" :key="index" :span="item.span?item.span:8"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<!--                <avue-input-tree v-if="item.prop === 'corpsTypeId'" leaf-only multiple :props="{label:'title'}"v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"/>--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-form-item label-width="150px" :label="item.label" :prop="item.prop" :rules="item.rules"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 <span v-else-if="item.type === 'select'"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   <el-select v-model="form[item.prop]" slot="prepend" style="width: 100%;" size="small" placeholder="请选择"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,8 +44,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               @row-update="rowUpdate" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               @row-del="rowDel"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <template slot="code" slot-scope="{row,index}"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <span style="float: left;padding-top: 2px">{{ row.code }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              <el-button type="text" size="mini" style="float: right" @click="commodityChoice(row)">选择</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <span style="margin-left: 12px;padding-top: 2px">{{ row.code }}</span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <el-button type="text" v-if="row.$cellEdit" size="mini" style="float: right" @click="commodityChoice(row,index)">选择</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <template slot-scope="{row,index}" slot="menu"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <el-button 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,11 +60,53 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </basic-container> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </el-form> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <el-dialog 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      title="导入商品" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      append-to-body 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      class="el-dialogDeep" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :visible.sync="dialogVisible" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      width="80%" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :close-on-click-modal="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :destroy-on-close="true" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :close-on-press-escape="false"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <el-row style="height: 0;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-col :span="5"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <el-scrollbar> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              <basic-container> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              </basic-container> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </el-scrollbar> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <el-col :span="19"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <basic-container> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <avue-crud :option="optionTwo" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       :table-loading="loading" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       :data="data" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       ref="crud" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       @refresh-change="refreshChange" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       @selection-change="selectionChange" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       :page.sync="page" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                       @on-load="onLoad"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            </avue-crud> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          </basic-container> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </el-col> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </el-row> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <span slot="footer" class="dialog-footer"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-button @click="dialogVisible = false">取 消</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <el-button type="primary" @click="importGoods()" :disabled="this.tableData.length == 1 ? false:true">导 入</el-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </span> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </el-dialog> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 <script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import customerContact from "./configuration/customerContact.json" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import {detail,corpsattn,typeSave} from "@/api/maintenance/priceManagement" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import commodity from "../../salesManagement/salesContract/config/commodity.json"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import {getList} from "@/api/basicData/configuration" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import {getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: "detailsPage", 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -158,7 +199,44 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      //导入商品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      detailsSelect:"", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      treeDeptId:'', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      tableData:[], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      dialogVisible: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      treeOption: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        nodeKey: 'id', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        lazy: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        treeLoad: function (node, resolve) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const parentId = (node.level === 0) ? 0 : node.data.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          getDeptLazyTreeTwo(parentId).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            resolve(res.data.data.map(item => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ...item, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                leaf: !item.hasChildren 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            })) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        addBtn: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        menu: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        size: 'small', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          labelText: '标题', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          label: 'title', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          value: 'value', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          children: 'children' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      optionTwo: commodity, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      loading: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      data: [], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      page: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        pageSize: 10, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        currentPage: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        total: 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   //初始化查询 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -232,9 +310,21 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //修改提交触发 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     editCustomer() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      console.log(this.form) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs["form"].validate((valid) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (valid) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //校验明细列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        let valids = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(this.contactsData.length !=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          this.contactsData.forEach((item) =>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if((!item.code || !item.bigCharacter) && valids){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              this.$message({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                type: "warning", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                message: "请检查明细列表第 "+(item.$index +1 )+" 行必填项" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              valids = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (valid && valids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           this.form.priceItemList = this.contactsData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           typeSave(this.form).then(res=>{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             this.$message({ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -248,6 +338,44 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //选择 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    commodityChoice(row,index){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.dialogVisible = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.detailsSelect = index 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //导入页左商品类型查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    nodeClick(data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.treeDeptId = data.id; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.page.currentPage = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.onLoad(this.page); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //刷新触发 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    refreshChange() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.treeDeptId = ''; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.page.currentPage = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.onLoad(this.page); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //选中触发 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    selectionChange(list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.tableData = list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //商品列表查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    onLoad(page, params = {}) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.loading = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        const data = res.data.data; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.page.total = data.total; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.data = data.records; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.loading = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //导入 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    importGoods(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(this.tableData){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.contactsData[this.detailsSelect].code = this.tableData[0].code; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.dialogVisible = !this.dialogVisible 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //返回列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     backToList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$router.$avueRouter.closeTag(); 
			 |