Explorar o código

Merge branch 'dev' of git.echepei.com:caojunjie/Smart_platform_ui into dev

caojunjie %!s(int64=3) %!d(string=hai) anos
pai
achega
3b34df0819

+ 13 - 0
src/api/statisticAnalysis/taskStatistics.js

@@ -0,0 +1,13 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/trade-project/project/statistics/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
+}

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

@@ -159,4 +159,12 @@ export function dispatch(data) {
     method: 'post',
     data:data
   })
+}
+
+export function updateProjectItem(data) {
+  return request({
+    url: '/api/trade-project/project/updateProjectItem',
+    method: 'post',
+    data:data
+  })
 }

+ 3 - 0
src/enums/column-name.js

@@ -780,6 +780,9 @@ const columnName = [{
 }, {
   code: 185,
   name: '销售利润(N)-列表页'
+}, {
+  code: 186,
+  name: '事务管理-任务'
 }
 ]
 export const getColumnName = (key) => {

+ 3 - 0
src/page/index/tags.vue

@@ -306,6 +306,9 @@ export default {
         if (tag.label == "销售订单(N)") {
           this.$store.commit("DOMXS_OUT_DETAIL");
         }
+        if (tag.label == "代理订单(N)") {
+          this.$store.commit("DOMXS_OUT_DETAIL");
+        }
         if (tag.label == "锁定订单明细") {
           this.$store.commit("DOMKC_OUT_DETAIL");
         }

+ 28 - 0
src/router/views/index.js

@@ -1723,4 +1723,32 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/warehousing/goodsTransfer/index')
   }]
 },
+{
+  path: '/statisticAnalysis/taskStatistics/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/statisticAnalysis/taskStatistics/index',
+    name: '任务统计',
+    meta: {
+      i18n: '/statisticAnalysis/taskStatistics/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/statisticAnalysis/taskStatistics/index')
+  }]
+},
+{
+  path: '/statisticAnalysis/commissionStatistics/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/statisticAnalysis/commissionStatistics/index',
+    name: '提成统计(S)',
+    meta: {
+      i18n: '/statisticAnalysis/commissionStatistics/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/statisticAnalysis/commissionStatistics/index')
+  }]
+},
 ]

+ 1 - 1
src/views/businessManagement/proxyOrder/index.vue

