lizhenhao 2 سال پیش
والد
کامیت
0876fa8e06

+ 84 - 0
src/api/cw/workClientInfo/WorkClientService.js

@@ -58,4 +58,88 @@ export default class WorkClientService {
       responseType: 'blob'
       responseType: 'blob'
     })
     })
   }
   }
+  pushUpdate (id) {
+    return request({
+      url: '/cw_work_client/info/pushUpdate',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  stopUpdate (id) {
+    return request({
+      url: '/cw_work_client/info/stopUpdate',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  rejectUpdate (id) {
+    return request({
+      url: '/cw_work_client/info/rebackOrAgreeUpdate',
+      method: 'get',
+      params: {id: id, type: 'reject'}
+    })
+  }
+  rebackUpdate (id) {
+    return request({
+      url: '/cw_work_client/info/rebackOrAgreeUpdate',
+      method: 'get',
+      params: {id: id, type: 'reback'}
+    })
+  }
+  rebackPushUpdate (id) {
+    return request({
+      url: '/cw_work_client/info/rebackOrAgreeUpdate',
+      method: 'get',
+      params: {id: id, type: 'reback_push'}
+    })
+  }
+  agreeUpdate (id) {
+    return request({
+      url: '/cw_work_client/info/rebackOrAgreeUpdate',
+      method: 'get',
+      params: {id: id, type: 'agree'}
+    })
+  }
+  reapplyUpdate (id) {
+    return request({
+      url: '/cw_work_client/info/rebackOrAgreeUpdate',
+      method: 'get',
+      params: {id: id, type: 'reapply'}
+    })
+  }
+  queryUscCodeIsUse (uscCode) {
+    return request({
+      url: '/cw_work_client/info/queryUscCodeIsUse',
+      method: 'get',
+      params: {uscCode: uscCode}
+    })
+  }
+  queryUscCodeById (id) {
+    return request({
+      url: '/cw_work_client/info/queryUscCodeById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  queryNameIsUse (name) {
+    return request({
+      url: '/cw_work_client/info/queryNameIsUse',
+      method: 'get',
+      params: {name: name}
+    })
+  }
+  queryNameById (id) {
+    return request({
+      url: '/cw_work_client/info/queryNameById',
+      method: 'get',
+      params: {id: id}
+    })
+  }
+  queryUpdateLogList (params) {
+    return request({
+      url: '/cw_work_client/info/queryUpdateLogList',
+      method: 'get',
+      params: params
+    })
+  }
 }
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1615 - 0
src/views/modules/cw/workClientInfo/WorkClientAddForm.vue


+ 6 - 20
src/views/modules/cw/workClientInfo/WorkClientForm.vue

@@ -155,19 +155,20 @@
                   </el-form-item>
                   </el-form-item>
                 </el-col>
                 </el-col>
                 <el-col :span="12">
                 <el-col :span="12">
-                  <el-form-item label="经营范围" prop="businessScope"
+                  <el-form-item label="主要职责" prop="keyResponsibilities"
                                 :rules="[
                                 :rules="[
                    ]">
                    ]">
-                    <el-input v-model="inputForm.businessScope" placeholder="请填写经营范围" clearable></el-input>
+                    <el-input v-model="inputForm.keyResponsibilities" placeholder="请填写主要职责" clearable></el-input>
                   </el-form-item>
                   </el-form-item>
                 </el-col>
                 </el-col>
-                <el-col :span="12">
-                  <el-form-item label="主要职责" prop="keyResponsibilities"
+                <el-col :span="24">
+                  <el-form-item label="经营范围" prop="businessScope"
                                 :rules="[
                                 :rules="[
                    ]">
                    ]">
-                    <el-input v-model="inputForm.keyResponsibilities" placeholder="请填写主要职责" clearable></el-input>
+                    <el-input type="textarea" maxlength="250" v-model="inputForm.businessScope" placeholder="请填写经营范围" show-word-limit></el-input>
                   </el-form-item>
                   </el-form-item>
                 </el-col>
                 </el-col>
+
                 <el-col :span="12">
                 <el-col :span="12">
                   <el-form-item label="所属行业" prop="industry"
                   <el-form-item label="所属行业" prop="industry"
                                 :rules="[
                                 :rules="[
@@ -206,21 +207,6 @@
                   </el-form-item>
                   </el-form-item>
                 </el-col>
                 </el-col>
                 <el-col :span="12">
                 <el-col :span="12">
-                  <el-form-item label="客户报备类型" prop="reportType"
-                                :rules="[
-                                   {required: true, message:'客户报备类型不能为空', trigger:'blur'}
-                   ]">
-                    <el-select v-model="inputForm.reportType" placeholder="请选择客户报备类型" clearable style="width: 100%;">
-                      <el-option
-                        v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
-                      </el-option>
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="12">
                   <el-form-item label="上级部门" prop="oneUpOffice"
                   <el-form-item label="上级部门" prop="oneUpOffice"
                                 :rules="[
                                 :rules="[
                    ]">
                    ]">

+ 133 - 34
src/views/modules/cw/workClientInfo/WorkClientList.vue

@@ -63,7 +63,9 @@
           </el-option>
           </el-option>
         </el-select>
         </el-select>
       </el-form-item>
       </el-form-item>
-
+      <el-form-item label="拥有人" prop="updateUserName">
+        <el-input size="small" v-model="searchForm.updateUserName" placeholder="请输入拥有人" clearable></el-input>
+      </el-form-item>
       <el-form-item>
       <el-form-item>
         <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
         <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
         <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
         <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
@@ -72,7 +74,9 @@
     <div class="bg-white top" style="">
     <div class="bg-white top" style="">
       <vxe-toolbar :refresh="{query: refreshList}" export custom>
       <vxe-toolbar :refresh="{query: refreshList}" export custom>
         <template #buttons>
         <template #buttons>
