Commit 1274324003f770adecffe06193f240dd7d4c2d74

Authored by lxf
1 parent 4baef8c9

fix: 下单优化

.hbuilderx/launch.json
@@ -6,6 +6,10 @@ @@ -6,6 +6,10 @@
6 { 6 {
7 "launchtype" : "local" 7 "launchtype" : "local"
8 }, 8 },
  9 + "mp-alipay" :
  10 + {
  11 + "launchtype" : "local"
  12 + },
9 "mp-weixin" : 13 "mp-weixin" :
10 { 14 {
11 "launchtype" : "local" 15 "launchtype" : "local"
@@ -91,6 +91,7 @@ module.exports = (vm) => { @@ -91,6 +91,7 @@ module.exports = (vm) => {
91 tmsOrg: params => vm.$u.http.get(tmsWebApi + '/org/commonSelect', { params }), 91 tmsOrg: params => vm.$u.http.get(tmsWebApi + '/org/commonSelect', { params }),
92 projectCode: params => vm.$u.http.get(freightAPI + '/freightProject/commonSelect', { params }),// 项目 92 projectCode: params => vm.$u.http.get(freightAPI + '/freightProject/commonSelect', { params }),// 项目
93 payeeCommonSelect: params => vm.$u.http.get(freightAPI + '/freightEnterpriseCollectDriver/payeeCommonSelect', { params }), // 代收人 93 payeeCommonSelect: params => vm.$u.http.get(freightAPI + '/freightEnterpriseCollectDriver/payeeCommonSelect', { params }), // 代收人
  94 + freightDriverCommonSelect: params => vm.$u.http.get(freightAdmin + '/freightDriver/tmsCommonSelect', { params }), // 网货司机选择器
94 driver: params => vm.$u.http.get(tmsServiceApi + '/driver/commonSelect', { params }), // 司机选择器 95 driver: params => vm.$u.http.get(tmsServiceApi + '/driver/commonSelect', { params }), // 司机选择器
95 vehicle: params => vm.$u.http.get(tmsWebApi + '/vehicle/commonSelect', { params }), // 车辆选择器 96 vehicle: params => vm.$u.http.get(tmsWebApi + '/vehicle/commonSelect', { params }), // 车辆选择器
96 goodsName: p => vm.$u.http.get(freightAPI + '/freightEnterpriseGoods/commonSelect', { params:{...p,goodsName:p.query }}).then(res=>{ 97 goodsName: p => vm.$u.http.get(freightAPI + '/freightEnterpriseGoods/commonSelect', { params:{...p,goodsName:p.query }}).then(res=>{
@@ -150,6 +151,7 @@ module.exports = (vm) => { @@ -150,6 +151,7 @@ module.exports = (vm) => {
150 getSensitiveByOrderCode:params => vm.$u.http.get( freightAdmin + '/freightOrder/getSensitiveByOrderCode', {params}), 151 getSensitiveByOrderCode:params => vm.$u.http.get( freightAdmin + '/freightOrder/getSensitiveByOrderCode', {params}),
151 buildMaQrcode:params => vm.$u.http.get( freightAdmin + '/woss/freightOrder/buildMaQrcode', {params}), 152 buildMaQrcode:params => vm.$u.http.get( freightAdmin + '/woss/freightOrder/buildMaQrcode', {params}),
152 supplementTrailerVehicle: params => vm.$u.http.get( freightAPI + '/freightOrder/supplementTrailerVehicle', params), // 绑定车挂 153 supplementTrailerVehicle: params => vm.$u.http.get( freightAPI + '/freightOrder/supplementTrailerVehicle', params), // 绑定车挂
  154 + getLatestRemark: params => vm.$u.http.get( freightAPI + '/freightOrder/getLatestRemark', params), // 使用的历史备注
153 }, 155 },
154 freightMaRecord: { 156 freightMaRecord: {
155 add: params => vm.$u.http.post( freightAPI + '/freightMaRecord/add', params,{custom: {toast:true}}), // 出发到达记录日志 157 add: params => vm.$u.http.post( freightAPI + '/freightMaRecord/add', params,{custom: {toast:true}}), // 出发到达记录日志
@@ -24,7 +24,10 @@ @@ -24,7 +24,10 @@
24 "scope.userLocation" : { 24 "scope.userLocation" : {
25 "desc" : "获取位置信息" 25 "desc" : "获取位置信息"
26 } 26 }
27 - } 27 + },
  28 + "requiredPrivateInfos": [
  29 + "chooseLocation"
  30 + ]
28 }, 31 },
29 "mp-alipay" : { 32 "mp-alipay" : {
30 "usingComponents" : true, 33 "usingComponents" : true,
@@ -73,6 +73,12 @@ @@ -73,6 +73,12 @@
73 } 73 }
74 }, 74 },
75 { 75 {
  76 + "path": "pages/order/select-remark",
  77 + "style": {
  78 + "navigationBarTitleText": "填写备注"
  79 + }
  80 + },
  81 + {
76 "path": "pages/settlement/index", 82 "path": "pages/settlement/index",
77 "style": { 83 "style": {
78 "navigationBarTitleText": "支付申请", 84 "navigationBarTitleText": "支付申请",
@@ -169,6 +175,12 @@ @@ -169,6 +175,12 @@
169 "style": { 175 "style": {
170 "navigationBarTitleText": "选择地址" 176 "navigationBarTitleText": "选择地址"
171 } 177 }
  178 + },
  179 + {
  180 + "path": "search-driver",
  181 + "style": {
  182 + "navigationBarTitleText": "选择司机"
  183 + }
172 } 184 }
173 ] 185 ]
174 } 186 }
pages/global/search-address.vue
@@ -115,15 +115,77 @@ export default { @@ -115,15 +115,77 @@ export default {
115 }, 115 },
116 // 地图选点 116 // 地图选点
117 selectLocation() { 117 selectLocation() {
118 - uni.$once('webview-select', location => {  
119 - this.onSelect(location); 118 + wx.chooseLocation({
  119 + latitude: this.lat ? Number(this.lat) : undefined,
  120 + longitude: this.lng ? Number(this.lng) : undefined,
  121 + }).then(res => {
  122 + uni.request({
  123 + url: 'https://restapi.amap.com/v3/geocode/regeo', //逆地理编码接口地址。
  124 + data: {
  125 + key: '1b987a62e5685a58cda5933e1bc66044',
  126 + location: res.longitude + ',' + res.latitude,
  127 + },
  128 + success: response => {
  129 + console.info(response);
  130 + const regeocode = response?.data?.regeocode || {};
  131 + const addressComponent = regeocode?.addressComponent || {};
  132 + const addressInfo = this.getAddress(response?.data);
  133 + let location = {
  134 + lng: res.longitude || '',
  135 + lat: res.latitude || '',
  136 + provinceCode: addressComponent.pcode,
  137 + provinceName: addressComponent.pname,
  138 + areaCode: addressComponent.adcode,
  139 + areaName: addressComponent.district,
  140 + address: addressInfo.address,
  141 + };
  142 + this.onSelect(location);
  143 + },
  144 + });
  145 + // let location = {
  146 + // lng: res.longitude || '',
  147 + // lat: res.latitude || '',
  148 + // provinceCode: '',
  149 + // provinceName: '',
  150 + // cityCode: '',
  151 + // cityName: '',
  152 + // areaCode: '',
  153 + // areaName: '',
  154 + // address: res.address || '',
  155 + // };
  156 + // this.onSelect(location);
120 }); 157 });
121 - const url = 'https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/webview/location-wx-freight.html';  
122 - const params = {  
123 - lat: this.lat ? Number(this.lat) : '',  
124 - lng: this.lng ? Number(this.lng) : '', 158 + // uni.$once('webview-select', location => {
  159 + // this.onSelect(location);
  160 + // });
  161 + // const url = 'https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/webview/location-wx-freight.html';
  162 + // const params = {
  163 + // lat: this.lat ? Number(this.lat) : '',
  164 + // lng: this.lng ? Number(this.lng) : '',
  165 + // };
  166 + // uni.navigateTo({ url: `/pages/common/webview?url=${url}&query=${JSON.stringify(params)}` });
  167 + },
  168 + // 格式化地址
  169 + getAddress(geo) {
  170 + const { regeocode = {} } = geo || {};
  171 + const { addressComponent = {} } = regeocode || {};
  172 + const { province, city, district, township, streetNumber } = addressComponent || {};
  173 + const { street, number } = streetNumber || {};
  174 + const formattedAddress = regeocode.formatted_address || regeocode.formattedAddress || '';
  175 + let amapAddress = formattedAddress.replace(province, '');
  176 + amapAddress = amapAddress.replace(city, '');
  177 + amapAddress = amapAddress.replace(district, '');
  178 + amapAddress = amapAddress.replace(township, '');
  179 + amapAddress = amapAddress.replace(street, '');
  180 + amapAddress = amapAddress.replace(number, '');
  181 + return {
  182 + formattedAddress,
  183 + fullAddress: `${province}${city}${district}${township}${street}${number}`,
  184 + address: `${township}${street}${number}${amapAddress}`,
  185 + amapAddress,
  186 + adcode: addressComponent.adcode,
  187 + township,
125 }; 188 };
126 - uni.navigateTo({ url: `/pages/common/webview?url=${url}&query=${JSON.stringify(params)}` });  
127 }, 189 },
128 }, 190 },
129 }; 191 };
pages/global/search-driver.vue 0 → 100644
@@ -0,0 +1,87 @@ @@ -0,0 +1,87 @@
  1 +<template>
  2 + <Page name="search-driver" flank>
  3 + <template #header>
  4 + <u-alert type="error" description="警告:司机存在重名,请注意核实手机号,以免错付运费!" fontSize="12"></u-alert>
  5 + <view class="search-bar-content">
  6 + <search-bar v-model="query" placeholder="搜索手机号或姓名" auto @confirm="onSearch" />
  7 + </view>
  8 + </template>
  9 + <template #content>
  10 + <List ref="list" v-model="list" :api="searchAPI">
  11 + <template v-for="(item, index) in list">
  12 + <view class="card" :key="index" @tap="choseIndex = index">
  13 + <view class="title">
  14 + <view>
  15 + <text v-if="item.name" style="margin-right: 10upx">{{ item.name || '' }}</text>
  16 + <text
  17 + >{{ item.mobile }}(<text style="color: #2673fb">最近使用:{{ item.latestVehicleNo || '无~' }}</text
  18 + >)</text
  19 + >
  20 + </view>
  21 + <view style="float: right" :class="{ action: choseIndex === index }">
  22 + <u-icon v-if="choseIndex !== index" name="checkmark-circle" size="20px"></u-icon>
  23 + <u-icon v-else name="checkmark-circle-fill" size="20px"></u-icon>
  24 + </view>
  25 + </view>
  26 + </view>
  27 + </template>
  28 + </List>
  29 + </template>
  30 + <template #footer>
  31 + <u-button type="primary" @click="onSelect">确定</u-button>
  32 + </template>
  33 + </Page>
  34 +</template>
  35 +
  36 +<script>
  37 +import payee from '../../components/card/payee.vue';
  38 +import UText from '../../uni_modules/uview-ui/components/u-text/u-text.vue';
  39 +export default {
  40 + name: 'change-payee',
  41 + components: { UText, payee },
  42 + data() {
  43 + return {
  44 + choseIndex: '',
  45 + list: [],
  46 + query: '',
  47 + };
  48 + },
  49 + methods: {
  50 + searchAPI(params) {
  51 + return uni.$u.api.filter.freightDriverCommonSelect({ query: this.query, ...params });
  52 + },
  53 + onSelect() {
  54 + let item = this.list[this.choseIndex];
  55 + uni.$emit('select-driver', item);
  56 + uni.navigateBack();
  57 + },
  58 + },
  59 +};
  60 +</script>
  61 +
  62 +<style lang="scss">
  63 +.page-search-driver {
  64 + &__header {
  65 + padding: 0 !important;
  66 + .search-bar-content {
  67 + padding: 15rpx 22rpx !important;
  68 + }
  69 + }
  70 + &__footer {
  71 + background: $color-white;
  72 + }
  73 + .title {
  74 + display: flex;
  75 + justify-content: space-between;
  76 + }
  77 + .card {
  78 + padding: $padding-md;
  79 + border-radius: $radius-md;
  80 + margin-bottom: $padding-md;
  81 + background: $color-white;
  82 + .action {
  83 + color: $color-primary;
  84 + }
  85 + }
  86 +}
  87 +</style>
