Ver código fonte

Merge remote-tracking branch 'origin/master'

user5 2 anos atrás
pai
commit
a6995dd086

+ 25 - 1
src/views/modules/cw/invoice/InvoiceFormTask.vue

@@ -272,7 +272,23 @@
         </el-col>
         <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status !== 'audit'"
                  label-width="160px" @submit.native.prevent>
-          <el-col :span="12" >
+          <el-col v-if="status === 'audit'" :span="12" >
+            <el-form-item label="开票时间" prop="billingDate"
+                          :rules="[
+                         {required: true, message:'开票时间不能为空', trigger:'blur'}
+                 ]">
+              <el-date-picker
+                v-model="inputForm.billingDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择开票时间"
+                style="width:100%"
+                placement="bottom-start"
+                clearable>
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col v-if="status !== 'audit'" :span="12" >
             <el-form-item label="开票时间" prop="billingDate"
                           :rules="[
                  ]">
@@ -361,6 +377,7 @@
               url="/sys/area/treeData"
               :value="inputForm.reconciliationArea"
               :clearable="true"
+              size="medium"
               :accordion="true"
               @getValue="(value) => {inputForm.reconciliationArea=value}"/>
           </el-form-item>
@@ -909,6 +926,13 @@
             throw new Error()
           }
         }
+        if (this.status === 'audit') {
+          if (this.commonJS.isEmpty(this.inputForm.billingDate)) {
+            this.$message.error('开票时间不可以为空')
+            this.loading = false
+            throw new Error('开票时间不可以为空')
+          }
+        }
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
             this.loading = true

+ 8 - 8
src/views/modules/cw/invoice/InvoiceList.vue

@@ -230,14 +230,14 @@
           </vxe-column>
           <vxe-column min-width="300" title="操作"  fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '1'||scope.row.status === '3'||scope.row.status === '4'" type="text"  size="small" @click="invoicePush(scope.row)">修改</el-button>
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '2'" type="text"  size="small" @click="invoiceReback(scope.row)">撤回</el-button>
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"  size="small" @click="editDetail(scope.row.id)">修改发票明细</el-button>
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"   size="small" @click="view(true, scope.row.id)">收款</el-button>
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"   size="small" @click="isReceivables(scope.row)">确认收款</el-button>
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '5'||scope.row.status === '7'||scope.row.status === '8'" type="text"  size="small" @click="invoiceInvalidPush(scope.row)">作废</el-button>
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '6'" type="text"  size="small" @click="invoiceInvalidReBack(scope.row)">作废撤回</el-button>
-              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.status === '1'||scope.row.status === '3'" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status === '1'||scope.row.status === '3'||scope.row.status === '4')" type="text"  size="small" @click="invoicePush(scope.row)">修改</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status === '2'" type="text"  size="small" @click="invoiceReback(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit:detail')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"  size="small" @click="editDetail(scope.row.id)">修改发票明细</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit:receivables')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"   size="small" @click="view(true, scope.row.id)">收款</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit:is_receivables')&&scope.row.status === '5'&&scope.row.receivablesStatus !== '1'" type="text"   size="small" @click="isReceivables(scope.row)">确认收款</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status === '5'||scope.row.status === '7'||scope.row.status === '8')" type="text"  size="small" @click="invoiceInvalidPush(scope.row)">作废</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status === '6'" type="text"  size="small" @click="invoiceInvalidReBack(scope.row)">作废撤回</el-button>
+              <el-button v-if="hasPermission('cw_finance:invoice:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status === '1'||scope.row.status === '3'||scope.row.status === '4')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
             </template>
           </vxe-column>
         </vxe-table>

+ 2 - 2
src/views/modules/cw/projectReportArchive/ProjectReportArchiveList.vue

@@ -149,8 +149,8 @@
               <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text"  size="small" @click="push(scope.row)">修改</el-button>
               <el-button v-else-if="hasPermission('cwProjectReportArchive:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
               <el-button v-if="hasPermission('cwProjectReportArchive:edit')&&scope.row.createBy.id === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