-          <el-button v-if="hasPermission('cw_work_client:info:add')" type="primary" size="small" icon="el-icon-plus" @click="start()">新建</el-button>
+          <el-button v-if="hasPermission('cw_work_client:info:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
+          <el-button v-if="hasPermission('cw_work_client:info:view')" size="small" @click="viewUpdateLog()">修改申请记录</el-button>
+
           <!--          <el-button v-if="hasPermission('klg:question:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
           <!--          <el-button v-if="hasPermission('klg:question:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.questionsTable && $refs.questionsTable.getCheckboxRecords().length === 0" plain>删除</el-button>-->
 <!--          <el-button type="warning" size="small" icon="el-icon-download" @click="exportFile()" plain>导出</el-button>-->
 <!--          <el-button type="warning" size="small" icon="el-icon-download" @click="exportFile()" plain>导出</el-button>-->
         </template>
         </template>
@@ -108,7 +112,7 @@
           <vxe-column min-width="230" align="center" title="客户名称" field="name">
           <vxe-column min-width="230" align="center" title="客户名称" field="name">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-link  type="primary" :underline="false" v-if="hasPermission('cw_work_client:info:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
               <el-link  type="primary" :underline="false" v-if="hasPermission('cw_work_client:info:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
-              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cw_work_client:info:view')"  @click="view(scope.row.id,)">{{scope.row.name}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('cw_work_client:info:view')"  @click="view(scope.row.id)">{{scope.row.name}}</el-link>
               <span v-else>{{scope.row.name}}</span>
               <span v-else>{{scope.row.name}}</span>
             </template>
             </template>
           </vxe-column>
           </vxe-column>
@@ -141,14 +145,20 @@
             </template>
             </template>
           </vxe-column>
           </vxe-column>
           <vxe-column min-width="160" align="center" title="按最终地位分类" field="cwWorkClientTypeDTO.finalStatusType"></vxe-column>
           <vxe-column min-width="160" align="center" title="按最终地位分类" field="cwWorkClientTypeDTO.finalStatusType"></vxe-column>
-          <vxe-column min-width="160" align="center" title="客户报备类型" field="reportType">
+<!--          <vxe-column min-width="160" align="center" title="客户报备类型" field="reportType">-->
+<!--            <template slot-scope="scope">-->
+<!--              {{$dictUtils.getDictLabel('cw_work_client_report_type', scope.row.reportType, '-')}}-->
+<!--            </template>-->
+<!--          </vxe-column>-->
+          <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
+          <vxe-column min-width="120" align="center" title="拥有人" fixed="right" field="updateUserName">
             <template slot-scope="scope">
             <template slot-scope="scope">
-              {{$dictUtils.getDictLabel('cw_work_client_report_type', scope.row.reportType, '-')}}
+              <el-link  type="primary" :underline="false" v-if="hasPermission('cw_work_client:info:view')" @click="updateLog(scope.row.id)">{{scope.row.updateUserName}}</el-link>
+              <span v-else>{{scope.row.updateUserName}}</span>
             </template>
             </template>
           </vxe-column>
           </vxe-column>
-          <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
-          <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
-          <vxe-column  min-width="150px"align="center" fixed="right" title="状态" field="status" >
+          <vxe-column  min-width="100px"align="center" fixed="right" title="修改申请状态" field="status" >
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
               <el-button  type="text" @click="detail(scope.row)" effect="dark" size="mini"
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status, '-')">
@@ -156,13 +166,20 @@
               </el-button>
               </el-button>
             </template>
             </template>
           </vxe-column>
           </vxe-column>
-          <vxe-column title="操作" width="150px" fixed="right" align="center">
+          <vxe-column title="操作" width="140px" fixed="right" align="center">
             <template  slot-scope="scope">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('cw_work_client:info:edit')&&scope.row.createBy.id === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3')" type="text"  size="small" @click="push(scope.row)">修改</el-button>
-              <el-button v-else-if="hasPermission('cw_work_client:info:edit')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
-              <el-button v-if="hasPermission('cw_work_client:info: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('cw_work_client:info: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('cw_work_client:info: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('cw_work_client:info:edit')&&scope.row.updateUser === $store.state.user.id&&(scope.row.status==='0'||scope.row.status==='5')" type="text"  size="small" @click="edit(scope.row.id)">修改</el-button>
+<!--              其他人修改-->
+              <el-button v-if="hasPermission('cw_work_client:info:edit')&&scope.row.updateUser !== $store.state.user.id&&(scope.row.status==='0'||scope.row.status==='5')" type="text"  size="small" @click="push(scope.row)">申请修改</el-button>
+<!--              当前申请人撤回-->
+              <el-button v-if="hasPermission('cw_work_client:info:edit')&&scope.row.requestUserId === $store.state.user.id&&scope.row.status==='2'" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
+<!--              当前申请人撤回后->申请修改-->
+              <el-button v-if="hasPermission('cw_work_client:info:edit')&&scope.row.requestUserId === $store.state.user.id&&scope.row.status==='3'" type="text"  size="small" @click="push(scope.row)">申请修改</el-button>
+<!--              当前申请人撤回后->取消修改申请-->
+              <el-button v-if="hasPermission('cw_work_client:info:edit')&&scope.row.requestUserId === $store.state.user.id&&scope.row.status==='3'" type="text"  size="small" @click="stopUpdate(scope.row.id)">取消修改</el-button>
+<!--              拥有人删除-->
+              <el-button v-if="hasPermission('cw_work_client:info:del')&&scope.row.updateUser === $store.state.user.id&&(scope.row.status==='0'||scope.row.status==='5')" type="text"   size="small" @click="del(scope.row.id)">删除</el-button>
             </template>
             </template>
           </vxe-column>
           </vxe-column>
         </vxe-table>
         </vxe-table>
@@ -177,8 +194,11 @@
           @page-change="currentChangeHandle">
           @page-change="currentChangeHandle">
         </vxe-pager>
         </vxe-pager>
       </div>
       </div>