pages/order/add.vue
@@ -13,8 +13,8 @@ @@ -13,8 +13,8 @@
13 <u-form-item label="内部单号"> 13 <u-form-item label="内部单号">
14 <u-input v-model="form.customerOrderCode" border="none" placeholder="请输入,选填" /> 14 <u-input v-model="form.customerOrderCode" border="none" placeholder="请输入,选填" />
15 </u-form-item> 15 </u-form-item>
16 - <u-form-item label="订单备注">  
17 - <u-input v-model="form.remark" border="none" placeholder="请输入,选填" /> 16 + <u-form-item label="订单备注" @click="selectRemark">
  17 + <u-input v-model="form.remark" border="none" suffix-icon="arrow-right" placeholder="请输入,选填" disabledColor="#ffffff" disabled />
18 </u-form-item> 18 </u-form-item>
19 </view> 19 </view>
20 <view class="card"> 20 <view class="card">
@@ -45,26 +45,43 @@ @@ -45,26 +45,43 @@
45 </u-form-item> 45 </u-form-item>
46 </view> 46 </view>
47 <view class="card"> 47 <view class="card">
48 - <u-form-item label="司机手机" required>  
49 - <u-input v-model="form.mobile" border="none" type="number" placeholder="请输入" @blur="mobileChange">  
50 - <template #suffix>  
51 - <u-tag @click="(showModal = true), (content = '')" text="粘贴识别" plain size="mini"></u-tag>  
52 - </template>  
53 - </u-input>  
54 - </u-form-item>  
55 - <u-form-item label="司机姓名" :required="!driverIsAuditPass">  
56 - <span v-if="driverIsAuditPass">{{ form.driverName }}</span>  
57 - <u-input v-else v-model="form.driverName" border="none" placeholder="请输入" />  
58 - </u-form-item> 48 + <view style="display: flex">
  49 + <view style="flex: 1">
  50 + <u-form-item label="司机手机" required>
  51 + <u-input v-model="form.mobile" border="none" type="number" placeholder="请输入" @blur="mobileChange"></u-input>
  52 + </u-form-item>
  53 + <u-form-item label="司机姓名" :required="!driverIsAuditPass">
  54 + <span v-if="driverIsAuditPass">{{ form.driverName }}</span>
  55 + <u-input v-else v-model="form.driverName" border="none" placeholder="请输入" />
  56 + </u-form-item>
  57 + </view>
  58 + <view @click="choseDriver" style="width: 180rpx; display: flex; align-items: center; justify-content: center; flex-direction: column; border-left: 1px solid #f6f8fb">
  59 + <view><u-icon name="search" size="28" color="#000"></u-icon></view>
  60 + <view><text class="action-text">搜索选择</text></view>
  61 + </view>
  62 + </view>
