From 09c2ac7911db8993b6b435cb5af23fcf69c0fbe2 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期五, 24 三月 2023 14:40:50 +0800 Subject: [PATCH] 增加货代详情 --- api/publicInterface.js | 8 ++- pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue | 77 +++++++++++++++++++++----------------- pages/customer-page/customer-my/customer-my.vue | 6 +- 3 files changed, 50 insertions(+), 41 deletions(-) diff --git a/api/publicInterface.js b/api/publicInterface.js index bba27cf..cb9197f 100644 --- a/api/publicInterface.js +++ b/api/publicInterface.js @@ -2,7 +2,9 @@ // import login from "../pages/login/login"; // const BaseUrl = "http://192.168.3.159:9999/"; -import {BaseUrl as wrBaseUrl} from '@/api/request.js' +import { + BaseUrl as wrBaseUrl +} from '@/api/request.js' // const BaseUrl = "http://192.168.0.120:9999" const BaseUrl = "http://192.168.3.109:9999" @@ -153,8 +155,8 @@ url: BaseUrl + '/admin/oauth2/token', method: "POST", data: { - grant_type:'mobile', - mobile:`MINI@${code}`, + grant_type: 'mobile', + mobile: `MINI@${code}`, code }, header: { diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue index fb69950..ca15628 100644 --- a/pages/customer-page/customer-my/customer-my.vue +++ b/pages/customer-page/customer-my/customer-my.vue @@ -10,7 +10,7 @@ <u-swipe-action> <u-cell-group :border="false"> <u-swipe-action-item :options="options1" v-for="(item, index) in huoDaiData" :index="index" :name="item.userId" :key="index" @click="deleteHuoDaiClick"> - <u-cell :title="item.name" value="璇︽儏" @click="toFreightForwarderDetails(item.id)"></u-cell> + <u-cell :title="item.name" value="璇︽儏" @click="toFreightForwarderDetails(item.userId)"></u-cell> </u-swipe-action-item> </u-cell-group> </u-swipe-action> @@ -253,9 +253,9 @@ }); }, // 璐т唬璇︽儏 - toFreightForwarderDetails(id) { + toFreightForwarderDetails(userId) { uni.navigateTo({ - url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details` + url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details?userId=${userId}` }); }, // 杞﹂槦璇︽儏 diff --git a/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue b/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue index 73112b5..8b03754 100644 --- a/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue +++ b/pages/customer-page/freight-forwarder-details/freight-forwarder-details.vue @@ -6,19 +6,15 @@ <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁"> <uni-tr> <uni-th align="left">濮撳悕</uni-th> - <uni-td align="left">娴嬭瘯</uni-td> + <uni-td align="left">{{ HuoDaiForm.name }}</uni-td> </uni-tr> <uni-tr> <uni-th align="left">鐢佃瘽</uni-th> - <uni-td align="left">18888888888</uni-td> + <uni-td align="left">{{ HuoDaiForm.phone }}</uni-td> </uni-tr> - <uni-tr> - <uni-th align="left">鎬у埆</uni-th> - <uni-td align="left">鐢�</uni-td> - </uni-tr> - <uni-tr> - <uni-th align="left">鍏徃鍚嶇О</uni-th> - <uni-td align="left">娌冲寳鏃槼钀ラ攢</uni-td> + <uni-tr v-if="roleType == 2"> + <uni-th align="left">瀹㈡埛鍚嶇О</uni-th> + <uni-td align="left">{{ HuoDaiForm.customerName }}</uni-td> </uni-tr> </uni-table> </view> @@ -29,19 +25,19 @@ <uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁"> <uni-tr> <uni-th align="left">娉ㄥ唽鏃堕棿</uni-th> - <uni-td align="left">2022/04/09</uni-td> + <uni-td align="left">{{ HuoDaiForm.createTime }}</uni-td> </uni-tr> <uni-tr> <uni-th align="left">绠$悊杞﹁締</uni-th> - <uni-td align="left">24杈�</uni-td> + <uni-td align="left">{{ HuoDaiForm.cars }}</uni-td> </uni-tr> <uni-tr> <uni-th align="left">浠诲姟鎬绘暟</uni-th> - <uni-td align="left">20</uni-td> + <uni-td align="left">{{ HuoDaiForm.sum }}</uni-td> </uni-tr> <uni-tr> <uni-th align="left">鎵ц瀹屾垚</uni-th> - <uni-td align="left">10</uni-td> + <uni-td align="left">{{ HuoDaiForm.over }}</uni-td> </uni-tr> </uni-table> </view> @@ -53,19 +49,30 @@ export default { data() { return { - huoDaiId: null + huoDaiId: null, + userId: '', + // 璐т唬璇︽儏淇℃伅琛ㄥ崟 + HuoDaiForm: {} }; + }, + onLoad(v) { + this.userId = v.userId; }, onShow() { this.init(); + }, + computed: { + roleType() { + return uni.getStorageSync('roleType'); + } }, methods: { init() { this.getHuoDaiDetail(); }, getHuoDaiDetail() { - this.$reqGet('getHuoDaiDetail').then(res => { - console.log(res, '璐т唬璇︽儏'); + this.$reqGet('getHuoDaiDetail', { userId: this.userId }).then(res => { + this.HuoDaiForm = res.data; }); } } @@ -88,29 +95,29 @@ line-height: vww(40); background-color: #f5f5f5; } - .uni-table { - min-width: 0 !important; + .uni-table { + min-width: 0 !important; - .uni-table-tr { - padding: 0; - font-size: vww(16); - font-weight: 300; - .uni-table-th { - height: vww(40); - line-height: vww(30); - padding: vww(5) vww(10); - color: #333333; - font-weight: 400; - } + .uni-table-tr { + padding: 0; + font-size: vww(16); + font-weight: 300; + .uni-table-th { + height: vww(40); + line-height: vww(30); + padding: vww(5) vww(10); + color: #333333; + font-weight: 400; + } - .uni-table-td { - height: vww(40); - line-height: vww(30); - padding: vww(5) vww(10); - color: #333333; - } + .uni-table-td { + height: vww(40); + line-height: vww(30); + padding: vww(5) vww(10); + color: #333333; } } + } } } </style> -- Gitblit v1.9.1