+
     </div>
     </div>
     <WorkClientForm ref="workClientForm" @refreshList="refreshList"></WorkClientForm>
     <WorkClientForm ref="workClientForm" @refreshList="refreshList"></WorkClientForm>
+    <WorkClientAddForm ref="workClientAddForm" @refreshList="refreshList" @updateDialogData="updateDialogData" @updateFlowAbleData="updateFlowAbleData"></WorkClientAddForm>
+    <WorkClientUpdateLog ref="workClientUpdateLog"></WorkClientUpdateLog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -189,6 +209,8 @@
   import WorkClientForm from './WorkClientForm'
   import WorkClientForm from './WorkClientForm'
   import pick from 'lodash.pick'
   import pick from 'lodash.pick'
   import UserService from '@/api/sys/UserService'
   import UserService from '@/api/sys/UserService'
+  import WorkClientAddForm from './WorkClientAddForm'
+  import WorkClientUpdateLog from './WorkClientUpdateLog'
   export default {
   export default {
     data () {
     data () {
       return {
       return {
@@ -202,7 +224,8 @@
           },
           },
           industry: '',
           industry: '',
           createDates: [],
           createDates: [],
-          status: ''
+          status: '',
+          updateUserName: ''
         },
         },
         dataList: [],
         dataList: [],
         tablePage: {
         tablePage: {
@@ -229,7 +252,9 @@
       this.userService = new UserService()
       this.userService = new UserService()
     },
     },
     components: {
     components: {
-      WorkClientForm
+      WorkClientForm,
+      WorkClientAddForm,
+      WorkClientUpdateLog
     },
     },
     computed: {
     computed: {
       userName () {
       userName () {
@@ -244,19 +269,41 @@
       this.refreshList()
       this.refreshList()
     },
     },
     activated () {
     activated () {
+      let query = this.$route.query
+      if (this.commonJS.isNotEmpty(query.methodName)) {
+        if (query.methodName === 'updateFlowAbleData') {
+          this.updateFlowAbleData(query.dataId)
+        }
+        if (query.methodName === 'updateDialogData') {
+          this.updateDialogData(query.dataId)
+        }
+      }
       this.refreshList()
       this.refreshList()
     },
     },
     methods: {
     methods: {
+      // 修改申请日志
+      viewUpdateLog () {
+        this.$refs.workClientUpdateLog.init()
+      },
+      // 修改申请日志
+      updateLog (id) {
+        this.$refs.workClientUpdateLog.init(id)
+      },
       // 新增
       // 新增
       add () {
       add () {
-        this.$refs.workClientForm.init('add', '')
+        this.$refs.workClientAddForm.init('add', 'false')
       },
       },
       // 修改
       // 修改
       edit (id) {
       edit (id) {
         id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
         id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
           return item.id
           return item.id
         })[0]
         })[0]
-        this.$refs.workClientForm.init('edit', id)
+        this.$refs.workClientAddForm.init('edit', id)
+      },
+      updateDialogData (id) {
+        this.$refs.workClientAddForm.init('edit', id)
+        this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+        this.$router.push({query: {}})
       },
       },
       // 查看
       // 查看
       view (id) {
       view (id) {
@@ -282,7 +329,7 @@
           this.loading = false
           this.loading = false
         })
         })
         this.checkIsAdmin()
         this.checkIsAdmin()
-        this.processService.getByName('财务-客户登记').then(({data}) => {
+        this.processService.getByName('财务-客户修改').then(async ({data}) => {
           if (!this.commonJS.isEmpty(data.id)) {
           if (!this.commonJS.isEmpty(data.id)) {
             this.processDefinitionAuditId = data.id
             this.processDefinitionAuditId = data.id
             this.procDefAuditKey = data.key
             this.procDefAuditKey = data.key
@@ -327,8 +374,8 @@
       },
       },
       start () {
       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,
         this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
           status: 'startAndHold'}).then((data) => {
           status: 'startAndHold'}).then((data) => {
             this.$router.push({
             this.$router.push({
@@ -349,7 +396,43 @@
             })
             })
           })
           })
       },
       },
