24 changed files with 263 additions and 49 deletions
Split View
Diff Options
-
2api/ztb.js
-
1app.json
-
1assets/image/icon_pdf.svg
-
2pages/agent/ability-item/index.js
-
2pages/agent/agent-item/index.js
-
12pages/agent/appointment/index.js
-
2pages/agent/factory-detail/index.js
-
83pages/agent/item-info/index.js
-
15pages/agent/item-info/index.json
-
53pages/agent/item-info/index.wxml
-
16pages/agent/item-info/index.wxss
-
6pages/agent/order-list/index.wxml
-
26pages/agent/select-item/index.js
-
7pages/agent/select-item/index.json
-
16pages/agent/select-item/index.wxml
-
12pages/agent/select-item/index.wxss
-
9pages/agent/select-list/index.js
-
2pages/agent/select-list/index.json
-
18pages/agent/select-list/index.wxml
-
2pages/login/index.js
-
2pages/moment/new-list/index.js
-
2pages/moment/new-list/index.wxml
-
12pages/setting/authory/index.wxml
-
9pages/storage/order-info/index.wxml
@ -1 +0,0 @@ |
|||
<svg t="1602157373813" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="13463" width="128" height="128"><path d="M911.36 0H112.64C51.2 0 0 51.2 0 112.64v793.6C0 972.8 51.2 1024 112.64 1024h793.6c61.44 0 112.64-51.2 112.64-112.64V112.64C1024 51.2 972.8 0 911.36 0zM486.4 440.32c-15.36 40.96-25.6 107.52-51.2 158.72-10.24 30.72-10.24 25.6-20.48 40.96h5.12c76.8-20.48 128-25.6 179.2-35.84-10.24-10.24-20.48-15.36-25.6-20.48-30.72-35.84-40.96-46.08-87.04-143.36z m373.76 240.64c-10.24 10.24-25.6 15.36-51.2 15.36-40.96 0-81.92-10.24-138.24-40.96-102.4 10.24-204.8 25.6-261.12 40.96-5.12 0-5.12 0-10.24 5.12C327.68 824.32 276.48 870.4 230.4 870.4c-15.36 0-35.84-10.24-40.96-15.36l-10.24-10.24-5.12-5.12c-5.12-10.24-5.12-20.48-5.12-30.72 5.12-30.72 40.96-76.8 107.52-122.88 10.24-10.24 35.84-20.48 56.32-30.72 15.36-25.6 25.6-46.08 46.08-92.16 30.72-51.2 51.2-122.88 66.56-174.08-20.48-66.56-35.84-117.76-15.36-189.44 5.12-25.6 25.6-46.08 46.08-46.08h15.36c15.36 0 25.6 5.12 35.84 15.36 35.84 35.84 20.48 133.12 0 209.92v10.24c20.48 66.56 56.32 128 92.16 158.72 15.36 10.24 30.72 25.6 46.08 35.84 25.6-5.12 46.08-5.12 71.68-5.12 71.68 0 112.64 10.24 128 40.96 5.12 10.24 10.24 20.48 5.12 30.72 5.12 5.12 0 20.48-10.24 30.72z m-35.84-46.08c-5.12-5.12-20.48-20.48-102.4-20.48-5.12 0-15.36 0-20.48 5.12 40.96 20.48 81.92 30.72 107.52 30.72h10.24c5.12 0 5.12 0 5.12-5.12v-10.24z m-501.76 76.8c-10.24 5.12-20.48 15.36-25.6 15.36-40.96 40.96-66.56 76.8-71.68 102.4 25.6-10.24 61.44-46.08 97.28-117.76z m163.84-384c5.12-20.48 10.24-40.96 15.36-51.2v-10.24c5.12-30.72 5.12-51.2-5.12-66.56h-10.24l-5.12 5.12c-10.24 25.6-10.24 71.68 5.12 122.88z" fill="#008Aff" p-id="13464" data-spm-anchor-id="a313x.7781069.0.i29" class=""></path></svg> |
|||
@ -0,0 +1,83 @@ |
|||
// pages/message/detail/index.js
|
|||
import Scene from '../../index/scene' |
|||
import Dialog from '../../../components/dialog/dialog' |
|||
import { getProxyOrderItemInfo, cancelProxyOrderItem } from "../../../api/ztb" |
|||
const util = require('../../../utils/util') |
|||
const math = require('../../../utils/math') |
|||
const event = require('../../../utils/event') |
|||
|
|||
Scene({ |
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
id: null, |
|||
cancel: true, |
|||
orderInfo: null |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
if (options.id) { |
|||
this.data.id = options.id |
|||
this.fetchOrderInfo() |
|||
} |
|||
}, |
|||
fetchOrderInfo: function () { |
|||
wx.showLoading({ title: '加载中', mask: true }) |
|||
getProxyOrderItemInfo({orderItemId: this.data.id}).then(result => { |
|||
this.data.cancel = true |
|||
for (let index = 0; index < result.data.orderItems.length; index++) { |
|||
const element = result.data.orderItems[index] |
|||
if (element.weightnoteInfo && element.weightnoteInfo.id) { |
|||
// 全额
|
|||
if (util.isEmpty(element.activityOrderAuditPassNum)) { |
|||
element.sumAmount = math.times(element.weightnoteInfo.settleUtiPrice, element.weightnoteInfo.settleWeight) |
|||
if (element.unitSurcharge!=null&element.surcharge !=null&&element.surcharge == math.times(element.weightnoteInfo.netWeight, element.unitSurcharge)) { |
|||
//按照净重,计算代卖费
|
|||
element.orderType = 0 |
|||
} else { |
|||
//按照结算重量计算代卖费
|
|||
element.orderType = 1 |
|||
} |
|||
} else { |
|||
if (element.weightnoteInfo.netWeight) { |
|||
element.proxyAmount = math.times(element.weightnoteInfo.netWeight, element.unitSurcharge) |
|||
} |
|||
} |
|||
this.data.cancel = false |
|||
} |
|||
if (element.activityOrderAuditPassNum == 2) { |
|||
element.finalSettlePrice = math.plus(element.finalPayMoney, element.preSettleMoney) |
|||
} |
|||
} |
|||
var orderInfoStep = result.data.orderItems |
|||
result.data.orderItems.forEach((element1, index1) => { |
|||
for (let i = 0; i <element1.orderItemTimeList.length; i++) { |
|||
orderInfoStep[index1].orderItemTimeList[i] = element1.orderItemTimeList[i] |
|||
} |
|||
}) |
|||
this.setData({ orderInfo: result.data, cancel: this.data.cancel, orderInfoStep }) |
|||
wx.hideLoading() |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}, |
|||
cancelOrder: function () { |
|||
Dialog.confirm({ title: '温馨提示', message: '确定预约的日期无法送货,需要销售重新到纸厂进程预约?' }).then(() => { |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
cancelProxyOrderItem(that.data.orderInfo.orderId).then(result => { |
|||
wx.hideLoading() |
|||
that.setData({ ['orderInfo.status']: 55 }) |
|||
event.emit('ProxyMessage', { what: 400, desc: 'ProxyChange' }) |
|||
util.showToast('订单已经取消') |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}) |
|||
} |
|||
|
|||
}) |
|||
@ -0,0 +1,15 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"van-button": "/components/button/index", |
|||
"van-dialog": "/components/dialog/index", |
|||
"submit-layout": "/components/submit-layout/index", |
|||
"delivery-info": "/pages/agent/order-detail/delivery-info/index", |
|||
"item-money-info": "/pages/agent/order-detail/item-money-info/index", |
|||
"item-car-info": "/pages/agent/order-detail/item-car-info/index", |
|||
"order-info": "/pages/agent/order-detail/order-info/index", |
|||
"pound-info": "/pages/agent/order-detail/pound-info/index", |
|||
"reserve-info": "/pages/agent/order-detail/reserve-info/index", |
|||
"header-info": "/pages/agent/order-detail/header-info/index", |
|||
"notification": "/pages/message/notification/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,53 @@ |
|||
<!--pages/message/detail/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content">代卖订单详情</view> |
|||
</cu-custom> |
|||
<!-- ------顶部信息------ --> |
|||
<header-info orderInfo="{{orderInfo}}" /> |
|||
<!-- ------特殊信息------ --> |
|||
<view wx:if="{{orderInfo && (orderInfo.status == 50 || orderInfo.status == 51)}}"> |
|||
<view class="flex flex-justify bg-white margin-top" style="padding:30rpx"> |
|||
<image class="image-load" src="/assets/image/ico_address.png"></image> |
|||
<view style="margin-left:24rpx;flex:1"> |
|||
<view class="text-sg">货物即将发往{{orderInfo.paperMillName}}</view> |
|||
<view class="text-sm text-gray" style="margin-top:8rpx">{{orderInfo.paperMillAddress}}</view> |
|||
</view> |
|||
</view> |
|||
<!-- 待预约状态下,预约信息放前面 --> |
|||
<view wx:if="{{orderInfo.status==50}}"> |
|||
<reserve-info orderInfo="{{orderInfo}}" /> |
|||
<view style="height:16rpx"> </view> |
|||
</view> |
|||
<!-- 待送货状态下送货信息放在前面 --> |
|||
<delivery-info orderInfo="{{orderInfo}}" wx:if="{{orderInfo.status==51}}" /> |
|||
</view> |
|||
<!-- ------车辆信息------ --> |
|||
<!-- 总共多少辆车,单独放在顶部 --> |
|||
<view style="height:16rpx"> </view> |
|||
<!-- 每一辆车,进度信息和结算信息 --> |
|||
<view wx:for="{{orderInfoStep}}" wx:key="index" style="margin-top:{{index == 0 ? 0 : 16}}rpx"> |
|||
<view class="bg-white text-df text-gray" style="padding:24rpx 30rpx">车辆信息{{index+1}}</view> |
|||
<!-- 进度 --> |
|||
<item-car-info orderInfo="{{orderInfo}}" item="{{item}}" /> |
|||
<!-- 磅单 --> |
|||
<pound-info orderInfo="{{orderInfo}}" item="{{item}}" /> |
|||
<!-- 金额 --> |
|||
<item-money-info orderInfo="{{orderInfo}}" item="{{item}}" /> |
|||
</view> |
|||
<!-- ------送货信息------ --> |
|||
<!-- 预约和送货状态下的送货信息已在前面展示过了,所以不需要展示 --> |
|||
<delivery-info orderInfo="{{orderInfo}}" wx:if="{{orderInfo.status>51}}" /> |
|||
<!-- ------预约信息------ --> |
|||
<!-- 预约和送货状态下的预约信息已在前面展示过了,所以不需要展示 --> |
|||
<reserve-info orderInfo="{{orderInfo}}" wx:if="{{orderInfo.status>51}}" /> |
|||
<!-- ------订单信息------ --> |
|||
<order-info orderInfo="{{orderInfo}}" /> |
|||
|
|||
<view style="height:{{136}}rpx;" |
|||
wx:if="{{orderInfo && ((cancel && orderInfo.status == 51) || orderInfo.status == 50)}}"></view> |
|||
<submit-layout wx:if="{{orderInfo && ((cancel && orderInfo.status == 51) || orderInfo.status == 50)}}"> |
|||
<van-button type="default" custom-style="height:88rpx;width:240rpx" bind:click="cancelOrder" |
|||
wx:if="{{orderInfo.status == 50 || orderInfo.status == 51}}">取消订单</van-button> |
|||
</submit-layout> |
|||
<van-dialog id="van-dialog" /> |
|||
<notification id="qn-notification" /> |
|||
@ -0,0 +1,16 @@ |
|||
/* pages/message/detail/index.wxss */ |
|||
.margin-top{ |
|||
margin-top: 16rpx; |
|||
} |
|||
|
|||
.margin-right{ |
|||
margin-right: 24rpx; |
|||
} |
|||
|
|||
.image-load { |
|||
width: 50px; |
|||
height: 50px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
// pages/message/index.js
|
|||
Component({ |
|||
options: { |
|||
addGlobalClass: true, |
|||
multipleSlots: true |
|||
}, |
|||
properties: { |
|||
item: { type: Object, value: null }, |
|||
itemId: { type: String, value: null } |
|||
}, |
|||
methods: { |
|||
lookItem: function (e) { |
|||
var orderItem = this.data.item.orderItems[e.currentTarget.dataset.index] |
|||
var data = { millName: this.data.item.paperMillName, createTime: this.data.item.createTime } |
|||
data.categoryName = orderItem.paperCategoryName |
|||
data.plateNumber = orderItem.plateNumber |
|||
data.id = orderItem.id |
|||
const channel = this.getOpenerEventChannel() |
|||
if(!channel){ |
|||
return |
|||
} |
|||
channel.emit('onCallback', { what: 62, detail: data }) |
|||
wx.navigateBack() |
|||
} |
|||
} |
|||
}) |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": { |
|||
"van-cell": "/components/cell/index", |
|||
"van-image": "/components/image/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
<!--pages/message/index.wxml--> |
|||
<view class="bg-white flex" style="border-bottom:2rpx solid #f3f3f3;padding: 20rpx 32rpx"> |
|||
<van-image use-loading-slot width="72rpx" height="72rpx" round lazy-load src="{{ item.logoImg || '/assets/image/icon_logo.png' }}"> |
|||
<image class="image-load" slot="loading" src="/assets/image/icon_logo.png"></image> |
|||
</van-image> |
|||
<view style="margin-left:16rpx"> |
|||
<view class="text-sg text-black">{{item.paperMillName}}</view> |
|||
<view class="text-sm text-gray">下单时间:{{item.createTime}}</view> |
|||
</view> |
|||
</view> |
|||
<van-cell clickable center is-link center wx:for-item="orderItem" wx:for-index="oindex" wx:for="{{item.orderItems}}" wx:key="oindex"> |
|||
<view slot="title" class="flex {{ itemId != orderItem.id || 'text-blue'}}" data-index="{{oindex}}" bindtap="lookItem"> |
|||
<text class="text-sg text-bold">车牌号码:{{orderItem.plateNumber}}</text> |
|||
<text class="text-sg text-bold" style="margin-left: 32rpx">「{{orderItem.paperCategoryName}}」</text> |
|||
</view> |
|||
</van-cell> |
|||
@ -0,0 +1,12 @@ |
|||
/* pages/mall/shops/index.wxss */ |
|||
.item-content { |
|||
background-color: white; |
|||
padding: 24rpx 32rpx; |
|||
} |
|||
|
|||
.item-order { |
|||
padding: 8rpx 30rpx; |
|||
border-radius: 10rpx; |
|||
border: 1rpx solid #f3f3f3; |
|||
background-color: #f3f3f3; |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save