From 8c82102ab7bb34e29a73f56b829cd622ab34604c Mon Sep 17 00:00:00 2001
From: zhangxiaoxu <819527061@qq.com>
Date: 星期二, 25 十一月 2025 11:30:23 +0800
Subject: [PATCH] 解决运输方式显示不对得问题
---
pages/home/home.vue | 226 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 128 insertions(+), 98 deletions(-)
diff --git a/pages/home/home.vue b/pages/home/home.vue
index 77b20e8..5950805 100644
--- a/pages/home/home.vue
+++ b/pages/home/home.vue
@@ -50,15 +50,15 @@
<view class="bottom-container">
<!-- 鎸夐挳鍖哄煙 -->
<view class="bottom-content__chulizhong bottom-content__item">
- <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
+ <!-- <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
<image src="@/static/home/cehui.png" mode=""></image>
<view>鎾ゅ洖</view>
- </view>
- <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
+ </view> -->
+ <view @click="() => checkTheScheduleClick(item.procInstId)" v-if="item.status == 1">
<image src="@/static/home/jindu.png" mode=""></image>
<view>鏌ョ湅杩涘害</view>
</view>
- <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 || item.status == 3) && item.processName == '鍙戣繍閫氱煡鍗�'">
+ <view @click="() => shenqingDetail(item)" v-if="item.actType == 'Offsetting' || item.actType == 'XsWaybill'">
<image src="@/static/home/biaodan.png" mode=""></image>
<view>鐢宠璇︽儏</view>
</view>
@@ -66,18 +66,18 @@
<image src="@/static/home/history.png" mode=""></image>
<view>閲嶆柊鐢宠</view>
</view> -->
- <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '鍙戣繍閫氱煡鍗�'">
+ <!-- <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/history.png" mode=""></image>
<view>缂栬緫</view>
- </view>
- <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
+ </view> -->
+ <view @click="() => checkTheScheduleClick(item.procInstId)" v-if="item.status !== 1">
<image src="@/static/home/history.png" mode=""></image>
<view>瀹℃壒鍘嗗彶</view>
</view>
- <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
+ <!-- <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
<image src="@/static/home/delete.png" mode=""></image>
<view>鍒犻櫎</view>
- </view>
+ </view> -->
</view>
<!-- 宸茬粨鏉熷皬缁勬寜閽� -->
<!-- <view class="bottom-content__chulizhong bottom-content__item" v-if="item.status == 2">
@@ -96,12 +96,12 @@
<combined-title title="鎴戠殑寰呭姙" detailsPath="/pages/my-todo/my-todo"></combined-title>
<view class="card-group">
<combination-card class="card" v-for="(item, index) in daibanData" index="index">
- <template v-slot:top>
+ <template slot="top">
<view>
<text>{{ item.actBusiness.title }}</text>
</view>
</template>
- <template v-slot:center>
+ <template slot="center">
<view class="center-container">
<view class="center-content__one center-margin">
<view class="">
@@ -120,23 +120,23 @@
</view>
</view>
</template>
- <template v-slot:bottom>
+ <template slot="bottom">
<view class="bottom-container">
<!-- 寰呭姙鎸夐挳 -->
<view class="bottom-content__item">
- <view @click="theFormDataClick(item.tableId)">
- <image src="@/static/home/jindu.png" mode=""></image>
- <view>鐢宠璇︽儏</view>
- </view>
- <view @click="adopClick(item)">
+ <view @click="() => daibanDetail(item)" v-if="item.actBusiness.actType == 'Offsetting' || item.actBusiness.actType == 'XsWaybill'">
+ <image src="@/static/home/jindu.png" mode=""></image>
+ <view>鐢宠璇︽儏</view>
+ </view>
+ <view @click="() => adopClick(item)">
<image src="@/static/home/tongguo.png" mode=""></image>
<view>閫氳繃</view>
</view>
- <view @click="rejectClick(item)">
+ <view @click="() => rejectClick(item)">
<image src="@/static/home/bohui.png" mode=""></image>
<view>椹冲洖</view>
</view>
- <view @click="approvalHistoryClick(item.procInstId)">
+ <view @click="() => checkTheScheduleClick(item.procInstId)">
<image src="@/static/home/history.png" mode=""></image>
<view>鍘嗗彶</view>
</view>
@@ -156,7 +156,7 @@
</view>
</template>
<template v-slot:center>
- <view class="center-container">
+ <view class="center-container" @click="() => shenqingDetail(item)">
<view class="center-content__one center-margin">
<view>
<text>浠诲姟鍚嶇О锛歿{ item.name }}</text>
@@ -175,7 +175,7 @@
</view>
<view class="center-content__three center-margin">
<view class="">
- <text>瀹℃壒鎰忚锛歿{ item.comment=='undefined'?'鏈~鍐�':item.comment || '鏈~鍐�' }}</text>
+ <text>瀹℃壒鎰忚锛歿{ item.comment == 'undefined' ? '鏈~鍐�' : item.comment || '鏈~鍐�' }}</text>
</view>
<view class="">
<text>
@@ -198,11 +198,15 @@
<view class="bottom-container">
<!-- 宸插姙鎸夐挳 -->
<view class="bottom-content__item">
- <view @click="theFormDataClick(item.tableId)" v-if="item.processName == '鍙戣繍閫氱煡鍗�'">
+ <view @click="() => shenqingDetail(item)" v-if="item.processName == '鍙戣繍閫氱煡鍗�'">
<image src="@/static/home/biaodan.png" mode=""></image>
<view>琛ㄥ崟鏁版嵁</view>
</view>
- <view @click="approvalHistoryClick(item.procInstId)">
+ <view @click="() => daibanDetail(item)" v-if="item.actBusiness.actType == 'Offsetting' || item.actBusiness.actType == 'XsWaybill'">
+ <image src="@/static/home/jindu.png" mode=""></image>
+ <view>璇︽儏</view>
+ </view>
+ <view @click="() => checkTheScheduleClick(item.procInstId)">
<image src="@/static/home/history.png" mode=""></image>
<view>瀹℃壒鍘嗗彶</view>
</view>
@@ -217,9 +221,9 @@
</view>
<!-- 鏃ヨ鍒� -->
- <combined-title title="鏃ュ彂杩愯鍒�" detailsPath="/pages/jihua/jihua" v-if="rijihuaMenu"></combined-title>
- <view class="card-group bottomChild" >
- <combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id" v-if="rijihuaMenu">
+ <combined-title title="鏃ュ彂杩愯鍒�" detailsPath="/pages/jihua/jihua"></combined-title>
+ <view class="card-group bottomChild">
+ <combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id">
<template v-slot:top></template>
<template v-slot:center>
<view class="main-block-box">
@@ -333,11 +337,22 @@
import combinedTitle from '@/components/common/combined-title/combined-title.vue';
import combinationCard from '@/components/common/combination-card/combination-card.vue';
import { setAccessToken, redirectLogin } from '@/utils/status.js';
+import { logout } from '@/api/global.js';
export default {
name: 'home',
+ onLaunch() {
+ let that = this;
+ uni.addInterceptor('redirectTo', {
+ //鐩戝惉鍏抽棴鏈〉闈㈣烦杞�
+ success(e) {
+ that.watchRouter();
+ }
+ });
+ },
computed: {
rijihuaMenu() {
+ console.log(this.$store.state.rijihuaMenu,'this.$store.state.rijihuaMenu==============',this.$store.state)
return this.$store.state.rijihuaMenu;
},
shenqingMenu() {
@@ -406,8 +421,14 @@
// dataSeletText: '璇烽�夋嫨鐘舵��',
// 椹冲洖璇锋眰
rejectForm: {
- procInstIds: '',
- comment: ''
+ id: "",
+ procInstId: "",
+ comment: "",
+ type: 0,
+ backTaskKey: "-1",
+ sendMessage: true,
+ sendSms: true,
+ sendEmail: true,
},
modalType: 0,
// 鍒犻櫎鐢宠妯℃�佹
@@ -438,8 +459,8 @@
haveTodoParams: {
pageNumber: 1,
pageSize: 2,
- sort: 'createTime',
- order: 'desc'
+ // sort: 'createTime',
+ // order: 'desc'
}
};
},
@@ -456,24 +477,7 @@
onUnload(event) {
//澶氬眰绾ц烦杞箣鍚庯紝鐩戝惉宸︿笂瑙掕繑鍥炰簨浠讹紝鐩存帴閫�鍥炲埌index
console.log('鐩戝惉宸︿笂瑙�', event);
- uni
- .request({
- url: `${BaseUrl}/auth/token/logout`,
- method: 'DELETE',
- header: {
- 'TENANT-ID': 5,
- Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
- VERSION: 'zzl'
- }
- })
- .then(res => {
- console.log('缂撳瓨娓呯悊鎴愬姛');
- })
- .catch(err => {
- uni.showToast({
- title: '缂撳瓨娓呯悊澶辫触锛�'
- });
- });
+ this.logout();
},
onShow() {
// 鑿滃崟娉ㄩ噴锛坅pp寰呯敤锛�
@@ -488,6 +492,9 @@
// popupMenu
},
methods: {
+ watchRouter() {
+ console.log('璺敱璺宠浆');
+ },
init() {
this.getUserInfo(); // 鐢ㄦ埛淇℃伅
this.getProcessDataList(); // 鐢宠鍒楄〃
@@ -495,10 +502,41 @@
this.doneList(); // 鎴戠殑宸插姙
this.xscarshippingdayplan(); // 鏃ヨ鍒�
},
+ //浠e姙璇︽儏
+ daibanDetail(item) {
+ console.log(item,'item=====------000000')
+ if(item?.actBusiness?.actType == 'Offsetting') { //鏀舵 actType = 鈥極ffsetting鈥�
+ uni.navigateTo({
+ url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
+
+ })
+ }else if(item?.actBusiness?.actType == 'XsWaybill') {
+ uni.navigateTo({
+ url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
+ })
+ }
+ },
+ //浠e姙璇︽儏
+ shenqingDetail(item) {
+ console.log(item,'item====寰呭姙===璇︽儏')
+ if(item.actType == 'Offsetting') { //鏀舵 actType = 鈥極ffsetting鈥�
+ uni.navigateTo({
+ url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`,
+
+ })
+ }else if(item.actType == 'XsWaybill') {
+ uni.navigateTo({
+ url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}`
+ })
+ }
+ },
getUserInfo() {
this.$reqGet('getUserInfo').then(res => {
+ console.log(res,'res=====绯荤粺鐧诲綍===')
if (res.code == 0) {
uni.setStorageSync('userInfo', res.data.sysUser);
+ this.$store.commit('SET_PERMISSIONS',res.data.permissions)
+ //uni.setStorageSync('permissions', res.data.permissions);
this.userId = res.data.sysUser.userId;
this.$nextTick(() => {
this.coalbunker();
@@ -548,6 +586,7 @@
};
this.$reqGet('xscarshippingdayplan', params)
.then(res => {
+ console.log('鍙戣繍鏃ヨ鍒�----------------------------------',res)
if (res.code == 0) {
this.fyData = res.data.records;
uni.hideLoading();
@@ -606,19 +645,19 @@
this.withDrawData.procInstId = procInstId;
},
withDrawConfirm() {
- this.$reqPost('cancel', this.withDrawData).then(res => {
- this.withDrawShow = false;
- if (res.code == 0) {
- uni.showToast({
- title: res.data,
- duration: 2000
- });
- }
- // 鍒锋柊鍒楄〃
- this.getProcessDataList();
- this.todoList();
- this.doneList();
- });
+ this.$reqPost('cancel', this.withDrawData).then(res => {
+ this.withDrawShow = false;
+ if (res.code == 0) {
+ uni.showToast({
+ title: res.data,
+ duration: 2000
+ });
+ }
+ // 鍒锋柊鍒楄〃
+ this.getProcessDataList();
+ this.todoList();
+ this.doneList();
+ });
},
withDrawCancel() {
this.withDrawShow = false;
@@ -637,7 +676,7 @@
// 閫氳繃妯℃�佹
adoptModalConfirm() {
this.adoptModalShow = false;
- this.adoptForm.comment = this.adoptModalContent;
+ this.adoptForm.comment = this.adoptModalContent || '';
this.$reqPost('passAll', this.adoptForm).then(res => {
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛!');
@@ -645,7 +684,7 @@
this.$u.toast('閫氳繃澶辫触!!');
}
this.todoList(); // 鎴戠殑寰呭姙
- this.doneList();
+ this.doneList();
});
},
adoptModalCancel() {
@@ -653,22 +692,27 @@
},
// 椹冲洖
rejectClick(v) {
+ console.log('椹冲洖====',v)
this.modalType = 1;
this.rejectModalShow = true;
- this.rejectForm.procInstIds = v.procInstId;
+ this.rejectForm.procInstId = v.procInstId;
+ this.rejectForm.id = v.id;
+ this.rejectForm.procDefId = v.procDefId;
+ this.rejectForm.priority = v.priority;
+ this.rejectForm.type = 1;
},
// 椹冲洖妯℃�佹
rejectModalConfirm() {
this.rejectModalShow = false;
- this.$reqPost('backAll', this.rejectForm).then(res => {
+ this.$reqPost('back', this.rejectForm).then(res => {
if (res.code == 0) {
this.$u.toast('鎿嶄綔鎴愬姛锛�');
} else {
this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�');
}
this.todoList(); // 鎴戠殑寰呭姙
- this.doneList();
+ this.doneList();
});
},
rejectModalCancel() {
@@ -703,38 +747,24 @@
});
},
// 琛ㄥ崟鏁版嵁
- theFormDataClick(v) {
- uni.navigateTo({
- url: `/pages/the-form-data/the-form-data?index=${v}`
- });
- },
+ // theFormDataClick(item) {
+ // console.log(item,'鐢宠杩樻槸-----item')
+ // // uni.navigateTo({
+ // // url: `/pages/the-form-data/the-form-data?index=${v}`
+ // // });
+ //
+ // },
// 鍒犻櫎鎾ゅ洖鐢宠
- deleteWithDrawApplication(id){
- uni
- .request({
- url: `${BaseUrl}/yunxiao/xswaybill/${id}`,
- method: 'DELETE',
- header: {
- 'TENANT-ID': 5,
- Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
- VERSION: 'zzl'
+ deleteWithDrawApplication(id) {
+ this.deleteWithDrawApplicationGlobal(id)
+ .then(res => {
+ if (res.code == 0) {
+ // 鍒锋柊鍒楄〃
+ this.getProcessDataList();
}
})
- .then(res => {
- uni.showToast({
- title:'鍒犻櫎鎴愬姛',
- icon:'none'
- })
-
- // 鍒锋柊鍒楄〃
- this.getProcessDataList();
-
- })
.catch(err => {
- uni.showToast({
- title:'鍒犻櫎鍑洪敊',
- icon:'none'
- })
+ console.log('鍒犻櫎鎾ゅ洖鐢宠寮傚父');
});
},
// 閲嶆柊鐢宠
@@ -827,7 +857,6 @@
url: `/pages/approval-history/approval-history?index=${v}`
});
},
-
redirectLogin() {
redirectLogin();
},
@@ -839,6 +868,7 @@
}
};
</script>
+
<style lang="scss" scoped>
::v-deep.home {
@@ -884,7 +914,7 @@
// echarts鍥捐〃
.charts-box {
width: 91%;
- height: vww(330);
+ height: vww(270);
margin: 0 auto;
.u-empty {
height: 100%;
@@ -906,7 +936,7 @@
}
}
}
- .bottomChild{
+ .bottomChild {
margin-bottom: vww(20);
}
@@ -1131,4 +1161,4 @@
}
}
}
-</style>
+</style>
--
Gitblit v1.9.1