-              <el-button v-if="hasPermission('cwProjectReportArchive:del')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
-              <el-button v-else-if="hasPermission('cwProjectReportArchive:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('cwProjectReportArchive:del')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-else-if="hasPermission('cwProjectReportArchive:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5'||scope.row.status==='4')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
             </template>
           </vxe-column>
         </vxe-table>

+ 55 - 33
src/views/modules/flowable/task/TaskForm.vue

@@ -451,41 +451,63 @@
       },
       // 驳回
       reject (vars) {
-        this.$confirm(`确定驳回流程吗?`, '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(async () => {
-          if (this.formType === '2') {
-            if (this.cUser === true || this.cUser === 'true') { // cUser为true则页面审核人为自定义多选,驳回时要将审核人重新定义一次
-              await setTimeout(() => {
+        if (this.procDefId.includes('Process_1667978088459') || this.procDefId.includes('UserTask_07ofhqm') || this.procDefId.includes('Process_1668394732246') || this.procDefId.includes('UserTask_0a4v9r9')) {
+          console.log('进入新版驳回')
+          this.$confirm(`确定驳回流程吗?`, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(async () => {
+            if (this.formType === '2') {
+              if (this.cUser === true || this.cUser === 'true') { // cUser为true则页面审核人为自定义多选,驳回时要将审核人重新定义一次
+                await setTimeout(() => {
+                  vars = {...vars, agree: false}
+                  this.commit(vars) // 驳回
+                }, 100)
+                this.$refs.form.updateStatusById('reject', (businessTable, businessId, inputForm) => {
+                  this.auditForm.candidateUserList = inputForm.assignee
+                })
+              } else {
                 vars = {...vars, agree: false}
-                this.commit(vars) // 驳回
-                // this.taskService.backNodes(this.taskId).then(({data}) => {
-                //   let backNodes = data
-                //   if (backNodes.length > 0) {
-                //     let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
-                //     this.back(backTaskDefKey)
-                //   }
-                // })
-              }, 100)
-              this.$refs.form.updateStatusById('reject', (businessTable, businessId, inputForm) => {
-                this.auditForm.candidateUserList = inputForm.assignee
-              })
-            } else {
-              vars = {...vars, agree: false}
-              await this.commit(vars) // 驳回
-              this.$refs.form.updateStatusById('reject')
-              // this.taskService.backNodes(this.taskId).then(({data}) => {
-              //   let backNodes = data
-              //   if (backNodes.length > 0) {
-              //     let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
-              //     this.back(backTaskDefKey)
-              //   }
-              // })
+                await this.commit(vars) // 驳回
+                this.$refs.form.updateStatusById('reject')
+              }
             }
-          }
-        })
+          })
+        } else {
+          console.log('进入旧版驳回')
+          this.$confirm(`确定驳回流程吗?`, '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(async () => {
+            if (this.formType === '2') {
+              if (this.cUser === true || this.cUser === 'true') { // cUser为true则页面审核人为自定义多选,驳回时要将审核人重新定义一次
+                await this.$refs.form.updateStatusById('reject', (businessTable, businessId, inputForm) => {
+                  this.auditForm.candidateUserList = inputForm.assignee
+                })
+                setTimeout(() => {
+                  this.taskService.backNodes(this.taskId).then(({data}) => {
+                    let backNodes = data
+                    if (backNodes.length > 0) {
+                      let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
+                      this.back(backTaskDefKey)
+                    }
+                  })
+                }, 100)
+              } else {
+                await this.$refs.form.updateStatusById('reject')
+                this.taskService.backNodes(this.taskId).then(({data}) => {
+                  let backNodes = data
+                  if (backNodes.length > 0) {
+                    let backTaskDefKey = backNodes[backNodes.length - 1].taskDefKey
+                    this.back(backTaskDefKey)
+                  }
+                })
+              }
+            }
+          })
+        }
       },
       // 驳回至指定节点(节点是从0开始)
       rejectToPointNum (num) {