Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
4e63a815ab
6 changed files with 46 additions and 6 deletions
  1. 2
      api/saas.js
  2. 2
      pages/process/order-info/index.wxml
  3. 3
      pages/process/order-price/index.js
  4. 2
      pages/process/outside-info/index.wxml
  5. 4
      pages/storage/order-create/index.js
  6. 39
      pages/storage/order-settlement/index.js

2
api/saas.js

@ -74,6 +74,7 @@ const getOutOrderInfo = (id) => mGet(`/ztb-factory/get/outbound-delivery-order-d
const closeOutOrder = (params) => mPost(`/ztb-factory/close/outbound-delivery-order`, params, sconfig)
const auditOutOrder = (params) => mPost(`/ztb-factory/audit/outbount-delivery-order`, params, sconfig)
const receiptOutOrder = (params) => mPost(`/ztb-factory/confirm/outbound-delivery-order-receipt`, params, sconfig)
const backupOutOrder = (params) => mPost(`/ztb-factory/save/outbound-delivery-order-receipt`, params, sconfig)
const createOutOrder = (params) => mPost(`/ztb-factory/relevancy/weight-note/and/outbound-delivery-order`, params, sconfig)
const recordOutOrder = (params) => mPost(`/ztb-factory/save/outbound-delivery-order`, params, sconfig)
const bindBankCard = (params) => mPost(`/ztb-factory/factory/binding/bank-card`, params, sconfig)
@ -152,6 +153,7 @@ export {
closeOutOrder,
auditOutOrder,
receiptOutOrder,
backupOutOrder,
createOutOrder,
recordOutOrder,
bindBankCard,

2
pages/process/order-info/index.wxml

@ -160,7 +160,7 @@
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算金额(元)</view>
<view class="text-gray">{{formate.formateAmount(form.adjustedPrice, 2) || '- -'}}</view>
<view class="text-gray">{{formate.formateAmount(form.adjustedPrice || form.settlePrice, 2) || '- -'}}</view>
</view>
</van-cell>
<van-cell>

3
pages/process/order-price/index.js

@ -37,6 +37,9 @@ Scene({
getFactoryOrderInfo(options.id).then(result => {
result.data.deductType = 1
this.data.step = 1
if(!result.data.totalWeighingPicture){
result.data.totalWeighingPicture = []
}
for (let index = 0; index < 2; index++) {
if(util.isEmpty(result.data.totalWeighingPicture[index])){
result.data.totalWeighingPicture[index] = { url: 'error' }

2
pages/process/outside-info/index.wxml

@ -191,7 +191,7 @@
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算金额(元)</view>
<view class="text-gray">{{item.adjustedPrice || '- -'}}</view>
<view class="text-gray">{{item.adjustedPrice || form.settlePrice || '- -'}}</view>
</view>
</van-cell>
</view>

4
pages/storage/order-create/index.js

@ -183,11 +183,11 @@ Scene({
util.showToast('请输入车牌号码')
return
}
if(util.isEmpty(this.data.form.netWeight)){
if(util.isEmpty(this.data.form.netWeight) && !this.data.poundInfo){
util.showToast('请输入净重')
return
}
if(Number(this.data.form.netWeight) <= 0){
if(Number(this.data.form.netWeight) <= 0 && !this.data.poundInfo){
util.showToast('净重不能小于零')
return
}

39
pages/storage/order-settlement/index.js

@ -1,7 +1,7 @@
// pages/storage/index/index.js
import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog'
import { getOutOrderInfo, getPaperList, receiptOutOrder, closeOutOrder, printOrder } from "../../../api/saas"
import { getOutOrderInfo, getPaperList, receiptOutOrder, backupOutOrder, closeOutOrder, printOrder } from "../../../api/saas"
const util = require('../../../utils/util')
const event = require('../../../utils/event')
const math = require('../../../utils/math')
@ -202,7 +202,42 @@ Scene({
})
},
saveForm: function(){
wx.showLoading({ title: '正在处理', mask: true })
var params = { id: this.data.orderInfo.id, categoryId: this.data.form.categoryId }
params.otherFee = this.data.form.otherFee
params.subsidy = this.data.form.subsidy
params.proxyPaySurcharge = this.data.form.proxyPaySurcharge
params.freight = this.data.form.freight
params.deductPercent = this.data.form.deductPercent
if(this.data.form.settleUnitPrice && Number(this.data.form.settleUnitPrice) > 0){
params.settleUnitPrice = math.divide(this.data.form.settleUnitPrice, 1000)
}
params.settlePrice = this.data.form.settlePrice
if(this.data.form.netWeight && Number(this.data.form.netWeight) > 0){
params.netWeight = math.times(this.data.form.netWeight, 1000)
}
if(this.data.form.settleWeight && Number(this.data.form.settleWeight) > 0){
params.settleWeight = math.times(this.data.form.settleWeight, 1000)
}
var weightNoteImageUrls = []
for (let index = 0; index < this.data.fileList.length; index++) {
const element = this.data.fileList[index]
if(!util.isEmpty(element.url)){
weightNoteImageUrls.push(element.url)
}
}
if(weightNoteImageUrls.length){
params.weightNoteImageUrls = weightNoteImageUrls
}
backupOutOrder(params).then(result => {
wx.hideLoading()
util.showBackToast('保存成功')
event.emit('OrderMessage', { what: 21, desc: 'settlementForm' })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
},
settlementForm: function(){
if(util.isEmpty(this.data.form.categoryId) || Number(this.data.form.categoryId) <= 0){

Loading…
Cancel
Save