-      // 发起客户登记
+      updateFlowAbleData (id) {
+        this.workClientService.queryById(id).then(({data}) => {
+          this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+          this.$router.push({query: {}})
+          // 读取流程表单
+          let title = `发起流程【客户修改】`
+          let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[客户修改]`
+          let status = 'startAndClose'
+          if (data.status === '3') {
+            status = 'startAndClose'
+          } else if (data.status === '4') {
+            status = 'reapplyFlag'
+          }
+          this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
+            businessId: data.id,
+            businessTable: 'cw_work_client_base'}).then((task) => {
+              this.$router.push({
+                path: '/flowable/task/TaskForm',
+                query: {
+                  ...pick(task.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                  procDefId: this.processDefinitionAuditId,
+                  procDefKey: this.procDefAuditKey,
+                  title: title,
+                  formType: task.data.formType,
+                  formUrl: task.data.formUrl,
+                  formTitle: processTitle,
+                  businessTable: 'cw_work_client_base',
+                  businessId: data.id,
+                  isShow: 'false',
+                  status: status,
+                  routePath: '/cw/workClientInfo/WorkClientList'
+                }
+              })
+            })
+        })
+      },
+      // 发起客户修改
       push (row) {
       push (row) {
         this.workClientService.queryById(row.id).then(({data}) => {
         this.workClientService.queryById(row.id).then(({data}) => {
           if (data.status !== row.status) { // status的值不等于“审核中”,就弹出提示
           if (data.status !== row.status) { // status的值不等于“审核中”,就弹出提示
@@ -357,9 +440,9 @@
             this.refreshList()
             this.refreshList()
           } else {
           } else {
             // 读取流程表单
             // 读取流程表单
-            let title = `发起流程【客户登记】`
-            let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[客户登记]`
-            let status = 'startAndHold'
+            let title = `发起流程【客户修改】`
+            let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[客户修改]`
+            let status = 'startAndClose'
             if (row.status === '3') {
             if (row.status === '3') {
               status = 'startAndClose'
               status = 'startAndClose'
             } else if (row.status === '4') {
             } else if (row.status === '4') {
@@ -389,7 +472,7 @@
           }
           }
         })
         })
       },
       },
-      // 查看客户登记流程结果
+      // 查看客户修改流程结果
       detail (row) {
       detail (row) {
         if (row.status !== '0' && row.status !== '1') {
         if (row.status !== '0' && row.status !== '1') {
           // eslint-disable-next-line eqeqeq
           // eslint-disable-next-line eqeqeq
@@ -403,8 +486,8 @@
                 ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 isShow: 'false',
                 readOnly: true,
                 readOnly: true,
-                title: '客户登记' + '流程详情',
-                formTitle: '客户登记' + '流程详情',
+                title: '客户修改' + '流程详情',
+                formTitle: '客户修改' + '流程详情',
                 businessId: row.id,
                 businessId: row.id,
                 status: 'reback'
                 status: 'reback'
               }
               }
@@ -412,28 +495,44 @@
           })
           })
         }
         }
       },
       },
-      // 撤回客户登记
+      // 撤回客户修改
       reback (row) {
       reback (row) {
         this.$confirm(`确定要撤回该申请吗?`, '提示', {
         this.$confirm(`确定要撤回该申请吗?`, '提示', {
           confirmButtonText: '确定',
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           cancelButtonText: '取消',
           type: 'warning'
           type: 'warning'
-        }).then(async () => {
-          await this.workClientService.queryById(row.id).then(({data}) => {
+        }).then(() => {
+          this.workClientService.queryById(row.id).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
               this.$message.error('数据已发生改变或不存在,请刷新数据')
               this.refreshList()
               this.refreshList()
             } else {
             } else {
               this.processService.revokeProcIns(row.procInsId).then(({data}) => {
               this.processService.revokeProcIns(row.procInsId).then(({data}) => {
                 let form = {status: '3', id: row.id}
                 let form = {status: '3', id: row.id}
-                this.workClientService.updateStatusById(form)
-                this.$message.success(data)
-                this.refreshList()
+                this.workClientService.updateStatusById(form).then(() => {
+                  this.workClientService.rebackUpdate(row.id).then(() => {
+                    this.$message.success(data)
+                    this.refreshList()
+                  })
+                })
               })
               })
             }
             }
           })
           })
         })
         })
       },
       },
+      // 取消修改申请
+      stopUpdate (id) {
+        this.$confirm(`确定要取消修改申请?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.workClientService.stopUpdate(id).then(() => {
+            this.$message.success('修改申请已取消')
+            this.refreshList()
+          })
+        })
+      },
       // 自定义服务端导出
       // 自定义服务端导出
       exportMethod ({ options }) {
       exportMethod ({ options }) {
         // 传给服务端的参数
         // 传给服务端的参数

+ 220 - 45
src/views/modules/cw/workClientInfo/WorkClientTaskForm.vue

@@ -9,9 +9,10 @@
                 <el-row  :gutter="0">
                 <el-row  :gutter="0">
                   <el-col :span="10">
                   <el-col :span="10">
                     <el-form-item label="客户名称" prop="name" :rules="[
                     <el-form-item label="客户名称" prop="name" :rules="[
-                    {required: true, message:'客户名称不能为空', trigger:'blur'}
                    ]">
                    ]">
-                      <el-input maxlength="64" v-model="inputForm.name" placeholder="请输入客户名称" clearable></el-input>
+                      <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户名称</span>
+                      <el-input maxlength="64" v-model="inputForm.name" @input="blurName" @blur="blurName" placeholder="请输入客户名称" clearable></el-input>
+                      <div class="usc_code_append_message">{{nameMessage}}</div>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>
                   <el-col :span="2">
                   <el-col :span="2">
@@ -127,14 +128,16 @@
                                   :rules="[
                                   :rules="[
                                   {required: true, message:'统一社会信用代码不能为空', trigger:'blur'}
                                   {required: true, message:'统一社会信用代码不能为空', trigger:'blur'}
                    ]">
                    ]">
-                      <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                      <el-input v-model="inputForm.uscCode" @blur="blurUscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                      <div class="usc_code_append_message">{{uscCodeMessage}}</div>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>
                   <el-col v-if="inputForm.isUscCode === '0'||commonJS.isEmpty(inputForm.isUscCode)" :span="12">
                   <el-col v-if="inputForm.isUscCode === '0'||commonJS.isEmpty(inputForm.isUscCode)" :span="12">
                     <el-form-item label="统一社会信用代码" prop="uscCode"
                     <el-form-item label="统一社会信用代码" prop="uscCode"
                                   :rules="[
                                   :rules="[
                    ]">
                    ]">
-                      <el-input v-model="inputForm.uscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                      <el-input v-model="inputForm.uscCode" @blur="blurUscCode" placeholder="请填写统一社会信用代码" clearable></el-input>
+                      <div class="usc_code_append_message">{{uscCodeMessage}}</div>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>
 
 
@@ -160,19 +163,20 @@
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>
                   <el-col :span="12">
                   <el-col :span="12">
-                    <el-form-item label="经营范围" prop="businessScope"
+                    <el-form-item label="主要职责" prop="keyResponsibilities"
                                   :rules="[
                                   :rules="[
                    ]">
                    ]">
-                      <el-input v-model="inputForm.businessScope" placeholder="请填写经营范围" clearable></el-input>
+                      <el-input v-model="inputForm.keyResponsibilities" placeholder="请填写主要职责" clearable></el-input>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>
-                  <el-col :span="12">
-                    <el-form-item label="主要职责" prop="keyResponsibilities"
+                  <el-col :span="24">
+                    <el-form-item label="经营范围" prop="businessScope"
                                   :rules="[
                                   :rules="[
                    ]">
                    ]">
