diff --git a/api/saas.js b/api/saas.js
index c173995..588adc6 100644
--- a/api/saas.js
+++ b/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,
diff --git a/pages/process/order-info/index.wxml b/pages/process/order-info/index.wxml
index 9644b29..9fbcd04 100644
--- a/pages/process/order-info/index.wxml
+++ b/pages/process/order-info/index.wxml
@@ -160,7 +160,7 @@
结算金额(元)
- {{formate.formateAmount(form.adjustedPrice, 2) || '- -'}}
+ {{formate.formateAmount(form.adjustedPrice || form.settlePrice, 2) || '- -'}}
diff --git a/pages/process/order-price/index.js b/pages/process/order-price/index.js
index fff9a51..89894a8 100644
--- a/pages/process/order-price/index.js
+++ b/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' }
diff --git a/pages/process/outside-info/index.wxml b/pages/process/outside-info/index.wxml
index 95cbbc4..d869c4a 100644
--- a/pages/process/outside-info/index.wxml
+++ b/pages/process/outside-info/index.wxml
@@ -191,7 +191,7 @@
结算金额(元)
- {{item.adjustedPrice || '- -'}}
+ {{item.adjustedPrice || form.settlePrice || '- -'}}
diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js
index 8bf232d..84e258f 100644
--- a/pages/storage/order-create/index.js
+++ b/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
}
diff --git a/pages/storage/order-settlement/index.js b/pages/storage/order-settlement/index.js
index ff2b951..d647261 100644
--- a/pages/storage/order-settlement/index.js
+++ b/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){