qinbai 3 years ago
parent
commit
879c189d02

+ 9 - 0
src/api/workManagement/mainProject.js

@@ -84,3 +84,12 @@ export function getPidByItemId(itemId) {
     }
   })
 }
+
+//远程模糊查询username
+export function getUserList(params) {
+  return request({
+    url: '/api/blade-user/userList',
+    method: 'get',
+    params:{params}
+  })
+}

+ 0 - 16
src/components/bill/billApplication.vue

@@ -110,22 +110,6 @@
         };
         this.show = false;
       },
-      rowDel(row, index, done) {
-        if(row.id){
-          this.$confirm("确定将选择数据删除?", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(() => {
-            remove(row.id).then(res =>{
-              if(res.data.success){
-                this.$message.success("操作成功!");
-                this.onLoad(this.page);
-              }
-            })
-          });
-        }
-      },
       //点击搜索按钮触发
       searchChange(params, done) {
         this.query = params;

+ 126 - 0
src/components/mainProject/index.vue

@@ -0,0 +1,126 @@
+<template>
+  <div>
+    <el-row style="height: 0;">
+      <el-col :span="5" >
+        <div>
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree :option="serviceTreeOption"  @node-click="serviceNodeClick"/>
+            </basic-container>
+          </el-scrollbar>
+        </div>
+      </el-col>
+      <el-col :span="19">
+        <basic-container>
+          <avue-crud ref="serviceCrud"
+                     :page.sync="servicePage"
+                     :search.sync="serviceSearch"
+                     :option="serviceOption"
+                     :table-loading="serviceLoading"
+                     :data="serviceData"
+                     @refresh-change="serviceRefreshChange"
+                     @selection-change="serviceSelectionChange"
+                     @search-change="serviceSearchChange"
+                     @on-load="serviceOnLoad">
+          </avue-crud>
+        </basic-container>
+      </el-col>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+          <el-button type="primary" size="small" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
+         <el-button size="small" @click="$emit('chose')">取 消</el-button>
+        </span>
+  </div>
+</template>
+
+<script>
+import serviceOption from "../../views/workManagement/main-items/configuration/serviceDialogList.json";
+import {getServiceProjectList,getServiceTypeTree,} from "@/api/workManagement/serviceProject";
+
+export default {
+  data() {
+    return {
+      serviceTreeOption: {
+        nodeKey: 'id',
+        lazy: true,
+        treeLoad: function(node, resolve) {
+          const parentId = node.level === 0 ? 0 : node.data.id;
+          getServiceTypeTree(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'
+        }
+      },
+      serviceOption:serviceOption,
+      serviceLoading:false,
+      serviceData:[],
+      servicePage:{
+        currentPage: 1,
+        total: 0,
+        pageSize: 10
+      },
+      serviceSearch:{},
+      serviceTreeDeptId:"",
+      serviceSelectList:[],
+    };
+  },
+  props: {
+    chose:{
+      type: Function
+    }
+  },
+  methods: {
+    //服务窗口事件
+    serviceNodeClick(data) {
+      this.serviceTreeDeptId = data.id;
+      this.serviceOnLoad(this.servicePage);
+    },
+    serviceRefreshChange(){
+      this.serviceOnLoad(this.servicePage, this.serviceSearch)
+    },
+    serviceSearchChange(params, done){
+      this.serviceOnLoad(this.servicePage, params)
+      done();
+    },
+    serviceSelectionChange(row){
+      this.serviceSelectList = row;
+    },
+    serviceOnLoad(page, params = {}) {
+      this.serviceLoading = true;
+      getServiceProjectList(page.currentPage, page.pageSize, params, this.serviceTreeDeptId).then(res => {
+        this.serviceData = res.data.data.records
+        this.servicePage.total = res.data.data.total
+        this.serviceLoading = false
+      })
+    },
+    serviceConfirm(){
+      if(this.serviceSelectList.length != 0){
+        this.$emit("serviceConfirm",this.serviceSelectList)
+      }
+      this.serviceSelectList = []
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+  .dialog-footer {
+    display: flex;
+    float: right;
+  }
+</style>

+ 1 - 1
src/components/selectComponent/userSelect.vue

@@ -103,7 +103,7 @@
         form: {},
         dicData: [],
         dialogVisible: false,
-        value: '',
+        value: null,
         option: option,
         parentId: 0,
         dataList: [],

+ 0 - 16
src/views/financialManagement/billDetails/billDetails.vue

@@ -96,22 +96,6 @@
         };
         this.show = false;
       },
-      rowDel(row, index, done) {
-        if(row.id){
-          this.$confirm("确定将选择数据删除?", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(() => {
-            remove(row.id).then(res =>{
-              if(res.data.success){
-                this.$message.success("操作成功!");
-                this.onLoad(this.page);
-              }
-            })
-          });
-        }
-      },
       //点击搜索按钮触发
       searchChange(params, done) {
         this.query = params;

+ 1 - 1
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -336,7 +336,7 @@
       })
 
       if (this.detailData.id) {
-        this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
+        this.id = this.detailData.id;//字符串转数字  超长用BigInt
         getDetail(this.id).then(res => {
           this.afterEcho(res.data.data)
         })

+ 1 - 1
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -334,7 +334,7 @@
         this.currencyDic = res.data.data
       })
       if (this.detailData.id) {
-        this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
+        this.id = this.detailData.id;//字符串转数字  超长用BigInt
         getDetail(this.id).then(res => {
           this.afterEcho(res.data.data)
         })

+ 0 - 23
src/views/salesManagement/salesContract/index.vue

@@ -7,7 +7,6 @@
                :page.sync="page"
                :search.sync="search"
                @row-del="rowDel"
-               @row-update="rowUpdate"
                :before-open="beforeOpen"
                :before-close="beforeClose"
                @row-save="rowSave"
@@ -139,20 +138,6 @@ export default {
         this.onLoad(this.page);
       });
     },
-    //修改时的修改按钮点击触发
-    rowUpdate(row, index, done, loading) {
-      typeSave(row).then(() => {
-        this.$message({
-          type: "success",
-          message: "操作成功!"
-        });
-        // 数据回调进行刷新
-        done(row);
-      }, error => {
-        window.console.log(error);
-        loading();
-      });
-    },
     //新增修改时保存触发
     rowSave(row, done, loading) {
       typeSave(row).then(res => {
@@ -160,14 +145,6 @@ export default {
         done()
       })
     },
-    //查询全部
-    initData() {
-      customerList().then(res => {
-        console.log(this.form);
-        const column = this.findObject(this.option.column, "parentId");
-        column.dicData = res.data.data.records;
-      });
-    },
     //新增子项触发
     handleAdd(row) {
       this.parentId = row.id;

+ 10 - 8
src/views/workManagement/main-items/detailsPage.vue

@@ -35,7 +35,10 @@
                 </el-select>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
                 <el-input type="textarea" v-else-if="(item.prop === 'remark')" v-model="form[item.prop]"   size="small" autocomplete="off" placeholder="请输入"></el-input>
-                <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]"  @change="debitChange"  :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
+                <el-input type="age" v-else-if="item.prop === 'debitAmount'" v-model="form[item.prop]"  @change="debitChange"  :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
+                  <template   slot="append">元</template>
+                </el-input>
+                <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]"   :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
                   <template   slot="append">元</template>
                 </el-input>
                 <el-input type="age" v-else v-model="form[item.prop]"  :disabled="item.disabled?true:false" size="small" value="0" autocomplete="off" placeholder="请输入">
@@ -351,7 +354,6 @@
             },{
               label: '合同金额',
               prop: 'debitAmount',
-              type:'unit',
               rules: [
                 {
                   required: true,
@@ -878,13 +880,12 @@
       pleaseCheck(){
         this.crudSelection.forEach(item =>{
           updateItemStatus(this.data[item.$index].id,1).then(res =>{
-            if(res.data.success){
-            }
+
           })
-            this.$message({
-              type: "success",
-              message: "请核成功!"
-            });
+          this.$message({
+            type: "success",
+            message: "请核成功!"
+          });
           //刷新列表
           this.getProjectDetail();
         })
@@ -1005,6 +1006,7 @@
               price:item.price,
               unit:item.unit,
               frequency:item.rate,
+              projectType:0
             }
             this.$refs.crud.rowCellAdd(params);
             this.$refs.crud.rowCell(item, this.optionFrom.length-1)

+ 7 - 22
src/views/workManagement/main-items/list.vue

@@ -1,5 +1,6 @@
 <template>
-  <basic-container v-if="show">
+  <div>
+  <basic-container v-show="show">
     <avue-crud
       ref="crud"
       :data="data"
@@ -9,8 +10,6 @@
       :table-loading="loading"
       :summary-method="summaryMethod"
       @row-del="rowDel"
-      @row-update="rowUpdate"
-      @row-save="rowSave"
       @search-change="searchChange"
       @refresh-change="refreshChange"
       @on-load="getList"
@@ -22,11 +21,11 @@
           :configuration="configuration"
         ></select-component>
       </template>
-      <template slot="menuLeft" scope="{ row,index }">
+      <template slot="menuLeft" >
         <el-button type="primary"
                    size="small"
                    icon="el-icon-plus"
-                   @click="addMainItems(row)">新 单
+                   @click="addMainItems">新 单
         </el-button>
         <el-button size="small"
                    type="info"
@@ -58,11 +57,12 @@
     </avue-crud>
   </basic-container>
   <detail-page
+    v-if="!show"
     ref="detail"
     @goBack="goBack"
     :detailData="detailData"
-    v-else
   ></detail-page>
+  </div>
 </template>
 
 <script>
@@ -189,22 +189,6 @@ export default {
         });
       }
     },
-    //修改时的修改按钮点击触发
-    rowUpdate(row, index, done, loading) {
-      setTimeout(() => {
-        this.$message.success("修改成功");
-        loading();
-        done();
-      }, 1000);
-    },
-    //新增修改时保存触发
-    rowSave(row, done, loading) {
-      setTimeout(() => {
-        this.$message.success("保存成功");
-        loading();
-        done();
-      }, 1000);
-    },
     saveColumn(row, column) {
       console.log(row, column);
     },
@@ -244,6 +228,7 @@ export default {
     goBack() {
       this.detailData=this.$options.data().detailData
       this.show = true;
+      this.getList(this.page,this.search)
     },
   }
 };