59 <view class="payee"> 63 <view class="payee">
60 <payee ref="payee" v-model="payeeModel" :have-action="isCollect" /> 64 <payee ref="payee" v-model="payeeModel" :have-action="isCollect" />
61 </view> 65 </view>
62 - <u-form-item label="车牌号" required @click="choseCar('licenseNumber')">  
63 - <u-input v-model="form.licenseNumber" border="none" placeholder="请输入" disabledColor="#ffffff" disabled />  
64 - </u-form-item>  
65 - <u-form-item label="车挂号" @click="choseCar('trailerNumber')">  
66 - <u-input v-model="form.trailerNumber" border="none" placeholder="请输入" disabledColor="#ffffff" disabled />  
67 - </u-form-item> 66 + <view style="display: flex">
  67 + <view style="flex: 1">
  68 + <u-form-item label="车牌号" required @click="choseCar('licenseNumber')">
  69 + <u-input v-model="form.licenseNumber" border="none" placeholder="请输入" disabledColor="#ffffff" disabled />
  70 + </u-form-item>
  71 + <u-form-item label="车挂号" @click="choseCar('trailerNumber')">
  72 + <u-input v-model="form.trailerNumber" border="none" placeholder="请输入" disabledColor="#ffffff" disabled />
  73 + </u-form-item>
  74 + </view>
  75 + <view
  76 + @click="(showModal = true), (content = '')"
  77 + style="width: 180rpx; display: flex; align-items: center; justify-content: center; flex-direction: column; border-left: 1px solid #f6f8fb"
  78 + >
  79 + <view>
  80 + <image style="height: 28px; width: 28px" src="/static/svgs/scan-font.svg"></image>
  81 + </view>
  82 + <view><text class="action-text">粘贴识别</text></view>
  83 + </view>
  84 + </view>
