28 changed files with 1610 additions and 32 deletions
Split View
Diff Options
-
2app.js
-
4app.json
-
1pages/home/customer-list/index.wxml
-
7pages/process/index/index.js
-
38pages/process/index/index.wxml
-
1pages/process/order-check/index.json
-
10pages/process/order-check/index.wxml
-
2pages/process/order-price/index.wxml
-
218pages/process/outside-add/index.js
-
19pages/process/outside-add/index.json
-
98pages/process/outside-add/index.wxml
-
21pages/process/outside-add/index.wxss
-
177pages/process/outside-check/index.js
-
14pages/process/outside-check/index.json
-
102pages/process/outside-check/index.wxml
-
8pages/process/outside-check/index.wxss
-
98pages/process/outside-info/index.js
-
19pages/process/outside-info/index.json
-
184pages/process/outside-info/index.wxml
-
21pages/process/outside-info/index.wxss
-
164pages/process/outside-list/index.js
-
15pages/process/outside-list/index.json
-
90pages/process/outside-list/index.wxml
-
7pages/process/outside-list/index.wxss
-
98pages/process/outside-price/index.js
-
19pages/process/outside-price/index.json
-
184pages/process/outside-price/index.wxml
-
21pages/process/outside-price/index.wxss
@ -0,0 +1,218 @@ |
|||
// pages/process/order-check/index.js
|
|||
import Scene from '../../index/scene' |
|||
import Dialog from '../../../components/dialog/dialog' |
|||
import { pricingOrder, getFactoryOrderInfo, getPaperList} from "../../../api/saas" |
|||
const event = require('../../../utils/event') |
|||
const util = require('../../../utils/util') |
|||
const app = getApp() |
|||
|
|||
Scene({ |
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
safeBottom: app.globalData.safeBottom, |
|||
paperList: null, |
|||
form: { |
|||
orderPapers: [{ productId: '', productName: '', unitPrice: ''}], |
|||
appointDate: null |
|||
}, |
|||
columns: [], |
|||
visible: false, |
|||
cateIndex: -1, |
|||
nowItem: null, |
|||
column1: [], |
|||
column4: [ |
|||
{ |
|||
values: [], |
|||
className: 'column1' |
|||
}, |
|||
{ |
|||
values: ['8:00~10:00', '10:00~12:00', '12:00~14:00', '14:00~16:00', '16:00~18:00', '18:00~20:00'], |
|||
className: 'column2' |
|||
} |
|||
] |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
var day = new Date() |
|||
for (let i = 0; i < 3; i++) { |
|||
day.setDate(day.getDate() + (i > 1 ? 1 : i)) |
|||
this.data.column4[0].values.push(util.formatDate(day, 'Y-M-D')) |
|||
} |
|||
getPaperList({pageNum: 1, pageSize: 100}).then(result => { |
|||
this.data.paperList = result.data.records |
|||
this.data.column1 = [] |
|||
for (let index = 0; index < this.data.paperList.length; index++) { |
|||
this.data.column1.push(this.data.paperList[index].name) |
|||
} |
|||
this.setData({ safeBottom: app.globalData.safeBottom }) |
|||
if(!options.id){ |
|||
wx.hideLoading() |
|||
} |
|||
}).catch(err => { |
|||
this.setData({ safeBottom: app.globalData.safeBottom }) |
|||
util.showToast(err) |
|||
if(!options.id){ |
|||
wx.hideLoading() |
|||
} |
|||
}) |
|||
if(options.id){ |
|||
getFactoryOrderInfo(options.id).then(result => { |
|||
wx.hideLoading() |
|||
this.setData({ form: result.data }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}, |
|||
chooseCustomer: function (e) { |
|||
var that = this |
|||
var events = {} |
|||
events.onCallback = function(data){ |
|||
if (data.what == 130) { |
|||
that.data.form.factoryCustomerId = data.detail.id |
|||
that.setData({ ['form.factoryCustomerName']: data.detail.name }) |
|||
} |
|||
} |
|||
wx.navigateTo({url: `/pages/home/customer-list/index?type=1`, events}) |
|||
}, |
|||
chooseEmploy: function (e) { |
|||
var that = this |
|||
var events = {} |
|||
events.onCallback = function(data){ |
|||
if (data.what == 121 && e.currentTarget.id == 'driverName') { |
|||
that.data.form.driverId = data.detail.id |
|||
that.setData({ ['form.driverName']: data.detail.enterpriseMemberName }) |
|||
} else if (data.what == 121 && e.currentTarget.id == 'operatorName') { |
|||
that.data.form.operatorId = data.detail.id |
|||
that.setData({ ['form.operatorName']: data.detail.enterpriseMemberName }) |
|||
} |
|||
} |
|||
wx.navigateTo({url: `/pages/home/employee/index?type=1`, events}) |
|||
}, |
|||
showPlate: function (e) { |
|||
this.keyboard = this.keyboard || this.selectComponent('#wux-keyboard') |
|||
this.keyboard.show(this.data.form.plateNumber, 0) |
|||
}, |
|||
onPlatenumber: function({detail}){ |
|||
if(detail && detail.plateNumber){ |
|||
this.setData({ ['form.plateNumber']: detail.plateNumber }) |
|||
} |
|||
}, |
|||
showCategory: function(e){ |
|||
if(e.currentTarget.dataset.index >= 0){ |
|||
this.data.cateIndex = e.currentTarget.dataset.index |
|||
this.setData({ visible: true, columns: this.data.column1 }) |
|||
} else { |
|||
this.data.cateIndex = -1 |
|||
this.setData({ visible: true, columns: this.data.column4 }) |
|||
} |
|||
}, |
|||
onConfirm: function({detail}){ |
|||
if(Array.isArray(detail.index)){ |
|||
this.setData({ visible: false, ['form.appointDate']: (detail.value[0] + ' ' + detail.value[1]) }) |
|||
} else { |
|||
var nowItem = this.data.paperList[detail.index] |
|||
for (var i = 0; i < this.data.form.orderPapers.length; i++) { |
|||
if (this.data.form.orderPapers[i].productId == nowItem.id){ |
|||
this.setData({ visible: false }) |
|||
util.showToast('纸品已经存在,请不要重复添加') |
|||
return |
|||
} |
|||
} |
|||
var product = {productId: nowItem.id, productName: detail.value, unitPrice: nowItem.defaultUnitPrice} |
|||
product.highestUnitPrice = nowItem.highestUnitPrice |
|||
product.lowestUnitPrice = nowItem.lowestUnitPrice |
|||
this.setData({ visible: false, ['form.orderPapers[' + this.data.cateIndex + ']']: product }) |
|||
} |
|||
}, |
|||
onHide: function(){ |
|||
this.setData({ visible: false }) |
|||
}, |
|||
bindInput: function (e) { |
|||
this.data.form.orderPapers[e.currentTarget.dataset.index].unitPrice = e.detail.value |
|||
}, |
|||
onChange: function(e) { |
|||
this.data.form.inspectionRemark = e.detail |
|||
}, |
|||
addCate: function(e){ |
|||
this.data.form.orderPapers.push({ productId: '', productName: '', unitPrice: ''}) |
|||
this.setData({ ['form.orderPapers']: this.data.form.orderPapers }) |
|||
}, |
|||
deleteCate: function(e){ |
|||
this.data.form.orderPapers.splice(e.currentTarget.dataset.index, 1) |
|||
this.setData({ ['form.orderPapers']: this.data.form.orderPapers }) |
|||
}, |
|||
findCateById: function(productId){ |
|||
for (let index = 0; index < this.data.paperList.length; index++) { |
|||
const element = this.data.paperList[index] |
|||
if(element.id == productId){ |
|||
return element |
|||
} |
|||
} |
|||
return null |
|||
}, |
|||
cancelOrder: function(e){ |
|||
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
cancelOrder(this.data.form.id).then(result => { |
|||
wx.hideLoading() |
|||
util.showBackToast('订单已经删除') |
|||
event.emit('OrderMessage', { what: 12, desc: 'cancelOrder' }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}) |
|||
}, |
|||
submitForm: function(){ |
|||
if(util.isEmpty(this.data.form.factoryCustomerName)){ |
|||
util.showToast('请选择客户') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.form.plateNumber)){ |
|||
util.showToast('请输入车牌号码') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.form.driverName)){ |
|||
util.showToast('请选择司机') |
|||
return |
|||
} |
|||
for (let index = 0; index < this.data.form.orderPapers.length; index++) { |
|||
const element = this.data.form.orderPapers[index] |
|||
if(util.isEmpty(element.productId)){ |
|||
util.showToast('请选择第' + (index + 1) + '项废纸品类') |
|||
return |
|||
} |
|||
if(!util.isEmpty(this.data.form.id)){ |
|||
var cate = this.findCateById(element.productId) |
|||
if(cate){ |
|||
element.highestUnitPrice = cate.highestUnitPrice |
|||
element.lowestUnitPrice = cate.lowestUnitPrice |
|||
} |
|||
} |
|||
if(element.highestUnitPrice && Number(element.unitPrice) > Number(element.highestUnitPrice)){ |
|||
util.showToast('第' + (index + 1) + '项废纸品类单价过高,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){ |
|||
util.showToast('第' + (index + 1) + '项废纸品类单价过低,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
} |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
pricingOrder(this.data.form).then(result => { |
|||
wx.hideLoading() |
|||
util.showBackToast('定价成功') |
|||
event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}) |
|||
@ -0,0 +1,19 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"van-index-anchor": "/components/index-anchor/index", |
|||
"van-cell": "/components/cell/index", |
|||
"van-icon": "/components/icon/index", |
|||
"van-button": "/components/button/index", |
|||
"van-checkbox": "/components/checkbox/index", |
|||
"van-loading": "/components/loading/index", |
|||
"van-image": "/components/image/index", |
|||
"van-picker": "/components/picker/index", |
|||
"van-popup": "/components/popup/index", |
|||
"van-dialog": "/components/dialog/index", |
|||
"van-field": "/components/field/index", |
|||
"van-switch": "/components/switch/index", |
|||
"vehicle-keyboard": "/components/vehicle-keyboard/index", |
|||
"submit-layout": "/components/submit-layout/index", |
|||
"notification": "/pages/message/notification/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
<!--pages/process/order-check/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content">新增厂外收货</view> |
|||
</cu-custom> |
|||
|
|||
<van-index-anchor index="订单信息" /> |
|||
<van-cell clickable center is-link bind:click="chooseCustomer"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>客户姓名</text> |
|||
</view> |
|||
<view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center is-link bind:click="showPlate"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>车牌号码</text> |
|||
</view> |
|||
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell id="driverName" clickable center is-link bind:click="chooseEmploy"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>司机</text> |
|||
</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
|
|||
<van-index-anchor index="纸品信息" /> |
|||
<scroll-view class="bg-white" scroll-y> |
|||
<view wx:for="{{form.orderPapers}}" wx:key="index" class="cate-list"> |
|||
<view class="flex flex-justify cate-header"> |
|||
<view class="flex flex-center"> |
|||
<text class="text-black text-lg">品类</text> |
|||
<text class="cate-index text-black">{{index + 1}}</text> |
|||
</view> |
|||
<van-icon name="close" size="44rpx" wx:if="{{form.orderPapers.length>1}}" data-index="{{index}}" bind:click="deleteCate"/> |
|||
</view> |
|||
<van-cell clickable center is-link data-index="{{index}}" bind:click="showCategory"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>废纸品类</text> |
|||
</view> |
|||
<view class="{{item.productName ? 'text-black' : 'text-gray'}}">{{item.productName || '请选择废纸品类'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell border="{{false}}"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>单价(元/公斤)</text> |
|||
</view> |
|||
<input data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入单价" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
</view> |
|||
<view class="flex flex-center" style="height:70rpx;margin-bottom:15rpx;margin-top:-12rpx;" bindtap="addCate"> |
|||
<!-- <text class="cuIcon-add text-blue text-bold" style="font-size:42rpx"></text> --> |
|||
<van-icon name="plus" color="#008AFF"/> |
|||
<text class="text-blue text-sg">添加品类</text> |
|||
</view> |
|||
</scroll-view> |
|||
<van-index-anchor index="其他信息" /> |
|||
<van-cell id="operatorName" clickable center is-link bind:click="chooseEmploy"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">操作员</view> |
|||
<view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center is-link bind:click="showCategory"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预计到厂时间</view> |
|||
<view class="{{form.appointDate ? 'text-black' : 'text-gray'}}">{{form.appointDate || '请选择预计到厂时间'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-field label="辅助设备" type="textarea" input-align="right" placeholder="请输入辅助设备" autosize border="{{ false }}" /> |
|||
|
|||
<submit-layout> |
|||
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelOrder" wx:if="{{form.id}}">取消</van-button> |
|||
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm" wx:if="{{form.id}}">保存 |
|||
</van-button> |
|||
<van-button type="info" custom-style="height:88rpx;width:686rpx" bind:click="submitForm" wx:if="{{!form.id}}">保存</van-button> |
|||
</submit-layout> |
|||
|
|||
<van-dialog id="van-dialog" /> |
|||
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard> |
|||
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29"> |
|||
<van-picker show-toolbar title="{{cateIndex >= 0 ? '选择纸品' : '选择预估时间'}}" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" /> |
|||
</van-popup> |
|||
<notification id="qn-notification"/> |
|||
@ -0,0 +1,21 @@ |
|||
/* pages/process/order-check/index.wxss */ |
|||
.cate-list { |
|||
margin: 24rpx 30rpx; |
|||
border: 1rpx solid #dcdcdc; |
|||
} |
|||
|
|||
.cate-header { |
|||
min-height: 76rpx; |
|||
background-color: #dcdcdc; |
|||
padding: 0rpx 30rpx; |
|||
} |
|||
|
|||
.cate-index { |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
line-height: 32rpx; |
|||
text-align: center; |
|||
border-radius: 5000rpx; |
|||
border: 1px solid #666666; |
|||
margin-left: 12rpx |
|||
} |
|||
@ -0,0 +1,177 @@ |
|||
// pages/process/order-check/index.js
|
|||
import Scene from '../../index/scene' |
|||
import { checkingOrder, getFactoryOrderInfo, getPaperList} from "../../../api/saas" |
|||
const event = require('../../../utils/event') |
|||
const util = require('../../../utils/util') |
|||
const math = require('../../../utils/math') |
|||
const app = getApp() |
|||
|
|||
Scene({ |
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
safeBottom: app.globalData.safeBottom, |
|||
paperList: null, |
|||
form: { |
|||
orderPapers: [{ productId: '', productName: '', unitPrice: ''}], |
|||
appointDate: null |
|||
}, |
|||
columns: [], |
|||
focus: 0, |
|||
visible: false, |
|||
amout: 20 |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
if(options.id){ |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
getPaperList({pageNum: 1, pageSize: 100}).then(result => { |
|||
this.data.paperList = result.data.records |
|||
this.data.columns = [] |
|||
for (let index = 0; index < this.data.paperList.length; index++) { |
|||
this.data.columns.push(this.data.paperList[index].name) |
|||
} |
|||
this.setData({ safeBottom: app.globalData.safeBottom, columns: this.data.columns }) |
|||
}).catch(err => { |
|||
this.setData({ safeBottom: app.globalData.safeBottom }) |
|||
util.showToast(err) |
|||
}) |
|||
getFactoryOrderInfo(options.id).then(result => { |
|||
wx.hideLoading() |
|||
result.data.sign = 1 |
|||
if(Number(result.data.deductPercent) <= 0){ |
|||
result.data.deductPercent = null |
|||
} |
|||
this.data.amout = math.times(result.data.settleWeight, result.data.unitPrice) |
|||
this.setData({ form: result.data, amout: this.data.amout }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}, |
|||
showPlate: function (e) { |
|||
this.keyboard = this.keyboard || this.selectComponent('#wux-keyboard') |
|||
this.keyboard.show(this.data.form.plateNumber, 0) |
|||
}, |
|||
onPlatenumber: function({detail}){ |
|||
if(detail && detail.plateNumber){ |
|||
this.setData({ ['form.plateNumber']: detail.plateNumber }) |
|||
} |
|||
}, |
|||
showCategory: function(){ |
|||
this.setData({ visible: true }) |
|||
}, |
|||
onConfirm: function({detail}){ |
|||
this.data.nowItem = this.data.paperList[detail.index] |
|||
this.data.form.productId = this.data.nowItem.id |
|||
this.data.form.unitPrice = this.data.nowItem.defaultUnitPrice |
|||
this.data.form.productName = detail.value |
|||
this.statAmount() |
|||
}, |
|||
onHide: function(){ |
|||
this.setData({ visible: false }) |
|||
}, |
|||
changeDeductType: function(e){ |
|||
this.setData({ ['form.sign']: e.currentTarget.dataset.type, focus: e.currentTarget.dataset.type }) |
|||
}, |
|||
bindInput: function (e) { |
|||
this.data.form[e.target.id] = e.detail.value |
|||
if(e.target.id == 'deductPercent'){ |
|||
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){ |
|||
this.data.form.deductWeight = null |
|||
this.data.form.deductPercent = null |
|||
} else { |
|||
this.data.form.deductWeight = math.divide(math.times(this.data.form.totalWeight, Number(e.detail.value)), 100).toFixed(2) |
|||
// this.setData({ ['form.deductWeight']: math.divide(math.times(this.data.form.totalWeight, Number(e.detail.value)), 100).toFixed(3) })
|
|||
} |
|||
} else if(e.target.id == 'deductWeight'){ |
|||
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){ |
|||
this.data.form.deductWeight = null |
|||
this.data.form.deductPercent = null |
|||
} else { |
|||
this.data.form.deductPercent = math.times(math.divide(Number(e.detail.value), this.data.form.totalWeight), 100).toFixed(2) |
|||
// this.setData({ ['form.deductPercent']: math.times(math.divide(Number(e.detail.value), this.data.form.totalWeight), 100).toFixed(2) })
|
|||
} |
|||
} |
|||
this.statAmount() |
|||
}, |
|||
onChange: function(e) { |
|||
this.data.form.inspectionRemark = e.detail |
|||
}, |
|||
statAmount: function(){ |
|||
this.data.form.settleWeight = this.data.form.netWeight |
|||
if(!util.isEmpty(this.data.form.deductWeight)){ |
|||
this.data.form.settleWeight = math.minus(this.data.form.netWeight, this.data.form.deductWeight) |
|||
} |
|||
if(!util.isEmpty(this.data.form.unitPrice) && Number(this.data.form.unitPrice) > 0){ |
|||
this.data.amout = math.times(this.data.form.settleWeight, this.data.form.unitPrice) |
|||
} else { |
|||
this.data.amout = null |
|||
} |
|||
this.setData({ visible: false, form: this.data.form, amout: this.data.amout }) |
|||
}, |
|||
checkOrder: function(){ |
|||
if(util.isEmpty(this.data.form.productId) || Number(this.data.form.productId) <= 0){ |
|||
util.showToast('请选择废纸品类') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.form.unitPrice) || Number(this.data.form.unitPrice) <= 0){ |
|||
util.showToast('请输入单价') |
|||
return |
|||
} |
|||
if(this.data.nowItem){ |
|||
if(this.data.nowItem.highestUnitPrice && Number(this.data.form.unitPrice) > Number(this.data.nowItem.highestUnitPrice)){ |
|||
util.showToast('输入单价过高,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
if(this.data.nowItem.lowestUnitPrice && Number(this.data.form.unitPrice) < Number(this.data.nowItem.lowestUnitPrice)){ |
|||
util.showToast('输入单价过低,价格范围:' + this.data.nowItem.lowestUnitPrice + '元/公斤-'+ this.data.nowItem.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
} |
|||
if(!util.isEmpty(this.data.form.deductWeight) && Number(this.data.form.deductWeight) >= Number(this.data.form.totalWeight)){ |
|||
util.showToast('扣重不得超过皮重') |
|||
return |
|||
} |
|||
if(!util.isEmpty(this.data.form.deductPercent) && Number(this.data.form.deductPecent) >= 100){ |
|||
util.showToast('扣点范围:0-100') |
|||
return |
|||
} |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
var data = {id: this.data.form.id} |
|||
if(Number(this.data.form.deductWeight) > 0){ |
|||
data.deductWeight = Number(this.data.form.deductWeight) |
|||
} |
|||
if(Number(this.data.form.deductPercent) > 0){ |
|||
data.deductPercent = Number(this.data.form.deductPercent) |
|||
} |
|||
data.plateNumber = this.data.form.plateNumber |
|||
data.productId = this.data.form.productId |
|||
data.sign = this.data.form.sign |
|||
data.unitPrice = Number(this.data.form.unitPrice) |
|||
checkingOrder({ id: this.data.form.id, editOrderPriceDto: data }).then(result => { |
|||
wx.hideLoading() |
|||
event.emit('OrderMessage', { what: 12, desc: 'checkingOrder' }) |
|||
util.showBackToast('订单审核已通过') |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}, |
|||
viewImage: function (e) { |
|||
var imgList = [] |
|||
for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) { |
|||
var url = this.data.form.totalWeighingPicture[index].url |
|||
if(!util.isEmpty(url) && 'error' != url){ |
|||
imgList.push(url) |
|||
} |
|||
} |
|||
if(imgList.length){ |
|||
wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) |
|||
} |
|||
} |
|||
}) |
|||
@ -0,0 +1,14 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"van-index-anchor": "/components/index-anchor/index", |
|||
"van-cell": "/components/cell/index", |
|||
"van-button": "/components/button/index", |
|||
"van-checkbox": "/components/checkbox/index", |
|||
"van-loading": "/components/loading/index", |
|||
"van-image": "/components/image/index", |
|||
"van-picker": "/components/picker/index", |
|||
"van-popup": "/components/popup/index", |
|||
"submit-layout": "/components/submit-layout/index", |
|||
"notification": "/pages/message/notification/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,102 @@ |
|||
<!--pages/process/order-check/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content">重新定价</view> |
|||
</cu-custom> |
|||
|
|||
<view wx:if="{{form}}"> |
|||
<van-index-anchor index="订单信息" /> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">客户姓名</view> |
|||
<view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">车牌号码</view> |
|||
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">司机</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
|
|||
<van-index-anchor index="定价信息" /> |
|||
<view wx:for="{{form.orderPapers}}" wx:key="index"> |
|||
<van-cell clickable center is-link data-index="{{index}}" bind:click="showCategory"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>废纸品类{{index + 1}}</text> |
|||
</view> |
|||
<view class="{{item.productName ? 'text-black' : 'text-gray'}}">{{item.productName || '请选择废纸品类'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>结算单价(元/公斤)</text> |
|||
</view> |
|||
<input data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入单价" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">净重(公斤)</view> |
|||
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType"> |
|||
<van-checkbox value="{{ item.sign == 1 }}" icon-size="32rpx"></van-checkbox> |
|||
<text style="margin-left:8rpx">扣重(公斤)</text> |
|||
</view> |
|||
<input id="deductWeight" type="digit" disabled="{{item.sign == 2}}" focus="{{focus == 1}}" |
|||
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量" |
|||
value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black" data-type="2" bindtap="changeDeductType"> |
|||
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox> |
|||
<text style="margin-left:8rpx">扣点(%)</text> |
|||
</view> |
|||
<input id="deductPercent" type="digit" disabled="{{form.sign == 1}}" focus="{{focus == 2}}" |
|||
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例" |
|||
value="{{form.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">结算重量(公斤)</view> |
|||
<view class="text-gray">{{form.settleWeight || '- -'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">结算金额(元)</view> |
|||
<view class="text-gray">{{form.settleWeight || '- -'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
</view> |
|||
</view> |
|||
|
|||
<submit-layout wx:if="{{form}}"> |
|||
<view class="flex flex-center" style="flex:1;justify-content: flex-start"> |
|||
<text class="text-lg" wx:if="{{amout}}">金额:</text> |
|||
<text class="text-xxl text-price text-red" wx:if="{{amout}}">{{amout}}</text> |
|||
</view> |
|||
<van-button type="info" custom-style="height:88rpx;width:300rpx" bind:click="checkOrder">通过审核</van-button> |
|||
</submit-layout> |
|||
|
|||
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29"> |
|||
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" /> |
|||
</van-popup> |
|||
<notification id="qn-notification"/> |
|||
@ -0,0 +1,8 @@ |
|||
/* pages/process/order-check/index.wxss */ |
|||
.page-icon { |
|||
margin-right: 24rpx; |
|||
} |
|||
|
|||
.big-icon{ |
|||
margin-top: 24rpx; |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
// pages/process/order-check/index.js
|
|||
import Scene from '../../index/scene' |
|||
import Dialog from '../../../components/dialog/dialog' |
|||
import { pricingOrder, getFactoryOrderInfo} from "../../../api/saas" |
|||
const event = require('../../../utils/event') |
|||
const util = require('../../../utils/util') |
|||
const app = getApp() |
|||
|
|||
Scene({ |
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
form: { |
|||
orderPapers: [{ productId: '', productName: '', unitPrice: ''}], |
|||
appointDate: null |
|||
} |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
if(options.id){ |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
getFactoryOrderInfo(options.id).then(result => { |
|||
wx.hideLoading() |
|||
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}, |
|||
bindInput: function (e) { |
|||
this.data.form.orderPapers[e.currentTarget.dataset.index].unitPrice = e.detail.value |
|||
}, |
|||
cancelOrder: function(e){ |
|||
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
cancelOrder(this.data.form.id).then(result => { |
|||
wx.hideLoading() |
|||
util.showBackToast('订单已经删除') |
|||
event.emit('OrderMessage', { what: 12, desc: 'cancelOrder' }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}) |
|||
}, |
|||
fileChange: function({detail}){ |
|||
console.log(detail) |
|||
}, |
|||
submitForm: function(){ |
|||
if(util.isEmpty(this.data.form.factoryCustomerName)){ |
|||
util.showToast('请选择客户') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.form.plateNumber)){ |
|||
util.showToast('请输入车牌号码') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.form.driverName)){ |
|||
util.showToast('请选择司机') |
|||
return |
|||
} |
|||
for (let index = 0; index < this.data.form.orderPapers.length; index++) { |
|||
const element = this.data.form.orderPapers[index] |
|||
if(util.isEmpty(element.productId)){ |
|||
util.showToast('请选择第' + (index + 1) + '项废纸品类') |
|||
return |
|||
} |
|||
if(!util.isEmpty(this.data.form.id)){ |
|||
var cate = this.findCateById(element.productId) |
|||
if(cate){ |
|||
element.highestUnitPrice = cate.highestUnitPrice |
|||
element.lowestUnitPrice = cate.lowestUnitPrice |
|||
} |
|||
} |
|||
if(element.highestUnitPrice && Number(element.unitPrice) > Number(element.highestUnitPrice)){ |
|||
util.showToast('第' + (index + 1) + '项废纸品类单价过高,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){ |
|||
util.showToast('第' + (index + 1) + '项废纸品类单价过低,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
} |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
pricingOrder(this.data.form).then(result => { |
|||
wx.hideLoading() |
|||
util.showBackToast('定价成功') |
|||
event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}) |
|||
@ -0,0 +1,19 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"van-index-anchor": "/components/index-anchor/index", |
|||
"van-cell": "/components/cell/index", |
|||
"van-icon": "/components/icon/index", |
|||
"van-button": "/components/button/index", |
|||
"van-checkbox": "/components/checkbox/index", |
|||
"van-loading": "/components/loading/index", |
|||
"van-image": "/components/image/index", |
|||
"van-picker": "/components/picker/index", |
|||
"van-popup": "/components/popup/index", |
|||
"van-dialog": "/components/dialog/index", |
|||
"van-field": "/components/field/index", |
|||
"van-switch": "/components/switch/index", |
|||
"van-uploader": "/components/uploader/index", |
|||
"submit-layout": "/components/submit-layout/index", |
|||
"notification": "/pages/message/notification/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,184 @@ |
|||
<!--pages/process/order-check/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content">厂外收货</view> |
|||
</cu-custom> |
|||
|
|||
<van-index-anchor index="订单信息" /> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">客户姓名</view> |
|||
<view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">车牌号码</view> |
|||
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">司机</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center wx:if="{{form.operatorName}}"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">操作员</view> |
|||
<view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center wx:if="{{form.appointDate}}"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预计到厂时间</view> |
|||
<view class="{{form.appointDate ? 'text-black' : 'text-gray'}}">{{form.appointDate || '请选择预计到厂时间'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-field label="辅助设备" type="textarea" disabled input-align="right" placeholder="请输入辅助设备" autosize border="{{ false }}" /> |
|||
|
|||
<van-index-anchor index="纸品信息" /> |
|||
<view wx:for="{{form.orderPapers}}" wx:key="index"> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">废纸品类{{index + 1}}</view> |
|||
<view class="{{item.productName ? 'text-black' : 'text-gray'}}">{{item.productName || '请选择废纸品类'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预估单价(元/公斤)</view> |
|||
<view class="{{item.unitPrice ? 'text-black' : 'text-gray'}}">{{item.unitPrice || '请输入单价'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>毛重(公斤)</text> |
|||
</view> |
|||
<input id="totalWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入毛重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>皮重(公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入皮重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">净重(公斤)</view> |
|||
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预估金额(元)</view> |
|||
<view class="{{item.price ? 'text-black' : 'text-gray'}}">{{item.price || ''}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx"> |
|||
<view class="flex flex-justify" style="padding-bottom: 24rpx"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>过磅凭证</text> |
|||
</view> |
|||
<text class="text-gray">最多3张,每图片大小限制5M</text> |
|||
</view> |
|||
<van-uploader name="{{index}}" file-list="{{ item.fileList }}" multiple max-count="6" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" /> |
|||
</view> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>结算单价(元/公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入结算单价" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType"> |
|||
<van-checkbox value="{{ item.sign == 1 }}" icon-size="32rpx"></van-checkbox> |
|||
<text style="margin-left:8rpx">扣重(公斤)</text> |
|||
</view> |
|||
<input id="deductWeight" type="digit" disabled="{{item.sign == 2}}" focus="{{focus == 1}}" |
|||
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量" |
|||
value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black" data-type="2" bindtap="changeDeductType"> |
|||
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox> |
|||
<text style="margin-left:8rpx">扣点(%)</text> |
|||
</view> |
|||
<input id="deductPercent" type="digit" disabled="{{form.sign == 1}}" focus="{{focus == 2}}" |
|||
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例" |
|||
value="{{form.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">结算重量(公斤)</view> |
|||
<view class="text-gray">{{form.settleWeight || '- -'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">结算金额(元)</view> |
|||
<view class="text-gray">{{form.settleWeight || '- -'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
</view> |
|||
<van-index-anchor index="汇总信息" /> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">总净重(公斤)</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预计总金额(元)</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>厂外皮重(公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入厂外皮重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>厂外毛重(公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入厂外毛重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
|
|||
<submit-layout wx:if="{{admin}}"> |
|||
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="saveForm">取消</van-button> |
|||
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">修改订单</van-button> |
|||
</submit-layout> |
|||
<submit-layout wx:else> |
|||
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="saveForm">保存</van-button> |
|||
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">提交订单</van-button> |
|||
</submit-layout> |
|||
|
|||
<van-dialog id="van-dialog" /> |
|||
<notification id="qn-notification"/> |
|||
@ -0,0 +1,21 @@ |
|||
/* pages/process/order-check/index.wxss */ |
|||
.cate-list { |
|||
margin: 24rpx 30rpx; |
|||
border: 1rpx solid #dcdcdc; |
|||
} |
|||
|
|||
.cate-header { |
|||
min-height: 76rpx; |
|||
background-color: #dcdcdc; |
|||
padding: 0rpx 30rpx; |
|||
} |
|||
|
|||
.cate-index { |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
line-height: 32rpx; |
|||
text-align: center; |
|||
border-radius: 5000rpx; |
|||
border: 1px solid #666666; |
|||
margin-left: 12rpx |
|||
} |
|||
@ -0,0 +1,164 @@ |
|||
// pages/process/order-list/index.js
|
|||
import Scene from '../../index/scene' |
|||
import Dialog from '../../../components/dialog/dialog' |
|||
import { getFactoryOrderList, cancelOrder } from "../../../api/saas" |
|||
const event = require('../../../utils/event') |
|||
const util = require('../../../utils/util') |
|||
const app = getApp() |
|||
|
|||
//1-定价 2-待过皮重 3-待过榜审核 4-待付款 41-代付中 42-待结算 5-已完成 6-已关闭
|
|||
Scene({ |
|||
// * 页面的初始数据
|
|||
data: { |
|||
height: app.globalData.fragmentHeight - 90, |
|||
tabIndex: 0, |
|||
tabList: [ |
|||
{id: 0, name: '全部', badge: 0, status: '' }, |
|||
{id: 1, name: '待定价', badge: 0, status: 1 }, |
|||
{id: 2, name: '待过皮重', badge: 0, status: 2 }, |
|||
{id: 3, name: '待过榜审核', badge: 0, status: 3 }, |
|||
{id: 4, name: '待付款', badge: 0, status: 4 }, |
|||
{id: 5, name: '代付中', badge: 0, status: 41 }, |
|||
{id: 6, name: '待结算', badge: 0, status: 42 }, |
|||
{id: 7, name: '已完成', badge: 0, status: 5 }, |
|||
// {id: 8, name: '已取消', badge: 0, status: 6 }
|
|||
], |
|||
loading: true, |
|||
requesting: false, |
|||
finished: false, |
|||
top: 0, |
|||
orderList: [], |
|||
form: { |
|||
funcType: 0, |
|||
pageNum: 1, |
|||
pageSize: 10 |
|||
}, |
|||
title: '全部', |
|||
lastTime: null |
|||
}, |
|||
// * 生命周期函数--监听页面加载
|
|||
onLoad: function (options) { |
|||
if(options.status){ |
|||
this.data.form.funcType = Number(options.status) |
|||
if(this.data.form.funcType == 1){ |
|||
this.data.title = '待定价订单' |
|||
} else if(this.data.form.funcType == 2){ |
|||
this.data.title = '过磅审核订单' |
|||
} else if(this.data.form.funcType == 3){ |
|||
this.data.title = '待付款订单' |
|||
} else if(this.data.form.funcType == 4){ |
|||
this.data.title = '已完成订单' |
|||
this.data.form.funcType = 6 |
|||
this.data.form.status = 5 |
|||
this.data.tabIndex = 7 |
|||
} else if(this.data.form.funcType == 5){ |
|||
this.data.title = '已关闭订单' |
|||
} |
|||
} |
|||
event.on('OrderMessage', this, this.onEvent) |
|||
this.setData({ height: app.globalData.fragmentHeight - 90, title: this.data.title, tabIndex: this.data.tabIndex }) |
|||
this.fetchOrderList() |
|||
}, |
|||
onEvent: function(message){ |
|||
if (message.what == 12) { |
|||
this.onRefreshList() |
|||
} |
|||
}, |
|||
onTabChange: function ({detail}) { |
|||
if (this.data.tabIndex == Number(detail.index)) { |
|||
return |
|||
} |
|||
this.setData({ tabIndex: detail.index, requesting: false }) |
|||
this.data.form.status = this.data.tabList[detail.index].status |
|||
this.onRefreshList() |
|||
}, |
|||
onRefreshList: function () { |
|||
if (this.data.requesting) { |
|||
return |
|||
} |
|||
this.setData({ orderList: [], ['form.pageNum']: 1, loading: true, finished: false }) |
|||
this.data.lastTime = null |
|||
this.fetchOrderList() |
|||
}, |
|||
//1:待定价,2:待过皮重,3:待过磅审核,4:待付款,5:已完成
|
|||
fetchOrderList: function () { |
|||
if (this.data.requesting || this.data.finished) { |
|||
return |
|||
} |
|||
if (this.data.loading) { |
|||
this.data.requesting = true |
|||
} else { |
|||
this.setData({ requesting: true }) |
|||
} |
|||
getFactoryOrderList(this.data.form).then(result => { |
|||
this.handResult(result) |
|||
}).catch(err => { |
|||
this.setData({ requesting: false, loading: false }) |
|||
util.showToast(err) |
|||
}).finally(() => { |
|||
this.refresh = this.refresh || this.selectComponent('#refresh') |
|||
this.refresh.setRefresh(false) |
|||
}) |
|||
}, |
|||
handResult: function(result){ |
|||
if (result.data && result.data.records && result.data.records.length) { |
|||
var respList = result.data.records |
|||
// 对返回的消息列表进行处理,将同一天的消息显示在一起
|
|||
for (let i = 0; i < respList.length; i++) { |
|||
if (util.isEmpty(this.data.lastTime)) { |
|||
this.data.lastTime = respList[i].createTime |
|||
if (this.data.lastTime.length > 10) { |
|||
this.data.lastTime = this.data.lastTime.substring(0, 10) |
|||
} |
|||
respList[i].tipsTime = this.data.lastTime |
|||
} else { |
|||
var itemTime = respList[i].createTime |
|||
if (itemTime.length > 10) { |
|||
itemTime = itemTime.substring(0, 10) |
|||
} |
|||
if (this.data.lastTime !== itemTime) { |
|||
respList[i].tipsTime = itemTime |
|||
} |
|||
this.data.lastTime = itemTime |
|||
} |
|||
} |
|||
let nowList = `orderList[${this.data.orderList.length}]` |
|||
var num = this.data.form.pageNum |
|||
var finished = ((num - 1) * this.data.form.pageSize + respList.length) >= result.data.total |
|||
this.setData({ [nowList]: respList, ['form.pageNum']: (num + 1), finished, requesting: false, loading: false }) |
|||
} else { |
|||
this.setData({ finished: true, requesting: false, loading: false }) |
|||
} |
|||
}, |
|||
cancelOrder: function(e){ |
|||
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
cancelOrder(e.currentTarget.dataset.id).then(result => { |
|||
wx.hideLoading() |
|||
util.showToast('订单已经删除') |
|||
this.onRefreshList() |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}) |
|||
}, |
|||
lookItem: function (e) { |
|||
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] |
|||
if(item.status == 1){ |
|||
wx.navigateTo({ url: `/pages/process/order-price/index?id=${item.id}` }) |
|||
} else { |
|||
wx.navigateTo({ url: `/pages/process/order-info/index?id=${item.id}` }) |
|||
} |
|||
}, |
|||
priceOrder: function(e){ |
|||
wx.navigateTo({ url: '/pages/process/order-price/index?id=' + e.currentTarget.dataset.id }) |
|||
}, |
|||
addOutside: function(e){ |
|||
wx.navigateTo({ url: '/pages/process/outside-check/index' }) |
|||
}, |
|||
onUnload: function(){ |
|||
event.remove('OrderMessage', this) |
|||
} |
|||
|
|||
}) |
|||
@ -0,0 +1,15 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"refresh-view": "/components/refresh-view/index", |
|||
"van-button": "/components/button/index", |
|||
"van-index-bar": "/components/index-bar/index", |
|||
"van-index-anchor": "/components/index-anchor/index", |
|||
"van-tabs": "/components/tabs/index", |
|||
"van-tab": "/components/tab/index", |
|||
"van-cell": "/components/cell/index", |
|||
"van-divider": "/components/divider/index", |
|||
"van-loading": "/components/loading/index", |
|||
"van-dialog": "/components/dialog/index", |
|||
"notification": "/pages/message/notification/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,90 @@ |
|||
<!--pages/process/order-list/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content">{{title}}</view> |
|||
</cu-custom> |
|||
|
|||
<van-tabs sticky active="{{tabIndex}}" color="#008AFF" bind:change="onTabChange" line-height="2px" swipe-threshold="4"> |
|||
<van-tab wx:for="{{tabList}}" wx:key="index" title="{{item.name}}" title-style="color:{{tabIndex==index?'#008AFF':'#333333'}}"></van-tab> |
|||
</van-tabs> |
|||
|
|||
<refresh-view id="refresh" bind:refresh="onRefreshList" height="{{height}}" bind:loadmore="fetchOrderList"> |
|||
<view class="list-empty" style="height:{{height}}rpx" wx:if="{{!orderList.length}}"> |
|||
<view style="margin-bottom:24px" wx:if="{{loading}}"> |
|||
<van-loading type="spinner" size="32" /> |
|||
</view> |
|||
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image> |
|||
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view> |
|||
</view> |
|||
<view wx:for-item="pageItem" wx:for-index="pageIndex" wx:for="{{orderList}}" wx:key="pageIndex"> |
|||
<view class="bg-white" wx:for="{{pageItem}}" wx:key="index"> |
|||
<view style="background-color:#f3f3f3;" wx:if="{{item.tipsTime}}"> |
|||
<text class="text-sg" style="line-height:64rpx;padding-left:32rpx">{{item.tipsTime}}</text> |
|||
</view> |
|||
<view class="item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem"> |
|||
<view class="flex flex-justify" wx:if="{{item.status == 1 || item.status == 2 || item.status == 3}}"> |
|||
<view style="height: 88rpx"> |
|||
<view class="flex flex-center text-sg text-black"> |
|||
<text>客户名称:{{item.factoryCustomerName}}</text> |
|||
<text wx:if="{{item.status != 1 && item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text> |
|||
</view> |
|||
<view class="text-sm text-gray" style="margin-top:12rpx" wx:if="{{item.status == 1}}">毛重:{{item.totalWeight}}公斤</view> |
|||
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.status == 2}}"> |
|||
<view class="text-sm text-gray">品类:{{item.productName}}</view> |
|||
<view class="text-sm text-gray">毛重:{{item.totalWeight}}公斤</view> |
|||
</view> |
|||
<view class="flex flex-justify" style="margin-top:12rpx" wx:if="{{item.status == 3}}"> |
|||
<view class="text-sm text-gray">品类:{{item.productName}}</view> |
|||
<view class="text-sm text-gray">金额:{{item.settlePrice}}元</view> |
|||
</view> |
|||
</view> |
|||
<view class="flex flex-center" wx:if="{{item.status == 1}}" style="height: 88rpx"> |
|||
<van-button plain type="default" custom-style="height:64rpx;width:132rpx" data-id="{{item.id}}" |
|||
bind:click="cancelOrder">取消</van-button> |
|||
<van-button plain type="info" custom-style="margin-left:24rpx;height:64rpx;width:132rpx" data-id="{{item.id}}" |
|||
bind:click="priceOrder">定价</van-button> |
|||
</view> |
|||
<view class="flex flex-center" wx:elif="{{item.status ==2}}"> |
|||
<view class="text-df text-black">待过皮重</view> |
|||
</view> |
|||
<view class="flex flex-center" wx:if="{{item.status == 3}}" style="height: 88rpx"> |
|||
<van-button plain type="info" custom-style="height:64rpx;width:132rpx" data-id="{{item.id}}" |
|||
bind:click="checkOrder">审核</van-button> |
|||
</view> |
|||
</view> |
|||
<view wx:else> |
|||
<view class="flex flex-justify"> |
|||
<view class="flex flex-center"> |
|||
<text>客户名称:{{item.factoryCustomerName}}</text> |
|||
<text wx:if="{{item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text> |
|||
</view> |
|||
<view class="flex" > |
|||
<view class="text-df" style="color:#FA541C" wx:if="{{item.status == 4}}">待付款</view> |
|||
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 41}}">代付中</view> |
|||
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 42}}">待结算</view> |
|||
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 5}}">已完成</view> |
|||
</view> |
|||
</view> |
|||
<view class="flex flex-justify" style="margin-top:12rpx"> |
|||
<view class="text-sm text-gray">品类:{{item.productName}}</view> |
|||
<view class="text-sm text-gray">重量:{{item.settleWeight}}公斤</view> |
|||
<view class="text-sm text-gray">金额:{{item.settlePrice}}元</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!--加载更多的UI--> |
|||
<van-divider content-position="center" wx:if="{{ form.pageNum > 1}}" custom-style="padding:0rpx 120rpx"> |
|||
<van-loading type="spinner" size="16" wx:if="{{!finished}}" /> |
|||
<text class="text-sm" style="margin-left:8rpx">{{finished?'到底啦~':'加载中...'}}</text> |
|||
</van-divider> |
|||
</refresh-view> |
|||
|
|||
<view style="width: 100rpx;height: 100rpx;border-radius: 50rpx;position: fixed;bottom:160rpx;right:50rpx"> |
|||
<van-button round type="info" icon="plus" bind:click="addOutside" custom-style="width: 100rpx;height: 100rpx;"> |
|||
<!-- <text class="cuIcon-add text-white" style="font-size:32px"></text> --> |
|||
</van-button> |
|||
</view> |
|||
|
|||
<van-dialog id="van-dialog" /> |
|||
<notification id="qn-notification"/> |
|||
@ -0,0 +1,7 @@ |
|||
/* pages/process/order-list/index.wxss */ |
|||
.item-content{ |
|||
padding: 20rpx 32rpx 20rpx 0rpx; |
|||
border-bottom:1rpx solid #f3f3f3; |
|||
margin-left:32rpx; |
|||
align-items: flex-start; |
|||
} |
|||
@ -0,0 +1,98 @@ |
|||
// pages/process/order-check/index.js
|
|||
import Scene from '../../index/scene' |
|||
import Dialog from '../../../components/dialog/dialog' |
|||
import { pricingOrder, getFactoryOrderInfo} from "../../../api/saas" |
|||
const event = require('../../../utils/event') |
|||
const util = require('../../../utils/util') |
|||
const app = getApp() |
|||
|
|||
Scene({ |
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
form: { |
|||
orderPapers: [{ productId: '', productName: '', unitPrice: ''}], |
|||
appointDate: null |
|||
} |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
if(options.id){ |
|||
wx.showLoading({ title: '正在获取', mask: true }) |
|||
getFactoryOrderInfo(options.id).then(result => { |
|||
wx.hideLoading() |
|||
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}, |
|||
bindInput: function (e) { |
|||
this.data.form.orderPapers[e.currentTarget.dataset.index].unitPrice = e.detail.value |
|||
}, |
|||
cancelOrder: function(e){ |
|||
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
cancelOrder(this.data.form.id).then(result => { |
|||
wx.hideLoading() |
|||
util.showBackToast('订单已经删除') |
|||
event.emit('OrderMessage', { what: 12, desc: 'cancelOrder' }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
}) |
|||
}, |
|||
fileChange: function({detail}){ |
|||
console.log(detail) |
|||
}, |
|||
submitForm: function(){ |
|||
if(util.isEmpty(this.data.form.factoryCustomerName)){ |
|||
util.showToast('请选择客户') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.form.plateNumber)){ |
|||
util.showToast('请输入车牌号码') |
|||
return |
|||
} |
|||
if(util.isEmpty(this.data.form.driverName)){ |
|||
util.showToast('请选择司机') |
|||
return |
|||
} |
|||
for (let index = 0; index < this.data.form.orderPapers.length; index++) { |
|||
const element = this.data.form.orderPapers[index] |
|||
if(util.isEmpty(element.productId)){ |
|||
util.showToast('请选择第' + (index + 1) + '项废纸品类') |
|||
return |
|||
} |
|||
if(!util.isEmpty(this.data.form.id)){ |
|||
var cate = this.findCateById(element.productId) |
|||
if(cate){ |
|||
element.highestUnitPrice = cate.highestUnitPrice |
|||
element.lowestUnitPrice = cate.lowestUnitPrice |
|||
} |
|||
} |
|||
if(element.highestUnitPrice && Number(element.unitPrice) > Number(element.highestUnitPrice)){ |
|||
util.showToast('第' + (index + 1) + '项废纸品类单价过高,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){ |
|||
util.showToast('第' + (index + 1) + '项废纸品类单价过低,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') |
|||
return |
|||
} |
|||
} |
|||
wx.showLoading({ title: '处理中', mask: true }) |
|||
pricingOrder(this.data.form).then(result => { |
|||
wx.hideLoading() |
|||
util.showBackToast('定价成功') |
|||
event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) |
|||
}).catch(err => { |
|||
wx.hideLoading() |
|||
util.showToast(err) |
|||
}) |
|||
} |
|||
}) |
|||
@ -0,0 +1,19 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"van-index-anchor": "/components/index-anchor/index", |
|||
"van-cell": "/components/cell/index", |
|||
"van-icon": "/components/icon/index", |
|||
"van-button": "/components/button/index", |
|||
"van-checkbox": "/components/checkbox/index", |
|||
"van-loading": "/components/loading/index", |
|||
"van-image": "/components/image/index", |
|||
"van-picker": "/components/picker/index", |
|||
"van-popup": "/components/popup/index", |
|||
"van-dialog": "/components/dialog/index", |
|||
"van-field": "/components/field/index", |
|||
"van-switch": "/components/switch/index", |
|||
"van-uploader": "/components/uploader/index", |
|||
"submit-layout": "/components/submit-layout/index", |
|||
"notification": "/pages/message/notification/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,184 @@ |
|||
<!--pages/process/order-check/index.wxml--> |
|||
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
|||
<view slot="content">厂外收货</view> |
|||
</cu-custom> |
|||
|
|||
<van-index-anchor index="订单信息" /> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">客户姓名</view> |
|||
<view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">车牌号码</view> |
|||
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">司机</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center wx:if="{{form.operatorName}}"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">操作员</view> |
|||
<view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center wx:if="{{form.appointDate}}"> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预计到厂时间</view> |
|||
<view class="{{form.appointDate ? 'text-black' : 'text-gray'}}">{{form.appointDate || '请选择预计到厂时间'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-field label="辅助设备" type="textarea" disabled input-align="right" placeholder="请输入辅助设备" autosize border="{{ false }}" /> |
|||
|
|||
<van-index-anchor index="纸品信息" /> |
|||
<view wx:for="{{form.orderPapers}}" wx:key="index"> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">废纸品类{{index + 1}}</view> |
|||
<view class="{{item.productName ? 'text-black' : 'text-gray'}}">{{item.productName || '请选择废纸品类'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预估单价(元/公斤)</view> |
|||
<view class="{{item.unitPrice ? 'text-black' : 'text-gray'}}">{{item.unitPrice || '请输入单价'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>毛重(公斤)</text> |
|||
</view> |
|||
<input id="totalWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入毛重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>皮重(公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入皮重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">净重(公斤)</view> |
|||
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预估金额(元)</view> |
|||
<view class="{{item.price ? 'text-black' : 'text-gray'}}">{{item.price || ''}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<view class="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx"> |
|||
<view class="flex flex-justify" style="padding-bottom: 24rpx"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>过磅凭证</text> |
|||
</view> |
|||
<text class="text-gray">最多3张,每图片大小限制5M</text> |
|||
</view> |
|||
<van-uploader name="{{index}}" file-list="{{ item.fileList }}" multiple max-count="6" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" /> |
|||
</view> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>结算单价(元/公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入结算单价" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType"> |
|||
<van-checkbox value="{{ item.sign == 1 }}" icon-size="32rpx"></van-checkbox> |
|||
<text style="margin-left:8rpx">扣重(公斤)</text> |
|||
</view> |
|||
<input id="deductWeight" type="digit" disabled="{{item.sign == 2}}" focus="{{focus == 1}}" |
|||
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量" |
|||
value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black" data-type="2" bindtap="changeDeductType"> |
|||
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox> |
|||
<text style="margin-left:8rpx">扣点(%)</text> |
|||
</view> |
|||
<input id="deductPercent" type="digit" disabled="{{form.sign == 1}}" focus="{{focus == 2}}" |
|||
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例" |
|||
value="{{form.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">结算重量(公斤)</view> |
|||
<view class="text-gray">{{form.settleWeight || '- -'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">结算金额(元)</view> |
|||
<view class="text-gray">{{form.settleWeight || '- -'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
</view> |
|||
<van-index-anchor index="汇总信息" /> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">总净重(公斤)</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell clickable center> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="text-black">预计总金额(元)</view> |
|||
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>厂外皮重(公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入厂外皮重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
<van-cell> |
|||
<view slot="title" class="flex flex-justify"> |
|||
<view class="flex flex-center text-black"> |
|||
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> |
|||
<text>厂外毛重(公斤)</text> |
|||
</view> |
|||
<input id="emptyWeight" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" |
|||
placeholder="请输入厂外毛重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> |
|||
</view> |
|||
</van-cell> |
|||
|
|||
<submit-layout wx:if="{{admin}}"> |
|||
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="saveForm">取消</van-button> |
|||
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">修改订单</van-button> |
|||
</submit-layout> |
|||
<submit-layout wx:else> |
|||
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="saveForm">保存</van-button> |
|||
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">提交订单</van-button> |
|||
</submit-layout> |
|||
|
|||
<van-dialog id="van-dialog" /> |
|||
<notification id="qn-notification"/> |
|||
@ -0,0 +1,21 @@ |
|||
/* pages/process/order-check/index.wxss */ |
|||
.cate-list { |
|||
margin: 24rpx 30rpx; |
|||
border: 1rpx solid #dcdcdc; |
|||
} |
|||
|
|||
.cate-header { |
|||
min-height: 76rpx; |
|||
background-color: #dcdcdc; |
|||
padding: 0rpx 30rpx; |
|||
} |
|||
|
|||
.cate-index { |
|||
width: 32rpx; |
|||
height: 32rpx; |
|||
line-height: 32rpx; |
|||
text-align: center; |
|||
border-radius: 5000rpx; |
|||
border: 1px solid #666666; |
|||
margin-left: 12rpx |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save