Bläddra i källkod

财务-bug修改

wangqiang 2 år sedan
förälder
incheckning
2f7ad267db

+ 7 - 0
src/api/cw/workContract/ContractInfoService.js

@@ -43,4 +43,11 @@ export default class ContractInfoService {
       data: param
     })
   }
+  updateInfo (param) {
+    return request({
+      url: '/contract/registration/updateInfo',
+      method: 'post',
+      data: param
+    })
+  }
 }

+ 8 - 8
src/views/modules/cw/reportCancellApply/ReportCancellApplyForm.vue

@@ -216,9 +216,9 @@
           this.inputForm.cwProjectInfoList[index].cwFileInfoList = list
           this.inputForm.cwProjectInfoList[index].fileNumber = list.length
           this.tableKeyClient = Math.random()
-          console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
-          console.log('list.length', list.length)
-          console.log(list)
+          // console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
+          // console.log('list.length', list.length)
+          // console.log(list)
         })
       },
       getKeyWatch (keyWatch) {
@@ -488,18 +488,18 @@
               id: this.uuid,
               servedUnitId: item.id
             }
-            console.log('新增行数据填入')
-            console.log('item', item)
-            console.log('d', d)
+            // console.log('新增行数据填入')
+            // console.log('item', item)
+            // console.log('d', d)
             this.$refs.clientTable.insertAt(d)
             this.inputForm.cwProjectInfoList.push(d)
-            console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
+            // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
             this.tableKeyClient = Math.random()
           })
         })
       },
       getContract (row) {
-        console.log('row', row)
+        // console.log('row', row)
         this.inputForm.projectName = row.projectName // 项目名称
         this.inputForm.projectId = row.id // 项目id
         this.inputForm.projectMasterName = row.projectMasterName // 项目经理

+ 15 - 3
src/views/modules/cw/reportCancellApply/ReportCancellApplyList.vue

@@ -8,8 +8,20 @@
       <el-form-item label="项目名称" prop="projectName">
         <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
-      <el-form-item label="项目经理" prop="projectMaster">
-        <el-input size="small" v-model="searchForm.projectMaster" placeholder="请输入项目经理" clearable></el-input>
+      <el-form-item label="项目经理" prop="projectMasterId">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :value="searchForm.projectMasterId"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.projectMasterId=value}"/>
+<!--        <el-input size="small" v-model="searchForm.projectMaster" placeholder="请输入项目经理" clearable></el-input>-->
       </el-form-item>
 <!--      <el-form-item label="创建人" prop="createBy">-->
 <!--        <el-input size="small" v-model="searchForm.createBy" placeholder="请输入创建人" clearable></el-input>-->
@@ -138,7 +150,7 @@
         searchForm: {
           projectNumber: '',
           projectName: '',
-          projectMaster: '',
+          projectMasterId: '',
           createBy: '',
           contractDates: []
         },

+ 2 - 5
src/views/modules/cw/reportCancellApply/ReportCancellApplyTaskForm.vue

@@ -9,7 +9,8 @@
             <el-col :span="12">
               <el-form-item label="报告文号" prop="reportNo"
                             :rules="[
-
+                              {required: true, message:'报告文号不能为空', trigger:'blur'},
+                              {required: true, message:'报告文号不能为空', trigger:'change'}
                    ]">
                 <el-input size="medium" :readonly="true" @focus="openContractForm()" v-model="inputForm.reportNo" placeholder="请填写报告文号">
                   <el-button slot="append" icon="el-icon-search" @click="openContractForm()"></el-button>