+ 167 - 0
src/views/workManagement/receipt/configuration/settleAccountsDetailsADD.json

@@ -0,0 +1,167 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "addBtn": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 220,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "serviceCharge",
+      "type": "sum"
+    },
+    {
+      "name": "matMoney",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "状态",
+      "prop": "strStatus",
+      "type": "select",
+      "dicData": [{
+        "label": "录入",
+        "value": "追加"
+      }, {
+        "label": "录入",
+        "value": "退费"
+      }]
+    },
+    {
+      "label": "服务项目",
+      "prop": "pname",
+      "width": 120
+    },
+    {
+      "label": "收费建议",
+      "prop": "remarks",
+      "width": 150
+    },
+    {
+      "label": "服务费",
+      "prop": "serviceCharge",
+      "width": 120
+    },
+    {
+      "label": "代垫费",
+      "prop": "matMoney",
+      "width": 120
+    },
+    {
+      "label": "追加费",
+      "prop": "superaddition",
+      "hide": true,
+      "width": 120
+    },
+    {
+      "label": "合计金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 120
+    },
+    {
+      "label": "承做人",
+      "prop": "userid",
+      "slot": true,
+      "width": 180
+    },
+    {
+      "label": "任务部门",
+      "prop": "deptid",
+      "type":"tree",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
+      "props": {
+        "label": "title",
+        "value": "value"
+      },
+      "slot": true,
+      "cell": true,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+
+    {
+      "label": "频率",
+      "prop": "frequency",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=frequency",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "width": 120,
+      "cell": true
+    },
+    {
+      "label": "提醒日",
+      "prop": "reminderDay",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
+      "type": "date",
+      "width": 150,
+      "cell": true
+    },
+    {
+      "label": "需求开始日期",
+      "prop": "beginTime",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
+      "type": "date",
+      "width": 150,
+      "cell": true
+    },
+    {
+      "label": "需求完成日期",
+      "prop": "actualDate",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
+      "type": "date",
+      "width": 150,
+      "cell": true
+    },
+    {
+      "label": "制单人",
+      "prop": "createUserName",
+      "disabled": true,
+      "width": 120
+    },
+    {
+      "label": "制单日期",
+      "prop": "createTime",
+      "disabled": true,
+      "width": 150
+    },
+    {
+      "label": "最新修改人",
+      "prop": "updateUserName",
+      "width": 120
+    },
+    {
+      "label": "最新修改时间",
+      "prop": "updateTime",
+      "width": 150
+    }
+  ]
+}

