qinbai 3 gadi atpakaļ
vecāks
revīzija
0fb682125f

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

@@ -73,3 +73,14 @@ export function getSysNo() {
     method: 'get'
   })
 }
+
+//子表ID查询父表ID
+export function getPidByItemId(itemId) {
+  return request({
+    url: '/api/trade-project/project/getPidByItemId',
+    method: 'get',
+    params:{
+      itemId:itemId
+    }
+  })
+}

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

@@ -10,7 +10,7 @@
   "addBtn": false,
   "viewBtn": false,
   "editBtn": false,
-  "delBtn": true,
+  "delBtn": false,
   "selection": true,
   "refreshBtn": false,
   "menuWidth": 220,

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

@@ -8,7 +8,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 24,
+  "searchMenuSpan": 18,
   "tree": true,
   "selection": false,
   "editBtn": false,
@@ -17,13 +17,6 @@
   "menuWidth": 220,
   "column": [
     {
-      "label": "系统编号",
-      "prop": "sysNo",
-      "index": 1,
-      "width": 120,
-      "overHidden": true
-    },
-    {
       "label": "项目编码",
       "prop": "code",
       "search": true,
@@ -41,13 +34,18 @@
     },
     {
       "label": "客户名称",
-      "prop": "corpId",
-      "hide": true,
+      "prop": "corpNames",
       "index": 4,
       "width": 120,
       "overHidden": true
     },
     {
+      "label": "客户名称",
+      "prop": "corpId",
+      "search": true,
+      "hide": true
+    },
+    {
       "label": "应收金额",
       "prop": "debitAmount",
       "index": 5,

+ 33 - 12
src/views/workManagement/main-items/detailsPage.vue

@@ -86,6 +86,12 @@
               @click="rowCellTwo(row,index)"
               :disabled="row.strStatus !== '录入'"
             >{{row.$cellEdit?'修改完成':'修改'}}</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="rowDel(row,index)"
+              :disabled="row.strStatus == '结算完成'"
+            >删除</el-button>
           </template>
           <template slot="userid" slot-scope="{row,index}">
             <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
@@ -242,7 +248,7 @@
 <script>
   import option from "./configuration/detailsPage.json";
   import startOption from "./configuration/startDialog.json";
-  import { projectDetail,editMianProject,updateItemStatus,getSysNo } from "@/api/workManagement/mainProject";
+  import { projectDetail,editMianProject,updateItemStatus,getSysNo,getPidByItemId} from "@/api/workManagement/mainProject";
   //上传文件json
   import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
   //服务列表接口
@@ -581,8 +587,16 @@
       this.$set(this.form,"advanceAmount",0)
       this.$set(this.form,"settlmentAmount",0)
       this.$set(this.form,"balanceAmount",0)
-      this.id = BigInt(this.$route.query.id);//字符串转数字  超长用BigInt
-      this.getProjectDetail();
+      if(this.$route.query.id){
+        this.id = BigInt(this.$route.query.id);//字符串转数字  超长用BigInt
+        this.getProjectDetail();
+      }
+      if(this.$route.query.itemId){
+        getPidByItemId(this.$route.query.itemId).then((res)=>{
+          this.id =  res.data.data;
+          this.getProjectDetail();
+        })
+      }
       const params = {
         code : "affair_payment_term"
       }
@@ -642,15 +656,15 @@
             this.form = res.data.data;
             this.oldForm = Object.assign({},res.data.data);
             this.configuration.dicData = res.data.data.corpName; //给客户名称赋值
-            if(res.data.data.filesList){
-              this.upLoadData = res.data.data.filesList
-              this.oldUpLoadData = this.deepClone(res.data.data.filesList)
-            }
             if(res.data.data.itemList){
               this.operationDetailList(res.data.data.itemList);
             }else{
               this.data = [];
             }
+            if(res.data.data.filesList){
+              this.upLoadData = res.data.data.filesList
+              this.oldUpLoadData = this.deepClone(res.data.data.filesList)
+            }
           })
         }else{
           getSysNo().then(res =>{
@@ -673,24 +687,31 @@
         })
         //如果 明细列表存在 请核之后的状态 禁止编辑一些输入框
         if(status.findIndex(item => item == false) == 0){
+          console.log(1)
           this.basicData.column.forEach(item =>{
             if(item.prop == "code" || item.prop == "cname" || item.prop == "corpId" || item.prop == "debitAmount"){
               item.disabled = true
               this.configuration.disabled = true
             }
           })
+        }else{
+          console.log(2)
+          this.basicData.column.forEach(item =>{
+            if(item.prop == "code" || item.prop == "cname" || item.prop == "corpId" || item.prop == "debitAmount"){
+              item.disabled = false
+              this.configuration.disabled = false
+            }
+          })
         }
       },
       //删除列表后面的删除按钮触发触发(row, index, done)
-      rowDel(row, index, done) {
+      rowDel(row, index) {
         this.$confirm("确定将此明细删除?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.data.splice(index,0)
-          // 数据回调进行刷新
-          done(row);
+          this.data.splice(index,1)
         });
       },
       // 合同金额