-                      <el-input v-model="inputForm.keyResponsibilities" placeholder="请填写主要职责" clearable></el-input>
+                      <el-input type="textarea" maxlength="250" v-model="inputForm.businessScope" placeholder="请填写经营范围" show-word-limit></el-input>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>
+
                   <el-col :span="12">
                   <el-col :span="12">
                     <el-form-item label="所属行业" prop="industry"
                     <el-form-item label="所属行业" prop="industry"
                                   :rules="[
                                   :rules="[
@@ -210,21 +214,21 @@
                       <el-input v-model="inputForm.organizationTypeName" @focus="openOrganizationType()" placeholder="请填写按组织类型分类" clearable></el-input>
                       <el-input v-model="inputForm.organizationTypeName" @focus="openOrganizationType()" placeholder="请填写按组织类型分类" clearable></el-input>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>
-                  <el-col :span="12">
-                    <el-form-item label="客户报备类型" prop="reportType"
-                                  :rules="[
-                                   {required: true, message:'客户报备类型不能为空', trigger:'blur'}
-                   ]">
-                      <el-select v-model="inputForm.reportType" placeholder="请选择客户报备类型" clearable style="width: 100%;">
-                        <el-option
-                          v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value">
-                        </el-option>
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
+<!--                  <el-col :span="12">-->
+<!--                    <el-form-item label="客户报备类型" prop="reportType"-->
+<!--                                  :rules="[-->
+<!--                                   {required: true, message:'客户报备类型不能为空', trigger:'blur'}-->
+<!--                   ]">-->
+<!--                      <el-select v-model="inputForm.reportType" placeholder="请选择客户报备类型" clearable style="width: 100%;">-->
+<!--                        <el-option-->
+<!--                          v-for="item in $dictUtils.getDictList('cw_work_client_report_type')"-->
+<!--                          :key="item.value"-->
+<!--                          :label="item.label"-->
+<!--                          :value="item.value">-->
+<!--                        </el-option>-->
+<!--                      </el-select>-->
+<!--                    </el-form-item>-->
+<!--                  </el-col>-->
                   <el-col :span="12">
                   <el-col :span="12">
                     <el-form-item label="上级部门" prop="oneUpOffice"
                     <el-form-item label="上级部门" prop="oneUpOffice"
                                   :rules="[
                                   :rules="[
@@ -600,7 +604,6 @@
               </el-row>
               </el-row>
             </el-tab-pane>
             </el-tab-pane>
             <el-tab-pane label="客户联系人" name="contact">
             <el-tab-pane label="客户联系人" name="contact">
-              <span slot="label"><span style="color: red;border-top: 20px">*</span> 客户联系人</span>
               <el-row :gutter="15">
               <el-row :gutter="15">
                 <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('contact')">
                 <el-button type="primary" style="margin-bottom: 15px" size="mini" :disabled="status === 'audit' || status === 'taskFormDetail'" @click="insertEvent('contact')">
                   新增客户联系人
                   新增客户联系人
@@ -796,7 +799,11 @@
           isUscCode: '',
           isUscCode: '',
           manageLevelTypeName: '',
           manageLevelTypeName: '',
           organizationTypeName: '',
           organizationTypeName: '',
-          remarks: ''
+          remarks: '',
+          updateUser: '',
+          updateRequestId: '',
+          updateUserName: '',
+          requestUserId: ''
         },
         },
         keyWatch: '',
         keyWatch: '',
         activeName: 'base',
         activeName: 'base',
@@ -854,7 +861,9 @@
           contactFirst: [
           contactFirst: [
             {required: true, message: '联系方式1不可以为空'}
             {required: true, message: '联系方式1不可以为空'}
           ]
           ]
-        }
+        },
+        uscCodeMessage: '',
+        nameMessage: ''
       }
       }
     },
     },
     workClientService: null,
     workClientService: null,
@@ -901,6 +910,8 @@
         this.keyWatch = keyWatch
         this.keyWatch = keyWatch
       },
       },
       init (method, id) {
       init (method, id) {
+        this.uscCodeMessage = ''
+        this.nameMessage = ''
         this.activeName = 'base'
         this.activeName = 'base'
         this.workClientService = new WorkClientService()
         this.workClientService = new WorkClientService()
         this.method = method
         this.method = method
@@ -970,7 +981,11 @@
           isUscCode: '',
           isUscCode: '',
           manageLevelTypeName: '',
           manageLevelTypeName: '',
           organizationTypeName: '',
           organizationTypeName: '',
-          remarks: ''
+          remarks: '',
+          updateUser: '',
+          updateRequestId: '',
+          updateUserName: '',
+          requestUserId: ''
         }
         }
         this.inputForm.id = id
         this.inputForm.id = id
         this.loading = false
         this.loading = false
@@ -1011,7 +1026,7 @@
             if (this.commonJS.isEmpty(this.inputForm.companyLevel)) {
             if (this.commonJS.isEmpty(this.inputForm.companyLevel)) {
               this.inputForm.companyLevel = '1'
               this.inputForm.companyLevel = '1'
             }
             }
-            if (this.formReadOnly) {
+            if (this.status === 'audit' || this.status === 'taskFormDetail') {
               this.method = 'view'
               this.method = 'view'
             }
             }
             this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'cw_work_client', null, null, null, null, false)
             this.$refs.uploadComponent.newUpload(this.method, this.inputForm.workAttachmentDtoList, 'cw_work_client', null, null, null, null, false)