68 </view> 85 </view>
69 <view class="card"> 86 <view class="card">
70 <u-form-item label="应付司机运费"> 87 <u-form-item label="应付司机运费">
@@ -140,9 +157,20 @@ @@ -140,9 +157,20 @@
140 <u-button :loading="loading" type="primary" @tap="submitAddFun">下单并指派</u-button> 157 <u-button :loading="loading" type="primary" @tap="submitAddFun">下单并指派</u-button>
141 </template> 158 </template>
142 <u-toast ref="uToast"></u-toast> 159 <u-toast ref="uToast"></u-toast>
143 - <u-modal :show="showModal" title="粘贴识别司机车辆信息" :showCancelButton="true" @cancel="cliCancel" @confirm="cliSubmit" confirmText="确定"> 160 + <u-modal :show="showModal" title="粘贴识别司机车辆信息" :showCancelButton="true" @cancel="showModal = false" @confirm="cliSubmit" confirmText="确定">
144 <u--textarea v-model="content" placeholder="支持同时粘贴司机手机号、车牌号、车挂号"></u--textarea> 161 <u--textarea v-model="content" placeholder="支持同时粘贴司机手机号、车牌号、车挂号"></u--textarea>
145 </u-modal> 162 </u-modal>
  163 + <u-modal
  164 + :show="showModal2"
  165 + title="已自动识别复制的信息,是否使用?"
  166 + :showCancelButton="true"
  167 + @cancel="showModal2 = false"
  168 + @confirm="cliSubmit2"
  169 + confirmText="确定使用"
  170 + cancelText="不使用"
  171 + >
  172 + <u-textarea disabled v-model="content2"></u-textarea>
  173 + </u-modal>
