Pārlūkot izejas kodu

添加基础资料分页显示,以及销售订单的更改

caojunjie 3 gadi atpakaļ
vecāks
revīzija
8c6b0a7d5d

+ 3 - 1
src/views/basicData/basicFeesDesc/index.vue

@@ -15,6 +15,7 @@
                    :data="dataList"
                    ref="crud"
                    v-model="form"
+                   :page.sync="page"
                    @row-del="rowDel"
                    @row-update="rowUpdate"
                    :before-open="beforeOpen"
@@ -176,6 +177,7 @@ export default {
       this.onLoad(this.page, params);
       done()
     },
+    //搜索重置按钮触发
     searchReset() {
       this.query = {};
       this.treeDeptId = '';
@@ -194,7 +196,7 @@ export default {
       console.log('1')
     },
     onLoad(page, params = {parentId:0}) {
-      let queryParams = Object.assign({}, params, {pageSize: page.pageSize, pageNum: page.currentPage,parentId:0,feesTypeId:this.treeDeptId})
+      let queryParams = Object.assign({}, params, {size: page.pageSize, current: page.currentPage,parentId:0,feesTypeId:this.treeDeptId})
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total

+ 5 - 0
src/views/basicData/basicFeesType/index.vue

@@ -4,6 +4,7 @@
                :data="dataList"
                ref="crud"
                v-model="form"
+               :page.sync="page"
                @row-del="rowDel"
                @row-update="rowUpdate"
                :before-open="beforeOpen"
@@ -163,12 +164,16 @@ export default {
       const {createTimeA} = this.query;
       let values = {
         ...params,
+        size:this.page.pageSize,
+        current:this.page.currentPage
       };
       if (createTimeA) {
         values = {
           ...params,
           createTime: createTimeA[0] + ' 00:00:00',
           endTime: createTimeA[1] + ' 23:59:59',
+          size:this.page.pageSize,
+          current:this.page.currentPage,
           ...this.query
         };
         values.createTimeA = null;

+ 5 - 1
src/views/basicData/basicStorageDesc/index.vue

@@ -15,6 +15,7 @@
                    :data="dataList"
                    ref="crud"
                    v-model="form"
+                   :page.sync="page"
                    @row-del="rowDel"
                    @row-update="rowUpdate"
                    :before-open="beforeOpen"
@@ -130,6 +131,9 @@ export default {
         this.page.currentPage = 1;
         this.onLoad(this.page, {});
         done()
+      }, error => {
+        window.console.log(error);
+        loading();
       })
     },
     //查询全部
@@ -193,7 +197,7 @@ export default {
       console.log('1')
     },
     onLoad(page, params = {parentId:0}) {
-      let queryParams = Object.assign({}, params, {pageSize: page.pageSize, pageNum: page.currentPage,parentId:0,storageTypeId:this.treeDeptId})
+      let queryParams = Object.assign({}, params, {size: page.pageSize, current: page.currentPage,parentId:0,storageTypeId:this.treeDeptId})
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total

+ 2 - 1
src/views/basicData/basicStorageType/index.vue

@@ -4,6 +4,7 @@
                :data="dataList"
                ref="crud"
                v-model="form"
+               :page.sync="page"
                @row-del="rowDel"
                @row-update="rowUpdate"
                :before-open="beforeOpen"
@@ -159,7 +160,7 @@ export default {
       console.log('1')
     },
     onLoad(page, params = {parentId:0}) {
-      let queryParams = Object.assign({}, params, {pageSize: page.pageSize, pageNum: page.currentPage})
+      let queryParams = Object.assign({}, params, {size: page.pageSize, current: page.currentPage})
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total

+ 6 - 2
src/views/basicData/commodityCategory/index.vue

@@ -4,6 +4,7 @@
                :data="dataList"
                ref="crud"
                v-model="form"
+               :page.sync="page"
                @row-del="rowDel"
                @row-update="rowUpdate"
                :before-open="beforeOpen"
@@ -157,17 +158,20 @@ export default {
       console.log('1')
     },
     onLoad(page, params = {}) {
-
       const {createTimeA} = this.query;
       let values = {
         ...params,
+        size:this.page.pageSize,
+        current:this.page.currentPage
       };
       if (createTimeA) {
         values = {
           ...params,
           createTime: createTimeA[0] + ' 00:00:00',
           endTime: createTimeA[1] + ' 23:59:59',
-          ...this.query
+          size:this.page.pageSize,
+          current:this.page.currentPage,
+          ...this.query,
         };
         values.createTimeA = null;
       }

+ 1 - 0
src/views/basicData/commodityType/index.vue

@@ -564,6 +564,7 @@ export default {
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
         const data = res.data.data;
         this.page.total = data.total;
+        console.log(res)
         this.data = data.records;
         this.loading = false;
         this.selectionClear();

+ 7 - 1
src/views/basicData/customerCategory/index.vue

@@ -4,6 +4,7 @@
                :data="dataList"
                ref="crud"
                v-model="form"
+               :page.sync="page"
                @row-del="rowDel"
                @row-update="rowUpdate"
                :before-open="beforeOpen"
@@ -157,13 +158,17 @@ export default {
       const {createTimeA} = this.query;
       let values = {
         ...params,
+        size:this.page.pageSize,
+        current:this.page.currentPage
       };
       if (createTimeA) {
         values = {
           ...params,
           createTime: createTimeA[0] + ' 00:00:00',
           endTime: createTimeA[1] + ' 23:59:59',
-          ...this.query
+          ...this.query,
+          size:this.page.pageSize,
+          current:this.page.currentPage
         };
         values.createTimeA = null;
       }
@@ -173,6 +178,7 @@ export default {
         console.log(res.data.data.records)
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        console.log(this.page)
       })
     },
     //树桩列点击展开触发

+ 3 - 3
src/views/basicData/customerInformation/detailsPage.vue

@@ -19,7 +19,7 @@
         <containerTitle title="基础资料"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in basicData.column" :span="item.span?item.span:8">
+            <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 disabled v-if="item.prop === 'companytype'" leaf-only multiple :props="{label:'title'}" v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"></avue-input-tree>
                 <el-input type="age" disabled v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
@@ -30,7 +30,7 @@
         <containerTitle title="联系方式"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in contactInformation.column" :span="item.span?item.span:8">
+            <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-input type="age" disabled v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
               </el-form-item>
@@ -40,7 +40,7 @@
         <containerTitle title="财务资料"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in financialInformation.column" :span="item.span?item.span:8">
+            <el-col v-for="(item,index) in financialInformation.column" :key="index" :span="item.span?item.span:8">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-switch
                     disabled

+ 21 - 12
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -20,7 +20,7 @@
         <containerTitle title="基础资料"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in basicData.column" :span="item.span?item.span:8">
+            <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"
                 ></avue-input-tree>
@@ -32,7 +32,7 @@
         <containerTitle title="联系方式"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in contactInformation.column" :span="item.span?item.span:8">
+            <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-input type="age" v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
               </el-form-item>
@@ -42,7 +42,7 @@
         <containerTitle title="财务资料"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in financialInformation.column" :span="item.span?item.span:8">
+            <el-col v-for="(item,index) in financialInformation.column" :key="index" :span="item.span?item.span:8">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-switch
                     v-if="item.prop === 'creditstatus'"
@@ -529,15 +529,24 @@ export default {
           this.disabled = true
           typeSave(this.form).then(res => {
             console.log(res.data)
-            this.$message({
-              type: "success",
-              message: this.form.id ? "修改成功!" : "新增成功!"
-            });
-            this.$router.$avueRouter.closeTag();
-            this.$router.push({
-              path: '/basicData/customerInformation/index',
-              query: {}
-            });
+            if (res.data.data === "error"){
+              this.disabled = false
+              this.$message({
+                showClose: true,
+                message: res.data.msg,
+                type: 'error'
+              });
+            }else {
+              this.$message({
+                type: "success",
+                message: this.form.id ? "修改成功!" : "新增成功!"
+              });
+              this.$router.$avueRouter.closeTag();
+              this.$router.push({
+                path: '/basicData/customerInformation/index',
+                query: {}
+              });
+            }
           })
         } else {
           return false;

+ 6 - 2
src/views/basicData/customerInformation/index.vue

@@ -4,7 +4,7 @@
       <div class="box">
         <el-scrollbar>
           <basic-container>
-            <avue-tree :option="treeOption" :data="treeData" @node-click=""/>
+            <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
           </basic-container>
         </el-scrollbar>
       </div>
@@ -200,8 +200,10 @@ export default {
       this.onLoad(this.page, params);
       done()
     },
+    //搜索重置按钮触发
     searchReset() {
-      console.log('1')
+      this.treeDeptId = '';
+      this.onLoad(this.page);
     },
     selectionChange() {
       console.log('1')
@@ -219,7 +221,9 @@ export default {
       let queryParams = Object.assign({}, params, {size: page.pageSize, current: page.currentPage,corpsTypeId:this.treeDeptId})
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
+        console.log(res.data.data.total)
         this.page.total = res.data.data.total
+        console.log(this.page)
       })
     },
     //树桩列点击展开触发

+ 4 - 4
src/views/businessManagement/salesOrder/configuration/advantageProject.json

@@ -7,7 +7,7 @@
   "dialogWidth": "60%",
   "addBtn":false,
   "editBtn":false,
-  "addRowBtn":true,
+  "addRowBtn":false,
   "cellBtn":false,
   "cancelBtn":false,
   "tree": true,
@@ -20,10 +20,10 @@
   "column":[
     {
       "label": "费用名称",
-      "prop": "itemId",
+      "prop": "feeName",
       "index": 1,
       "width":100,
-      "cell": true,
+      "cell": false,
       "rules": [
         {
           "required": true,
@@ -36,7 +36,7 @@
       "prop": "code",
       "index": 2,
       "width":100,
-      "cell": true,
+      "cell": false,
       "rules": [
         {
           "required": true,

+ 6 - 6
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -5,7 +5,7 @@
   "searchShow": true,
   "addBtn":false,
   "editBtn":false,
-  "addRowBtn":true,
+  "addRowBtn":false,
   "cellBtn":false,
   "cancelBtn":false,
   "refreshBtn": false,
@@ -33,10 +33,10 @@
       ]
     },{
       "label": "类别",
-      "prop": "priceCategory",
+      "prop": "cname",
       "index": 1,
       "width":100,
-      "cell": true,
+      "cell": false,
       "rules": [
         {
           "required": true,
@@ -49,7 +49,7 @@
       "prop": "code",
       "index": 2,
       "width":100,
-      "cell": true,
+      "cell": false,
       "rules": [
         {
           "required": false,
@@ -62,7 +62,7 @@
       "prop": "typeno",
       "index": 3,
       "width":100,
-      "cell": true,
+      "cell": false,
       "rules": [
         {
           "required": false,
@@ -75,7 +75,7 @@
       "prop": "specificationAndModel",
       "index": 4,
       "width":100,
-      "cell": true,
+      "cell": false,
       "rules": [
         {
           "required": false,

+ 125 - 0
src/views/businessManagement/salesOrder/configuration/mainListCost.json

@@ -0,0 +1,125 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": false,
+  "searchShowBtn": false,
+  "menu": false,
+  "simplePage": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "viewBtn": true,
+  "menuWidth": 300,
+  "column": [
+    {
+      "label": "费用编号",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "width": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入费用编号",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "费用名称",
+      "prop": "cname",
+      "search": true,
+      "index": 2,
+      "width": 100,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入商品名称",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "币别",
+      "prop": "fcyno",
+      "search": true,
+      "index": 3,
+      "width": 100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入币别",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "计量单位",
+      "prop": "unitno",
+      "search": true,
+      "index": 4,
+      "width": 100,
+      "rules": [{
+        "required": false,
+        "message": "请输入计量单位",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "收付",
+      "type": "select",
+      "prop": "dc",
+      "search": true,
+      "index": 5,
+      "width": 100,
+      "dicData": [{
+        "label": "收",
+        "value": "D"
+      }, {
+        "label": "付",
+        "value": "C"
+      }],
+      "rules": [
+        {
+          "required": false,
+          "message": "请选择收付",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "费用类别",
+      "prop": "feesTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }]
+    },{
+      "label": "备注",
+      "prop": "remarks",
+      "index": 6,
+      "width":100,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入备注",
+          "trigger": "blur"
+        }
+      ]
+    }
+  ]
+}

+ 3 - 3
src/views/businessManagement/salesOrder/detailsPage.vue

@@ -19,7 +19,7 @@
         <containerTitle title="基础资料"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in basicData.column" :span="item.span?item.span:8">
+            <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 disabled v-if="item.prop === 'companytype'" leaf-only multiple :props="{label:'title'}" v-model="form[item.prop]" placeholder="请选择内容" type="tree" :dic="dic"></avue-input-tree>
                 <el-input type="age" disabled v-else v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
@@ -30,7 +30,7 @@
         <containerTitle title="联系方式"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in contactInformation.column" :span="item.span?item.span:8">
+            <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-input type="age" disabled v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
               </el-form-item>
@@ -40,7 +40,7 @@
         <containerTitle title="财务资料"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in financialInformation.column" :span="item.span?item.span:8">
+            <el-col v-for="(item,index) in financialInformation.column" :key="index" :span="item.span?item.span:8">
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-switch
                     disabled

+ 200 - 11
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -20,7 +20,7 @@
         <containerTitle title="基础资料"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in basicData.column" :span="item.span?item.span:8">
+            <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"-->
 <!--                ></avue-input-tree>-->
@@ -33,7 +33,7 @@
         <containerTitle title="发货信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
           <el-row>
-            <el-col v-for="item in contactInformation.column" :span="item.span?item.span:8">
+            <el-col v-for="(item,index) in contactInformation.column" :key="index" :span="item.span?item.span:8">
               <el-form-item :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"/>
                 <el-input v-else type="age" v-model="form[item.prop]" size="small" autocomplete="off"></el-input>
@@ -53,6 +53,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>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                   type="text"
@@ -61,12 +64,11 @@
               >{{row.$cellEdit?'保存':'修改'}}</el-button>
             </template>
             <template slot="menuLeft" slot-scope="{size}">
-              <el-button type="success"
-                         icon="el-icon-edit"
+              <el-button type="primary"
+                         icon="el-icon-plus"
                          size="small"
-                         plain
                          @click="dialogVisible = !dialogVisible"
-              >导入</el-button>
+              >新增</el-button>
             </template>
           </avue-crud>
         </basic-container>
@@ -81,6 +83,9 @@
               @row-update="rowUpdateProject"
               @row-del="rowDelProject"
           >
+            <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="choice(row)">选择</el-button>
+            </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
                   type="text"
@@ -88,6 +93,13 @@
                   @click="rowCellTwo(row,index)"
               >{{row.$cellEdit?'保存':'修改'}}</el-button>
             </template>
+            <template slot="menuLeft" slot-scope="{size}">
+              <el-button type="primary"
+                         icon="el-icon-plus"
+                         size="small"
+                         @click="costIncrease"
+              >新增</el-button>
+            </template>
           </avue-crud>
         </basic-container>
         <containerTitle title="附件上传"></containerTitle>
@@ -110,6 +122,7 @@
         :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">
@@ -136,14 +149,54 @@
       </el-row>
         <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="importGoods">导入</el-button>
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
+          <el-button type="primary" @click="importChoice" v-if="commodityData === true" :disabled="tableData.length !== 1">导入</el-button>
+        </span>
+    </el-dialog>
+    <el-dialog
+        title="导入费用"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="dialogCost"
+        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="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
+              </basic-container>
+            </el-scrollbar>
+          </div>
+        </el-col>
+        <el-col :span="19">
+          <basic-container>
+            <avue-crud :option="optionTwoCost"
+                       :table-loading="loadingCost"
+                       :data="dataCost"
+                       ref="crud"
+                       @refresh-change="refreshChangeCost"
+                       @selection-change="selectionChangeCost"
+                       :page.sync="pageCost"
+                       @on-load="onLoadCost">
+            </avue-crud>
+          </basic-container>
+        </el-col>
+      </el-row>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogCost = false">取 消</el-button>
+          <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
+          <el-button type="primary" @click="choiceCost" v-if="choiceData === true" :disabled="tableDataCost.length !== 1">导入</el-button>
         </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {customerList, typeSave, detail, deleteDetails,
+import {typeSave, detail, deleteDetails,
   corpstypeTree,
   corpsattn,
   corpsbank,
@@ -154,14 +207,27 @@ import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
 import bankOfDeposit from "./configuration/bankOfDeposit.json"
 import commodity from "./configuration/commodity.json"
-import {getDeptLazyTree} from "@/api/basicData/commodityType";
+import optionTwoCost from "./configuration/mainListCost.json"
+import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
 export default {
   name: "detailsPage",
   data() {
     return {
       form: {},
       data:[],
+      loadingCost:false,
+      choiceData:false,
+      commodityData:false,
+      dataCost:[],
+      choiceIndex:'',
+      dialogCost:false,
       treeDeptId:'',
+      treeDeptIdCost:'',
+      pageCost:{
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
       page:{
         pageSize: 10,
         currentPage: 1,
@@ -170,6 +236,31 @@ export default {
       loading:false,
       contactsForm: {},
       optionTwo:commodity,
+      optionTwoCost:optionTwoCost,
+      treeOptionCost:{
+        nodeKey: 'id',
+        lazy: true,
+        treeLoad: function (node, resolve) {
+          const parentId = (node.level === 0) ? 0 : node.data.id;
+          getDeptLazyTree(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'
+        }
+      },
       treeOption: {
         nodeKey: 'id',
         lazy: true,
@@ -201,6 +292,7 @@ export default {
       advantageProjectData: [],
       disabled:false,
       bankOfDepositData: [],
+      tableDataCost: [],
       dic:[],
       tableData:[],
       customerContact:customerContact,
@@ -210,7 +302,7 @@ export default {
         column: [
           {
             label: '销售金额',
-            prop: 'orderAmount',//无
+            prop: 'orderAmount',
             rules: [
               {
                 required: false,
@@ -621,9 +713,78 @@ export default {
       console.log(row)
       this.$refs.crudProject.rowCell(row, index)
     },
+    //费用新增触发
+    costIncrease(){
+      this.dialogCost = !this.dialogCost
+      this.choiceData = false
+    },
+    //点击费用明细选择触发
+    choice(row){
+      this.dialogCost = !this.dialogCost
+      this.choiceData = true
+      console.log(row)
+      this.choiceIndex = row.$index
+    },
+    //点击商品明细选择触发
+    commodityChoice(row){
+      this.dialogVisible = !this.dialogVisible
+      this.commodityData = true
+      console.log(row)
+      this.choiceIndexT = row.$index
+    },
+    //导入商品触发
+    importChoice(){
+      if (this.tableData.length === 1){
+        this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
+        this.contactsData[this.choiceIndexT].code = this.tableData[0].code
+        this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
+        this.contactsData[this.choiceIndexT].specificationAndModel = this.tableData[0].specificationAndModel
+        this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
+      }
+      this.dialogVisible = !this.dialogVisible
+      this.commodityData = false
+    },
+    //费用编辑导入触发
+    choiceCost(){
+      console.log('1111')
+      if (this.tableDataCost.length === 1){
+        this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
+        this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
+        this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
+      }
+      this.dialogCost = !this.dialogCost
+      this.choiceData = false
+    },
+    //费用导入触发
+    importCost(){
+      console.log('111111')
+      // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
+      if (this.tableDataCost.length>0){
+        for(let item in this.tableDataCost){
+          console.log(this.tableDataCost[item])
+          this.tableDataCost[item].itemId = this.tableDataCost[item].id
+          this.tableDataCost[item].feeName = this.tableDataCost[item].cname
+          delete this.tableDataCost[item].id
+          this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
+          this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length-1)
+        }
+      }
+      this.tableDataCost = []
+      this.dialogCost = false
+    },
     //确认导入触发
     importGoods(){
-      this.contactsData = this.contactsData.concat(this.tableData)
+      // this.contactsData = this.contactsData.concat(this.tableData)
+      if (this.tableData.length>0){
+        for(let item in this.tableData){
+          console.log(this.tableData[item])
+          this.tableData[item].itemId = this.tableData[item].id
+          delete this.tableData[item].id
+          this.$refs.crudContact.rowCellAdd(this.tableData[item]);
+          this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length-1)
+        }
+      }
+      this.tableData = []
       this.dialogVisible = false
     },
     //选中触发
@@ -631,17 +792,33 @@ export default {
       console.log(list);
       this.tableData = list
     },
+    //费用选中触发
+    selectionChangeCost(list){
+      console.log(list);
+      this.tableDataCost = list
+    },
     nodeClick(data) {
       this.treeDeptId = data.id;
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    nodeClickCost(data){
+      this.treeDeptIdCost = data.id;
+      this.pageCost.currentPage = 1;
+      this.onLoadCost(this.pageCost);
+    },
     //刷新触发
     refreshChange() {
       this.treeDeptId = '';
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
+    //费用刷新触发
+    refreshChangeCost() {
+      this.treeDeptIdCost = '';
+      this.pageCost.currentPage = 1;
+      this.onLoadCost(this.pageCost);
+    },
     //新增商品信息保存触发
     rowSave(row, done, loading){
       console.log(row)
@@ -698,6 +875,18 @@ export default {
         this.loading = false;
       });
     },
+    //费用查询
+    onLoadCost(page, params = {}) {
+      this.loadingCost = true;
+      let queryParams = Object.assign({}, params, {pageSize: page.pageSize, pageNum: page.currentPage,parentId:0,feesTypeId:this.treeDeptIdCost})
+      customerList(queryParams).then(res => {
+        console.log(res)
+        const data = res.data.data;
+        this.pageCost.total = data.total;
+        this.dataCost = data.records;
+        this.loadingCost = false;
+      });
+    },
     //删除费用明细触发
     rowDelProject(row, index, donerowDel) {
       this.$confirm("确定将选择数据删除?", {

+ 2 - 2
src/views/businessManagement/salesOrder/index.vue

@@ -175,8 +175,8 @@ export default {
     },
     onLoad(page, params = {parentId: 0}) {
       let queryParams = Object.assign({}, params, {
-        pageSize: page.pageSize,
-        pageNum: page.currentPage,
+        size: page.pageSize,
+        current: page.currentPage,
         corpsTypeId: this.treeDeptId
       })
       customerList(queryParams).then(res => {