@@ -1040,25 +1055,107 @@
         this.doSubmit('save', callback)
         this.doSubmit('save', callback)
       },
       },
       startForm (callback) {
       startForm (callback) {
+        // 如果uscCode是空的或者uscCode的数据不存在,再执行保存方法
+        if (this.commonJS.isNotEmpty(this.inputForm.uscCode)) {
+          this.workClientService.queryUscCodeIsUse(this.inputForm.uscCode).then(({data}) => {
+            this.workClientService.queryUscCodeById(this.inputForm.id).then((uscCode) => {
+              if (data.use === 'false' || uscCode.data === this.inputForm.uscCode) {
+                this.uscCodeMessage = ''
+                this.workClientService.queryNameIsUse(this.inputForm.name).then((client) => {
+                  this.workClientService.queryNameById(this.inputForm.id).then((name) => {
+                    if (client.data.use === 'false' || name.data === this.inputForm.name) {
+                      this.startFormTrue(callback)
+                      this.nameMessage = ''
+                    } else {
+                      this.nameMessage = '该客户已存在'
+                      throw new Error()
+                    }
+                  })
+                })
+              } else {
+                this.uscCodeMessage = '该客户已存在'
+                throw new Error()
+              }
+            })
+          })
+        } else {
+          this.workClientService.queryNameIsUse(this.inputForm.name).then((client) => {
+            this.workClientService.queryNameById(this.inputForm.id).then((name) => {
+              if (client.data.use === 'false' || name.data === this.inputForm.name) {
+                this.startFormTrue(callback)
+                this.nameMessage = ''
+              } else {
+                this.nameMessage = '该客户已存在'
+                throw new Error()
+              }
+            })
+          })
+        }
+      },
+      startFormTrue (callback) {
         if (this.commonJS.isEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
         if (this.commonJS.isEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
           this.$message.error('“开票信息”中至少有一条数据')
           this.$message.error('“开票信息”中至少有一条数据')
           throw new Error('“开票信息”中至少有一条数据')
           throw new Error('“开票信息”中至少有一条数据')
-        } else if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
-          this.$message.error('“客户联系人”信息中至少有一条数据')
-          throw new Error('“客户联系人”信息中至少有一条数据')
         } else {
         } else {
-          this.doSubmit('start', callback)
+          if (this.commonJS.isEmpty(this.inputForm.updateRequestId)) {
+            this.workClientService.pushUpdate(this.inputForm.id).then(({data}) => {
+              this.inputForm.updateRequestId = data.id
+              this.doSubmit('start', callback)
+            })
+          } else {
+            this.workClientService.rebackPushUpdate(this.inputForm.id).then(() => {
+              this.doSubmit('start', callback)
+            })
+          }
         }
         }
       },
       },
       reapplyForm (callback) {
       reapplyForm (callback) {
+        // 如果uscCode是空的或者uscCode的数据不存在,再执行保存方法
+        if (this.commonJS.isNotEmpty(this.inputForm.uscCode)) {
+          this.workClientService.queryUscCodeIsUse(this.inputForm.uscCode).then(({data}) => {
+            this.workClientService.queryUscCodeById(this.inputForm.id).then((uscCode) => {
+              if (data.use === 'false' || uscCode.data === this.inputForm.uscCode) {
+                this.uscCodeMessage = ''
+                this.workClientService.queryNameIsUse(this.inputForm.name).then((client) => {
+                  this.workClientService.queryNameById(this.inputForm.id).then((name) => {
+                    if (client.data.use === 'false' || name.data === this.inputForm.name) {
+                      this.reapplyFormTrue(callback)
+                      this.nameMessage = ''
+                    } else {
+                      this.nameMessage = '该客户已存在'
+                      throw new Error()
+                    }
+                  })
+                })
+              } else {
+                this.uscCodeMessage = '该客户已存在'
+                throw new Error()
+              }
+            })
+          })
+        } else {
+          this.workClientService.queryNameIsUse(this.inputForm.name).then((client) => {
+            this.workClientService.queryNameById(this.inputForm.id).then((name) => {
+              if (client.data.use === 'false' || name.data === this.inputForm.name) {
+                this.reapplyFormTrue(callback)
+                this.nameMessage = ''
+              } else {
+                this.nameMessage = '该客户已存在'
+                throw new Error()
+              }
+            })
+          })
+        }
+      },
+      reapplyFormTrue (callback) {
         this.workClientService.queryById(this.inputForm.id).then(({data}) => {
         this.workClientService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
           if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
           } else {
           } else {
-            if (this.commonJS.isEmpty(this.inputForm.cwWorkClientContactDTOList)) {
-              this.$message.error('“客户联系人”信息中至少有一条数据')
-              throw new Error('“客户联系人”信息中至少有一条数据')
+            if (this.commonJS.isEmpty(this.inputForm.cwWorkClientBillingDTOList)) {
+              this.$message.error('“开票信息”中至少有一条数据')
+              throw new Error('“开票信息”中至少有一条数据')
             } else {
             } else {
               this.doSubmit('reapply', callback)
               this.doSubmit('reapply', callback)
             }
             }
@@ -1097,6 +1194,8 @@
         } else if (status === 'start') {
         } else if (status === 'start') {
           // 送审  待审核
           // 送审  待审核
           this.inputForm.status = '2'
           this.inputForm.status = '2'
+          this.inputForm.requestUserId = this.$store.state.user.id
+          this.inputForm.assignee = this.inputForm.updateUser
         } else if (status === 'agree') {
         } else if (status === 'agree') {
           // 审核同意
           // 审核同意
           this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
           this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
@@ -1104,6 +1203,8 @@
           this.inputForm.status = '5'
           this.inputForm.status = '5'
         } else if (status === 'reapply') {
         } else if (status === 'reapply') {
           this.inputForm.status = '2'
           this.inputForm.status = '2'
+          this.inputForm.requestUserId = this.$store.state.user.id
+          this.inputForm.assignee = this.inputForm.updateUser
         }
         }
         this.$refs['inputForm'].validate((valid) => {
         this.$refs['inputForm'].validate((valid) => {
           if (valid) {
           if (valid) {
@@ -1120,6 +1221,12 @@
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
             }
             this.workClientService.saveForm(this.inputForm).then(({data}) => {
             this.workClientService.saveForm(this.inputForm).then(({data}) => {
+              if (status === 'agree') {
+                this.workClientService.agreeUpdate(data.businessId)
+              }
+              if (status === 'reapply') {
+                this.workClientService.reapplyUpdate(data.businessId)
+              }
               callback(data.businessTable, data.businessId, this.inputForm)
               callback(data.businessTable, data.businessId, this.inputForm)
               this.loading = false
               this.loading = false
             }).catch(() => {
             }).catch(() => {
@@ -1144,13 +1251,17 @@
                   this.inputForm.status = '4'
                   this.inputForm.status = '4'
                   let param = {status: '4', id: this.inputForm.id}
                   let param = {status: '4', id: this.inputForm.id}
                   this.workClientService.updateStatusById(param).then(() => {
                   this.workClientService.updateStatusById(param).then(() => {
+                    this.workClientService.rejectUpdate(this.inputForm.id)
                     callback()
                     callback()
                   })
                   })
                 }
                 }
                 if (type === 'reback') {
                 if (type === 'reback') {
                   // 撤回
                   // 撤回
                   let param = {status: '3', id: this.inputForm.id}
                   let param = {status: '3', id: this.inputForm.id}
-                  this.workClientService.updateStatusById(param)
+                  this.workClientService.updateStatusById(param).then(() => {
+                    this.workClientService.rebackUpdate(this.inputForm.id)
+                    callback()
+                  })
                 }
                 }
               }
               }
             })
             })
@@ -1161,8 +1272,7 @@
                 throw new Error()
                 throw new Error()
               } else {
               } else {
                 // 终止
                 // 终止
-                let param = {status: '1', id: this.inputForm.id}
-                this.workClientService.updateStatusById(param).then(() => {
+                this.workClientService.stopUpdate(this.inputForm.id).then(() => {
                   callback()
                   callback()
                 })
                 })
               }
               }
@@ -1239,10 +1349,16 @@
           isUscCode: '',
           isUscCode: '',
           manageLevelTypeName: '',
           manageLevelTypeName: '',
           organizationTypeName: '',
           organizationTypeName: '',
-          remarks: ''
+          remarks: '',
+          updateUser: '',
+          updateRequestId: '',
+          updateUserName: '',
+          requestUserId: ''
         }
         }
         this.$refs.uploadComponent.clearUpload()
         this.$refs.uploadComponent.clearUpload()
         this.$refs.inputForm.resetFields()
         this.$refs.inputForm.resetFields()
