Browse Source

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

caojunjie 3 năm trước cách đây
mục cha
commit
a1d10e8557

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

@@ -64,3 +64,10 @@ export function getFlowList(current,size,params) {
     }
   })
 }
+//系统编号
+export function getSysNo() {
+  return request({
+    url: '/api/trade-project/project/getSysNo',
+    method: 'get'
+  })
+}

+ 2 - 1
src/views/basicData/customerCategory/configuration/mainList.json

@@ -18,7 +18,7 @@
       "prop": "cname",
       "search": true,
       "index": 1,
-      "width": 100,
+      "width": 280,
       "rules": [
         {
           "required": true,
@@ -85,6 +85,7 @@
       "search": true,
       "index": 4,
       "width": 100,
+      "value":0,
       "dicData": [{
         "label": "正常",
         "value": 0

+ 12 - 4
src/views/basicData/customerCategory/index.vue

@@ -9,6 +9,7 @@
                @row-update="rowUpdate"
                :before-open="beforeOpen"
                :before-close="beforeClose"
+               :table-loading="loading"
                @row-save="rowSave"
                @search-change="searchChange"
                @search-reset="searchReset"
@@ -41,6 +42,7 @@ export default {
     return {
       form: {},
       option: option,
+      loading:false,
       parentId:0,
       dataList: [],
       page: {
@@ -81,6 +83,7 @@ export default {
         });
         // 数据回调进行刷新
         done(row);
+        this.onLoad(this.page);
       }, error => {
         window.console.log(error);
         loading();
@@ -89,7 +92,13 @@ export default {
     //新增修改时保存触发
     rowSave(row, done, loading) {
       typeSave(row).then(res => {
-        done()
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done(row)
+        this.onLoad(this.page);
+
       }, error => {
         window.console.log(error);
         loading();
@@ -155,6 +164,7 @@ export default {
       console.log('1')
     },
     onLoad(page, params = {}) {
+      this.loading = true;
       const {createTimeA} = this.query;
       let values = {
         ...params,
@@ -173,12 +183,10 @@ export default {
         values.createTimeA = null;
       }
       values.parentId = 0
-      console.log(values)
       customerList(values).then(res => {
-        console.log(res.data.data.records)
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
-        console.log(this.page)
+        this.loading = false;
       })
     },
     //树桩列点击展开触发

+ 43 - 41
src/views/workManagement/main-items/configuration/detailsPage.json

@@ -18,84 +18,90 @@
     {
       "label": "服务项目",
       "prop": "pname",
-      "index": 1,
       "width": 120
     },
     {
       "label": "收费建议",
       "prop": "remarks",
-      "index": 2,
       "width": 150
     },
     {
+      "label": "承做人",
+      "prop": "userid",
+      "slot": true,
+      "width": 180
+    },
+    {
+      "label": "任务部门",
+      "prop": "deptid",
+      "type":"tree",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=",
+      "props": {
+        "label": "title",
+        "value": "value"
+      },
+      "cell": true,
+      "slot": true,
+      "width": 150,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
+    },
+    {
       "label": "单价",
       "prop": "price",
-      "index": 3,
-      "width": 120
+      "width": 120,
+      "cell": true
     },
     {
       "label": "计价单位",
       "prop": "unit",
-      "index": 4,
-      "width": 120
+      "width": 120,
+      "cell": true
     },
     {
       "label": "数量",
       "prop": "quantity",
-      "index": 5,
       "width": 120,
       "cell": true
     },
     {
       "label": "合计金额",
       "prop": "amount",
-      "index": 6,
       "width": 120,
       "cell": true
     },
     {
       "label": "频率",
       "prop": "frequency",
-      "index": 7,
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=frequency",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
       "width": 120,
       "cell": true
     },
     {
       "label": "提醒日",
       "prop": "reminderDay",
-      "valueFormat": "timestamp",
+      "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
       "type": "date",
-      "index": 9,
       "width": 150,
       "cell": true
     },
     {
-      "label": "任务部门",
-      "prop": "deptid",
-      "type":"tree",
-      "dicUrl": "/api/blade-system/dept/tree?tenantId=",
-      "props": {
-        "label": "title",
-        "value": "value"
-      },
-      "cell": true,
-      "slot": true,
-      "index": 11,
-      "width": 150
-    },
-    {
-      "label": "承做人",
-      "prop": "userid",
-      "slot": true,
-      "index": 12,
-      "width": 180
-    },
-    {
       "label": "需求开始日期",
       "prop": "beginTime",
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
       "type": "date",
-      "index": 13,
       "width": 150,
       "cell": true
     },
@@ -103,35 +109,31 @@
       "label": "需求完成日期",
       "prop": "endTime",
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
+      "format": "yyyy-MM-dd",
       "type": "date",
-      "index": 14,
       "width": 150,
       "cell": true
     },
     {
       "label": "制单人",
-      "prop": "createUser",
+      "prop": "createUserName",
       "disabled": true,
-      "index": 14,
       "width": 120
     },
     {
       "label": "制单日期",
-      "prop": "createUser",
+      "prop": "createTime",
       "disabled": true,
-      "index": 14,
       "width": 150
     },
     {
       "label": "最新修改人",
-      "prop": "updateUser",
-      "index": 14,
+      "prop": "updateUserName",
       "width": 120
     },
     {
       "label": "最新修改时间",
       "prop": "updateTime",
-      "index": 14,
       "width": 150
     }
   ]

+ 10 - 4
src/views/workManagement/main-items/configuration/mainList.json

@@ -8,6 +8,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
+  "searchMenuSpan": 24,
   "tree": true,
   "selection": true,
   "editBtn": false,
@@ -37,7 +38,7 @@
     },
     {
       "label": "客户名称",
-      "prop": "corpId",
+      "prop": "corpAttn",
       "search": true,
       "index": 4,
       "width": 120
@@ -70,19 +71,24 @@
     {
       "label": "状态",
       "prop": "status",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=affair_status",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
       "index": 9,
       "width": 120
     },
     {
       "label": "备注",
       "prop": "remark",
-      "search": true,
       "index": 10,
       "width": 150
     },
     {
       "label": "制单人",
-      "prop": "createUser",
+      "prop": "createUserName",
       "index": 11,
       "width": 120
     },
@@ -94,7 +100,7 @@
     },
     {
       "label": "最新修改人",
-      "prop": "updateUser",
+      "prop": "updateUserName",
       "index": 13,
       "width": 120
     },

+ 73 - 20
src/views/workManagement/main-items/detailsPage.vue

@@ -17,6 +17,7 @@
       </div>
     </div>
     <div style="margin-top: 60px">
+      {{paymentTerm}}
       <containerTitle title="基础信息"></containerTitle>
       <basic-container>
         <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
@@ -25,18 +26,19 @@
               <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
                 <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" :disabled="item.disabled?true:false" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
                 <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]" size="small" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"/>
-                <el-select v-else-if="item.prop === 'paymentType'" style="width: 100%" size="small" placeholder="请选择" clearable filterable>
+                <el-select v-else-if="item.prop === 'paymentType'" style="width: 100%" size="small" placeholder="请选择" clearable filterable @change="selectBD">
                   <el-option v-for="(item,index) in paymentTerm" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
                 <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
-                <el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?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="请输入">
+                  <template v-if="item.prop === 'debitAmount'|| item.prop === 'advanceAmount'||item.prop === 'settlmentAmount'||item.prop === 'balanceAmount'" slot="append">元</template>
+                </el-input>
               </el-form-item>
             </el-col>
           </el-row>
         </el-form>
       </basic-container>
       <containerTitle title="明细列表"></containerTitle>
-      {{data}}
       <basic-container>
         <avue-crud
           ref="crud"
@@ -54,7 +56,7 @@
           @search-change="searchChange"
           @saveColumn="saveColumn"
         >
-          <template slot="menuLeft">
+          <template slot-scope="scope" slot="menuLeft">
             <el-button type="primary"
                        size="small"
                        icon="el-icon-plus"
@@ -62,7 +64,7 @@
             </el-button>
             <el-button type="info"
                        size="small"
-                       @click.stop="berforPleaseCheck">请 核
+                       @click.stop="beforePleaseCheck">请 核
             </el-button>
           </template>
           <template slot="menuRight">
@@ -79,11 +81,12 @@
               type="text"
               size="small"
               @click="rowCellTwo(row,index)"
-            >{{row.$cellEdit?'保存':'修改'}}</el-button>
+            >{{row.$cellEdit?'修改完成':'修改'}}</el-button>
           </template>
           <template slot="userid" slot-scope="{row,index}">
-            <span style="float: left;padding-top: 2px">{{ row.userName }}</span>
-            <el-button type="text" size="mini" style="float: right" @click="selectUser(row)">选择</el-button>
+            <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
+            <span style="margin-left: 12px;padding-top: 2px">{{ row.userName }}</span>
+            <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="selectUser(row)">选择</el-button>
           </template>
         </avue-crud>
       </basic-container>
@@ -183,7 +186,7 @@
 
 <script>
   import option from "./configuration/detailsPage.json";
-  import { projectDetail,editMianProject,updateItemStatus } from "@/api/workManagement/mainProject";
+  import { projectDetail,editMianProject,updateItemStatus,getSysNo } from "@/api/workManagement/mainProject";
   //上传文件json
   import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
   //服务列表接口
@@ -191,11 +194,14 @@
   import serviceOption from "./configuration/serviceDialogList.json";
   //业务字典
   import { getDictionary } from "@/api/system/dictbiz";
+  // 当前登录人
+  import { getUserInfo } from "@/api/system/user";
   //用户组件
   import userOption from "./configuration/userList.json";
   import { getList } from "@/api/system/user";
   import { getDeptLazyTree} from "@/api/system/dept";
   import type from "../service-items/type";
+  import data from "../../util/data";
 
   export default {
     data() {
@@ -231,6 +237,7 @@
             {
               label: '系统编号',
               prop: 'sysNo',
+              disabled: true,
               rules: [
                 {
                   required: true,
@@ -284,8 +291,9 @@
               ]
             },
             {
-              label: '未收金额',
-              prop: 'balanceAmount',
+              label: '已收金额',
+              prop: 'settlmentAmount',
+              disabled: true,
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
@@ -295,8 +303,9 @@
               ]
             },
             {
-              label: '已收金额',
-              prop: 'settlmentAmount',
+              label: '未收金额',
+              prop: 'balanceAmount',
+              disabled: true,
               rules: [
                 {
                   pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
@@ -438,7 +447,16 @@
       };
     },
     created() {
-      this.id = BigInt(this.$route.query.id);
+      // 表格行编辑 输入框change事件
+      //单价
+      this.optionTable.column[4].change = function (val) {
+        val.row.amount = val.row.quantity*val.value;
+      }
+      //数量
+      this.optionTable.column[6].change = function (val) {
+        val.row.amount = val.row.price*val.value;
+      }
+      this.id = BigInt(this.$route.query.id);//字符串转数字  超长用BigInt
       this.getProjectDetail();
       const params = {
         code : "affair_payment_term"
@@ -451,12 +469,13 @@
 
     },
     methods: {
+      //查询明细
       getProjectDetail(pleaseCheck){
         if(this.id){
-          projectDetail(this.id,0).then(res =>{
+          projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
             this.form = res.data.data;
             if(res.data.data.itemList){
-              this.dataList = res.data.data.itemList;
+              this.data = res.data.data.itemList;
               if(pleaseCheck === 10086){
                 this.pleaseCheck();
               }
@@ -464,6 +483,14 @@
               this.data = [];
             }
           })
+        }else{
+          getSysNo().then(res =>{
+            this.$set(this.form,"sysNo", res.data.data)
+            this.$set(this.form,"createTime", new Date())
+          });
+          getUserInfo().then(res =>{
+            this.$set(this.form,"createUserName", res.data.data.name)
+          })
         }
       },
       //删除列表后面的删除按钮触发触发(row, index, done)
@@ -482,6 +509,10 @@
           done(row);
         });
       },
+      //slelect 强制赋值
+      selectBD(){
+        this.$forceUpdate();
+      },
       //点击修改或保存时触发
       rowCellTwo(row,index){
         this.$refs.crud.rowCell(row, index);
@@ -519,7 +550,7 @@
           cancelButtonText: "取消",
           type: "warning"
         }).then(()=>{
-            this.$refs["form"].validate((valid) => {
+          this.$refs["form"].validate((valid) => {
               if(valid){
                 this.$router.push({
                   path: "/mainItems_detailsPage",
@@ -533,9 +564,18 @@
         })
       },
       //请核
-      berforPleaseCheck(){
+      beforePleaseCheck(){
         if(this.crudSelection.length!=0){
-           this.editMainProject(10086);
+          let result = [];
+          this.crudSelection.forEach(item=>{
+            //新录入状态下  才可提交审核
+            // if(item.status === 0){
+            //   result.push("true")
+            // }else{
+            //   result.push("false")
+            // }
+            this.editMainProject(10086);
+          })
         }else{
           this.$message({
             type: "error",
@@ -568,7 +608,18 @@
       //新增 修改
       editMainProject(pleaseCheck){
         this.$refs["form"].validate((valid) => {
-          if(valid){
+          //校验明细列表
+          let user = true;
+          this.data.forEach((item,index) =>{
+            if(!item.userid && !item.deptid && user){
+              this.$message({
+                type: "warning",
+                message: "请检查明细列表第"+(index+1)+"行必填数据数据"
+              });
+              user = false;
+            }
+          })
+          if(valid && user){
             const params = {
               ...this.form,
               itemList:this.data,
@@ -658,6 +709,7 @@
               remarks:item.remarks,
               price:item.price,
               unit:item.unit,
+              frequency:item.rate,
             }
             this.$refs.crud.rowCellAdd(params);
             this.$refs.crud.rowCell(item, this.optionFrom.length-1)
@@ -705,6 +757,7 @@
          if(this.userSelection){
            this.data[this.detailsSelect].userid = this.userSelection[0].id;
            this.data[this.detailsSelect].userName = this.userSelection[0].realName;
+           // this.$set(this.data[this.detailsSelect],'userName',this.userSelection[0].realName)
            this.userDialog = !this.userDialog
          }
       }

+ 27 - 43
src/views/workManagement/main-items/list.vue

@@ -37,13 +37,6 @@
           @click.stop="editOpen(scope.row, scope.index)"
         >编辑
         </el-button>
-<!--        <el-button-->
-<!--          icon="el-icon-check"-->
-<!--          size="small"-->
-<!--          type="text"-->
-<!--          @click.stop="beforeOpenPage(scope.row, scope.index)"-->
-<!--        >详 情-->
-<!--        </el-button>-->
         <el-button
           type="text"
           icon="el-icon-delete"
@@ -62,7 +55,6 @@
 
 <script>
   import option from "./configuration/mainList.json";
-  import { getDictionary } from "@/api/system/dictbiz";
   import { getList,deleteMain } from "@/api/workManagement/mainProject";
   import reportDialog from "@/components/report-dialog/main";
 
@@ -81,14 +73,7 @@ export default {
     };
   },
   created() {
-    let  params = {code:"payment_term"}
-    getDictionary(params).then(res =>{
-      console.log(res.data.data)
-    })
-    // if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
-    //   this.option.searchMenuSpan = 6;
-    //   this.option.searchMenuPosition = "center";
-    // }
+
   },
   mounted() {
     option.height = window.innerHeight - 380 ;
@@ -106,7 +91,7 @@ export default {
       this.switchDialog = val;
     },
     //flag:0 判断是主营项目还是结算
-    getList(page,params={flag:0}) {
+    getList(page,params = { flag : 0 }) {
       this.loading = true;
       getList(page.currentPage, page.pageSize,params).then(res =>{
         this.data = res.data.data.records
@@ -130,37 +115,36 @@ export default {
       });
     },
     searchChange(params, done) {
-      this.getList(this.page, params);
+      this.getList(this.page, params = { flag : 0 });
       done();
     },
-    sizeChange(val) {
-      this.page.pageSize = val;
-      this.getList();
-    },
-    currentChange(val) {
-      this.page.currentPage = val;
-      this.getList();
-    },
-    refreshChange() {
-      this.page.currentPage = 1;
-      this.getList();
+    refreshChange(page,params) {
+      console.log(page,params)
+      this.getList(page,params);
     },
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
-      this.$confirm("确定将选择数据删除?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        deleteMain(row.id).then(res =>{
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-        })
-        // 数据回调进行刷新
-        done(row);
-      });
+      if(row.allowDelete){
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          deleteMain(row.id).then(res =>{
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          })
+          // 数据回调进行刷新
+          done(row);
+        });
+      }else{
+        this.$message({
+          type: "warning",
+          message: "当前项目存在已请核任务 不能删除!"
+        });
+      }
     },
     //修改时的修改按钮点击触发
     rowUpdate(row, index, done, loading) {

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

@@ -7,7 +7,8 @@
   "lazy": true,
   "tip": false,
   "searchShow": true,
-  "searchMenuSpan": 6,
+  "searchMenuPosition": "right",
+  "searchMenuSpan": 18,
   "tree": true,
   "selection": true,
   "editBtn": false,

+ 2 - 1
src/views/workManagement/receipt/settleAccounts.vue

@@ -59,8 +59,9 @@
       option.height = window.innerHeight - 340 ;
     },
     methods: {
-      getList(page,params={flag:1}) {
+      getList(page,params={}) {
         this.loading = true;
+        params.flag = 1;
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.data = res.data.data.records
           this.page.total = res.data.data.total

+ 0 - 8
src/views/workManagement/receipt/statisticalList.vue

@@ -40,15 +40,7 @@
       }
     },
     created() {
-      console.log(parseInt(this.option.column.length / 4),111111111)
-      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
-        console.log(123)
-        this.option.searchMenuSpan = 6;
-        this.option.searchMenuPosition = "center";
-      }else {
 
-        this.option.searchMenuPosition = "right";
-      }
     },
     mounted() {
       option.height = window.innerHeight - 340 ;

+ 9 - 9
src/views/workManagement/service-items/configuration/projectOption.json

@@ -7,6 +7,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
+  "searchMenuSpan": 12,
   "tree": true,
   "selection": true,
   "viewBtn": false,
@@ -78,6 +79,12 @@
     {
       "label": "频率",
       "prop": "rate",
+      "type": "select",
+      "dicUrl": "/api/blade-system/dict-biz/dictionary?code=frequency",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
       "index": 5,
       "width": 120
     },
@@ -94,18 +101,11 @@
       "label": "标准工时",
       "prop": "workingHours",
       "index": 7,
-      "width": 80,
-      "rules": [
-        {
-          "pattern": "/^(([1-9][0-9]*)|(([0]\\.\\d{1,2}|[1-9][0-9]*\\.\\d{1,2})))$/",
-          "message":"请输入数字或小数,且小数位不超过两位",
-          "trigger": "blur"
-        }
-      ]
+      "width": 80
     },
     {
       "label": "创建人",
-      "prop": "createUser",
+      "prop": "createUserName",
       "addDisplay": false,
       "editDisplay": false,
       "index": 8,

+ 22 - 20
src/views/workManagement/service-items/configuration/typeOption.json

@@ -8,6 +8,7 @@
   "simplePage": true,
   "searchShow": true,
   "searchMenuPosition": "right",
+  "searchMenuSpan": 12,
   "tree": true,
   "selection": true,
   "viewBtn": true,
@@ -28,10 +29,27 @@
       ]
     },
     {
+      "label": "上级类型",
+      "prop": "parentId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "overHidden": true,
+      "props": {
+        "label": "cname",
+        "value": "id"
+      },
+      "rules": [{
+        "required": false,
+        "message": "请选择上级机构",
+        "trigger": "click"
+      }]
+    },
+    {
       "label": "排序",
       "prop": "sort",
       "type": "number",
-      "index": 2,
+      "index": 6,
       "overHidden": true,
       "rules": [{
         "required": true,
@@ -44,8 +62,9 @@
       "type": "select",
       "prop": "status",
       "search": true,
-      "index": 3,
+      "index": 2,
       "overHidden": true,
+      "value": 0,
       "dicData": [{
         "label": "正常",
         "value": 0
@@ -62,25 +81,8 @@
       ]
     },
     {
-      "label": "上级类型",
-      "prop": "parentId",
-      "dicData": [],
-      "type": "tree",
-      "hide": true,
-      "overHidden": true,
-      "props": {
-        "label": "cname",
-        "value": "id"
-      },
-      "rules": [{
-        "required": false,
-        "message": "请选择上级机构",
-        "trigger": "click"
-      }]
-    },
-    {
       "label": "创建人",
-      "prop": "createUser",
+      "prop": "createUserName",
       "index": 4,
       "overHidden": true,
       "addDisplay": false,

+ 1 - 4
src/views/workManagement/service-items/project.vue

@@ -105,10 +105,7 @@ export default {
     };
   },
   created() {
-    if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
-      this.option.searchMenuSpan = 6;
-      this.option.searchMenuPosition = "center";
-    }
+
   },
   components: {
     reportDialog

+ 2 - 5
src/views/workManagement/service-items/type.vue

@@ -53,10 +53,7 @@
       }
     },
     created() {
-      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
-        this.option.searchMenuSpan = 6;
-        this.option.searchMenuPosition = "center";
-      }
+
     },
     mounted() {
       option.height = window.innerHeight - 310 ;
@@ -134,7 +131,7 @@
       handleAdd(row) {
         this.parentId = row.id;
         const column = this.findObject(this.option.column, "parentId");
-        column.value = row.id;
+        this.$set(this.form,"parentId",row.id)
         column.addDisabled = true;
         this.$refs.crud.rowAdd();
       },

+ 1 - 0
src/views/workManagement/task/configuration/mainList.json

@@ -7,6 +7,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
+  "searchMenuSpan": 12,
   "tree": true,
   "selection": true,
   "addBtn": false,

+ 2 - 5
src/views/workManagement/task/index.vue

@@ -64,10 +64,7 @@
       }
     },
     created() {
-      if (parseInt(this.option.column.length / 4) !== this.option.column.length / 4){
-        this.option.searchMenuSpan = 6;
-        this.option.searchMenuPosition = "center";
-      }
+
     },
     mounted() {
       option.height = window.innerHeight - 350 ;
@@ -95,7 +92,7 @@
       searchChange(params, done) {
         this.query = params;
         this.page.currentPage = 1;
-        params.parentId = 0
+        params.status = 1
         this.onLoad(this.page, params);
         done()
       },