From dbccd6b83b9e30f9fdcb2c7900a16cb038648c62 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 03 九月 2025 10:55:39 +0800
Subject: [PATCH] 前端
---
small-program/pages/packaging-worker/packaging-worker.vue | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/small-program/pages/packaging-worker/packaging-worker.vue b/small-program/pages/packaging-worker/packaging-worker.vue
index eb714bb..77a6182 100644
--- a/small-program/pages/packaging-worker/packaging-worker.vue
+++ b/small-program/pages/packaging-worker/packaging-worker.vue
@@ -9,7 +9,7 @@
<view class="list-item-row" @click="show = true">
<view class="list-item-row-label">鐢ㄥ伐鏃堕棿<b>*</b></view>
<view class="list-item-row-val">
- <text>{{form.startDate ? form.startDate + ' 鑷� ' + form.endDate + ' (' + form.priceNum1 + '澶�) ' : '璇烽�夋嫨'}}</text>
+ <text>{{form.startDate ? form.startDate + ' 鑷� ' + form.endDate + ' (' + workDays + '澶�) ' : '璇烽�夋嫨'}}</text>
<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
</view>
</view>
@@ -18,7 +18,7 @@
<view class="list-item-row" @click="selectAddress()">
<view class="list-item-row-label">鐢ㄥ伐鍦扮偣<b>*</b></view>
<view class="list-item-row-val">
- <text>{{form.location ? form.location : '璇烽�夋嫨'}}</text>
+ <text style="width:80%;">{{form.location ? form.location : '璇烽�夋嫨'}}</text>
<u-icon name="arrow-right" color="#111111" size="16"></u-icon>
</view>
</view>
@@ -84,10 +84,14 @@
<view :class="form.carType === item.id ? 'list-item-cate-item active' : 'list-item-cate-item'" v-for="(item, index) in settlementType" :key="index" @click="clickType(item.id)">{{item.name}}</view>
</view>
<view class="list-item-row">
- <view class="list-item-row-label">澶╂暟</view>
+ <view class="list-item-row-label" v-if="form.carType === 0">澶╂暟</view>
+ <view class="list-item-row-label" v-if="form.carType === 1">灏忔椂鏁�</view>
+ <view class="list-item-row-label" v-if="form.carType === 2">閲嶉噺</view>
<view class="list-item-row-val">
- <input v-model="form.priceNum1" disabled @blur="getPrice" type="number" placeholder="璇疯緭鍏�" />
- <text>澶�</text>
+ <input v-model="form.priceNum1" :disabled="form.carType === 0" @blur="getPrice" type="number" placeholder="璇疯緭鍏�" />
+ <text v-if="form.carType === 0">澶�</text>
+ <text v-if="form.carType === 1">灏忔椂</text>
+ <text v-if="form.carType === 2">鏂�</text>
</view>
</view>
<view class="list-item-row">
@@ -143,6 +147,7 @@
:show="show"
color="#00BC12"
mode="range"
+ :allowSameDay="true"
@close="show = false"
@confirm="confirmDate" />
@@ -198,11 +203,12 @@
},
settlementType: [
{ name: '鎸夊ぉ浠樿垂', id: 0 },
- { name: '鎸夋浠樿垂', id: 1 },
+ { name: '鎸夊皬鏃朵粯璐�', id: 1 },
{ name: '鎸夐噸閲忎粯璐�', id: 2 }
],
cateList: [],
- viewStatus: false
+ viewStatus: false,
+ workDays: 0
};
},
onLoad(option) {
@@ -234,6 +240,8 @@
this.form.lgt = option.longitude
this.form.location = option.address
this.form.workType = option.workType
+ this.form.days = option.days
+ this.workDays = option.days
}
this.getCateList()
},
@@ -296,7 +304,11 @@
confirmDate(e) {
this.form.startDate = e[0]
this.form.endDate = e[e.length - 1]
- this.form.priceNum1 = e.length;
+ let time = this.form.startDate == this.form.endDate ? 1 : 0
+ this.workDays = e.length - time;
+ if (this.form.carType === 0) {
+ this.form.priceNum1 = e.length - time;
+ }
this.show = false
this.getPrice()
},
@@ -305,7 +317,7 @@
success: (res) => {
this.form.lat = res.latitude
this.form.lgt = res.longitude
- this.form.address = res.address
+ this.form.address =res.name || res.address
}
});
},
@@ -313,10 +325,13 @@
this.form.carType = id
if (id === 0) {
this.form.priceUnit = '鍏�/浜�/澶�'
+ this.form.priceNum1 = this.workDays
} else if (id === 1) {
this.form.priceUnit = '鍏�/浜�/灏忔椂'
+ this.form.priceNum1 = ''
} else {
this.form.priceUnit = '鍏�/鏂�'
+ this.form.priceNum1 = ''
}
},
confirmCategary(e) {
--
Gitblit v1.9.3