@@ -785,7 +806,7 @@
           let valids = true;
           if(this.data.length !=0){
             this.data.forEach((item) =>{
-              if((item.userid ==""  || !item.deptid || !item.amount) && valids){
+              if((item.userid ==""  || !item.deptid) && valids){
                 this.$message({
                   type: "warning",
                   message: "请检查明细列表第 "+(item.$index +1 )+" 行必填项"

+ 18 - 0
src/views/workManagement/main-items/list.vue

@@ -5,6 +5,7 @@
       :data="data"
       :option="optionTable"
       :page.sync="page"
+      :search.sync="search"
       :table-loading="loading"
       @row-del="rowDel"
       @row-update="rowUpdate"
@@ -14,6 +15,12 @@
       @on-load="getList"
       @saveColumn="saveColumn"
     >
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
       <template slot="menuLeft">
         <el-button type="primary"
                    size="small"
@@ -62,6 +69,17 @@ export default {
       switchDialog:false,
       loading: false,
       data: [],
+      search:{},
+      configuration:{
+        multipleChoices:false,
+        multiple:false,
+        disabled:false,
+        searchShow:true,
+        collapseTags:false,
+        clearable:true,
+        placeholder:'请点击右边按钮选择',
+        dicData:[]
+      },
       optionTable: option,
       page: {
         currentPage: 1,

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

@@ -54,8 +54,15 @@
     },
     {
       "label": "客户名称",
-      "prop": "cornName",
+      "prop": "corpNames",
       "overHidden": true,
+      "index": 4,
+      "width": 120
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpId",
+      "hide": true,
       "search": true,
       "index": 4,
       "width": 120

+ 6 - 4
src/views/workManagement/receipt/configuration/statisticalList.json

@@ -9,9 +9,9 @@
   "searchShow": true,
   "searchMenuPosition": "right",
   "tree": true,
-  "searchMenuSpan": 18,
+  "searchMenuSpan": 12,
   "selection": false,
-  "viewBtn": true,
+  "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 150,
@@ -57,7 +57,7 @@
       "prop": "status",
       "type": "select",
       "search": true,
-      "searchOrder": 5,
+      "searchOrder": 6,
       "overHidden": true,
       "dicData": [
         {
@@ -100,7 +100,7 @@
     {
       "label": "服务项目",
       "prop": "pname",
-      "searchOrder": 2,
+      "searchOrder": 5,
       "search": true,
       "overHidden": true,
       "width": 120
@@ -108,6 +108,8 @@
     {
       "label": "承做人",
       "prop": "userName",
+      "search": true,
+      "searchOrder": 2,
       "overHidden": true,
       "width": 120
     },

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

@@ -5,6 +5,7 @@
       :data="data"
       :option="option"
       :page.sync="page"
+      :search.sync="search"
       :table-loading="loading"
       @row-del="rowDel"
       @size-change="sizeChange"
@@ -14,6 +15,12 @@
       @on-load="getList"
       @saveColumn="saveColumn"
     >
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
       <template slot-scope="{row,index}" slot="menuLeft">
         <el-button
           icon="el-icon-printer"
@@ -24,7 +31,6 @@
         </el-button>
       </template>
       <template slot-scope="scope" slot="menu">
-
         <el-button
           type="text"
           icon="el-icon-edit"
@@ -47,6 +53,17 @@
         loading: false,
         data: [],
         option: option,
+        search:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
         page: {
           currentPage: 1,
           total: 0,

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

@@ -29,8 +29,14 @@
           :configuration="configuration"
         ></select-component>
       </template>
-
-
+      <template slot-scope="scope" slot="menu">
+        <el-button
+          type="text"
+          size="small"
+          @click.stop="check(scope.row, scope.index)"
+        >查 看
+        </el-button>
+      </template>
     </avue-crud>
   </basic-container>
 </template>
@@ -85,6 +91,12 @@
       rowSave() {
 
       },
+      check(row,index){
+        this.$router.push({
+          path: "/mainItems_detailsPage",
+          query: { itemId: row.id }
+        });
+      },
       //点击搜索按钮触发
       searchChange(params, done) {
         this.onLoad(this.page, params);

+ 13 - 12
src/views/workManagement/task/configuration/mainList.json

@@ -7,7 +7,7 @@
   "tip": false,
   "searchShow": true,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 18,
+  "searchMenuSpan": 24,
   "tree": true,
   "selection": false,
   "addBtn": false,
@@ -15,7 +15,7 @@
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 150,
-  "searchLabelWidth": 130,
+  "searchLabelWidth": 100,
   "column": [
     {
       "label": "状态",
@@ -26,6 +26,10 @@
       "type": "select",
       "dicData": [
         {
+          "label": "已审核",
+          "value": "1"
+        },
+        {
           "label": "正在结算",
           "value": "4"
         },
@@ -46,22 +50,19 @@
     {
       "label": "客户名称",
       "overHidden": true,
-      "search": true,
       "prop": "cornName",
-      "searchOrder": 1,
       "width": 220
     },
     {
-      "label": "服务项目",
-      "prop": "pname",
-      "overHidden": true,
-      "width": 120
+      "label": "客户名称",
+      "hide": true,
+      "search": true,
+      "prop": "cornId",
+      "searchOrder": 1
     },
     {
-      "label": "承做人",
-      "prop": "userName",
-      "search": true,
-      "searchOrder": 2,
+      "label": "服务项目",
+      "prop": "pname",
       "overHidden": true,
       "width": 120
     },

+ 18 - 0
src/views/workManagement/task/index.vue

@@ -5,6 +5,7 @@
                ref="crud"
                v-model="form"
                :page.sync="page"
+               :search.sync="search"
                :table-loading="loading"
                @search-change="searchChange"
                @search-reset="searchReset"
@@ -13,6 +14,12 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot="cornIdSearch">
+        <select-component
+          v-model="search.cornId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
       <template slot="menuLeft">
         <el-button
           icon="el-icon-printer"
@@ -53,6 +60,17 @@
       return {
         loading : false,
         form: {},
+        search:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
         option: option,
         parentId:0,
         dataList: [],