@@ -223,7 +224,6 @@
         }
       },
       getContract (row) {
-        console.log('row', row)
         this.inputForm.projectName = row.projectName // 项目名称
         this.inputForm.projectId = row.id // 项目id
         this.inputForm.projectMasterName = row.projectMasterName // 项目经理
@@ -246,7 +246,6 @@
       },
       async agreeForm (callback) {
         await this.reportCancellApplyService.queryById(this.inputForm.id).then(({data}) => {
-          console.log('进来了看看data', data)
           if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
@@ -302,8 +301,6 @@
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
             this.reportCancellApplyService.saveForm(this.inputForm).then(({data}) => {
-              console.log('businessTable', data.businessTable)
-              console.log('businessId', data.businessId)
               callback(data.businessTable, data.businessId, this.inputForm)
               this.loading = false
             }).catch(() => {

+ 1 - 1
src/views/modules/cw/reportManagement/ProjectInfoForm.vue

@@ -144,7 +144,7 @@
           'orders': this.tablePage.orders,
           ...this.searchForm
         }).then(({data}) => {
-          console.log('data2', data)
+          // console.log('data2', data)
           this.dataList = data.records
           this.tablePage.total = data.total
           this.loading = false

+ 7 - 7
src/views/modules/cw/reportManagement/ReportManagementForm.vue

@@ -378,9 +378,9 @@
           this.inputForm.cwProjectInfoList[index].cwFileInfoList = list
           this.inputForm.cwProjectInfoList[index].fileNumber = list.length
           this.tableKeyClient = Math.random()
-          console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
-          console.log('list.length', list.length)
-          console.log(list)
+          // console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
+          // console.log('list.length', list.length)
+          // console.log(list)
         })
       },
       getKeyWatch (keyWatch) {
@@ -648,12 +648,12 @@
               id: this.uuid,
               servedUnitId: item.id
             }
-            console.log('新增行数据填入')
-            console.log('item', item)
-            console.log('d', d)
+            // console.log('新增行数据填入')
+            // console.log('item', item)
+            // console.log('d', d)
             this.$refs.clientTable.insertAt(d)
             this.inputForm.cwProjectInfoList.push(d)
-            console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
+            // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
             this.tableKeyClient = Math.random()
           })
         })

+ 19 - 7
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -8,8 +8,20 @@
       <el-form-item label="项目名称" prop="projectName">
         <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
       </el-form-item>
-      <el-form-item label="项目经理" prop="projectMasterName">
-        <el-input size="small" v-model="searchForm.projectMasterName" placeholder="请输入项目经理" clearable></el-input>
+      <el-form-item label="项目经理" prop="projectMasterId">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :value="searchForm.projectMasterId"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.projectMasterId=value}"/>
+<!--        <el-input size="small" v-model="searchForm.projectMasterName" placeholder="请输入项目经理" clearable></el-input>-->
       </el-form-item>
       <el-form-item label="创建人" prop="createBy">
         <SelectUserTree
@@ -134,7 +146,7 @@
         searchForm: {
           projectNumber: '',
           projectName: '',
-          projectMasterName: '',
+          projectMasterId: '',
           createBy: '',
           contractDates: []
         },