+ 1 - 2
src/views/workManagement/receipt/configuration/settleAccountsDetailsPage.json

@@ -13,7 +13,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 220,
+  "menuWidth": 160,
   "showSummary": true,
   "summaryText": "合计",
   "sumColumnList": [
@@ -90,7 +90,6 @@
         "label": "title",
         "value": "value"
       },
-      "slot": true,
       "width": 150,
       "rules": [
         {

+ 158 - 0
src/views/workManagement/receipt/configuration/settleAccountsDetailsReturn.json

@@ -0,0 +1,158 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "addBtn": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 220,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "serviceCharge",
+      "type": "sum"
+    },
+    {
+      "name": "matMoney",
+      "type": "sum"
+    }
+  ],
+  "column": [
+    {
+      "label": "状态",
+      "prop": "strStatus"
+    },
+    {
+      "label": "服务项目",
+      "prop": "pname",
+      "width": 120
+    },
+    {
+      "label": "收费建议",
+      "prop": "remarks",
+      "width": 150
+    },
+    {
+      "label": "服务费",
+      "prop": "serviceCharge",
+      "width": 120
+    },
+    {
+      "label": "代垫费",
+      "prop": "matMoney",
+      "width": 120
+    },
+    {
+      "label": "退费",
+      "prop": "costReturn",
+      "hide": true,
+      "width": 120
+    },
+    {
+      "label": "合计金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 120
+    },
+    {
+      "label": "承做人",
+      "prop": "userid",
+      "slot": true,
+      "width": 180
+    },
+    {
+      "label": "任务部门",
+      "prop": "deptid",
+      "type":"tree",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
+      "props": {
+        "label": "title",
+        "value": "value"
+      },
+      "cell": true,
+      "slot": true,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
+      "label": "频率",
+      "prop": "frequency",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=frequency",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "width": 120,
+      "cell": true
+    },
+    {
+      "label": "提醒日",
+      "prop": "reminderDay",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
+      "type": "date",
+      "width": 150,
+      "cell": true
+    },
+    {
+      "label": "需求开始日期",
+      "prop": "beginTime",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
+      "type": "date",
+      "width": 150,
+      "cell": true
+    },
+    {
+      "label": "需求完成日期",
+      "prop": "actualDate",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
+      "type": "date",
+      "width": 150,
+      "cell": true
+    },
+    {
+      "label": "制单人",
+      "prop": "createUserName",
+      "disabled": true,
+      "width": 120
+    },
+    {
+      "label": "制单日期",
+      "prop": "createTime",
+      "disabled": true,
+      "width": 150
+    },
+    {
+      "label": "最新修改人",
+      "prop": "updateUserName",
+      "width": 120
+    },
+    {
+      "label": "最新修改时间",
+      "prop": "updateTime",
+      "width": 150
+    }
+  ]
+}