+        this.uscCodeMessage = ''
+        this.nameMessage = ''
       },
       },
       tabHandleClick (event) {
       tabHandleClick (event) {
         this.tableKeyBilling = Math.random()
         this.tableKeyBilling = Math.random()
@@ -1258,6 +1374,14 @@
           this.inputForm.name = data.data.ENTNAME
           this.inputForm.name = data.data.ENTNAME
           this.inputForm.uscCode = data.data.UNCID
           this.inputForm.uscCode = data.data.UNCID
           this.inputForm.address = data.data.OPLOC
           this.inputForm.address = data.data.OPLOC
+          setTimeout(() => {
+            if (this.commonJS.isNotEmpty(this.inputForm.name)) {
+              this.blurName(this.inputForm.name)
+            }
+            if (this.commonJS.isNotEmpty(this.inputForm.uscCode)) {
+              this.blurUscCode(this.inputForm.uscCode)
+            }
+          }, 100)
         })
         })
         this.visiblePop = false
         this.visiblePop = false
       },
       },
@@ -1453,11 +1577,11 @@
           this.loading = false
           this.loading = false
           throw new Error('基本信息中,”企业隶属关系划分“未填写')
           throw new Error('基本信息中,”企业隶属关系划分“未填写')
         }
         }
-        if (this.commonJS.isEmpty(this.inputForm.reportType)) {
-          this.$message.error('基本信息中,”客户报备类型“未填写')
-          this.loading = false
-          throw new Error('基本信息中,”客户报备类型“未填写')
-        }
+        // if (this.commonJS.isEmpty(this.inputForm.reportType)) {
+        //   this.$message.error('基本信息中,”客户报备类型“未填写')
+        //   this.loading = false
+        //   throw new Error('基本信息中,”客户报备类型“未填写')
+        // }
         if (this.commonJS.isEmpty(this.inputForm.address)) {
         if (this.commonJS.isEmpty(this.inputForm.address)) {
           this.$message.error('基本信息中,”地址“未填写')
           this.$message.error('基本信息中,”地址“未填写')
           this.loading = false
           this.loading = false
@@ -1549,6 +1673,57 @@
             })
             })
           }
           }
         }
         }
+      },
+      // 统一社会信用代码blur事件
+      blurUscCode () {
+        if (this.commonJS.isNotEmpty(this.inputForm.uscCode)) {
+          this.workClientService.queryUscCodeIsUse(this.inputForm.uscCode).then(({data}) => {
+            this.workClientService.queryUscCodeById(this.inputForm.id).then((uscCode) => {
+              if (data.use !== 'false' && this.commonJS.isNotEmpty(data.use) && this.commonJS.isNotEmpty(data.id) && this.inputForm.uscCode !== uscCode.data) {
+                this.uscCodeMessage = '该客户已存在'
+                if (data.isUpdate === 'false') {
+                  this.$message.error('该客户信息已存在并且数据正在修改中')
+                } else {
+                  this.$confirm(`该客户信息已存在是否进行信息修改?`, '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                  }).then(() => {
+                    this.close()
+                    if (data.use === '0') {
+                      this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+                      this.$router.push({path: '/cw/workClientInfo/WorkClientList', query: {dataId: data.id, methodName: 'updateFlowAbleData'}})
+                    }
+                    if (data.use === '1') {
+                      this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+                      this.$router.push({path: '/cw/workClientInfo/WorkClientList', query: {dataId: data.id, methodName: 'updateDialogData'}})
+                    }
+                  })
+                }
+              } else {
+                this.uscCodeMessage = ''
+              }
+            })
+          })
+        } else {
+          this.uscCodeMessage = ''
+        }
+      },
+      // 客户名称blur事件
+      blurName () {
+        if (this.commonJS.isNotEmpty(this.inputForm.name)) {
+          this.workClientService.queryNameIsUse(this.inputForm.name).then(({data}) => {
+            this.workClientService.queryNameById(this.inputForm.id).then((name) => {
+              if (data.use !== 'false' && this.commonJS.isNotEmpty(data.use) && this.commonJS.isNotEmpty(data.id) && this.inputForm.name !== name.data) {
+                this.nameMessage = '该客户已存在'
+              } else {
+                this.nameMessage = ''
+              }
+            })
+          })
+        } else {
+          this.nameMessage = ''
+        }
       }
       }
     }
     }
   }
   }