@@ -288,8 +300,8 @@
       },
       start () {
         // 读取流程表单
-        let tabTitle = `发起流程【质控管理员审核】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [质控管理员审核]`
+        let tabTitle = `发起流程【报告质控审核】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [报告质控审核]`
         this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
           status: 'startAndHold'}).then((data) => {
             this.$router.push({
@@ -312,8 +324,8 @@
       // 发起客户登记
       push (row) {
         // 读取流程表单
-        let title = `发起流程【质控管理员审核】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[质控管理员审核]`
+        let title = `发起流程【报告质控审核】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[报告质控审核]`
         let status = 'startAndHold'
         if (row.status === '3' || row.status === '4') {
           status = 'startAndClose'

+ 34 - 29
src/views/modules/cw/reportManagement/ReportManagementTaskForm.vue

@@ -375,9 +375,9 @@
           this.inputForm.cwProjectInfoList[index].cwFileInfoList = list
           this.inputForm.cwProjectInfoList[index].fileNumber = list.length
           this.tableKeyClient = Math.random()
-          console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
-          console.log('list.length', list.length)
-          console.log(list)
+          // console.log('this.inputForm.cwFileInfoList', this.inputForm.cwFileInfoList)
+          // console.log('list.length', list.length)
+          // console.log(list)
         })
       },
       getKeyWatch (keyWatch) {
@@ -453,6 +453,8 @@
           this.$refs.inputForm.resetFields()
           this.loading = true
           this.projectReportService.queryById(this.inputForm.id).then(({data}) => {
+            this.inputForm.status = data.status
+            // console.log('this.inputForm.status', this.inputForm.status)
             // this.$refs.uploadComponent.clearUpload()
             this.inputForm = this.recover(this.inputForm, data)
             this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
@@ -482,7 +484,7 @@
         }
       },
       getContract (row) {
-        console.log('row', row)
+        // console.log('row', row)
         this.inputForm.projectName = row.projectName // 项目名称
         this.inputForm.projectId = row.id // 项目id
         this.inputForm.projectNumber = row.projectNumber // 项目编号
@@ -504,7 +506,7 @@
       },
       async agreeForm (callback) {
         await this.projectReportService.queryById(this.inputForm.id).then(({data}) => {
-          console.log('进来了看看data', data)
+          // console.log('进来了看看data', data)
           if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
@@ -563,27 +565,30 @@
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
-            console.log('进来了')
-            this.inputForm.cwProjectInfoList.forEach((item, index) => {
-              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportDate)) {
-                this.$message.error('报告日期不能为空')
-                this.loading = false
-                throw new Error('报告日期不能为空')
-              }
-              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportType)) {
-                this.$message.error('报告类型不能为空')
-                this.loading = false
-                throw new Error('报告类型不能为空')
-              }
-              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].opinionType)) {
-                this.$message.error('意见类型不能为空')
-                this.loading = false
-                throw new Error('意见类型不能为空')
-              }
-            })
+            // console.log('进来了')
+            // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
+            if (this.inputForm.cwProjectInfoList !== undefined) {
+              this.inputForm.cwProjectInfoList.forEach((item, index) => {
+                if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportDate)) {
+                  this.$message.error('报告日期不能为空')
+                  this.loading = false
+                  throw new Error('报告日期不能为空')
+                }
+                if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportType)) {
+                  this.$message.error('报告类型不能为空')
+                  this.loading = false
+                  throw new Error('报告类型不能为空')
+                }
+                if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].opinionType)) {
+                  this.$message.error('意见类型不能为空')
+                  this.loading = false
+                  throw new Error('意见类型不能为空')
+                }
+              })
+            }
             this.projectReportService.saveForm(this.inputForm).then(({data}) => {
-              console.log('businessTable', data.businessTable)
-              console.log('businessId', data.businessId)
+              // console.log('businessTable', data.businessTable)
+              // console.log('businessId', data.businessId)
               callback(data.businessTable, data.businessId, this.inputForm)
               this.loading = false
             }).catch(() => {
@@ -703,12 +708,12 @@
               id: this.uuid,
               servedUnitId: item.id
             }
-            console.log('新增行数据填入')
-            console.log('item', item)
-            console.log('d', d)
+            // console.log('新增行数据填入')
+            // console.log('item', item)
+            // console.log('d', d)
             this.$refs.clientTable.insertAt(d)
             this.inputForm.cwProjectInfoList.push(d)
-            console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
+            // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
             this.tableKeyClient = Math.random()
           })
         })

+ 2 - 2
src/views/modules/cw/reportManagement/ReportServiceUnitForm.vue