+ 32 - 9
src/views/workManagement/receipt/configuration/statisticalList.json

@@ -9,7 +9,7 @@
   "searchShow": true,
   "searchMenuPosition": "right",
   "tree": true,
-  "searchMenuSpan": 24,
+  "searchMenuSpan": 16,
   "searchSpan": 8,
   "searchIcon": true,
   "searchIndex": 2,
@@ -100,6 +100,29 @@
       ]
     },
     {
+      "label": "费用类型",
+      "prop": "projectType",
+      "overHidden": true,
+      "search": true,
+      "type": "select",
+      "dicData": [
+        {
+        "label": "正常",
+        "value": 0
+        },
+        {
+          "label": "追加",
+          "value": 1
+        },
+        {
+          "label": "退款",
+          "value": 2
+        }
+      ],
+      "index": 2,
+      "width": 80
+    },
+    {
       "label": "客户名称",
       "prop": "cornName",
       "overHidden": true,
@@ -135,14 +158,6 @@
       "width": 120
     },
     {
-      "label": "承做人",
-      "prop": "userName",
-      "index": 8,
-      "search": true,
-      "overHidden": true,
-      "width": 120
-    },
-    {
       "label": "任务部门",
       "prop": "deptName",
       "index": 9,
@@ -170,6 +185,14 @@
       "width":150
     },
     {
+      "label": "承做人",
+      "prop": "userName",
+      "index": 8,
+      "search": true,
+      "overHidden": true,
+      "width": 120
+    },
+    {
       "label": "频率",
       "prop": "frequency",
       "index": 12,

+ 27 - 3
src/views/workManagement/receipt/settleAccounts.vue

@@ -1,5 +1,6 @@
 <template>
-  <basic-container  v-if="show">
+  <div>
+  <basic-container  v-show="show">
     <avue-crud
       ref="crud"
       :data="data"
@@ -21,6 +22,22 @@
           :configuration="configuration"
         ></select-component>
       </template>
+      <template slot="userNameSearch">
+        <el-select
+          v-model="search.userName"
+          multiple
+          filterable
+          remote
+          reserve-keyword
+          :remote-method="remoteMethod">
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </template>
       <template slot-scope="{row,index}" slot="menuLeft">
         <el-button
           icon="el-icon-printer"
@@ -42,11 +59,12 @@
     </avue-crud>
   </basic-container>
   <detail-page
+    v-if="!show"
     ref="detail"
     @goBack="goBack"
     :detailData="detailData"
-    v-else
   ></detail-page>
+  </div>
 </template>
 
 <script>
@@ -91,7 +109,7 @@
         this.loading = true;
         params.flag = 1;
         if(params){
-          if (params.createTime != undefined) {  //发货
+          if (params.createTime != undefined && params.createTime.length !=0) {  //发货
             params.createStartDate = params.createTime[0]+ " " + "00:00:00";
             params.createEndDate = params.createTime[1] + " " + "23:59:59";
             this.$delete(params,'createTime')
@@ -147,6 +165,12 @@
       goBack() {
         this.detailData=this.$options.data().detailData
         this.show = true;
+
+        this.search.createTime[0] =  this.search.createStartDate
+        this.search.createTime[1] =  this.search.createEndDate
+        console.log(this.search)
+
+        this.getList(this.page,this.search)
       },
     }
   };

+ 285 - 39
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -28,7 +28,7 @@
                   <template   slot="append">元</template>
                 </el-input>
                 <selectComponent v-else-if="item.prop === 'corpId'" :disabled="item.disabled?true:false"  v-model="form[item.prop]" :configuration="configuration"/>
-                <el-input type="textarea" v-else-if="(item.prop === 'remark'||item.prop === 'settlementRemark')"v-model="form[item.prop]" :disabled="item.disabled && item.prop === 'remark'?true:false"  size="small" autocomplete="off" placeholder="请输入"></el-input>
+                <el-input type="textarea" v-else-if="(item.prop === 'remark'||item.prop === 'settlementRemark')" v-model="form[item.prop]" :disabled="item.disabled && item.prop === 'remark'?true:false"  size="small" autocomplete="off" placeholder="请输入"></el-input>
                 <el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入"></el-input>
               </el-form-item>
             </el-col>
@@ -47,38 +47,48 @@
                    @selection-change="selectionChange"
                    @current-change="currentChange"
                    @size-change="sizeChange"
+                   @row-update="rowUpdate"
                    @refresh-change="refreshChange">
           <template slot="menuLeft">
+            <el-tabs v-model="activeName" @tab-click="handleClick">
+              <el-tab-pane label="原始数据" name="first" :key="'first'">
+              </el-tab-pane>
+              <el-tab-pane label="追加" name="second" :key="'second'">
+              </el-tab-pane>
+              <el-tab-pane label="退款" name="three" :key="'three'">
+              </el-tab-pane>
+            </el-tabs>
+          </template>
+          <template slot="menuRight">
             <el-button
-              icon="el-icon-printer"
-              size="small"
               type="primary"
-              @click.stop="openReport()"
-            >报表
+              size="small"
+              v-if="secondDisable == 1  || secondDisable == 2 "
+              @click.stop="serviceDialog = true"
+            >录入明细
             </el-button>
+          </template>
+          <template slot-scope="scope" slot="menu">
             <el-button
-              icon="el-icon-printer"
+              type="text"
               size="small"
-              type="primary"
-              :disabled="selectList.length == 0"
-              @click.stop="costAdd()"
-            >追加代垫费
+              v-if="secondDisable == 1  || secondDisable == 2 "
+              @click="rowCell(scope.row,scope.index)"
+            >{{ scope.row.$cellEdit ? '修改完成' : '修改' }}
             </el-button>
             <el-button
-              icon="el-icon-printer"
+              type="text"
               size="small"
-              type="primary"
-              :disabled="selectList.length == 0"
-              @click.stop="costReturn()"
-            >退费
+              v-if="secondDisable == 1  || secondDisable == 2 "
+              @click="rowDel(scope.row,scope.index)"
+            >删除
             </el-button>
-          </template>
-          <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
               icon="el-icon-check"
               size="small"
-              v-if="scope.row.status == 4"
+              :disabled="!scope.row.id"
+              v-if="scope.row.status == 4 || secondDisable == 1  || secondDisable == 2 "
               @click.stop="beforeCloseAccount(scope.row,scope.index)"
             >结 算
             </el-button>
@@ -91,6 +101,74 @@
             >取消结算
             </el-button>
           </template>
+          <template slot="userid" slot-scope="{row,index}">
+            <span v-if="row.$cellEdit" class="required_fields">*</span>
+            <user-select
+              style="width:90% !important;"
+              v-if="row.$cellEdit"
+              v-model="row.userName"
+              @value="(values) => value(values,row)"
+              :configuration="UConfiguration"
+            >
+            </user-select>
+            <span v-else>{{ row.userName }}</span>
+          </template>
+          <template slot="amount" slot-scope="{ row }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.amount"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+            ></el-input>
+            <span v-else>{{ row.amount }}</span>
+          </template>
+          <template slot="serviceCharge" slot-scope="{ row }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.serviceCharge"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+              @input="costCount(row)"
+            ></el-input>
+            <span v-else>{{ row.serviceCharge }}</span>
+          </template>
+          <template slot="matMoney" slot-scope="{ row }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.matMoney"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+              @input="costCount(row)"
+            ></el-input>
+            <span v-else>{{ row.matMoney }}</span>
+          </template>
+          <template slot="costReturn" slot-scope="{ row }">
+            <span v-if="row.$cellEdit" class="required_fields">*</span>
+            <el-input
+              v-if="row.$cellEdit"
+              style="width:90% !important;"
+              v-model="row.costReturn"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+            ></el-input>
+            <span v-else>{{ row.costReturn }}</span>
+          </template>
+          <template slot="superaddition" slot-scope="{ row }">
+            <span v-if="row.$cellEdit" class="required_fields">*</span>
+            <el-input
+              v-if="row.$cellEdit"
+              style="width: 90%"
+              v-model="row.superaddition"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+            ></el-input>
+            <span v-else>{{ row.superaddition }}</span>
+          </template>
         </avue-crud>
       </basic-container>
       <containerTitle title="附件上传"></containerTitle>
@@ -106,6 +184,21 @@
       </basic-container>
     </div>
     <el-dialog
+      title="导入服务项目"
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="serviceDialog"
+      width="70%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false">
+      <service-component
+        @serviceConfirm="serviceConfirm"
+        @choce="choce"
+      >
+      </service-component>
+    </el-dialog>
+    <el-dialog
       title="结算"
       append-to-body
       class="el-dialogDeep"
@@ -133,12 +226,16 @@
 
 <script>
   import option from "./configuration/settleAccountsDetailsPage.json";
+  import optionAdd from "./configuration/settleAccountsDetailsADD.json";
+  import optionReturn from "./configuration/settleAccountsDetailsReturn.json";
   import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
   import { projectDetail,editMianProject,updateItemStatus } from "@/api/workManagement/mainProject";
   //业务字典
   import { getDictionary } from "@/api/system/dictbiz";
   //上传附件删除
   import { corpsbank } from "@/api/basicData/configuration"
+  import serviceComponent from "@/components/mainProject/index"
+  import _ from "lodash";
 
 
   export default {
@@ -148,10 +245,19 @@
         type: Object
       }
     },
+    components:{
+      serviceComponent
+    },
     data() {
       return {
         loading:false,
         accountDialog:false,
+        serviceDialog:false,
+        activeName: "first",
+        tab1:true,
+        tab2:false,
+        tab3:false,
+        secondDisable:0,
         aaccount:{},
         form: {},
         accountFormData:{
@@ -162,11 +268,21 @@
           trigger: 'blur'
         }
         ],
+        UConfiguration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
         option: option,
         parentId:0,
         account:{},
         paymentTerm:[],
         selectList:[],
+
         page: {
           pageSize: 10,
           pagerCount: 5,
@@ -330,14 +446,6 @@
               type:'datetime',
             },
             {
-              label: '追加代垫费',
-              prop: 'superaddition',
-            },
-            {
-              label: '退费',
-              prop: 'costReturn',
-            },
-            {
               label: '备注',
               span: 24,
               prop: 'remark',
@@ -351,8 +459,11 @@
             },
           ],
         },