+ 151 - 0
src/views/modules/cw/workClientInfo/WorkClientUpdateLog.vue

@@ -0,0 +1,151 @@
+<template>
+  <div>
+    <el-dialog
+      :title="title"
+      :close-on-click-modal="false"
+      v-dialogDrag
+      width="880px"
+      append-to-body
+      height="500px"
+      @close="close"
+      :visible.sync="visibleChoose">
+      <div style="height: calc(100%);">
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="" prop="createName">
+            <el-input size="small" v-model="searchForm.createName" @keyup.enter.native="list" placeholder="修改申请发起人" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="" prop="clientNo">
+            <el-input size="small" v-model="searchForm.clientNo" @keyup.enter.native="list" placeholder="客户编号" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="" prop="status">
+            <el-select v-model="searchForm.status" placeholder="申请状态"clearable>
+              <el-option
+                v-for="item in $dictUtils.getDictList('cw_work_client_temp_status')"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
+
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          max-height="400px"
+          :loading="loading"
+          size="small"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          @sort-change=""
+          :sort-config="{remote:true}"
+          :data="dataList">
+          <vxe-column type="seq" width="40"></vxe-column>
+          <vxe-column min-width="150" title="客户编号" align="center" field="clientNo"></vxe-column>
+          <vxe-column min-width="150" title="修改申请发起人" align="center" field="createName"></vxe-column>
+          <vxe-column min-width="150" title="修改申请发起时间" align="center" field="createDate"></vxe-column>
+          <vxe-column min-width="150" title="申请状态" align="center" field="status">
+            <template slot-scope="scope">
+              <span v-if="scope.row.status === '2'" style="color: #409EFF"><b>{{$dictUtils.getDictLabel('cw_work_client_temp_status', scope.row.status, '-')}}</b></span>
+              <span v-if="scope.row.status === '3'" style="color: #E6A23C"><b>{{$dictUtils.getDictLabel('cw_work_client_temp_status', scope.row.status, '-')}}</b></span>
+              <span v-if="scope.row.status === '4'" style="color: #F56C6C"><b>{{$dictUtils.getDictLabel('cw_work_client_temp_status', scope.row.status, '-')}}</b></span>
+              <span v-if="scope.row.status === '5'" style="color: #67C23A"><b>{{$dictUtils.getDictLabel('cw_work_client_temp_status', scope.row.status, '-')}}</b></span>
+              <span v-if="scope.row.status === '6'" style="color: #909399">{{$dictUtils.getDictLabel('cw_work_client_temp_status', scope.row.status, '-')}}</span>
+            </template>
+          </vxe-column>
+        </vxe-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
+    </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import InputNumber from '@/views/modules/sys/workContract/InputNumber.vue'
+  import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  export default {
+    data () {
+      return {
+        title: '',
+        method: '',
+        visibleChoose: false,
+        loading: false,
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        dataList: [],
+        searchForm: {
+          createName: '',
+          status: '',
+          clientNo: ''
+        },
+        clientId: ''
+      }
+    },
+    workClientService: null,
+    created () {
+      this.workClientService = new WorkClientService()
+    },
+    components: {
+      SelectUserTree,
+      InputNumber
+    },
+    methods: {
+      init (clientId) {
+        this.title = '客户修改申请记录'
+        this.visibleChoose = true
+        this.clientId = clientId
+        this.list()
+      },
+      list () {
+        this.dataList = []
+        this.loading = true
+        this.searchForm.clientId = this.clientId
+        this.workClientService.queryUpdateLogList(this.searchForm).then(({data}) => {
+          this.dataList = data
+          this.loading = false
+        })
+      },
+      // 当前页
+      currentChangeHandle ({currentPage, pageSize}) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.list()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.list()
+      },
+      close () {
+        this.$refs.searchForm.resetFields()
+        this.visibleChoose = false
+      }
+    }
+  }
+</script>
+<style scoped>
+  /deep/ .el-dialog__body {
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+  /deep/ .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
+    margin-bottom: 0px;
+  }
+</style>

+ 5 - 1
src/views/modules/flowable/task/TaskForm.vue

@@ -389,6 +389,10 @@
           }
           }
           this.$refs.form.reapplyForm((businessTable, businessId, inputForm) => {
           this.$refs.form.reapplyForm((businessTable, businessId, inputForm) => {
             vars = {...vars, ...inputForm}
             vars = {...vars, ...inputForm}
+            let assignee = this.auditForm.assignee
+            if (!this.commonJS.isEmpty(inputForm.assignee)) {
+              assignee = inputForm.assignee
+            }
             this.taskService.audit({
             this.taskService.audit({
               taskId: this.taskId,
               taskId: this.taskId,
               taskDefKey: this.taskDefKey,
               taskDefKey: this.taskDefKey,
@@ -396,7 +400,7 @@
               procDefId: this.procDefId,
               procDefId: this.procDefId,
               vars: vars,
               vars: vars,
               comment: this.auditForm,
               comment: this.auditForm,
-              assignee: this.auditForm.assignee
+              assignee: assignee
             }).then(({data}) => {
             }).then(({data}) => {
               this.$message.success('提交成功')
               this.$message.success('提交成功')
               this.changeBusiness()
               this.changeBusiness()