From 8903e1a476fd1140acbc1a91e187de6d771e4664 Mon Sep 17 00:00:00 2001
From: 付延余 <f-yanyu@outlook.com>
Date: 星期四, 23 三月 2023 17:56:23 +0800
Subject: [PATCH] 1.待领取列表增加字段 矿、煤场、煤种、客户名称、发运日期、日计划编号(完成) 2.多次抢单弹框再次确认是否抢单(完成) 3.待预约提煤单列表显示样式(完成)
---
pages/customer-page/customer-my/customer-my.vue | 36 ++++++++++++++++++++++--------------
1 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/pages/customer-page/customer-my/customer-my.vue b/pages/customer-page/customer-my/customer-my.vue
index 67fdd6b..c7ea67c 100644
--- a/pages/customer-page/customer-my/customer-my.vue
+++ b/pages/customer-page/customer-my/customer-my.vue
@@ -9,7 +9,7 @@
<view class="huodai-list">
<u-swipe-action>
<u-cell-group :border="false">
- <u-swipe-action-item :options="options1" v-for="(item, index) in huoDaiData" :index="index" :name="item.id" :key="index" @click="deleteHuoDaiClick">
+ <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-swipe-action-item>
</u-cell-group>
@@ -26,7 +26,7 @@
<u-swipe-action>
<u-cell-group :border="false">
<u-swipe-action-item :options="options1" v-for="(item, index) in fleetData" :index="index" :name="item.id" :key="index" @click="deleteFleetClick">
- <u-cell :title="item.name" value="25杈�" @click="tofleetDetails(item.id)"></u-cell>
+ <u-cell :title="item.name" :value="item.userSijisum + '杈�'" @click="tofleetDetails(item.id)"></u-cell>
</u-swipe-action-item>
</u-cell-group>
</u-swipe-action>
@@ -90,7 +90,7 @@
<script>
import combinedTitle from '@/components/combined-title/combined-title.vue';
-import { customerId ,redirectLogin} from '@/utils/status';
+import { customerId, redirectLogin } from '@/utils/status';
export default {
components: {
combinedTitle
@@ -140,14 +140,14 @@
},
// 鑾峰彇璐т唬鍒楄〃
getAllHuoDaiByCustomerId() {
- this.$reqGet('getAllHuoDaiByCustomerId', { customerId }).then(res => {
+ this.$reqGet('getAllHuoDaiByCustomerId').then(res => {
this.huoDaiData = res.data;
console.log('璐т唬鍒楄〃', res);
});
},
// 鑾峰彇杞﹂槦鍒楄〃
getFleet() {
- this.$reqGet('getFleet', { customerId }).then(res => {
+ this.$reqGet('getFleet').then(res => {
this.fleetData = res.data;
console.log('杞﹂槦鍒楄〃', res);
});
@@ -177,19 +177,23 @@
// 鏂板缓杞﹂槦
this.$reqPost('saveFleet', this.addGroupForm, 'params').then(res => {
uni.hideLoading();
- console.log('鏂板缓杞﹂槦', res);
- this.getFleet();
+ if (res.code == 0) {
+ this.$u.toast('娣诲姞鎴愬姛');
+ this.getFleet();
+ } else {
+ this.$u.toast(res.data ? res.data : '娣诲姞澶辫触');
+ }
});
this.updateGroupShow = false;
},
// 鍒犻櫎璐т唬
deleteHuoDaiClick(args) {
- console.log(args.name, '璐т唬id');
+ console.log(args, '璐т唬id');
this.deleteHuoDaiId = args.name;
this.deleteHuoDaiShow = true;
this.huoDaiData.forEach(item => {
- if (item.id == this.deleteHuoDaiId) {
- this.deleteHuoDaiContent = '纭鍒犻櫎璐т唬' + item.huoDaiName;
+ if (item.userId == this.deleteHuoDaiId) {
+ this.deleteHuoDaiContent = '纭鍒犻櫎璐т唬' + item.name + '鍚楋紵';
}
});
},
@@ -207,9 +211,13 @@
this.$reqPost('deleteHuoDai', { id: this.deleteHuoDaiId }, 'params').then(res => {
uni.hideLoading();
if (res.code == 0) {
- this.$u.toast('鍒犻櫎鎴愬姛');
+ if (res.data) {
+ this.$u.toast('鍒犻櫎鎴愬姛');
+ this.getAllHuoDaiByCustomerId();
+ } else {
+ this.$u.toast('鍒犻櫎澶辫触');
+ }
}
- this.getAllHuoDaiByCustomerId();
});
},
// 鍒犻櫎杞﹂槦
@@ -246,7 +254,7 @@
// 璐т唬璇︽儏
toFreightForwarderDetails(id) {
uni.navigateTo({
- url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details?huoDaiId=${id}`
+ url: `/pages/customer-page/freight-forwarder-details/freight-forwarder-details`
});
},
// 杞﹂槦璇︽儏
@@ -259,7 +267,7 @@
this.logoutShow = true;
},
logoutConfirm() {
- redirectLogin()
+ redirectLogin();
},
logoutCancel() {
this.logoutShow = false;
--
Gitblit v1.9.1