-        //列表假数据
-        dataList : [],
+        dataList: [],
+        allDataList:[],
+        data_one:[],
+        data_two:[],
+        data_three:[],
         //上传文件
         upLoadOption: upLoadOption,
         upLoadData:[],
@@ -360,7 +471,7 @@
       }
     },
     created() {
-      this.id = BigInt(this.detailData.id);
+      this.id = this.detailData.id;
       this.getProjectDetail();
       const params = {
         code : "affair_payment_term"
@@ -373,24 +484,89 @@
 
     },
     methods: {
-      //追加代垫费
-      costAdd(){
-        this.selectList.forEach(item =>{
-
-        })
+      value(value,row){
+        row.userid = value.id
+        row.deptid = value.deptId
       },
-      //退费
-      costReturn(){
+      costCount(row){
+        if(row.serviceCharge && row.matMoney){
+          row.amount = _.add(parseFloat(row.serviceCharge),parseFloat(row.matMoney));
+        }
+      },
+      handleClick(tab) {
+        if(tab.name == "first") {
+          this.tab1 = true;
+          this.tab2 = false;
+          this.tab3 = false;
+
+          if(this.secondDisable == 1){
+            this.data_two = this.dataList
+          }
+          if(this.secondDisable == 2){
+            this.data_three = this.dataList
+          }
+
+          this.secondDisable = 0
+          this.option = option  //换option
+          this.dataList = this.data_one  //切换数据
+        } else if(tab.name == "second") {
+          this.tab1 = false;
+          this.tab2 = true;
+          this.tab3 = false;
+
+          if(this.secondDisable == 0){
+            this.data_one = this.dataList
+          }
+          if(this.secondDisable == 2){
+            this.data_three = this.dataList
+          }
 
+          this.secondDisable = 1
+          this.option = optionAdd
+          this.dataList = this.data_two
+        }else if(tab.name == "three") {
+          this.tab1 = false;
+          this.tab2 = false;
+          this.tab3 = true;
+
+          if(this.secondDisable == 0){
+            this.data_one = this.dataList
+          }
+          if(this.secondDisable == 1){
+            this.data_two = this.dataList
+          }
+
+          this.secondDisable = 2
+          this.option = optionReturn
+          this.dataList = this.data_three
+        }
       },
       getProjectDetail(){
         if(this.id){
-          projectDetail(this.id,"4,5").then(res =>{
+          projectDetail(this.id,"4,5,7,8").then(res =>{
             this.form = res.data.data;
             this.configuration.dicData   = res.data.data.corpName
             if(res.data.data.itemList){
               this.loading = true;
-              this.dataList = res.data.data.itemList;
+              this.allDataList = res.data.data.itemList;
+
+              this.allDataList.map(item =>{
+                if(item.projectType === 0){
+                  this.data_one.push(item)
+                }
+              })
+              this.allDataList.map(item =>{
+                if(item.projectType === 1){
+                  this.data_two.push(item)
+                }
+              })
+              this.allDataList.map(item =>{
+                if(item.projectType === 2){
+                  this.data_three.push(item)
+                }
+              })
+              this.dataList = this.data_one
+
               this.loading = false;
             }
             if(res.data.data.filesList){
@@ -451,13 +627,67 @@
       backToList(){
         this.$emit("goBack");
       },
+
+      serviceConfirm(list){
+        list.forEach((item)=>{
+          const params = {
+            strStatus:"录入",
+            pname:item.cname,
+            remarks:item.remarks,
+            price:item.price,
+            unit:item.unit,
+            frequency:item.rate,
+            projectType:this.secondDisable,
+            status:this.secondDisable === 1?7:8
+          }
+          this.$refs.crud.rowCellAdd(params);
+        })
+        this.serviceDialog = false
+      },
+      choce(){
+        this.serviceDialog = false
+      },
       //新增 修改
       editMainProject(){
+        if(this.secondDisable == 0){
+          this.dataList = this.data_one
+        }
+        if(this.secondDisable == 1){
+          this.dataList = this.data_two
+        }
+        if(this.secondDisable == 2){
+          this.dataList = this.data_three
+        }
+        this.allDataList = []
+        this.allDataList.push(...this.data_one,...this.data_two,...this.data_three)
+
+        for (let i = 0; i < this.allDataList.length; i++) {
+          if(this.allDataList[i].superaddition === (null || "") && this.allDataList[i].projectType === 1){
+            return this.$message.error(`请输入明细列表追加费必填项`);
+          }
+          if(this.allDataList[i].costReturn === (null || "") && this.allDataList[i].projectType === 2){
+            return this.$message.error(`请输入明细列表退费必填项`);
+          }
+          if(this.allDataList[i].userid === (null || "")){
+            return this.$message.error(`请输入明细列表承做人必填项`);
+          }
+          if(this.allDataList[i].deptid === (null || "")){
+            return this.$message.error(`请输入明细列表任务部门必填项`);
+          }
+
+          // if(this.allDataList[i].projectType === 2){
+          //   this.allDataList[i].serviceCharge = -this.allDataList[i].serviceCharge
+          //   this.allDataList[i].matMoney = -this.allDataList[i].matMoney
+          // }
+
+        }
+
         const params = {
           ...this.form,
-          itemList:this.dataList,
+          itemList:this.allDataList,
           filesList:this.upLoadData
         }
+
         editMianProject(params).then(res =>{
           if(res.data.success){
             this.$message({
@@ -483,6 +713,22 @@
       refreshChange() {
         console.log('1')
       },
+      rowCell(row, index) {
+        this.$refs.crud.rowCell(row, index);
+        // row.$cellEdit = !row.$cellEdit
+      },
+      rowUpdate(row, index, done, loading) {
+        done(row);
+      },
+      rowDel(row,index){
+        this.$confirm("确定将此明细删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.dataList.splice(index,1)
+        });
+      },
       //上传文件保存
       upLoadSave(row, done, loading){
         this.upLoadData.push(row)

+ 27 - 2
src/views/workManagement/receipt/statisticalList.vue

@@ -28,6 +28,22 @@
           v-model="search.cornId"
           :configuration="configuration"
         ></select-component>
+      <template slot="userNameSearch">
+        <el-select
+          v-model="search.userName"
+          multiple
+          filterable
+          remote
+          reserve-keyword
+          :remote-method="remoteMethod">
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+          </el-option>
+        </el-select>
+      </template>
       </template>
       <template slot-scope="scope" slot="menu">
         <el-button
@@ -43,7 +59,7 @@
 
 <script>
   import option from "./configuration/statisticalList.json";
-  import { getFlowList } from "@/api/workManagement/mainProject";
+  import { getFlowList,getUserList } from "@/api/workManagement/mainProject";
 
   export default {
     name: "statisticalList",
@@ -55,6 +71,7 @@
         option: option,
         parentId:0,
         dataList: [],
+        options:[],
         page: {
           currentPage: 1,
           total: 0,
@@ -91,6 +108,14 @@
       rowSave() {
 
       },
+      remoteMethod(query){
+        let params = {
+          realName : query
+        }
+        getUserList(params).then(res=>{
+          // res.data.data.
+        })
+      },
       check(row,index){
         if(this.$store.getters.mainItemStatus){
           this.$alert("主营项目页面已存在,请关闭主营项目再进行操作", "温馨提示", {
@@ -134,7 +159,7 @@
           params.payEndTime = params.payTime[1] + " " + "23:59:59";
           this.$delete(params,'payTime')
         }
-        if(!params.status){
+        if(!params.status && params.status!==0){
             params.status = "0,1,2,3,4,5,6";
         }
         this.loading = true

+ 6 - 7
src/views/workManagement/service-items/project.vue

@@ -34,7 +34,6 @@
           @cell-dblclick="cellDblclick"
           @on-load="getList"
           @saveColumn="saveColumn"
-          @tree-load="treeLoad"
         >
           <template slot="menuLeft">
             <el-button
@@ -227,12 +226,12 @@ export default {
       this.getList(this.page);
     },
     //列表内展开树节点
-    treeLoad(tree, treeNode, resolve) {
-      const parentId = tree.id;
-      getList({parentId:parentId}).then(res => {
-        resolve(res.data.data.records);
-      });
-    },
+    // treeLoad(tree, treeNode, resolve) {
+    //   const parentId = tree.id;
+    //   getServiceProjectList({parentId:parentId}).then(res => {
+    //     resolve(res.data.data.records);
+    //   });
+    // },
   }
 };
 </script>