qinbai 3 anos atrás
pai
commit
fbf8e3a322

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

@@ -39,7 +39,7 @@
       "label": "任务部门",
       "prop": "deptid",
       "type":"tree",
-      "dicUrl": "/api/blade-system/dept/tree?tenantId=",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
       "props": {
         "label": "title",
         "value": "value"
@@ -77,7 +77,14 @@
       "label": "合计金额",
       "prop": "amount",
       "width": 120,
-      "cell": true
+      "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": " ",
+          "trigger": "blur"
+        }
+      ]
     },
     {
       "label": "频率",

+ 38 - 23
src/views/workManagement/main-items/detailsPage.vue

@@ -5,14 +5,13 @@
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
-        <el-button type="primary"
+        <el-button type="success"
                    class="el-button--small-yh add-customer-btn-two"
-                   icon="el-icon-plus"
-                   @click.stop="addMainProject">新 单
+                   @click.stop="addMainProject">复制新单
         </el-button>
         <el-button class="el-button--small-yh add-customer-btn" type="primary"
                    @click.stop="editMainProject"
-        >{{this.id?"确认修改" :"确认保存"}}
+        >{{this.id?"确认修改" :"确认新增"}}
         </el-button>
       </div>
     </div>
@@ -63,7 +62,7 @@
             <el-button type="primary"
                        size="small"
                        icon="el-icon-plus"
-                       @click="serviceDialog = true">新增明细
+                       @click="serviceDialog = true">录入明细
             </el-button>
             <el-button type="info"
                        size="small"
@@ -72,11 +71,10 @@
           </template>
           <template slot="menuRight">
             <el-button
-              icon="el-icon-printer"
               size="small"
-              type="primary"
+              type="info"
               @click.stop="openReport()"
-            >报表
+            >导出报表
             </el-button>
           </template>
           <template slot-scope="{row,index}"  slot="menu">
@@ -472,6 +470,7 @@
       this.optionTable.column[7].change = function (val) {
         val.row.amount = val.row.price*val.value;
       }
+
       this.$set(this.form,"debitAmount",0)
       this.$set(this.form,"advanceAmount",0)
       this.$set(this.form,"settlmentAmount",0)
@@ -494,7 +493,10 @@
         if(this.id){
           projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
             this.form = res.data.data;
-            this.upLoadData =res.data.data.filesList
+            this.configuration.dicData = res.data.data.corpName;
+            if(res.data.data.filesList){
+              this.upLoadData = res.data.data.filesList
+            }
             if(res.data.data.itemList){
               this.data = res.data.data.itemList;
               let status = [];
@@ -592,20 +594,33 @@
       //请核
       beforePleaseCheck(){
         if(this.crudSelection.length!=0){
+          let resultUserName = [];
           let result = [];
           this.crudSelection.forEach(item=>{
             // 新录入状态下  才可提交审核
-            item.status == 0 ? result.push(true) : result.push(false)
+            item.createUserName ? resultUserName.push(true) : resultUserName.push(false) //如果没有创建人并且为新录入  提示保存
+            item.strStatus === "录入" ? result.push(true) : result.push(false) //判断所有的是否为录入状态
           })
-          //如果数组内有一个 为false  则为false
-          if(result.findIndex(item => item != true) == -1){
-            this.editMainProject(10086);
+          if(resultUserName.findIndex(item => item != true) == -1){
+            // 如果数组内有一个 为false  则为false
+            if(result.findIndex(item => item != true) == -1){
+              this.editMainProject(10086);
+            }else{
+              this.$message({
+                type: "error",
+                message: "请核数据中存在已请核数据!"
+              });
+              return
+            }
           }else{
-            this.$message({
-              type: "error",
-              message: "请核数据中存在已请核数据!"
-            });
-            return;
+            this.$confirm("列表内存在新录入数据,是否先保存此数据?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              this.editMainProject();
+              return
+            })
           }
         }else{
           this.$message({
@@ -641,9 +656,9 @@
         this.$refs["form"].validate((valid) => {
           //校验明细列表
           let valids = true;
-          if(this.crudSelection.length != 0 ){
-            this.crudSelection.forEach((item) =>{
-              if((item.userid ==""  || !item.deptid) && valids){
+          if(this.data.length !=0){
+            this.data.forEach((item) =>{
+              if((item.userid ==""  || !item.deptid || !item.amount) && valids){
                 this.$message({
                   type: "warning",
                   message: "请检查明细列表第 "+(item.$index +1 )+" 行必填项"
@@ -674,8 +689,8 @@
                 this.data = []
                 this.upLoadData = []
                 this.id = ''
-              }else{
-                this.getProjectDetail(pleaseCheck);
+              }else if(pleaseCheck === 10086){
+                this.getProjectDetail(pleaseCheck)
               }
             })
           }

+ 8 - 4
src/views/workManagement/main-items/list.vue

@@ -22,11 +22,15 @@
                    icon="el-icon-plus"
                    @click="addMainItems">新 单
         </el-button>
-        <el-button icon="el-icon-printer"
-                   size="small"
-                   type="primary"
+        <el-button size="small"
+                   type="success"
+                   @click.stop=""
+        >复制新单
+        </el-button>
+        <el-button size="small"
+                   type="info"
                    @click.stop="openReport()"
-          >报 表
+          >导出报表
         </el-button>
       </template>
       <template slot-scope="scope" slot="menu">

+ 32 - 18
src/views/workManagement/receipt/configuration/settleAccountsDetailsPage.json

@@ -39,12 +39,11 @@
       "label": "任务部门",
       "prop": "deptid",
       "type":"tree",
-      "dicUrl": "/api/blade-system/dept/tree?tenantId=",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
       "props": {
         "label": "title",
         "value": "value"
       },
-      "cell": true,
       "slot": true,
       "width": 150,
       "rules": [
@@ -56,28 +55,47 @@
       ]
     },
     {
+      "label": "账户名称",
+      "prop": "accountName",
+      "width": 120
+    },
+    {
+      "label": "开户银行",
+      "prop": "accountBank",
+      "width": 120
+    },
+    {
+      "label": "银行账号",
+      "prop": "accountNo",
+      "width": 120
+    },
+    {
+      "label": "结算日期",
+      "prop": "payTime",
+      "width": 120,
+      "valueFormat": "yyyy-MM-dd",
+      "format": "yyyy-MM-dd",
+      "type": "date"
+    },
+    {
       "label": "单价",
       "prop": "price",
-      "width": 120,
-      "cell": true
+      "width": 120
     },
     {
       "label": "计价单位",
       "prop": "unit",
-      "width": 120,
-      "cell": true
+      "width": 120
     },
     {
       "label": "数量",
       "prop": "quantity",
-      "width": 120,
-      "cell": true
+      "width": 120
     },
     {
       "label": "合计金额",
       "prop": "amount",
-      "width": 120,
-      "cell": true
+      "width": 120
     },
     {
       "label": "频率",
@@ -88,8 +106,7 @@
         "label": "dictValue",
         "value": "dictKey"
       },
-      "width": 120,
-      "cell": true
+      "width": 120
     },
     {
       "label": "提醒日",
@@ -97,8 +114,7 @@
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
       "format": "yyyy-MM-dd",
       "type": "date",
-      "width": 150,
-      "cell": true
+      "width": 150
     },
     {
       "label": "需求开始日期",
@@ -106,8 +122,7 @@
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
       "format": "yyyy-MM-dd",
       "type": "date",
-      "width": 150,
-      "cell": true
+      "width": 150
     },
     {
       "label": "需求完成日期",
@@ -115,8 +130,7 @@
       "valueFormat": "yyyy-MM-dd HH:mm:ss",
       "format": "yyyy-MM-dd",
       "type": "date",
-      "width": 150,
-      "cell": true
+      "width": 150
     },
     {
       "label": "制单人",

+ 79 - 33
src/views/workManagement/receipt/settleAccountsDetailsPage.vue

@@ -5,6 +5,10 @@
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
+        <el-button class="el-button--small-yh add-customer-btn" type="primary"
+                   @click.stop="editMainProject"
+        >{{this.id?"确认修改" :"确认新增"}}
+        </el-button>
       </div>
     </div>
     <div style="margin-top: 60px">
@@ -53,6 +57,7 @@
               type="text"
               icon="el-icon-check"
               size="small"
+              v-if="scope.row.status == 4"
               @click.stop="beforeCloseAccount(scope.row,scope.index)"
             >结 算
             </el-button>
@@ -88,20 +93,24 @@
       :close-on-click-modal="false"
       :destroy-on-close="true"
       :close-on-press-escape="false">
-      <el-form v-model="accountFormData">
-        <el-form-item label="账户名称:"  class="landConFrom-input" prop="accountName">
-          <el-input v-model="accountFormData.accountName" style="width: 200px;"></el-input>
+
+      <el-form  :model="accountFormData" ref="accountFormData">
+        <el-form-item label="账户名称"  class="landConFrom-input" prop="accountName" :rules="rules">
+          <el-input v-model="accountFormData.accountName" style="width: 220px;" size="small" clearable  placeholder="请输入" ></el-input>
+        </el-form-item>
+        <el-form-item label="开户银行"  class="landConFrom-input" prop="accountBank" :rules="rules">
+          <el-input v-model="accountFormData.accountBank" style="width: 220px;"  size="small" clearable autocomplete="off" placeholder="请输入" ></el-input>
         </el-form-item>
-        <el-form-item label="开户银行:"  class="landConFrom-input" prop="accountBank">
-          <el-input v-model="accountFormData.accountBank"  style="width: 200px;"></el-input>
+        <el-form-item label="银行账号"  class="landConFrom-input" prop="accountNo"  :rules="rules">
+          <el-input v-model="accountFormData.accountNo" style="width: 220px;" size="small" clearable autocomplete="off" placeholder="请输入" ></el-input>
         </el-form-item>
-        <el-form-item label="银行账号:"  class="landConFrom-input" prop="accountNo">
-          <el-input v-model="accountFormData.accountNo"  style="width: 200px;"></el-input>
+        <el-form-item label="结算日期"  class="landConFrom-input" prop="payTime"  :rules="rules">
+          <el-date-picker type="date" v-model="accountFormData.payTime" value-format="yyyy-MM-dd HH:mm:ss"  size="small" clearable  placeholder="日期" ></el-date-picker>
         </el-form-item>
       </el-form>
       <span slot="footer" style="display: flex; justify-content: center">
           <el-button @click.stop="accountDialog = false , accountFormData = {}" size="small">取 消</el-button>
-          <el-button type="primary"  size="small" @click="closeAccount">结算</el-button>
+          <el-button type="primary"  size="small" @click="closeAccount('accountFormData')">结算</el-button>
       </span>
     </el-dialog>
   </div>
@@ -110,9 +119,12 @@
 <script>
   import option from "./configuration/settleAccountsDetailsPage.json";
   import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
-  import { projectDetail,updateItemStatus } from "@/api/workManagement/mainProject";
+  import { projectDetail,editMianProject,updateItemStatus } from "@/api/workManagement/mainProject";
   //业务字典
   import { getDictionary } from "@/api/system/dictbiz";
+  //上传附件删除
+  import { corpsbank } from "@/api/basicData/configuration"
+
 
   export default {
     name: "customerInformation",
@@ -123,10 +135,13 @@
         aaccount:{},
         form: {},
         accountFormData:{
-          accountName:'',
-          accountBank:'',
-          accountNo:'',
         },
+        rules:[{
+          required: true,
+          message: ' ',
+          trigger: 'blur'
+        }
+        ],
         option: option,
         parentId:0,
         account:{},
@@ -328,6 +343,9 @@
               this.dataList = res.data.data.itemList;
               this.loading = false;
             }
+            if(res.data.data.filesList){
+              this.upLoadData = res.data.data.filesList
+            }
           })
         }
       },
@@ -336,27 +354,33 @@
         this.aaccount = row;
         this.accountDialog = true;
       },
-      closeAccount(){
-        this.$confirm("确认结算此明细?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          updateItemStatus(this.aaccount.id,5,
-            this.accountFormData.accountName,
-            this.accountFormData.accountBank,
-            this.accountFormData.accountNo,).then(res =>{
-            if(res.data.success){
-              this.$message({
-                type: "success",
-                message: "操作成功!"
-              });
-              this.accountFormData = {},
-              this.accountDialog = false;
-              this.getProjectDetail();
-            }
-          })
-        });
+      closeAccount(form){
+        this.$refs[form].validate((valid) => {
+          console.log(132)
+          if(valid){
+            this.$confirm("确认结算此明细?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              updateItemStatus(this.aaccount.id,5,
+                this.accountFormData.accountName,
+                this.accountFormData.accountBank,
+                this.accountFormData.accountNo,
+                this.accountFormData.payTime,).then(res =>{
+                if(res.data.success){
+                  this.$message({
+                    type: "success",
+                    message: "操作成功!"
+                  });
+                  this.accountFormData = {},
+                    this.accountDialog = false;
+                  this.getProjectDetail();
+                }
+              })
+            });
+          }
+        })
       },
       //结算
       callAccount(row,index){
@@ -384,6 +408,23 @@
           query: {}
         });
       },
+      //新增 修改
+      editMainProject(){
+        const params = {
+          ...this.form,
+          itemList:this.dataList,
+          filesList:this.upLoadData
+        }
+        editMianProject(params).then(res =>{
+          if(res.data.success){
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.getProjectDetail()
+          }
+        })
+      },
       searchReset() {
         console.log('1')
       },
@@ -457,6 +498,11 @@
   ::v-deep .el-form-item {
     margin-bottom: 0;
   }
+  .add-customer-btn {
+    position: fixed;
+    right: 36px;
+    top: 115px;
+  }
   .landConFrom-input{
     display:flex;
     justify-content:center;

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

@@ -82,7 +82,7 @@
       "prop": "deptid",
       "search": true,
       "type":"tree",
-      "dicUrl": "/api/blade-system/dept/tree?tenantId=",
+      "dicUrl": "/api/blade-system/dept/tree?tenantId=096359",
       "props": {
         "label": "title",
         "value": "value"