瀏覽代碼

修改bug

qukaidi 2 年之前
父節點
當前提交
f92895099e

+ 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 - 4
src/views/statisticAnalysis/commissionStatistics/index.vue

@@ -60,13 +60,12 @@ export default {
             search: true
           },
           {
-            label: "日期",
+            label: "业务日期",
             prop: "actualDate",
-            type: "datetime",
+            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,
           },

+ 4 - 5
src/views/statisticAnalysis/taskStatistics/index.vue

@@ -60,13 +60,12 @@ export default {
             search: true
           },
           {
-            label: "日期",
+            label: "业务日期",
             prop: "beginTime",
-            type: "datetime",
+            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,
           },
@@ -139,7 +138,7 @@ export default {
         data.beginTimeEnd = data.beginTime[1]
         delete data.beginTime
       }
-      data.branch = "N"
+      data.branch = "Y"
       this.loading = true;
       getList(
         page.currentPage,

+ 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>

+ 8 - 5
src/views/workManagement/task/configuration/mainList.json

@@ -83,7 +83,7 @@
     },
     {
       "label": "承做人",
-      "prop": "userName",
+      "prop": "userid",
       "search": true,
       "overHidden": true,
       "width": 150
@@ -136,6 +136,11 @@
       "label": "频率",
       "prop": "frequency",
       "overHidden": true,
+      "dicData": [],
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
       "width": 120
     },
     {
@@ -161,8 +166,7 @@
       "type": "date",
       "unlinkPanels": true,
       "overHidden": true,
-      "width": 150,
-      "cell": true
+      "width": 150
     },
     {
       "label": "完成日期",
@@ -172,8 +176,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';