@@ -93,7 +93,7 @@
     },
     methods: {
       init (id) {
-        console.log('projectID', id)
+        // console.log('projectID', id)
         this.title = '客户选择'
         this.visibleChoose = true
         this.list(id)
@@ -132,7 +132,7 @@
           'projectId': id,
           ...this.searchForm
         }).then(({data}) => {
-          console.log('进来了projectReportService', data)
+          // console.log('进来了projectReportService', data)
           this.dataList = data.records
           this.tablePage.total = data.total
           this.loading = false

+ 36 - 22
src/views/modules/cw/workContract/ContractFileForm.vue

@@ -215,7 +215,7 @@
                 </vxe-table-column>
                 <vxe-table-column align="center" title="操作" width="100">
                   <template v-slot="scope">
-                    <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
+                    <el-button size="mini" :disabled="true" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
                   </template>
                 </vxe-table-column>
               </vxe-table>
@@ -367,7 +367,8 @@
       },
       bus: {
         get () {
-          this.$refs.archiveFile.setDividerName('合同归档附件')
+          this.$refs.archiveFile.setDividerName('附件', false)
+          this.$refs.uploadFile.setDividerName('附件', false)
           return this.businessId
         },
         set (val) {
@@ -413,8 +414,8 @@
         this.showViewer = false
       },
       init (method, id) {
-        console.log(method)
-        console.log('id', id)
+        // console.log(method)
+        // console.log('id', id)
         this.dataList = []
         this.dataListNew = []
         this.method = method
@@ -462,19 +463,27 @@
             this.$refs.archiveFile.clearUpload()
             this.$refs.uploadFile.clearUpload()
             this.inputForm.contractProperList = data1.data.contractProperList
-            console.log('data1.id', data1.data.id)
-            console.log('data1.data.filedType', data1.data.filedType)
+            // console.log('data1.id', data1.data.id)
+            // console.log('data1.data.filedType', data1.data.filedType)
             if ((data1.data.filedType !== '0' & data1.data.filedType !== undefined) || data1.data.id === undefined) {
-              console.log('data1.22222')
+              // console.log('data1.22222')
+              // console.log('data1.data.contractProperList', data1.data.contractProperList)
+              this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
               this.contractFileService.findById(this.inputForm.id).then(data2 => {
                 this.inputForm.contractProperList = data2.data.contractProperList
                 this.inputForm.contractInfoList = data2.data.contractInfoList
-                console.log('data2', data2)
+                // console.log('data2', data2)
                 this.contractInfoService.findById(data2.data.contractInfoId).then(data3 => {
                   data3.data.contractProperList = this.inputForm.contractProperList
                   data3.data.contractInfoList = this.inputForm.contractInfoList
-                  this.$refs.uploadFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
-                  this.$refs.archiveFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                  if (data3.data.filedType === '2' || data3.data.filedType === '5') {
+                    // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                    this.$refs.archiveFile.newUpload('view', data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+                  } else {
+                    // this.$refs.uploadFile.newUpload('view', data3.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
+                    this.$refs.archiveFile.newUpload(method, data3.data.contractInfoList, 'cwWorkContract', null, null, null, null, false)
+                  }
+                  // console.log('data3', data3)
                   this.saveData(data3.data, method)
                   if (this.formReadOnly) {
                     method = 'view'
@@ -482,7 +491,7 @@
                 })
               })
             } else {
-              console.log('进来了22')
+              // console.log('进来了22')
               this.$refs.uploadFile.newUpload('view', data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
               this.saveData(data1.data, method)
               if (this.formReadOnly) {
@@ -498,7 +507,7 @@
         // console.log(event)
       },
       saveData (data, method) {
-        console.log('data', data)
+        // console.log('data', data)
         this.inputForm = this.recover(this.inputForm, data)
         this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
       },
@@ -512,7 +521,7 @@
         this.$refs.workClientChooseForm.init()
       },
       getWorkClientChoose (list) {
-        console.log('list', list)
+        // console.log('list', list)
         if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
           this.inputForm.cwWorkClientContactDTOList = []
         }
@@ -551,7 +560,7 @@
           if (this.status === 'startAndHoldFiled') {
             this.inputForm.status = '5'
           }
-          await this.contractInfoService.save(this.inputForm)
+          // await this.contractInfoService.save(this.inputForm)
         }
         // 合同登记归档暂存
         if (this.status === 'startAndHoldFiled') {
@@ -560,6 +569,7 @@
           this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
           // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
           this.contractFileService.save(this.inputForm)
+          this.contractInfoService.updateInfo(this.inputForm)
         }
         this.$refs.inputForm.resetFields()
         this.loading = false
@@ -568,18 +578,20 @@
       },
       // 送审
       startForm (callback) {
-        console.log('filedType', this.inputForm.id)
+        // console.log('filedType', this.inputForm.id)
         let id = this.inputForm.id
         this.loading = true
         this.inputForm.status = '5'
-        this.contractInfoService.save(this.inputForm)
-        console.log('inputForm', this.inputForm)
         this.inputForm.filedType = '2'
+        this.inputForm.contractProperList = []
+        this.contractInfoService.updateInfo(this.inputForm)
+        // console.log('inputForm', this.inputForm)
         this.inputForm.contractInfoId = id
         this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
-        this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
+        // console.log('this.inputForm', this.inputForm)
+        // this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
         this.contractFileService.save(this.inputForm).then(({data}) => {
-          console.log('data', data)
+          // console.log('data', data)
           callback(data.businessTable, data.businessId, this.inputForm)
           this.$refs.inputForm.resetFields()
           this.loading = false
@@ -590,10 +602,11 @@
         let id = this.inputForm.id
         this.loading = true
         this.inputForm.status = '5'
+        this.inputForm.filedType = '5'
         // this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
+        this.inputForm.contractProperList = []
         // console.log('this.inputForm.contractProperList', this.inputForm.contractProperList)
-        this.contractInfoService.save(this.inputForm)
-        this.inputForm.filedType = '5'
+        this.contractInfoService.updateInfo(this.inputForm)
         this.inputForm.contractInfoId = id
         // this.inputForm.contractInfoList = this.$refs.uploadFile.getDataList()
         this.contractFileService.save(this.inputForm).then(({data}) => {
@@ -609,6 +622,7 @@
         this.visible = false
         this.showVi = true
         this.$refs.archiveFile.clearUpload()
+        this.$refs.uploadFile.clearUpload()
       },
       httpRequest (file) {
         httpRequest(file, fileName(file), 'workContract')
@@ -713,7 +727,7 @@
         this.visable = false
       },
       updateStatusById (type) {
-        console.log('type' + type)
+        // console.log('type' + type)
         if (type === 'agree') {
           this.inputForm.filedType = '5'
           this.contractFileService.updateStatusById(this.inputForm)

+ 12 - 12
src/views/modules/cw/workContract/ContractNameForm.vue

@@ -421,8 +421,8 @@
         this.showViewer = false
       },
       init (method, id) {
-        console.log(method)
-        console.log('id', id)
+        // console.log(method)
+        // console.log('id', id)
         this.dataList = []
         this.dataListNew = []
         if (method === 'edit') {
@@ -476,14 +476,14 @@
             this.$refs.archiveFile.clearUpload()
             this.$refs.uploadFile.clearUpload()
             this.inputForm.contractProperList = data1.data.contractProperList
-            console.log('data1.id', data1.data.id)
-            console.log('data1.data.filedType', data1.data.filedType)
+            // console.log('data1.id', data1.data.id)
+            // console.log('data1.data.filedType', data1.data.filedType)
             if ((data1.data.filedType !== '0' & data1.data.filedType !== undefined) || data1.data.id === undefined) {
-              console.log('data1.22222')
+              // console.log('data1.22222')
               this.contractFileService.findById(this.inputForm.id).then(data2 => {
                 this.inputForm.contractProperList = data2.data.contractProperList
                 this.inputForm.contractInfoList = data2.data.contractInfoList
-                console.log('data2', data2)
+                // console.log('data2', data2)
                 this.contractInfoService.findById(data2.data.contractInfoId).then(data3 => {
                   data3.data.contractProperList = this.inputForm.contractProperList
                   data3.data.contractInfoList = this.inputForm.contractInfoList
@@ -496,7 +496,7 @@
                 })
               })
             } else {
-              console.log('进来了22')
+              // console.log('进来了22')
               this.$refs.uploadFile.newUpload(method, data1.data.contractProperList, 'cwWorkContract', null, null, null, null, false)
               this.$refs.archiveFile.newUpload('view', [], 'cwWorkContract', null, null, null, null, false)
               this.saveData(data1.data, method)
@@ -530,7 +530,7 @@
         // console.log(event)
       },
       saveData (data, method) {
-        console.log('data', data)
+        // console.log('data', data)
         this.inputForm = this.recover(this.inputForm, data)
         this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
       },
@@ -544,7 +544,7 @@
         this.$refs.workClientChooseForm.init()
       },
       getWorkClientChoose (list) {
-        console.log('list', list)
+        // console.log('list', list)
         if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
           this.inputForm.cwWorkClientContactDTOList = []
         }
@@ -600,18 +600,18 @@
       },
       // 送审
       startForm (callback) {
-        console.log('filedType', this.inputForm.id)
+        // console.log('filedType', this.inputForm.id)
         let id = this.inputForm.id
         this.loading = true
         this.inputForm.status = '5'
         this.contractInfoService.save(this.inputForm)
-        console.log('inputForm', this.inputForm)
+        // console.log('inputForm', this.inputForm)
         this.inputForm.filedType = '2'
         this.inputForm.contractInfoId = id
         this.inputForm.contractInfoList = this.$refs.archiveFile.getDataList()
         this.inputForm.contractProperList = this.$refs.uploadFile.getDataList()
         this.contractFileService.save(this.inputForm).then(({data}) => {
-          console.log('data', data)
+          // console.log('data', data)
           callback(data.businessTable, data.businessId, this.inputForm)
           this.$refs.inputForm.resetFields()
           this.loading = false

+ 11 - 11
src/views/modules/cw/workContract/ContractRegistration.vue

@@ -87,7 +87,7 @@
       <vxe-toolbar :refresh="{query: refreshList}" import export print custom>
         <template #buttons>
           <el-button v-if="hasPermission('cw:workContract:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
-          <el-button v-if="hasPermission('cw:workContract:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" plain>删除</el-button>
+          <el-button v-if="hasPermission('cw:workContract:del')" type="danger"   size="small" hidden icon="el-icon-delete" @click="del()" plain>删除</el-button>
         </template>
       </vxe-toolbar>
       <div style="height: calc(100% - 80px);">
@@ -109,7 +109,7 @@
           :data="dataList"
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
-          <vxe-column type="checkbox" width="40px"></vxe-column>
+<!--          <vxe-column type="checkbox" width="40px"></vxe-column>-->
 
           <vxe-column width="200px" title="合同编号" field="contractNo"></vxe-column>
           <vxe-column width="200px" title="合同名称" field="contractName">
@@ -121,7 +121,7 @@
           </vxe-column>
           <vxe-column width="200px" title="签约日期" field="signingDate"></vxe-column>
           <vxe-column width="200px" title="合同金额(元)" field="contractAmount"></vxe-column>
-          <vxe-column width="200px" title="所属部门" field="department"></vxe-column>
+          <vxe-column width="200px" title="所属部门" field="departmentName"></vxe-column>
           <vxe-column width="200px" title="创建人" field="createBy"></vxe-column>
           <vxe-column width="200px" title="创建日期" field="createDate"></vxe-column>
           <vxe-column width="200px" title="状态" field="status">
@@ -138,16 +138,16 @@
 
           <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cw:workContract:view')" type="text" size="small" @click="view(scope.row.id)">查看</el-button>
-              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '5' && scope.row.createId === create" type="text" size="small" @click="edit(scope.row)">修改</el-button>
+<!--              <el-button v-if="hasPermission('cw:workContract:view')" type="text" size="small" @click="view(scope.row.id)">查看</el-button>-->
+              <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '5' && scope.row.createId === $store.state.user.id" type="text" size="small" @click="edit(scope.row)">修改</el-button>
               <el-button v-if="hasPermission('cw:workContract:edit') && scope.row.status === '5' && isAdmin" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>
-              <el-button v-if="hasPermission('cw:workContract:del') && (scope.row.status === '1' || scope.row.status === '3' || scope.row.status === '4')  && scope.row.createId === create" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('cw:workContract:del') && (scope.row.status === '1' || scope.row.status === '3' || scope.row.status === '4')  && scope.row.createId === $store.state.user.id" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
               <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '2'" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '0' || scope.row.filedType === undefined)" type="text" size="small" @click="filed(scope.row.id)">归档</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '0' || scope.row.filedType === undefined)" type="text" size="small" @click="filed(scope.row.id)">归档</el-button>
               <!--归档暂存修改-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && scope.row.filedType === '1'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && scope.row.filedType === '1'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>
               <!--归档撤回驳回修改-->
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '3' || scope.row.filedType === '4')" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.createId === $store.state.user.id && (scope.row.filedType === '3' || scope.row.filedType === '4')" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>
               <!--归档撤回-->
               <el-button v-if="hasPermission('cw:workContract:back') && scope.row.status === '5' && scope.row.filedType === '2'" type="text"  size="small" @click="rebackFiled(scope.row)">撤回</el-button>
               </template>
@@ -256,7 +256,7 @@
       },
       user () {
         this.create = JSON.parse(localStorage.getItem('user')).id
-        console.log('createId', this.create)
+        // console.log('createId', this.create)
         return JSON.parse(localStorage.getItem('user'))
       }
     },
@@ -264,7 +264,7 @@
     methods: {
       // 获取数据列表
       refreshList () {
-        console.log('user', this.user)
+        // console.log('user', this.user)
         this.loading = true
         this.contractInfoService.list({
           'current': this.tablePage.currentPage,

+ 12 - 9
src/views/modules/cw/workContract/ContractRegistrationForm.vue

@@ -6,17 +6,17 @@
       <el-row  :gutter="0">
 
         <el-col :span="12">
-          <el-form-item label="合同编号" prop="contractNo">
-            <el-input maxlength="64" :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
           <el-form-item label="合同名称" prop="contractName"
                         :rules="[{required: true, message: '合同名称不能为空', trigger: 'blur'}
                  ]">
             <el-input v-model="inputForm.contractName" placeholder="请输入合同名称"     clearable></el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="12">
+          <el-form-item label="合同编号" prop="contractNo">
+            <el-input maxlength="64" :disabled="true" v-model="inputForm.contractNo" placeholder="自动生成"></el-input>
+          </el-form-item>
+        </el-col>
 <!--        <el-col :span="12">-->
 <!--          <el-form-item label="合同状态" prop="contractStatus">-->
 <!--            <el-input maxlength="64" v-model="inputForm.contractStatus" :disabled="true" placeholder="请输入合同状态"></el-input>-->
@@ -118,6 +118,7 @@
               :url="`/sys/office/treeData?type=2`"
               :value="inputForm.department"
               :accordion="true"
+              size="medium"
               @getValue="(value) => {inputForm.department=value}"/>
           </el-form-item>
         </el-col>
@@ -170,12 +171,12 @@
         </el-tab-pane>
         <el-tab-pane label="参与签约方" name="contactParty">
           <el-row :gutter="15">
-            <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="method === 'view'" @click="openWorkClient">
+            <el-button type="info" style="margin-bottom: 15px" size="mini" :disabled="formReadOnly" @click="openWorkClient">
               新增参与签约方
             </el-button>
           </el-row>
-          <el-row  :gutter="15">
-            <el-form :disabled="method === 'view'">
+          <el-row :gutter="15">
+            <el-form>
               <vxe-table
                 border
                 show-overflow
@@ -203,7 +204,7 @@
                 </vxe-table-column>
                 <vxe-table-column align="center" title="操作" width="100">
                   <template v-slot="scope">
-                    <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
+                    <el-button size="mini" :disabled="formReadOnly" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'client')">删除</el-button>
                   </template>
                 </vxe-table-column>
               </vxe-table>
@@ -406,6 +407,7 @@
         this.dataList = []
         this.dataListNew = []
         this.method = method
+        console.log('method', method)
         this.inputForm = {
           contractNo: '',
           contractName: '',
@@ -444,6 +446,7 @@
           // if (method === 'edit' || method === 'view') { // 修改或者查看
           this.loading = true
           this.$refs.uploadComponent.clearUpload()
+          this.$refs.archiveFile.clearUpload()
           this.contractInfoService.findById(this.inputForm.id).then(({data}) => {
             this.inputForm = this.recover(this.inputForm, data)
             // 对数值进行判断是否为空,为空则赋值默认值