|
@@ -18,6 +18,10 @@
|
|
|
<u-button style="width: 100%;" :loading='loading' type="error" icon="close" text="驳回"
|
|
<u-button style="width: 100%;" :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>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="btnConcel">
|
|
|
|
|
+ <u-button @click="showAction = true">更多</u-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-action-sheet :actions="actionList" :closeOnClickOverlay="true" :closeOnClickAction="true" title="更多操作" :show="showAction" @close="showAction = false" @select="selectActionClick"></u-action-sheet>
|
|
|
<u-picker itemHeight='60' :show="technicianShow" visibleItemCount='10' :columns="userOptions" keyName="name"
|
|
<u-picker itemHeight='60' :show="technicianShow" visibleItemCount='10' :columns="userOptions" keyName="name"
|
|
|
@confirm='selectTechnicianInfo' @cancel='technicianShow = false' title='选择负责人'></u-picker>
|
|
@confirm='selectTechnicianInfo' @cancel='technicianShow = false' title='选择负责人'></u-picker>
|
|
|
</view>
|
|
</view>
|
|
@@ -26,7 +30,8 @@
|
|
|
<script>
|
|
<script>
|
|
|
import {
|
|
import {
|
|
|
approveTaskWithVariables,
|
|
approveTaskWithVariables,
|
|
|
- AssignPurchasePlanUserAPI
|
|
|
|
|
|
|
+ AssignPurchasePlanUserAPI,
|
|
|
|
|
+ cancelTask
|
|
|
} from '@/api/wt/index.js'
|
|
} from '@/api/wt/index.js'
|
|
|
import {
|
|
import {
|
|
|
listAllUserBind
|
|
listAllUserBind
|
|
@@ -50,7 +55,13 @@
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ showAction: false,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
|
|
+ actionList: [{
|
|
|
|
|
+ name: '作废',
|
|
|
|
|
+ fontSize: '28',
|
|
|
|
|
+ color: '#ffaa7f'
|
|
|
|
|
+ }],
|
|
|
technicianShow: false,
|
|
technicianShow: false,
|
|
|
userOptions: [],
|
|
userOptions: [],
|
|
|
form: {
|
|
form: {
|
|
@@ -79,6 +90,38 @@
|
|
|
this.getUserOptions()
|
|
this.getUserOptions()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ selectActionClick(item) {
|
|
|
|
|
+ console.log('selectActionClick', item)
|
|
|
|
|
+ if (item.name == '作废') {
|
|
|
|
|
+ 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('用户点击取消');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
async getUserOptions() {
|
|
async getUserOptions() {
|
|
|
const data = await listAllUserBind()
|
|
const data = await listAllUserBind()
|
|
|
this.userOptions.push(data)
|
|
this.userOptions.push(data)
|
|
@@ -140,5 +183,8 @@
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
-<style>
|
|
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.btnConcel {
|
|
|
|
|
+ margin-top: 20rpx;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|