|
@@ -106,27 +106,28 @@
|
|
|
</a-card>
|
|
|
<br />
|
|
|
<!-- 审批人 -->
|
|
|
- <a-card v-if='userTaskFlag' :title="$t('dvp.approver')" class='mt10'>
|
|
|
- <a-row
|
|
|
- :gutter='24'
|
|
|
- v-for='(userTask, index) in userTaskList'
|
|
|
- :key='userTask.key'
|
|
|
- style="padding:12px;"
|
|
|
- >
|
|
|
- <a-col :xl='8' :lg='12' :md='12' :sm='24' :xs='24'>
|
|
|
- <a-form-item
|
|
|
- :label='userTask.name'
|
|
|
- :required='userTask.required'
|
|
|
- >
|
|
|
- <a-select
|
|
|
- :placeholder="$t('dvp.please-select-approver')"
|
|
|
- :filter-option='handleFilterOption'
|
|
|
- @change='handleUserChange($event, userTask)'
|
|
|
- @search='handleUserSearch'
|
|
|
- allowClear
|
|
|
- showSearch
|
|
|
- :disabled="userTask.isDisabled"
|
|
|
- v-decorator="[
|
|
|
+ <a-spin :spinning="loading">
|
|
|
+ <a-card v-if='userTaskFlag' :title="$t('dvp.approver')" class='mt10'>
|
|
|
+ <a-row
|
|
|
+ :gutter='24'
|
|
|
+ v-for='(userTask, index) in userTaskList'
|
|
|
+ :key='userTask.key'
|
|
|
+ style="padding:12px;"
|
|
|
+ >
|
|
|
+ <a-col :xl='8' :lg='12' :md='12' :sm='24' :xs='24'>
|
|
|
+ <a-form-item
|
|
|
+ :label='userTask.name'
|
|
|
+ :required='userTask.required'
|
|
|
+ >
|
|
|
+ <a-select
|
|
|
+ :placeholder="$t('dvp.please-select-approver')"
|
|
|
+ :filter-option='handleFilterOption'
|
|
|
+ @change='handleUserChange($event, userTask)'
|
|
|
+ @search='handleUserSearch'
|
|
|
+ allowClear
|
|
|
+ showSearch
|
|
|
+ :disabled="userTask.isDisabled"
|
|
|
+ v-decorator="[
|
|
|
'userName'+ userTask.key,
|
|
|
{
|
|
|
rules: [
|
|
@@ -138,38 +139,39 @@
|
|
|
initialValue: initialValueDefault(userTask)
|
|
|
},
|
|
|
]"
|
|
|
- >
|
|
|
- <a-icon slot='suffixIcon' type='search' />
|
|
|
- <a-select-option
|
|
|
- v-for='(user, uIndex) in userList'
|
|
|
- :key='uIndex'
|
|
|
- :value='user.value'
|
|
|
- >
|
|
|
- {{ user.name }}
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :xl='8' :lg='12' :md='12' :sm='24' :xs='24'>
|
|
|
- <a-form-item :label="'\xa0'">
|
|
|
- <a-button
|
|
|
- v-if='userTask.required'
|
|
|
- type='primary'
|
|
|
- shape='circle'
|
|
|
- icon='plus'
|
|
|
- @click='add(userTask.key, true)'
|
|
|
- />
|
|
|
- <a-button
|
|
|
- v-else
|
|
|
- type='dashed'
|
|
|
- shape='circle'
|
|
|
- icon='minus'
|
|
|
- @click='remove(userTask.key, userTask.isDisabled)'
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-card>
|
|
|
+ >
|
|
|
+ <a-icon slot='suffixIcon' type='search'/>
|
|
|
+ <a-select-option
|
|
|
+ v-for='(user, uIndex) in userList'
|
|
|
+ :key='uIndex'
|
|
|
+ :value='user.value'
|
|
|
+ >
|
|
|
+ {{ user.name }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl='8' :lg='12' :md='12' :sm='24' :xs='24'>
|
|
|
+ <a-form-item :label="'\xa0'">
|
|
|
+ <a-button
|
|
|
+ v-if='userTask.required'
|
|
|
+ type='primary'
|
|
|
+ shape='circle'
|
|
|
+ icon='plus'
|
|
|
+ @click='add(userTask.key, true)'
|
|
|
+ />
|
|
|
+ <a-button
|
|
|
+ v-else
|
|
|
+ type='dashed'
|
|
|
+ shape='circle'
|
|
|
+ icon='minus'
|
|
|
+ @click='remove(userTask.key, userTask.isDisabled)'
|
|
|
+ />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-card>
|
|
|
+ </a-spin>
|
|
|
</a-form>
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key='2' :tab="$t('dvp.flow-chart')" force-render>
|
|
@@ -250,7 +252,9 @@ export default {
|
|
|
reason: undefined
|
|
|
},
|
|
|
/** 不接受原因 */
|
|
|
- rejectReason: undefined
|
|
|
+ rejectReason: undefined,
|
|
|
+ /** 加载 */
|
|
|
+ loading: false
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -496,6 +500,7 @@ export default {
|
|
|
approveType: this.inputArgs.approveType,
|
|
|
processId: this.process.processId
|
|
|
}
|
|
|
+ this.loading = true;
|
|
|
this.$api.getProcessUserRecord(data).then(res => {
|
|
|
if (res.flag) {
|
|
|
let recordData = res.data;
|
|
@@ -609,7 +614,9 @@ export default {
|
|
|
} else {
|
|
|
this.$notification.error({ message: res.message });
|
|
|
}
|
|
|
- });
|
|
|
+ }).finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
},
|
|
|
// 绑定审批人名称
|
|
|
initialValueDefault(userTask) {
|
|
@@ -660,12 +667,17 @@ export default {
|
|
|
if (!v) {
|
|
|
v = k.replaceAll('userTask', 'userTaskName');
|
|
|
}
|
|
|
- this.userList.forEach(item => {
|
|
|
- if (item.value === val) {
|
|
|
- userTask[v] = item.name;
|
|
|
- }
|
|
|
- });
|
|
|
- this.handleUserSearch(undefined);
|
|
|
+ // 零部件DVP 计划/验证审批
|
|
|
+ if (this.inputArgs.approveType === '71') {
|
|
|
+ userTask[v] = num === 1 ? this.materialsEngineerInfo.name : this.testEngineerInfo.name;
|
|
|
+ } else {
|
|
|
+ this.userList.forEach(item => {
|
|
|
+ if (item.value === val) {
|
|
|
+ userTask[v] = item.name;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.handleUserSearch(undefined);
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 处理用户检索
|