@@ -482,7 +482,7 @@ export default {
       if (JSON.stringify(this.$route.query) != "{}") {
         this.$router.$avueRouter.closeTag();
         this.$router.push({
-          path: "/businessManagement/salesOrder/index"
+          path: "/businessManagement/proxyOrder/index"
         });
       }
       this.dataList.forEach(item => {

+ 2 - 2
src/views/dealer/sales/detail.vue

@@ -818,7 +818,7 @@ export default {
           : {
             stock: 0,
             balanceAmount: 0,
-            balanceQuantity: 0
+            surplusRouteQuantity: 0
           };
         this.$set(
           form,
@@ -829,7 +829,7 @@ export default {
               : (Number(a.inAmount) / Number(a.inQuantity)).toFixed(2)
             : 0
         );
-        this.$set(form, "stock", a.balanceQuantity);
+        this.$set(form, "stock", a.surplusRouteQuantity);
       })
         .finally(() => {
           this.goodsLoading = false

+ 25 - 17
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -494,7 +494,9 @@ export default {
       cancelCheck(this.form.id).then(res => {
         if (res.data.success) {
           this.$message.success("操作成功!")
-          this.afterEcho(res.data.data)
+          getDetails(this.form.id).then(res => {
+            this.afterEcho(res.data.data)
+          })
         }
       }).finally(() => {
         this.buttonLoading = false
@@ -563,24 +565,30 @@ export default {
     afterEcho(data) {
       this.form = data;
       this.oldForm = Object.assign({}, data);
-
-      this.checkDisabled = data.checkStatus === "录入" ? false : true;
-      this.recallDisabled = data.checkStatus === "审批提交" ? true : false;
-
-      this.option.column.forEach(item => {
-        if (item.prop == "remark") {
-          this.$set(item, "disabled", (this.auditDisabled || false))
-        } else if (item.prop == "createUserName" || item.prop == "createTime" || item.prop == "sysNo") {
-          this.$set(item, "disabled", true)
-        } else {
-          this.$set(item, "disabled", this.checkDisabled)
+      console.log(data)
+      if (data) {
+        console.log(1)
+        this.checkDisabled = data.checkStatus === "录入" ? false : true;
+        this.recallDisabled = data.checkStatus === "审批提交" ? true : false;
+        this.option.column.forEach(item => {
+          if (item.prop == "remark") {
+            this.$set(item, "disabled", (this.auditDisabled || false))
+          } else if (item.prop == "createUserName" || item.prop == "createTime" || item.prop == "sysNo") {
+            this.$set(item, "disabled", true)
+          } else {
+            this.$set(item, "disabled", this.checkDisabled)
+          }
+        })
+        if (data.itemsList) {
+          this.dataList = data.itemsList
+          this.oldDataList = this.deepClone(data.itemsList)
         }
-      })
-
-      if (data.itemsList) {
-        this.dataList = data.itemsList
-        this.oldDataList = this.deepClone(data.itemsList)
+      } else {
+        this.checkDisabled = true;
+        this.recallDisabled = false;
+        this.$set(this.form, "checkStatus", "录入")
       }
+
     },
     async openEdit() {
       //标签页保存key

+ 2 - 1
src/views/landTransportation/bulkReportAnalysis/index.vue

@@ -1019,10 +1019,11 @@ export default {
         const routeData = this.$router.resolve({
           path: '/api/blade-land/order/bulkCargo-export',      //跳转目标窗口的地址
           query: {
+            'Blade-Auth':getToken(),
             ...queryParams    //括号内是要传递给新窗口的参数
           }
         })
-        window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+        window.open(routeData.href.slice(1, routeData.href.length));
       }).catch(() => {
         this.$message({
           type: 'info',

+ 2 - 1
src/views/landTransportation/reportAnalysis/index.vue

@@ -783,10 +783,11 @@ export default {
         const routeData = this.$router.resolve({
           path: '/api/blade-land/order/acct-export',      //跳转目标窗口的地址
           query: {
+            'Blade-Auth':getToken(),
             ...queryParams    //括号内是要传递给新窗口的参数
           }
         })
-        window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+        window.open(routeData.href.slice(1, routeData.href.length));
       }).catch(() => {
         this.$message({
           type: 'info',

+ 13 - 6
src/views/reimbursement/detail.vue

@@ -71,7 +71,7 @@
               :props="props" check-strictly :emit-path="false" :show-all-levels="false"
               @change="moldChange($event, row, dicArea)" @clear="row.feeList = feesOption" placeholder="请选择">
             </avue-cascader>
-            <span v-else="!row.$cellEdit">{{ row.mold }}</span>
+            <span v-else>{{ row.mold }}</span>
           </template>
           <template slot="detailId" slot-scope="{ row }">
             <el-select v-if="row.$cellEdit" v-model="row.detailId" filterable clearable @change="detailChange(row)"
@@ -87,13 +87,13 @@
           </template>
           <template slot="payMethod" slot-scope="{ row, index }">
             <el-select v-model="row.payMethod" size="small" placeholder="请选择" clearable :disabled="!row.$cellEdit">
-              <el-option v-for="(item, index) in paymentOption" :key="item.dictKey" :label="item.dictValue"
+              <el-option v-for="(item, index) in paymentOption" :key="index" :label="item.dictValue"
                 :value="item.dictKey"></el-option>
             </el-select>
           </template>
           <template slot="amount" slot-scope="{ row, index }">
             <el-input-number v-if="row.$cellEdit" v-model="row.amount" size="small" :controls="false" :precision="2"
-              style="width: 100%" placeholder="金额"></el-input-number>
+              style="width: 100%" placeholder="金额"></el-input-number> 
             <span v-else>{{ row.amount }}</span>
           </template>
         </avue-crud>
@@ -323,11 +323,13 @@ export default {
         this.dataList = this.form.itemList ? this.form.itemList : [];
         this.dataList.forEach(item => {
           this.moldChange(item.moldId, item, this.dicArea)
-          item.payMethod = item.payMethod.toString();
+          if (item.payMethod) {
+            item.payMethod = item.payMethod.toString();
+          }
         })
         delete this.form.itemList;
-        this.oldForm = { ...this.form };
-        this.oldDataList = [...this.dataList];
+        this.oldForm =this.deepClone({ ...this.form });
+        this.oldDataList =this.deepClone([...this.dataList]);
         this.checkDisabled = this.form.status > 0 ? true : false;
         if (this.form.status > 0) {
           this.option.column.map(e => {
@@ -361,6 +363,11 @@ export default {
     },
     //修改提交触发
     editCustomer(status) {
+      for (let i = 0; i < this.dataList.length; i++) {
+        if (this.dataList[i].amount == null) {
+          return this.$message.error("报销明细第" + Number(i + 1) + "行的金额不能为空");
+        }
+      }
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {

+ 6 - 2
src/views/saleLeads/detail.vue

@@ -7,7 +7,7 @@
       </div>
       <div class="add-customer-btn">
         <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openEdit"
-          v-if="disabled && !approvalStatus">编 辑
+          v-if="disabled && !approvalStatus && form.status != 1">编 辑
         </el-button>
         <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="submit" v-if="form.status == 1">
           提交
@@ -17,7 +17,8 @@
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="form.status > 0 || approvalStatus" @click.native="pleaseCheck">请核数据
+            <el-dropdown-item :disabled="form.status > 0 && form.status != 2 || approvalStatus"
+              @click.native="pleaseCheck">请核数据
             </el-dropdown-item>
             <el-dropdown-item :disabled="!form.approvalStatus"
               @click.native="checkScheduleDialog = true, checkId = form.id">审核进度</el-dropdown-item>
@@ -486,6 +487,9 @@ export default {
     // 编辑按钮触发
     openEdit() {
       this.disabled = false;
+      this.option.column.map(e => {
+        this.$set(e, 'disabled', false)
+      })
     },
     // 复制
     copyDoc() {

+ 1 - 1
src/views/saleLeads/index.vue

@@ -13,7 +13,7 @@
         </template>
         <template slot-scope="scope" slot="menu">
           <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)"
-            :disabled="scope.row.status == 1">删除
+            :disabled="scope.row.status == 1||scope.row.approvalStatus&&scope.row.approvalStatus!='B'">删除
           </el-button>
         </template>
         <template slot="corpNameSearch">

+ 55 - 36
src/views/statisticAnalysis/commissionStatistics/index.vue

@@ -5,10 +5,14 @@
         :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
         @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
         @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
-        <!-- <template slot="menuLeft">
+        <template slot="menuLeft">
           <el-button type="info" size="small" @click="outExport">导出
           </el-button>
-        </template> -->
+        </template>
+        <template slot="userNameSearch">
+          <user-select v-model="search.userName" :configuration="UConfiguration">
+          </user-select>
+        </template>
         <template slot="businesDateSearch">
           <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
             format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
@@ -21,12 +25,21 @@
 
 <script>
 import { getToken } from "@/util/auth";
-import { getList } from "@/api/statisticAnalysis/salesDetails"
+import { getList } from "@/api/statisticAnalysis/taskStatistics"
 
 export default {
   name: "index",
   data() {
     return {
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
       form: {},
       search: {},
       dataList: [],
@@ -52,40 +65,43 @@ export default {
         delBtn: false,
         searchIcon: true,
         menu: false,
+        showSummary: true,
+        summaryText: "合计",
+        sumColumnList: [
+          {
+            name: "commission",
+            type: "sum"
+          }],
         column: [
           {
             label: "承做人",
-            prop: "userid",
+            prop: "userName",
             overHidden: true,
-            search: true,
-            formatter: row => {
-              return row.userName;
-            }
+            search: true
           },
           {
-            label: "日期",
-            prop: "careteTime",
-            type: "datetime",
+            label: "业务日期",
+            prop: "actualDate",
+            type: "date",
             format: 'yyyy-MM-dd',
-            valueFormat: 'yyyy-MM-dd HH:mm:ss',
+            valueFormat: 'yyyy-MM-dd',
             searchRange: true,
-            searchDefaultTime: ['00:00:00', '23:59:59'],
             overHidden: true,
             search: true,
           },
           {
             label: "客户名称",
-            prop: "cordName",
+            prop: "cornName",
             overHidden: true,
           },
           {
             label: "任务名称",
-            prop: "taskName",
+            prop: "pname",
             overHidden: true,
           },
           {
             label: "提成金额",
-            prop: "commissionAmount",
+            prop: "commission",
             overHidden: true
           }
         ]
@@ -116,15 +132,13 @@ export default {
       this.page.pageSize = val;
     },
     onLoad(page, params) {
-      if (this.search.careteTime && this.search.careteTime.length > 0) {
-        params = {
-          ...params,
-          beginCreateTime: this.search.careteTime[0],
-          endCreateTime: this.search.careteTime[1]
-        };
+      let data = this.deepClone(Object.assign({}, params, this.search));
+      if (data.actualDate) {
+        data.beginStartTime = data.actualDate[0]
+        data.beginEndTime = data.actualDate[1]
+        delete data.actualDate
       }
-      let data = this.deepClone(Object.assign(params, this.search));
-      delete data.careteTime;
+      data.branch = "Y"
       this.loading = true;
       getList(
         page.currentPage,
@@ -166,19 +180,24 @@ export default {
     editOpen(row) {
     },
     outExport() {
-      let queryParams = this.search
-      if (queryParams.arrivalTime) {
-        queryParams.beginCreateTime = queryParams.careteTime[0]
-        queryParams.endCreateTime = queryParams.careteTime[1]
-        delete queryParams.careteTime
-      }
-      const routeData = this.$router.resolve({
-        path: '/api/blade-land/order/acct-export',      //跳转目标窗口的地址
-        query: {
-          ...queryParams    //括号内是要传递给新窗口的参数
+           let params = { ...this.search }
+      if (params.beginTime && params.beginTime.length > 0) {
+        params = {
+          ...params,
+          beginTimeStart: params.beginTime[0],
+          beginTimeEnd: params.beginTime[1],
         }
-      })
-      window.open(routeData.href.slice(1, routeData.href.length - 1) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+      } else {
+        params = {
+          ...params,
+          beginTimeStart: '',
+          beginTimeEnd: '',
+        }
+      }
+      window.open(
+        `/api/trade-project/project/statisticsExport?${this.website.tokenHeader
+        }=${getToken()}&type=TC&branch=Y&beginTimeStart=${params.beginTimeStart}&beginTimeEnd=${params.beginTimeEnd}&userName=${params.userName}&taskStatus=${params.taskStatus}`
+      );
     }
   }
 };

+ 1 - 1
src/views/statisticAnalysis/salesReconciliationDetails/index.vue

@@ -278,7 +278,7 @@ export default {
         .then(() => {
           window.open(
             `/api/blade-purchase-sales/exportOrder/orderDetailedExport?${this.website.tokenHeader
-            }=${getToken()}&corpId=${this.search.corpId}&chargeMember=${this.search.chargeMember}&cname=${this.search.cname}&sysNo=${this.search.sysNo
+            }=${getToken()}&id=${this.$route.query.id}&corpId=${this.search.corpId}&chargeMember=${this.search.chargeMember}&cname=${this.search.cname}&sysNo=${this.search.sysNo
             }&beginCreateTime=${this.search.beginCreateTime}&endCreateTime =${this.search.endCreateTime
             }`
           );

+ 232 - 0
src/views/statisticAnalysis/taskStatistics/index.vue

@@ -0,0 +1,232 @@
+<template>
+  <div>
+    <basic-container class="page-crad">
+      <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+        :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+        @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
+        <template slot="menuLeft">
+          <el-button type="info" size="small" @click="outExport">导出
+          </el-button>
+        </template>
+        <template slot="userNameSearch">
+          <user-select v-model="search.userName" :configuration="UConfiguration">
+          </user-select>
+        </template>
+        <template slot="businesDateSearch">
+          <el-date-picker v-model="search.businesDate" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
+            format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']">
+          </el-date-picker>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import { getToken } from "@/util/auth";
+import { getList } from "@/api/statisticAnalysis/taskStatistics"
+
+export default {
+  name: "index",
+  data() {
+    return {
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
+      form: {},
+      search: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      optionBack: {
+        searchShow: true,
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchMenuSpan: 24,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        searchIcon: true,
+        menu: false,
+        column: [
+          {
+            label: "承做人",
+            prop: "userName",
+            overHidden: true,
+            search: true
+          },
+          {
+            label: "业务日期",
+            prop: "beginTime",
+            type: "date",
+            format: 'yyyy-MM-dd',
+            valueFormat: 'yyyy-MM-dd',
+            searchRange: true,
+            overHidden: true,
+            search: true,
+          },
+          {
+            label: "客户名称",
+            prop: "cornName",
+            overHidden: true,
+          },
+          {
+            label: "任务名称",
+            prop: "pname",
+            overHidden: true,
+          },
+          {
+            label: "状态",
+            prop: "taskStatus",
+            search: true,
+            type: "select",
+            overHidden: true,
+            dataType: 'number',
+            dicData: [],
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            }
+          }
+        ]
+      }
+    };
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(183), this.optionBack);
+    this.getWorkDicts("task_status").then(res => {
+      this.findObject(this.option.column, "taskStatus").dicData =
+        res.data.data;
+    });
+
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
+    },
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params = {}) {
+      let data = this.deepClone(Object.assign({}, params, this.search));
+      if (data.beginTime) {
+        data.beginTimeStart = data.beginTime[0]
+        data.beginTimeEnd = data.beginTime[1]
+        delete data.beginTime
+      }
+      data.branch = "Y"
+      this.loading = true;
+      getList(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(data)
+      ).then(res => {
+        if (res.data.data.records) {
+          res.data.data.records.forEach(e => {
+            e.itemLoading = true;
+          });
+        }
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 210;
+        }
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(this.getColumnName(183), this.option);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.optionBack;
+      const inSave = await this.delColumnData(this.getColumnName(183), this.optionBack);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    editOpen(row) {
+    },
+    outExport() {
+      let params = { ...this.search }
+      if (params.beginTime && params.beginTime.length > 0) {
+        params = {
+          ...params,
+          beginTimeStart: params.beginTime[0],
+          beginTimeEnd: params.beginTime[1],
+        }
+      } else {
+        params = {
+          ...params,
+          beginTimeStart: '',
+          beginTimeEnd: '',
+        }
+      }
+      window.open(
+        `/api/trade-project/project/statisticsExport?${this.website.tokenHeader
+        }=${getToken()}&type=RW&branch=Y&beginTimeStart=${params.beginTimeStart}&beginTimeEnd=${params.beginTimeEnd}&userName=${params.userName}&taskStatus=${params.taskStatus}`
+      );
+    }
+  }
+};
+</script>
+
+<style scoped>
+.page-crad ::v-deep .basic-container__card {
+  height: 94.2vh;
+}
+
+::v-deep .el-table__expanded-cell[class*="cell"] {
+  padding: 0px;
+}
+
+.itemTable ::v-deep .el-table {
+  width: 100%;
+}
+</style>

+ 101 - 303
src/views/workManagement/handoverSheet/detail.vue

@@ -2,341 +2,129 @@
   <div class="borderless" v-loading="pageLoading">
     <div class="customer-head">
       <div class="customer-back">
-        <el-button
-          type="danger"
-          style="border: none;background: none;color: red"
-          icon="el-icon-arrow-left"
-          @click="backToList"
-          :loading="btnLoading"
-          >返回列表</el-button
-        >
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+          @click="backToList" :loading="btnLoading">返回列表</el-button>
       </div>
       <div class="add-customer-btn">
-        <el-button
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
-          @click.stop="openEdit"
-          v-if="disabled"
-          >编 辑</el-button
-        >
-        <el-button
-          v-if="
-            form.id &&
-              loginUser === form.handingUser &&
-              form.confirmStatus !== 1
-          "
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
-          :loading="btnLoading"
-          @click="submitConfirm"
-          :disabled="!form.id || disabled"
-          >提交确认</el-button
-        >
-        <el-button
-          v-if="checker && form.status != 3"
-          type="primary"
-          size="small"
-          class="el-button--small-yh"
-          @click.stop="openCheckDialog"
-        >
+        <el-button type="primary" size="small" class="el-button--small-yh" @click.stop="openEdit" v-if="disabled">编 辑
+        </el-button>
+        <el-button v-if="
+          form.id  &&
+          form.confirmStatus !== 1
+        " type="primary" size="small" class="el-button--small-yh" :loading="btnLoading" @click="submitConfirm"
+          :disabled="!form.id || disabled">提交确认</el-button>
+        <el-button v-if="checker && form.status != 3" type="primary" size="small" class="el-button--small-yh"
+          @click.stop="openCheckDialog">
           审批
         </el-button>
-        <el-button
-          v-if="form.status > 0"
-          @click.native="(checkScheduleDialog = true), (checkId = form.id)"
-          type="primary"
-          size="small"
-          >审核进度</el-button
-        >
-        <el-button
-          type="primary"
-          v-if="!checkDisabled"
-          :disabled="!form.id || disabled || form.confirmStatus !== 1"
-          size="small"
-          @click="pleaseCheck"
-          :loading="btnLoading"
-          >请核</el-button
-        >
-        <el-button
-          type="success"
-          :disabled="!form.id"
-          size="small"
-          @click="copyDoc"
-          :loading="btnLoading"
-          v-if="false"
-          >复制单据</el-button
-        >
-        <el-button
-          type="primary"
-          @click="editCustomer"
-          size="small"
-          :loading="btnLoading"
-          >保存数据</el-button
-        >
+        <el-button v-if="form.status > 0" @click.native="(checkScheduleDialog = true), (checkId = form.id)"
+          type="primary" size="small">审核进度</el-button>
+        <el-button type="primary" v-if="!checkDisabled" :disabled="!form.id || disabled || form.confirmStatus !== 1"
+          size="small" @click="pleaseCheck" :loading="btnLoading">请核</el-button>
+        <el-button type="success" :disabled="!form.id" size="small" @click="copyDoc" :loading="btnLoading" v-if="false">
+          复制单据</el-button>
+        <el-button type="primary" @click="editCustomer" size="small" :loading="btnLoading">保存数据</el-button>
       </div>
     </div>
     <div class="customer-main">
       <containerTitle title="基础信息" />
       <basic-container :showBtn="true">
-        <avue-form
-          ref="form"
-          class="trading-form"
-          v-model="form"
-          :option="option"
-        >
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="corpId">
-            <crop-select
-              v-model="form.corpId"
-              @getCorpData="getKHData"
-              corpType="KH"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-            />
+            <crop-select v-model="form.corpId" @getCorpData="getKHData" corpType="KH"
+              :disabled="disabled || checkDisabled || confirmDisabled" />
           </template>
           <template slot="chargeStatus">
-            <el-switch
-              v-model="form.chargeStatus"
-              active-text="是"
-              inactive-text="否"
-              :active-value="1"
-              :inactive-value="0"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              @change="chargeStatusChange"
-            ></el-switch>
+            <el-switch v-model="form.chargeStatus" active-text="是" inactive-text="否" :active-value="1"
+              :inactive-value="0" :disabled="disabled || checkDisabled || confirmDisabled" @change="chargeStatusChange">
+            </el-switch>
           </template>
           <template slot="handingUser">
-            <el-select
-              v-model="form.handingUser"
-              filterable
-              clearable
-              size="small"
-              placeholder="请选择"
-              :disabled="
-                disabled ||
-                  checkDisabled ||
-                  form.chargeStatus == 0 ||
-                  confirmDisabled
-              "
-              @change="handingUserChange"
-            >
-              <el-option
-                v-for="(item, index) in userList"
-                :key="index"
-                :label="item.realName"
-                :value="item.id"
-              ></el-option>
+            <el-select v-model="form.handingUser" filterable clearable size="small" placeholder="请选择" :disabled="
+              disabled ||
+              checkDisabled ||
+              confirmDisabled
+            " @change="handingUserChange">
+              <el-option v-for="(item, index) in userList" :key="index" :label="item.realName" :value="item.id">
+              </el-option>
             </el-select>
           </template>
           <template slot="handingUserName">
-            <el-select
-              v-model="form.handingUserName"
-              filterable
-              clearable
-              allow-create
-              default-first-option
-              size="small"
-              placeholder="请选择"
-              :disabled="
+            <el-select v-model="form.handingUserName" filterable clearable allow-create default-first-option
+              size="small" placeholder="请选择" :disabled="
                 disabled ||
-                  checkDisabled ||
-                  form.chargeStatus == 0 ||
-                  confirmDisabled
-              "
-            >
-              <el-option
-                v-for="(item, index) in userList"
-                :key="index"
-                :label="item.realName"
-                :value="item.realName"
-              ></el-option>
+                checkDisabled ||
+                form.chargeStatus == 0 ||
+                confirmDisabled
+              ">
+              <el-option v-for="(item, index) in userList" :key="index" :label="item.realName" :value="item.realName">
+              </el-option>
             </el-select>
           </template>
           <template slot="external">
-            <el-switch
-              v-model="form.external"
-              active-text="是"
-              inactive-text="否"
-              :active-value="1"
-              :inactive-value="0"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              @change="externalChange"
-            ></el-switch>
+            <el-switch v-model="form.external" active-text="是" inactive-text="否" :active-value="1" :inactive-value="0"
+              :disabled="disabled || checkDisabled || confirmDisabled" @change="externalChange"></el-switch>
           </template>
         </avue-form>
       </basic-container>
       <containerTitle title="详情内容" />
       <basic-container>
-        <avue-crud
-          ref="crud"
-          :data="dataList"
-          :option="tableOption"
-          :cell-style="cellStyle"
-          @saveColumn="saveColumn"
-          @resetColumn="resetColumn"
-        >
+        <avue-crud ref="crud" :data="dataList" :option="tableOption" :cell-style="cellStyle" @saveColumn="saveColumn"
+          @resetColumn="resetColumn">
           <template slot="menuLeft">
-            <el-button
-              type="primary"
-              icon="el-icon-plus"
-              size="small"
-              @click.stop="newDetails"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              >录入明细</el-button
-            >
-            <el-button
-              type="info"
-              icon="el-icon-printer"
-              size="small"
-              @click="openReport"
-              >报表打印</el-button
-            >
+            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newDetails"
+              :disabled="disabled || checkDisabled || confirmDisabled">录入明细</el-button>
+            <el-button type="info" icon="el-icon-printer" size="small" @click="openReport">报表打印</el-button>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
-            <el-button
-              size="small"
-              icon="el-icon-edit"
-              type="text"
-              @click="rowCell(row, index)"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              >{{ row.$cellEdit ? "保存" : "修改" }}</el-button
-            >
-            <el-button
-              size="small"
-              icon="el-icon-upload"
-              type="text"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              @click="annexOpen(row, index)"
-              >附件</el-button
-            >
-            <el-button
-              size="small"
-              icon="el-icon-delete"
-              type="text"
-              @click="rowDel(row, index)"
-              :disabled="disabled || checkDisabled || confirmDisabled"
-              >删除</el-button
-            >
+            <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
+              :disabled="disabled || checkDisabled || confirmDisabled">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
+            <el-button size="small" icon="el-icon-upload" type="text"
+              :disabled="disabled || checkDisabled || confirmDisabled" @click="annexOpen(row, index)">附件</el-button>
+            <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+              :disabled="disabled || checkDisabled || confirmDisabled">删除</el-button>
           </template>
           <template slot="quantity" slot-scope="{ row, index }">
-            <el-input-number
-              v-if="row.$cellEdit"
-              v-model="row.quantity"
-              size="small"
-              :controls="false"
-              :precision="0"
-              style="width: 100%"
-              placeholder="数量"
-            ></el-input-number>
+            <el-input-number v-if="row.$cellEdit" v-model="row.quantity" size="small" :controls="false" :precision="0"
+              style="width: 100%" placeholder="数量"></el-input-number>
             <span v-else>{{ row.quantity }}</span>
           </template>
           <template slot-scope="{ row, index }" slot="unit">
-            <el-select
-              v-if="row.$cellEdit"
-              v-model="row.unit"
-              size="small"
-              clearable
-              filterable
-            >
-              <el-option
-                v-for="(item, index) in unitOption"
-                :key="index"
-                :label="item.dictValue"
-                :value="item.dictValue"
-              />
+            <el-select v-if="row.$cellEdit" v-model="row.unit" size="small" clearable filterable>
+              <el-option v-for="(item, index) in unitOption" :key="index" :label="item.dictValue"
+                :value="item.dictValue" />
             </el-select>
             <span v-else>{{ row.unit }}</span>
           </template>
           <template slot="amount" slot-scope="{ row, index }">
-            <el-input-number
-              v-if="row.$cellEdit"
-              v-model="row.amount"
-              size="small"
-              :controls="false"
-              :precision="2"
-              style="width: 100%"
-              placeholder="金额"
-            ></el-input-number>
+            <el-input-number v-if="row.$cellEdit" v-model="row.amount" size="small" :controls="false" :precision="2"
+              style="width: 100%" placeholder="金额"></el-input-number>
             <span v-else>{{ row.amount }}</span>
           </template>
         </avue-crud>
       </basic-container>
       <containerTitle title="客户未收款" />
       <basic-container>
-        <avue-form
-          ref="detailForm"
-          class="trading-form"
-          v-model="form"
-          :option="detailOption"
-        ></avue-form>
+        <avue-form ref="detailForm" class="trading-form" v-model="form" :option="detailOption"></avue-form>
       </basic-container>
     </div>
 
-    <el-dialog
-      append-to-body
-      title="审批"
-      class="el-dialogDeep"
-      :visible.sync="checkDialog"
-      width="50%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      v-dialog-drag
-    >
-      <check
-        :checkData="checkData"
-        :checkDetail="false"
-        :idList="[]"
-        @choceCheckFun="choceCheckFun"
-      />
+    <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+      <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun" />
     </el-dialog>
-    <el-dialog
-      append-to-body
-      title="审批进度"
-      class="el-dialogDeep"
-      :visible.sync="checkScheduleDialog"
-      width="40%"
-      :close-on-click-modal="false"
-      :destroy-on-close="true"
-      :close-on-press-escape="false"
-      v-dialog-drag
-    >
-      <check-schedule
-        :checkId="checkId"
-        :batchNo="batchNo"
-        @choceScheduleFun="choceScheduleFun"
-      />
+    <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
+      :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+      <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun" />
     </el-dialog>
     <!--    报表-->
-    <report-dialog
-      :switchDialog="switchDialog"
-      :reportId="form.id"
-      reportName="交接单"
-      @onClose="onClose()"
-    />
-    <el-dialog
-      title="附件"
-      :visible.sync="dialogVisible"
-      append-to-body
-      width="70%"
-    >
-      <c-upload
-        typeUpload="PC"
-        :basic="true"
-        deleteUrl="/api/blade-client/common-file/remove"
-        :data="orderList"
-        :disabled="upLoadForm.status >= 2"
-        :enumerationValue="124"
-      ></c-upload>
+    <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="交接单" @onClose="onClose()" />
+    <el-dialog title="附件" :visible.sync="dialogVisible" append-to-body width="70%">
+      <c-upload typeUpload="PC" :basic="true" deleteUrl="/api/blade-client/common-file/remove" :data="orderList"
+        :disabled="upLoadForm.status >= 2" :enumerationValue="124"></c-upload>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="saveAnnex"
-          size="small"
-          :disabled="upLoadForm.status >= 2"
-          >保 存</el-button
-        >
+        <el-button type="primary" @click="saveAnnex" size="small" :disabled="upLoadForm.status >= 2">保 存</el-button>
       </span>
     </el-dialog>
   </div>
@@ -450,7 +238,13 @@ export default {
             label: "接收人",
             prop: "handingUser",
             span: 8,
-            rules: [{ validator: validateHandingUser, trigger: "change" }]
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "change"
+              }
+            ],
           },
           {
             label: "是否外部交接单",
@@ -567,8 +361,8 @@ export default {
           this.form = res.data.data;
           this.dataList = this.form.itemList ? this.form.itemList : [];
           delete this.form.itemList;
-          this.oldForm = { ...this.form };
-          this.oldDataList = [...this.dataList];
+          this.oldForm = this.deepClone({ ...this.form });
+          this.oldDataList = this.deepClone([...this.dataList]);
           this.checkDisabled = this.form.status > 0 ? true : false;
           this.confirmDisabled = this.form.confirmStatus === 1 ? true : false;
           if (this.form.status > 0 || this.form.confirmStatus === 1) {
@@ -825,21 +619,24 @@ export default {
     },
     // 提交确认
     submitConfirm() {
-      this.$confirm("提交确认?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        this.btnLoading = true;
-        submitConfirm({ id: this.form.id })
-          .then(res => {
-            this.$message.success("提交成功");
-            this.queryData(this.form.id);
-          })
-          .finally(() => {
-            this.btnLoading = false;
-          });
-      });
+      if (this.verification()) {
+        this.$confirm("提交确认?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.btnLoading = true;
+          submitConfirm({ id: this.form.id })
+            .then(res => {
+              this.$message.success("提交成功");
+              this.queryData(this.form.id);
+            })
+            .finally(() => {
+              this.btnLoading = false;
+            });
+        });
+      }
+
     },
     externalChange(row) {
       // if (row == 1) {
@@ -850,7 +647,7 @@ export default {
     }
   },
   watch: {
-    "form.external": function(obj) {
+    "form.external": function (obj) {
       if (obj == 1) {
         this.findObject(this.option.column, "handingCorpName").display = true;
       } else {
@@ -861,4 +658,5 @@ export default {
 };
 </script>
 
-<style scoped></style>
+<style scoped>
+</style>

+ 1 - 1
src/views/workManagement/handoverSheet/index.vue

@@ -42,7 +42,7 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row, scope.index)"
-            :disabled="scope.row.status == 3 || scope.row.confirmStatus === 1"
+            :disabled="scope.row.status > 0 || scope.row.confirmStatus === 1"
           >删除
           </el-button>
         </template>

+ 1 - 1
src/views/workManagement/main-items/detailsPage.vue

@@ -1034,7 +1034,7 @@ export default {
       const params = {
         ...this.form,
         ...this.formTwo,
-        itemList: this.data,
+        itemList: this.data.filter((e,index)=>index==this.pgIndex),
         filesList: this.upLoadData
       }
       dispatch(params).then(res => {

+ 139 - 49
src/views/workManagement/main-items/list.vue

@@ -13,53 +13,16 @@
             <el-menu-item :index="1">追加</el-menu-item>
             <el-menu-item :index="2">退款</el-menu-item>
           </el-menu>
-          <el-table :data="scope.row.insideList">
-            <el-table-column label="状态" prop="strStatus" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="服务项目" prop="pname" align="center" show-overflow-tooltip width="180">
-            </el-table-column>
-            <el-table-column label="收费建议" prop="remarks" align="center" show-overflow-tooltip width="120">
-            </el-table-column>
-            <el-table-column label="承做人" prop="userid" align="center" show-overflow-tooltip width="120">
-            </el-table-column>
-            <el-table-column label="任务部门" prop="deptid" align="center" show-overflow-tooltip width="120">
-            </el-table-column>
-            <el-table-column label="开始日期" prop="beginTime" align="center" show-overflow-tooltip width="120">
-            </el-table-column>
-            <el-table-column label="完成日期" prop="actualDate" align="center" show-overflow-tooltip width="180">
-            </el-table-column>
-            <el-table-column label="服务费" prop="serviceCharge" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="成本" prop="matMoney" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="未知明细收入" prop="otheramt" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="合计金额" prop="amount" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="收款方式" prop="accountName" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="收款日期" prop="payTime" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="频率" prop="frequency" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="提醒日" prop="reminderDay" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="制单人" prop="createUserName" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="制单日期" prop="createTime" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="最新修改人" prop="updateUserName" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="最新修改时间" prop="updateTime" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column label="单据状态" prop="status" align="center" show-overflow-tooltip width="200">
-            </el-table-column>
-            <el-table-column fixed="right" label="操作" width="80" align="center">
-              <template slot-scope="scope">
-                <el-button @click="dispatch(scope.row)" type="text" size="small">派工</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
+          <avue-crud :data="scope.row.insideList" :option="expandOption" :cell-style="cellStyle" class="itemTable">
+            <template slot-scope="{row}" slot="menu">
+              <el-button :disabled="row.taskStatus != 10" @click="dispatch(row)" type="text" size="small">派工</el-button>
+            </template>
+            <template slot="taskStatus" slot-scope="{ row }">
+              <span v-if="row.taskStatus == 10">暂存</span>
+              <span v-if="row.taskStatus == 20">进行中</span>
+              <span v-if="row.taskStatus == 30">完成</span>
+            </template>
+          </avue-crud>
         </template>
         <template slot="corpIdSearch">
           <select-component v-model="search.corpId" :configuration="configuration"></select-component>
@@ -102,6 +65,7 @@ import { getList, deleteMain, projectDetail } from "@/api/workManagement/mainPro
 import reportDialog from "@/components/report-dialog/main";
 import { micrometerFormat } from "@/util/validate";
 import { getUserList } from "@/api/workManagement/mainProject";
+import { getDeptTree } from "@/api/system/dept";
 import _ from "lodash";
 
 export default {
@@ -130,6 +94,122 @@ export default {
         total: 0,
         pageSize: 10,
         pageSizes: [10, 20, 50, 100, 200, 400, 500]
+      },
+      expandOption: {
+        align: "center",
+        header: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 80,
+        column: [
+          {
+            label: "状态",
+            prop: "strStatus",
+            width: 138,
+            overHidden: true
+          },
+          {
+            label: "服务项目",
+            prop: "pname",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "收费建议",
+            prop: "remarks",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "承做人",
+            prop: "userName",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "任务部门",
+            prop: "deptid",
+            type: "tree",
+            props: {
+              label: "title",
+              value: "value"
+            },
+            dicData: [],
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "开始日期",
+            prop: "beginTime",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "完成日期",
+            prop: "actualDate",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "服务费",
+            prop: "serviceCharge",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "成本",
+            prop: "matMoney",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "未知明细收入",
+            prop: "otheramt",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "合计金额",
+            prop: "amount",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "收款方式",
+            prop: "accountName",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "收款日期",
+            prop: "payTime",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "频率",
+            prop: "frequency",
+            dicData: [],
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "提醒日",
+            prop: "reminderDay",
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: "单据状态",
+            prop: "taskStatus",
+            width: 100,
+            overHidden: true
+          }
+        ]
       }
     };
   },
@@ -142,6 +222,16 @@ export default {
         }
       })
     })
+    getDeptTree("096359").then(res => {
+      this.expandOption.column.forEach(item => {
+        if (item.prop === "deptid") {
+          item.dicData = res.data.data;
+        }
+      })
+    })
+    this.getWorkDicts("frequency").then(res => {
+      this.findObject(this.expandOption.column, "frequency").dicData = res.data.data
+    });
   },
   activated() {
     if (!this.show && !this.$store.getters.mainItemStatus) {
@@ -383,7 +473,7 @@ export default {
 </script>
 
 <style scoped>
-.zyTable ::v-deep .el-table__expanded-cell[class*=cell] {
-  padding: 20px 120px 20px 50px;
+.itemTable ::v-deep .el-table {
+  width: 800px;
 }
 </style>

+ 24 - 67
src/views/workManagement/purchaseApply/index.vue

@@ -1,77 +1,35 @@
 <template>
   <div>
     <basic-container v-show="show" class="page-crad">
-      <avue-crud
-        ref="crud"
-        :option="option"
-        :data="dataList"
-        v-model="form"
-        :page.sync="page"
-        :search.sync="search"
-        :table-loading="loading"
-        :cell-style="cellStyle"
-        @selection-change="selectionChange"
-        @search-change="searchChange"
-        @current-change="currentChange"
-        @size-change="sizeChange"
-        @refresh-change="refreshChange"
-        @on-load="onLoad"
-        @search-criteria-switch="searchCriteriaSwitch"
-        @saveColumn="saveColumn"
-        @resetColumn="resetColumn"
-      >
+      <avue-crud ref="crud" :option="option" :data="dataList" v-model="form" :page.sync="page" :search.sync="search"
+        :table-loading="loading" :cell-style="cellStyle" @selection-change="selectionChange"
+        @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+        @refresh-change="refreshChange" @on-load="onLoad" @search-criteria-switch="searchCriteriaSwitch"
+        @saveColumn="saveColumn" @resetColumn="resetColumn">
         <template slot="menuLeft">
-          <el-button
-            type="primary"
-            icon="el-icon-plus"
-            size="small"
-            @click.stop="newAdd()"
-          >创建单据</el-button>
-          <el-button
-            type="success"
-            size="small"
-            icon="el-icon-plus"
-            @click.stop="copyDoc()"
-            :disabled="selection.length != 1"
-            v-if="false"
-          >复制单据</el-button>
+          <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">创建单据</el-button>
+          <el-button type="success" size="small" icon="el-icon-plus" @click.stop="copyDoc()"
+            :disabled="selection.length != 1" v-if="false">复制单据</el-button>
         </template>
         <template slot-scope="scope" slot="menu">
-          <el-button
-            type="text"
-            icon="el-icon-delete"
-            size="small"
-            @click.stop="rowDel(scope.row, scope.index)"
-            :disabled="scope.row.status == 3"
-          >删除
+          <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(scope.row, scope.index)"
+            :disabled="scope.row.status != 0">删除
           </el-button>
         </template>
         <template slot="applyUserNameSearch">
-          <el-select
-            v-model="search.applyUser"
-            filterable
-            clearable
-            size="small"
-          >
-            <el-option
-              v-for="(item,index) in userList"
-              :key="index"
-              :label="item.realName"
-              :value="item.id"
-            ></el-option>
+          <el-select v-model="search.applyUser" filterable clearable size="small">
+            <el-option v-for="(item, index) in userList" :key="index" :label="item.realName" :value="item.id">
+            </el-option>
           </el-select>
         </template>
         <template slot="applyUserName" slot-scope="scope">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.applyUserName }}</span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{
+              scope.row.applyUserName
+          }}</span>
         </template>
       </avue-crud>
     </basic-container>
-    <detail-page
-      @goBack="goBack"
-      @copyOrder="copyOrder"
-      :detailData="detailData"
-      v-if="!show"
-    />
+    <detail-page @goBack="goBack" @copyOrder="copyOrder" :detailData="detailData" v-if="!show" />
   </div>
 </template>
 
@@ -79,7 +37,7 @@
 import option from "./config/mainList.json";
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getList, deleteList} from "@/api/officeSupplies/purchaseApply";
+import { getList, deleteList } from "@/api/officeSupplies/purchaseApply";
 
 export default {
   name: "index",
@@ -114,7 +72,7 @@ export default {
     this.option.column.forEach(item => {
       if (item.search) i++
     })
-    if (i % 3 !== 0){
+    if (i % 3 !== 0) {
       const num = 3 - Number(i % 3)
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
@@ -154,10 +112,10 @@ export default {
   },
   methods: {
     searchCriteriaSwitch(type) {
-      if (type){
-        this.option.height =  this.option.height - 90
-      }else {
-        this.option.height =  this.option.height + 90
+      if (type) {
+        this.option.height = this.option.height - 90
+      } else {
+        this.option.height = this.option.height + 90
       }
       this.$refs.crud.getTableHeight()
     },
@@ -238,7 +196,7 @@ export default {
     cellStyle() {
       return "padding:0;height:40px;";
     },
-    copyDoc() {},
+    copyDoc() { },
     selectionChange(list) {
       this.selection = list;
     },
@@ -296,5 +254,4 @@ export default {
 </script>
 
 <style scoped>
-
 </style>

+ 1 - 1
src/views/workManagement/requisition/index.vue

@@ -42,7 +42,7 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row, scope.index)"
-            :disabled="scope.row.status == 3"
+            :disabled="scope.row.status !=0"
           >删除
           </el-button>
         </template>

+ 39 - 55
src/views/workManagement/service-items/project.vue

@@ -4,52 +4,30 @@
       <div class="box">
         <el-scrollbar>
           <basic-container>
-            <avue-tree
-              :option="treeOption"
-              :data="treeData"
-              @node-click="nodeClick"
-            />
+            <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" />
           </basic-container>
         </el-scrollbar>
       </div>
     </el-col>
     <el-col :span="20">
       <basic-container>
-        <avue-crud
-          ref="crud"
-          :data="data"
-          :option="tableOption"
-          :page.sync="page"
-          :table-loading="loading"
-          v-model='form'
-          :search.sync="search"
-          :cell-style="cellStyle"
-          :before-open="beforeOpen"
-          @size-change="sizeChange"
-          @current-change="currentChange"
-          @search-change="searchChange"
-          @refresh-change="refreshChange"
-          @row-save="rowSave"
-          @row-del="rowDel"
-          @row-update="rowUpdate"
-          @cell-dblclick="cellDblclick"
-          @on-load="getList"
-          @saveColumn="saveColumn"
-          @resetColumn="resetColumn"
-        >
+        <avue-crud ref="crud" :data="data" :option="tableOption" :page.sync="page" :table-loading="loading"
+          v-model='form' :search.sync="search" :cell-style="cellStyle" :before-open="beforeOpen"
+          @size-change="sizeChange" @current-change="currentChange" @search-change="searchChange"
+          @refresh-change="refreshChange" @row-save="rowSave" @row-del="rowDel" @row-update="rowUpdate"
+          @cell-dblclick="cellDblclick" @on-load="getList" @saveColumn="saveColumn" @resetColumn="resetColumn">
           <template slot="menuLeft">
-            <el-button
-              icon="el-icon-printer"
-              size="small"
-              type="primary"
-              @click.stop="openReport()"
-            >报表打印
+            <el-button icon="el-icon-plus" size="small" type="primary" @click.stop="rowAdd()">新 增
             </el-button>
+            <el-button icon="el-icon-printer" size="small" type="primary" @click.stop="openReport()">报表打印
+            </el-button>
+          </template>
+          <template slot-scope="{column, disabled}" slot="commissionForm">
+           <el-input v-model="form.commission" size="small" oninput="value=value.replace(/[^0-9.]/g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
+            <template slot="append">%</template>
+           </el-input>
           </template>
-          <report-dialog
-            :switchDialog="switchDialog"
-            @onClose="onClose()"
-          ></report-dialog>
+          <report-dialog :switchDialog="switchDialog" @onClose="onClose()"></report-dialog>
         </avue-crud>
       </basic-container>
     </el-col>
@@ -57,20 +35,20 @@
 </template>
 
 <script>
-  import option from "./configuration/projectOption.json";
-  import {getServiceProjectList, remove, submit,detail, getServiceTypeTree,getDeptTree,getDicData} from "@/api/workManagement/serviceProject";
-  import reportDialog from "@/components/report-dialog/main";
+import option from "./configuration/projectOption.json";
+import { getServiceProjectList, remove, submit, detail, getServiceTypeTree, getDeptTree, getDicData } from "@/api/workManagement/serviceProject";
+import reportDialog from "@/components/report-dialog/main";
 export default {
   data() {
     return {
-      switchDialog:false,//报表
+      switchDialog: false,//报表
       loading: true,
       data: [],
       tableOption: {},
-      form:{},
-      search:{},
-      treeDeptId:"",
-      treeDeptName:'',
+      form: {},
+      search: {},
+      treeDeptId: "",
+      treeDeptName: '',
       height: window.innerHeight - 350,
       page: {
         currentPage: 1,
@@ -80,7 +58,7 @@ export default {
       treeOption: {
         nodeKey: "id",
         lazy: true,
-        treeLoad: function(node, resolve) {
+        treeLoad: function (node, resolve) {
           const parentId = node.level === 0 ? 0 : node.data.id;
           getServiceTypeTree(parentId).then(res => {
             resolve(
@@ -120,7 +98,7 @@ export default {
   methods: {
     //打印
     openReport() {
-      this.switchDialog =! this.switchDialog;
+      this.switchDialog = !this.switchDialog;
     },
     //关闭打印
     onClose(val) {
@@ -135,7 +113,7 @@ export default {
           this.tableOption.height = window.innerHeight - 240;
           // this.treeOption.height = window.innerHeight - 240;
         }
-      }).finally(()=>{
+      }).finally(() => {
         this.loading = false
       })
 
@@ -145,11 +123,11 @@ export default {
 
     // },
     //点击新增或修改时
-    beforeOpen(done, type){
+    beforeOpen(done, type) {
       if (["add"].includes(type)) {
-        this.tableOption.column.forEach(e=>{
-          if(e.prop=='goodsTypeId'){
-            this.$set(this.tableOption.column,2,{...e,value:this.treeDeptId})
+        this.tableOption.column.forEach(e => {
+          if (e.prop == 'goodsTypeId') {
+            this.$set(this.tableOption.column, 2, { ...e, value: this.treeDeptId })
           }
         })
       }
@@ -173,11 +151,17 @@ export default {
       this.getList();
     },
     refreshChange() {
-      this.getList(this.page,this.search);
+      this.getList(this.page, this.search);
+    },
+    rowAdd() {
+      this.form = {
+        commission: 5
+      }
+      this.$refs.crud.rowAdd()
     },
     rowSave(row, done, loading) {
       row.sort = 1;
-      row.goodsTypeId = Array.isArray(row.goodsTypeId) ? row.goodsTypeId.join(',') :  row.goodsTypeId;
+      row.goodsTypeId = Array.isArray(row.goodsTypeId) ? row.goodsTypeId.join(',') : row.goodsTypeId;
       submit(row).then(() => {
         this.page.currentPage = 1;
         this.getList(this.page);
@@ -202,7 +186,7 @@ export default {
         loading();
       });
     },
-    rowDel(row, index,done) {
+    rowDel(row, index, done) {
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",

+ 16 - 6
src/views/workManagement/task/configuration/mainList.json

@@ -11,7 +11,7 @@
   "height": "auto",
   "searchIcon": true,
   "searchIndex": 2,
-  "searchMenuSpan": 16,
+  "searchMenuSpan": 8,
   "tree": true,
   "selection": false,
   "addBtn": false,
@@ -83,7 +83,7 @@
     },
     {
       "label": "承做人",
-      "prop": "userName",
+      "prop": "userid",
       "search": true,
       "overHidden": true,
       "width": 150
@@ -97,6 +97,13 @@
       "searchOrder": 1
     },
     {
+      "label": "业务单号",
+      "search": true,
+      "prop": "sysNo",
+      "overHidden": true,
+      "width": 140
+    },
+    {
       "label": "服务项目",
       "prop": "pname",
       "search": true,
@@ -136,6 +143,11 @@
       "label": "频率",
       "prop": "frequency",
       "overHidden": true,
+      "dicData": [],
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
       "width": 120
     },
     {
@@ -161,8 +173,7 @@
       "type": "date",
       "unlinkPanels": true,
       "overHidden": true,
-      "width": 150,
-      "cell": true
+      "width": 150
     },
     {
       "label": "完成日期",
@@ -172,8 +183,7 @@
       "type": "date",
       "unlinkPanels": true,
       "overHidden": true,
-      "width": 150,
-      "cell": true
+      "width": 150
     },
     {
       "label": "开始日期",

+ 58 - 20
src/views/workManagement/task/index.vue

@@ -3,7 +3,7 @@
     <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" :search.sync="search"
       :table-loading="loading" @search-change="searchChange" @search-reset="searchReset"
       @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
-      @refresh-change="refreshChange" @on-load="onLoad">
+      @refresh-change="refreshChange" @saveColumn="saveColumn" @resetColumn="resetColumn" @on-load="onLoad">
       <template slot="cornIdSearch">
         <select-component v-model="search.cornId" :configuration="configuration"></select-component>
       </template>
@@ -14,11 +14,9 @@
         <el-button icon="el-icon-printer" size="small" type="primary" :loading="exportLoading" @click.stop="downFile">导出
         </el-button>
       </template>
-      <template slot="userNameSearch">
-        <el-select v-model="search.userName" remote filterable clearable :remote-method="remoteMethod">
-          <el-option v-for="item in options" :key="item.value" :label="item.realName" :value="item.realName">
-          </el-option>
-        </el-select>
+      <template slot="useridSearch">
+        <user-select v-model="search.userName" :configuration="UConfiguration">
+        </user-select>
       </template>
       <template slot="deptid" slot-scope="{row,index}">
         <span>{{ row.deptName }}</span>
@@ -29,15 +27,22 @@
           </el-option>
         </el-select>
       </template>
+      <template slot="userid" slot-scope="{row,index}">
+        <user-select 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-scope="{row,index}" slot="menu">
         <el-button type="text" icon="el-icon-view" size="small" @click.stop="copyTo">发送
         </el-button>
         <el-button type="text" icon="el-icon-edit" :disabled="row.status != 5 || row.taskStatus == 30" size="small"
           @click.stop="completion(row)">完工
         </el-button>
-        <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowCell(row)">{{ row.$cellEdit ? "保存" :
-            "修改"
-        }}
+        <el-button type="text" icon="el-icon-edit" size="small" @click.stop="rowCell(row)" :disabled="row.taskStatus == 30"
+          >{{ row.$cellEdit ? "保存" :
+              "修改"
+          }}
         </el-button>
       </template>
     </avue-crud>
@@ -62,7 +67,7 @@
 
 <script>
 import option from "./configuration/mainList.json";
-import { getFlowList } from "@/api/workManagement/mainProject";
+import { getFlowList, updateProjectItem } from "@/api/workManagement/mainProject";
 import { updateItemStatus } from "@/api/workManagement/mainProject";
 import { getUserList } from "@/api/workManagement/mainProject";
 import { saveMessage } from "@/api/logs";
@@ -88,7 +93,7 @@ export default {
         placeholder: '请点击右边按钮选择',
         dicData: []
       },
-      option: option,
+      option: {},
       parentId: 0,
       dataList: [],
       page: {
@@ -157,8 +162,11 @@ export default {
       },
     }
   },
-  created() {
-
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(186), option);
+    this.getWorkDicts("frequency").then(res => {
+      this.findObject(this.option.column, "frequency").dicData = res.data.data
+    });
   },
   mounted() {
     getUserList().then(res => {
@@ -183,7 +191,19 @@ export default {
     },
     rowCell(row, index) {
       if (row.$cellEdit == true) {
-        this.$set(row, "$cellEdit", false);
+        if(!row.userid){
+          return this.$message.error('承做人不能为空!');
+        }
+        this.$confirm("确认修改?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          updateProjectItem(row).then(res => {
+            this.$message.success("修改成功!")
+            this.$set(row, "$cellEdit", false);
+          })
+        });
       } else {
         this.$set(row, "$cellEdit", true);
       }
@@ -286,12 +306,6 @@ export default {
       this.onLoad(this.page)
     },
     paramsAdjustment(params) {
-      // params = Object.assign({}, this.search);
-      // if (params.beginTime && params.beginTime.length != 0) {  //发货
-      //   params.beginStartTime = params.beginTime[0] + " " + "00:00:00";
-      //   params.beginEndTime = params.beginTime[1] + " " + "23:59:59";
-      //   this.$delete(params, 'beginTime')
-      // }
       let data = this.deepClone(Object.assign({}, params, this.search));
       if (data.createdTime) {
         data.beginStartTime = data.createdTime[0]
@@ -308,6 +322,30 @@ export default {
       }
       return data
     },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(186),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      const inSave = await this.delColumnData(
+        this.getColumnName(186),
+        option
+      );
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.option = option;
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
     onLoad(page, params) {
       let data = this.paramsAdjustment(params)
       data.branch = 'Y';