|
@@ -11,8 +11,10 @@
|
|
|
<u-button style="width: 100%;margin-bottom: 10rpx;" icon="edit-pen" :loading='loading' type="success"
|
|
<u-button style="width: 100%;margin-bottom: 10rpx;" icon="edit-pen" :loading='loading' type="success"
|
|
|
text="通过" @click="handleAudit(1)">
|
|
text="通过" @click="handleAudit(1)">
|
|
|
</u-button>
|
|
</u-button>
|
|
|
- <u-button style="width: 100%;" :loading='loading' type="error" icon="close" text="驳回"
|
|
|
|
|
|
|
+ <u-button style="width: 100%;margin-bottom: 10rpx;" :loading='loading' type="error" icon="close" text="驳回"
|
|
|
@click="handleAudit(0)" v-if="!['starter'].includes(taskDefinitionKey)"></u-button>
|
|
@click="handleAudit(0)" v-if="!['starter'].includes(taskDefinitionKey)"></u-button>
|
|
|
|
|
+ <u-button style="width: 100%;margin-bottom: 10rpx;" :loading='loading' type="info" icon="close" text="作废"
|
|
|
|
|
+ @click="handleCancel()"></u-button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -21,7 +23,8 @@
|
|
|
<script>
|
|
<script>
|
|
|
import {
|
|
import {
|
|
|
approveTaskWithVariables,
|
|
approveTaskWithVariables,
|
|
|
- rejectTask
|
|
|
|
|
|
|
+ rejectTask,
|
|
|
|
|
+ cancelTask,
|
|
|
} from '@/api/wt/index.js'
|
|
} from '@/api/wt/index.js'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'taskSubmit',
|
|
name: 'taskSubmit',
|
|
@@ -92,7 +95,35 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ handleCancel() {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '是否确认作废?',
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ cancelTask({
|
|
|
|
|
+ taskId: this.taskId,
|
|
|
|
|
+ id: this.id,
|
|
|
|
|
+ reason: this.form.reason,
|
|
|
|
|
+ businessId: this.businessId,
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ if (res.code != '-1') {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.$emit('handleAudit', {
|
|
|
|
|
+ title: '作废'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.$message.error("流程作废失败");
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
|
+ console.log('用户点击取消');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
getTableValue() {
|
|
getTableValue() {
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
this.$emit('getTableValue', async (data) => {
|
|
this.$emit('getTableValue', async (data) => {
|