146 <popup-platenumber :visible="showCar" @update:visible="e => (showCar = e)" @confirm="carConfirm" v-model="carNumber"></popup-platenumber> 174 <popup-platenumber :visible="showCar" @update:visible="e => (showCar = e)" @confirm="carConfirm" v-model="carNumber"></popup-platenumber>
147 </Page> 175 </Page>
148 </template> 176 </template>
@@ -159,7 +187,9 @@ export default { @@ -159,7 +187,9 @@ export default {
159 return { 187 return {
160 loading: false, 188 loading: false,
161 showModal: '', 189 showModal: '',
  190 + showModal2: '',
162 content: '', 191 content: '',
  192 + content2: '',
163 carNumber: '', 193 carNumber: '',
164 showLoadTime: false, 194 showLoadTime: false,
165 loadTimeDef: new Date(), 195 loadTimeDef: new Date(),
@@ -190,6 +220,7 @@ export default { @@ -190,6 +220,7 @@ export default {
190 distance: '', 220 distance: '',
191 allowDriverSeeFreightAmountNode: '', 221 allowDriverSeeFreightAmountNode: '',
192 waypoints: [{}, {}], 222 waypoints: [{}, {}],
  223 + remark: '',
193 }, 224 },
194 payeeModel: {}, 225 payeeModel: {},
195 driverObj: {}, //司机信息 226 driverObj: {}, //司机信息
@@ -223,24 +254,7 @@ export default { @@ -223,24 +254,7 @@ export default {
223 methods: { 254 methods: {
224 clipboard(data) { 255 clipboard(data) {
225 if (!data) return; 256 if (!data) return;
226 - let mobileReg = /1[3456789]\d{9}/;  
227 - let vehicleReg = /[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新]{1}[ABCDEFGHJKLMNOPQRSTUVWXY]{1}[0-9A-Z]{5,6}/;  
228 - let trailerReg = /[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新]{1}[ABCDEFGHJKLMNPQRSTUVWXY]{1}[0-9A-Z]{4}[挂超]{1}/;  
229 - let mobile = mobileReg.exec(data.toUpperCase());  
230 - let vehicle = vehicleReg.exec(data.toUpperCase());  
231 - let trailer = trailerReg.exec(data.toUpperCase());  
232 - let cliMobile = '',  
233 - cliVehicle = '',  
234 - cliTrailer = '';  
235 - if (mobile && mobile.input) {  
236 - cliMobile = mobile[0];  
237 - }  
238 - if (vehicle && vehicle.input) {  
239 - cliVehicle = vehicle[0];  
240 - }  
241 - if (trailer && trailer.input) {  
242 - cliTrailer = trailer[0];  
243 - } 257 + let { cliMobile = '', cliVehicle = '', cliTrailer = '' } = this.getClipboardInfo(data);
244 if (cliMobile || cliVehicle || cliTrailer) { 258 if (cliMobile || cliVehicle || cliTrailer) {
245 this.form = { 259 this.form = {
246 ...this.form, 260 ...this.form,
@@ -263,14 +277,47 @@ export default { @@ -263,14 +277,47 @@ export default {
263 } 277 }
264 } 278 }
265 }, 279 },
266 - cliCancel() {  
267 - this.showModal = false; 280 + getClipboardInfo(data) {
  281 + if (!data) return;
  282 + let mobileReg = /1[3456789]\d{9}/;
  283 + let vehicleReg = /[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新]{1}[ABCDEFGHJKLMNOPQRSTUVWXY]{1}[0-9A-Z]{5,6}/;
  284 + let trailerReg = /[京津冀晋蒙辽吉黑沪苏浙皖闽赣鲁豫鄂湘粤桂琼川贵云渝藏陕甘青宁新]{1}[ABCDEFGHJKLMNPQRSTUVWXY]{1}[0-9A-Z]{4}[挂超]{1}/;
  285 + let mobile = mobileReg.exec(data.toUpperCase());
  286 + let vehicle = vehicleReg.exec(data.toUpperCase());
  287 + let trailer = trailerReg.exec(data.toUpperCase());
  288 + let cliMobile = '',
  289 + cliVehicle = '',
  290 + cliTrailer = '';
  291 + if (mobile && mobile.input) {
  292 + cliMobile = mobile[0];
  293 + }
  294 + if (vehicle && vehicle.input) {
  295 + cliVehicle = vehicle[0];
  296 + }
  297 + if (trailer && trailer.input) {
  298 + cliTrailer = trailer[0];
  299 + }
  300 + return {
  301 + cliMobile,
  302 + cliVehicle,
  303 + cliTrailer,
  304 + text: `${cliVehicle ? '车牌号:' : ''}${cliVehicle}\n${cliTrailer ? '车挂号:' : ''}${cliTrailer}\n${cliMobile ? '司机手机号:' : ''}${cliMobile}`,
  305 + };
268 }, 306 },
269 cliSubmit() { 307 cliSubmit() {
270 - this.clipboard(this.content);  
271 - this.cliCancel(); 308 + this.showModal = false;
  309 + let resInfo = this.getClipboardInfo(this.content);
  310 + if (resInfo.text) {
  311 + this.showModal2 = true;
  312 + this.content2 = resInfo.text;
  313 + } else {
  314 + uni.showToast({ title: '未识别到信息' });
  315 + }
  316 + },
  317 + cliSubmit2() {
  318 + this.showModal2 = false;
  319 + this.clipboard(this.content2);
272 }, 320 },
273 -  
274 initConfig() { 321 initConfig() {
275 uni.$u.api.freightOrder.currentFreight({}).then(en => { 322 uni.$u.api.freightOrder.currentFreight({}).then(en => {
276 this.currentFreight = en?.result || {}; 323 this.currentFreight = en?.result || {};
@@ -315,6 +362,28 @@ export default { @@ -315,6 +362,28 @@ export default {
315 this.computedDistance(); 362 this.computedDistance();
316 }); 363 });
317 }, 364 },
  365 + selectRemark() {
  366 + uni.$once('select-remark', remark => {
  367 + console.info(remark);
  368 + this.form.remark = remark || '';
  369 + });
  370 + uni.navigateTo({
  371 + url: `/pages/order/select-remark`,
  372 + });
  373 + },
  374 + choseDriver() {
  375 + uni.$once('select-driver', driver => {
  376 + this.form.driverName = driver.name;
  377 + this.form.driverMobile = driver.mobile;
  378 + this.form.mobile = driver.mobile;
  379 + if (driver.mobile) {
  380 + this.mobileChange();
  381 + }
  382 + });
  383 + uni.navigateTo({
  384 + url: `/pages/global/search-driver`,
  385 + });
  386 + },
318 choseProjectCode() { 387 choseProjectCode() {
319 uni.$once('select-common', option => { 388 uni.$once('select-common', option => {
320 this.form.projectCode = option.code; 389 this.form.projectCode = option.code;
@@ -584,6 +653,12 @@ export default { @@ -584,6 +653,12 @@ export default {
584 } 653 }
585 } 654 }
586 } 655 }
  656 + .action-text {
  657 + background: #f6f8fb;
  658 + color: #2673fb;
  659 + font-size: 24upx;
  660 + padding: 2upx 4upx;
  661 + }
587 } 662 }
588 } 663 }
589 </style> 664 </style>
pages/order/select-remark.vue 0 → 100644
@@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
  1 +<template>
  2 + <Page name="select-remark" flank>
  3 + <template #content>
  4 + <u-textarea placeholder="请输入,点击历史备注快捷填写" v-model="remark"></u-textarea>
  5 + <view class="his-title">历史备注</view>
  6 + <view class="his-card">
  7 + <view @click="clickItem(item)" class="his-item" v-for="(item, index) in hisList" :key="index">
  8 + <text>{{ item }}</text>
  9 + </view>
  10 + </view>
  11 + </template>
  12 + <template #footer>
  13 + <u-button type="primary" @click="onSelect">确定</u-button>
  14 + </template>
  15 + </Page>
  16 +</template>
  17 +<script>
  18 +export default {
  19 + name: 'select-remark',
  20 + data() {
  21 + return {
  22 + remark: '',
  23 + hisList: [],
  24 + };
  25 + },
  26 + onLoad() {
  27 + this.getHis();
  28 + },
  29 + methods: {
  30 + getHis() {
  31 + uni.$u.api.freightOrder.getLatestRemark({}).then(res => {
  32 + this.hisList = res.result || [];
  33 + });
  34 + },
  35 + clickItem(v) {
  36 + this.remark = v;
  37 + },
  38 + onSelect() {
  39 + uni.$emit('select-remark', this.remark);
  40 + uni.navigateBack();
  41 + },
  42 + },
  43 +};
  44 +</script>
  45 +
  46 +<style lang="scss">
  47 +.page-select-remark {
  48 + &__content {
  49 + .his-title {
  50 + padding: $padding-xs 0;
  51 + }
  52 + .his-card {
  53 + padding: $padding-md $padding-xs;
  54 + border-radius: $radius-md;
  55 + background: $color-white;
  56 + .his-item {
  57 + padding: $padding-xs 0;
  58 + color: $color-text-minor;
  59 + border-bottom: 1px solid $color-border;
  60 + text {
  61 + overflow-wrap: anywhere;
  62 + }
  63 + }
  64 + .his-item:last-child {
  65 + border-bottom: none;
  66 + }
  67 + }
  68 + }
  69 +}
  70 +</style>
pages/settlement/index.vue
1 <template> 1 <template>
2 - <Page name="freight-order" flank> 2 + <Page name="settlement" flank>
3 <template #header> 3 <template #header>
4 <u-tabs :current="activeTab" :list="tabList" @click="onTabChange" :scrollable="false" :activeStyle="{ color: '#1E7B6B' }"> </u-tabs> 4 <u-tabs :current="activeTab" :list="tabList" @click="onTabChange" :scrollable="false" :activeStyle="{ color: '#1E7B6B' }"> </u-tabs>
5 <view class="line"></view> 5 <view class="line"></view>
@@ -287,7 +287,7 @@ export default { @@ -287,7 +287,7 @@ export default {
287 }; 287 };
288 </script> 288 </script>
289 <style lang="scss"> 289 <style lang="scss">
290 -.page-freight-order { 290 +.page-settlement {
291 &__header { 291 &__header {
292 padding: 0 !important; 292 padding: 0 !important;
293 293
static/svgs/scan-font.svg 0 → 100644
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5465" height="128" width="128"><path d="M128 661.333333a42.666667 42.666667 0 0 1 42.666667 42.666667v128c0 5.888 2.090667 10.922667 6.229333 15.104A20.565333 20.565333 0 0 0 192 853.333333h128a42.666667 42.666667 0 0 1 0 85.333334h-128c-29.44 0-54.613333-10.410667-75.434667-31.232A102.784 102.784 0 0 1 85.333333 832v-128a42.666667 42.666667 0 0 1 42.666667-42.666667z m768 0a42.666667 42.666667 0 0 1 42.666667 42.666667v128c0 29.44-10.410667 54.613333-31.232 75.434667A102.784 102.784 0 0 1 832 938.666667h-128a42.666667 42.666667 0 0 1 0-85.333334h128a20.565333 20.565333 0 0 0 15.104-6.229333A20.565333 20.565333 0 0 0 853.333333 832v-128a42.666667 42.666667 0 0 1 42.666667-42.666667zM661.333333 341.333333a42.666667 42.666667 0 0 1 4.992 85.034667L661.333333 426.666667H554.666667v298.666666a42.666667 42.666667 0 0 1-37.674667 42.368L512 768a42.666667 42.666667 0 0 1-42.368-37.674667L469.333333 725.333333v-298.666666H362.666667a42.666667 42.666667 0 0 1-4.992-85.034667L362.666667 341.333333h298.666666z m170.666667-256c29.44 0 54.613333 10.410667 75.434667 31.232S938.666667 162.56 938.666667 192v128a42.666667 42.666667 0 0 1-85.333334 0v-128a20.565333 20.565333 0 0 0-6.229333-15.104A20.565333 20.565333 0 0 0 832 170.666667h-128a42.666667 42.666667 0 0 1 0-85.333334h128z m-512 0a42.666667 42.666667 0 0 1 0 85.333334h-128a20.565333 20.565333 0 0 0-15.104 6.229333A20.565333 20.565333 0 0 0 170.666667 192v128a42.666667 42.666667 0 0 1-85.333334 0v-128c0-29.44 10.410667-54.613333 31.232-75.434667A102.784 102.784 0 0 1 192 85.333333h128z" p-id="5466"></path></svg>
0 \ No newline at end of file 2 \ No newline at end of file