From 2909406f4e67616aa8f618013534d43aae566f0c Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期二, 19 七月 2022 17:21:39 +0800 Subject: [PATCH] v1 --- pages/my-application/my-application.vue | 97 +++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 90 insertions(+), 7 deletions(-) diff --git a/pages/my-application/my-application.vue b/pages/my-application/my-application.vue index 3046d03..9088476 100644 --- a/pages/my-application/my-application.vue +++ b/pages/my-application/my-application.vue @@ -2,7 +2,6 @@ <!-- 鎴戠殑鐢宠 --> <view class="my-application"> <!-- 鎼滅储鍖哄煙 --> - <view class="searchBox"> <view class="topRow"> <view class="search"> @@ -80,12 +79,12 @@ <image src="@/static/home/biaodan.png" mode=""></image> <view>琛ㄥ崟鏁版嵁</view> </view> - <view v-if="item.status == 3"> - <image src="@/static/home/history.png" mode="" ></image> + <view v-if="item.status == 3" @click="apply(item)"> + <image src="@/static/home/history.png" mode=""></image> <view>閲嶆柊鐢宠</view> </view> <view v-if="item.status == 3"> - <image src="@/static/home/history.png" mode="" ></image> + <image src="@/static/home/history.png" mode=""></image> <view>缂栬緫</view> </view> <view @click="approvalHistoryClick" v-if="item.status == 2 || item.status == 3"> @@ -144,9 +143,9 @@ data() { return { status: ['鑽夌', '澶勭悊涓�', '宸茬粨鏉�', '宸叉挙鍥�'], - statusColor: ['#bbbbbb', '#FF9900', '#007AFF', '#06BE00'], + statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'], result: ['鏈彁浜�', '澶勭悊涓�', '閫氳繃', '椹冲洖'], - resultColor: ['#bbbbbb', '#FF9900', '#06BE00', '#be2b2d'], + resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'], // 鎼滅储鍖哄煙 selectText: '', // 閫夋嫨鍣� @@ -163,6 +162,19 @@ id: '', // 鎾ゅ洖鐢宠ID procInstId: '' }, + // 閲嶆柊鐢宠 + form: { + sendMessage: true, + sendSms: true, + sendEmail: true, + procDefId: '', + assignees: [], + priority: '0' + }, + assigneeList: [], + showAssign: false, + isGateway: false, + isCustom: false, // 鎵归噺鍒犻櫎鐢宠 batchDeleteModalShow: false, // 澶嶉�夋 @@ -311,7 +323,7 @@ this.withDrawData.procInstId = i.procInstId; } }); - this.$reqPost('withDraw', this.withDrawData).then(res => { + this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { console.log('res', res); if (res.code == 0) { uni.showToast({ @@ -339,6 +351,77 @@ withDrawCancel() { this.withDrawShow = false; }, + apply(v) { + if (!v.procDefId || v.procDefId == 'null') { + this.$u.toast('娴佺▼瀹氫箟涓虹┖'); + return; + } + this.form.id = v.id; + this.form.procDefId = v.procDefId; + this.form.title = v.title; + // 鍔犺浇瀹℃壒浜� + // this.userLoading = true; + uni.showLoading({ + title: '瀹℃壒浜哄姞杞戒腑' + }); + // getFirstNode(v.procDefId).then((res) => { + this.$reqGet('getFirstNode', {}, v.procDefId).then(res => { + // this.userLoading = false; + console.log('瀹℃壒浜�', res); + uni.hideLoading(); + if (res.data) { + this.error = ''; + if (res.data.type == 3 || res.data.type == 4) { + this.isGateway = true; + this.form.firstGateway = true; + this.showAssign = false; + this.isCustom = false; + return; + } + if (res.data.type == 5) { + this.isCustom = true; + this.isGateway = false; + this.form.firstGateway = false; + this.showAssign = false; + return; + } + if (res.data.type == 1) { + this.showAssign = true; + this.isGateway = false; + this.form.firstGateway = false; + this.isCustom = false; + if (res.data.users && res.data.users.length > 0) { + this.assigneeList = res.data.users; + // 榛樿鍕鹃�� + let ids = []; + res.data.users.forEach(e => { + ids.push(e.userId); + }); + this.form.assignees = ids; + this.showAssign = true; + // 鑾峰彇琛ㄥ崟鍐呭锛岄噸鏂板垱寤虹敵璇� + this.$reqPost('apply',this.form).then(res=>{ + console.log('閲嶆柊鎻愪氦鐢宠',res); + if(res.code == 0){ + uni.showToast({ + title:res.data, + icon:'success', + duration:2000 + }); + } + }) + } else { + this.form.assignees = []; + this.showAssign = true; + this.error = '璇疯繘鍏�"娴佺▼绠$悊"涓哄鎵硅妭鐐瑰垎閰嶅�欓�夊鎵逛汉鍛�'; + } + } + } + console.log(this.form); + }); + + this.modalVisible = true; + }, // 鎵归噺鍒犻櫎妯℃�佹 batchDeleteClick() { this.batchDeleteModalShow = true; -- Gitblit v1.9.1