加价政策,合并 ai 识别驿站
This commit is contained in:
parent
a66df12632
commit
17aa16a972
@ -117,7 +117,7 @@ Component({
|
||||
if(valid.length>0)return;
|
||||
}
|
||||
this.setData({
|
||||
show:false
|
||||
_show:false
|
||||
});
|
||||
this.triggerEvent('ok',this.properties.content);
|
||||
},
|
||||
@ -125,6 +125,7 @@ Component({
|
||||
this.setData({
|
||||
show:false
|
||||
})
|
||||
this.triggerEvent('afterLeave')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ Page({
|
||||
params.packages = realItem;
|
||||
}
|
||||
if(res.data.price_request.pickup_images){
|
||||
params.pickup_images_count = res.data.price_request.pickup_images_count;
|
||||
// params.pickup_images_count = res.data.price_request.pickup_images_count;
|
||||
params.pickup_images = res.data.price_request.pickup_images;
|
||||
}
|
||||
userApi.order.pre(params).then((data)=>{
|
||||
|
||||
@ -23,13 +23,33 @@ Page({
|
||||
|
||||
isShowStationEditor:false,
|
||||
|
||||
currentEditStation:{}
|
||||
currentEditStation:{},
|
||||
|
||||
isShowSameStation:false,
|
||||
ignoreSameStation:false,
|
||||
sameStationName:''
|
||||
},
|
||||
|
||||
async bottomBarButtonTap(){
|
||||
const data = [];
|
||||
const pickupImgs = [];
|
||||
let hasSame = false;
|
||||
this.data.choosedStationList.find((item,index)=>{
|
||||
//查找ai识别中相同驿站
|
||||
//代码写好,暂不开启
|
||||
if(false){
|
||||
let sameStations = this.data.choosedStationList.filter((_item)=>{
|
||||
return (_item.name==item.name)&&!_item.id;
|
||||
});
|
||||
if(sameStations.length>1&&!this.data.ignoreSameStation){
|
||||
hasSame = true;
|
||||
this.setData({
|
||||
isShowSameStation:true,
|
||||
sameStationName:sameStations[0].name
|
||||
})
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(item.pickup_codes.length>0&&item.pickup_codes[0]!=''){
|
||||
//倒着找相同的索引 因为需要从后往前找
|
||||
const codes = item.pickup_codes.join(',').split(',').reverse();
|
||||
@ -50,12 +70,14 @@ Page({
|
||||
icon:'none',
|
||||
title: '取件码重复',
|
||||
})
|
||||
console.log(this.data.choosedStationList[index],'----');
|
||||
this.setData({
|
||||
[`choosedStationList[${index}]`]:this.data.choosedStationList[index]
|
||||
})
|
||||
return true;
|
||||
}
|
||||
if(item.imgUrl){
|
||||
pickupImgs.push(item.imgUrl);
|
||||
}
|
||||
data.push({
|
||||
id:item.id||'',
|
||||
name:item.name,
|
||||
@ -70,7 +92,7 @@ Page({
|
||||
if(data.length>0){
|
||||
let priceRequest = {
|
||||
packages:data,
|
||||
pickup_images:data[0].imgUrl
|
||||
pickup_images:pickupImgs.join(',')
|
||||
};
|
||||
if(this.data.timePeriodsIndex==-1){
|
||||
wx.showToast({
|
||||
@ -374,6 +396,34 @@ Page({
|
||||
urls: [url],
|
||||
})
|
||||
},
|
||||
ignoreSameStation(){
|
||||
this.data.ignoreSameStation = true;
|
||||
},
|
||||
sameStationAfterLeave(){
|
||||
console.log(this.data.ignoreSameStation);
|
||||
if(this.data.ignoreSameStation){
|
||||
this.bottomBarButtonTap();
|
||||
}
|
||||
},
|
||||
mergeStation(){
|
||||
this.data.ignoreSameStation = false;
|
||||
this.data.choosedStationList.map((item,index)=>{
|
||||
if(!item.id){
|
||||
//从当前往后找所有的
|
||||
this.data.choosedStationList.map((_item,_index)=>{
|
||||
if(_index>index){
|
||||
if(_item.name == item.name&&!_item.id){
|
||||
item.pickup_codes = item.pickup_codes.concat(_item.pickup_codes);
|
||||
this.data.choosedStationList.splice(_index,1);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
choosedStationList:this.data.choosedStationList
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
||||
@ -102,3 +102,11 @@
|
||||
<modal-view editable titleText="修改驿站" content="{{currentEditStation.name||''}}"
|
||||
model:show="{{isShowStationEditor}}" use-input auto-focus bind:ok="editStationName"
|
||||
contentPlaceholder="驿站名不能为空"/>
|
||||
|
||||
<modal-view class="same-station-view" titleText="合并驿站" show="{{isShowSameStation}}"
|
||||
bind:ok="ignoreSameStation" bind:cancel="mergeStation" ok-button-text="直接保存" cancel-button-text="立即合并" bind:afterLeave="sameStationAfterLeave">
|
||||
<view class="content-text">
|
||||
检测到有多个<label style="color:red;font-weight: bold;">{{sameStationName}}</label>,是否需要合并,
|
||||
多个驿站会产生额外配送费用。
|
||||
</view>
|
||||
</modal-view>
|
||||
@ -259,3 +259,11 @@
|
||||
width:28rpx;height:28rpx;
|
||||
margin-right:12rpx;
|
||||
}
|
||||
|
||||
.same-station-view .content-text{
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
margin:22rpx 0 40rpx 0;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
@ -7,7 +7,10 @@
|
||||
<view bind:tap="navToSetting">
|
||||
<image class="avatar" src="{{userInfo.optimized_avatar||'/assets/icon/my/avatar.png'}}"/>
|
||||
</view>
|
||||
<view class="name">{{userInfo.nickname}}</view>
|
||||
<view class="name">
|
||||
<view>{{userInfo.nickname}}</view>
|
||||
<view class="phone">{{userInfo.phone}}</view>
|
||||
</view>
|
||||
<image src="/assets/icon/help/qrcode.png" class="qrcode" bind:tap="showQRCode"
|
||||
wx:if="{{userInfo.userid}}"/>
|
||||
</view>
|
||||
@ -32,7 +35,7 @@
|
||||
<view class="cell-bd">
|
||||
<view>
|
||||
<view>邀请好友下单</view>
|
||||
<view class="spec">邀请好友领券下单,自己再得1张跑腿券</view>
|
||||
<view class="spec">邀请好友领券下单,自己再得1张配送券</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cell-ft"></view>
|
||||
|
||||
@ -29,6 +29,12 @@
|
||||
flex:1;
|
||||
margin-left:30rpx;
|
||||
}
|
||||
.user-info .content .phone{
|
||||
margin-top:18rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: normal;
|
||||
color: #333;
|
||||
}
|
||||
.user-info .content .qrcode{
|
||||
width:56rpx;height:56rpx;
|
||||
}
|
||||
|
||||
@ -110,6 +110,11 @@ Page({
|
||||
url: `/pages/browser/index?url=${encodeURIComponent(this.data.appConfig.url_delivery_contract)}`,
|
||||
})
|
||||
},
|
||||
navToFee(){
|
||||
wx.navigateTo({
|
||||
url: `/pages/browser/index?url=${encodeURIComponent(this.data.appConfig.url_addition_fee_policy)}`,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
||||
@ -27,6 +27,10 @@
|
||||
<view class="cell-bd">配送服务协议</view>
|
||||
<view class="cell-ft"></view>
|
||||
</view>
|
||||
<view class="cell" bind:tap="navToFee">
|
||||
<view class="cell-bd">加价收费标准</view>
|
||||
<view class="cell-ft"></view>
|
||||
</view>
|
||||
</view>
|
||||
<button type="default" class="logout-btn" bind:tap="logout">退出登录</button>
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</view> -->
|
||||
<!-- <swiper style="height:{{scrollViewHeight*2}}rpx"> -->
|
||||
|
||||
<!-- 跑腿列表 -->
|
||||
<!-- 配送列表 -->
|
||||
<!-- <swiper-item> -->
|
||||
|
||||
<list-view class="order-list main" wx:if="{{tabIndex==0}}"
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import userApi from '../../../api/user';
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
@ -10,7 +12,9 @@ Page({
|
||||
cancelling:false,
|
||||
isShowCancelView:false,
|
||||
isShowAcceptView:false,
|
||||
refresherTriggered:false
|
||||
refresherTriggered:false,
|
||||
|
||||
appConfig:{}
|
||||
},
|
||||
|
||||
/**
|
||||
@ -19,6 +23,11 @@ Page({
|
||||
onLoad(options) {
|
||||
this.data.orderId = options.orderid;
|
||||
this.getDetail();
|
||||
app.getAppConfig().then((data)=>{
|
||||
this.setData({
|
||||
appConfig:data
|
||||
})
|
||||
})
|
||||
},
|
||||
getDetail(){
|
||||
this.setData({
|
||||
@ -87,6 +96,11 @@ Page({
|
||||
current:event.currentTarget.dataset.item
|
||||
})
|
||||
},
|
||||
navToFee(){
|
||||
wx.navigateTo({
|
||||
url: `/pages/browser/index?url=${encodeURIComponent(this.data.appConfig.url_addition_fee_policy)}`,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
||||
@ -2,5 +2,6 @@
|
||||
"usingComponents": {
|
||||
"modal-view":"/components/modalView",
|
||||
"merchant-order":"/components/merchantOrder"
|
||||
}
|
||||
},
|
||||
"navigationBarTitleText": "订单加价申请"
|
||||
}
|
||||
@ -13,7 +13,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-container delivery-man">
|
||||
<view class="head">跑腿员</view>
|
||||
<view class="head">配送员</view>
|
||||
<view class="spliter"></view>
|
||||
<view class="info">
|
||||
<image class="avatar" src="{{applyDetail.deliveryman_avatar||'/assets/icon/my/avatar.png'}}"/>
|
||||
@ -28,11 +28,15 @@
|
||||
<view class="head">加价原因</view>
|
||||
<view class="spliter"></view>
|
||||
<view class="reason">{{applyDetail.reason}}</view>
|
||||
<view class="imgs">
|
||||
<view class="imgs" wx:if="{{applyDetail.photo_urls&&applyDetail.photo_urls.length>0}}">
|
||||
<image class="item" src="{{item}}" wx:for="{{applyDetail.photo_urls}}"
|
||||
wx:key="index" data-item="{{item}}" bind:tap="viewImage"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-container markup-money" bind:tap="navToFee">
|
||||
<view>加价收费标准</view>
|
||||
<view class="right-arrow"></view>
|
||||
</view>
|
||||
<view class="page-container markup-money">
|
||||
<view>加价金额</view>
|
||||
<view class="value">{{applyDetail.additional_fee_amount}}元</view>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user