From caa06ce0d92e081ae2a68e0cb33628fd1e5493f9 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Tue, 20 Apr 2021 17:13:34 +0800
Subject: [PATCH] no message
---
components/icon/index.wxss | 1 -
pages/formate.wxs | 30 ++-
pages/process/index/index.js | 1 -
pages/storage/order-create/index.js | 42 +++-
pages/storage/order-create/index.wxml | 39 +--
pages/storage/order-info/index.js | 43 +++-
pages/storage/order-info/index.json | 2 +
pages/storage/order-info/index.wxml | 287 ++++++++++++++++------
pages/storage/order-list/index.js | 6 +-
pages/storage/order-settlement/index.js | 44 +++-
pages/storage/order-settlement/index.wxml | 37 +--
pages/storage/pound-info/index.js | 26 +-
pages/storage/pound-info/index.wxml | 32 +--
pages/storage/pound-list/index.wxml | 9 +-
14 files changed, 458 insertions(+), 141 deletions(-)
diff --git a/components/icon/index.wxss b/components/icon/index.wxss
index efea571..26fc99e 100644
--- a/components/icon/index.wxss
+++ b/components/icon/index.wxss
@@ -940,7 +940,6 @@
display: -webkit-inline-flex;
display: inline-flex;
padding-top: 4rpx;
- margin-right: -8rpx;
-webkit-align-items: center;
align-items: center;
-webkit-justify-content: center;
diff --git a/pages/formate.wxs b/pages/formate.wxs
index 1856223..0a74ffd 100644
--- a/pages/formate.wxs
+++ b/pages/formate.wxs
@@ -63,9 +63,37 @@ function formateWeight(weight) {
return (parseFloat(weight) / 1000).toFixed(2)
}
+function maxWeight(fweight, sweight) {
+ if(fweight && sweight){
+ if(fweight > sweight){
+ return fweight
+ }
+ return sweight
+ }
+ if(sweight){
+ return sweight
+ }
+ return '- -'
+}
+
+function minWeight(fweight, sweight) {
+ if(fweight && sweight){
+ if(fweight < sweight){
+ return fweight
+ }
+ return sweight
+ }
+ if(fweight){
+ return fweight
+ }
+ return '- -'
+}
+
module.exports = {
formateAmount: formateAmount,
formateWeight: formateWeight,
formatTime: formatTime,
- formateDate: formateDate
+ formateDate: formateDate,
+ maxWeight: maxWeight,
+ minWeight: minWeight
}
\ No newline at end of file
diff --git a/pages/process/index/index.js b/pages/process/index/index.js
index 5748acc..22c49fd 100644
--- a/pages/process/index/index.js
+++ b/pages/process/index/index.js
@@ -110,7 +110,6 @@ Component({
},
outList: function(e){
if(e.currentTarget.dataset.status == 1){
- // wx.navigateTo({ url: '/pages/storage/order-settlement/index?id=579730676195135488' })
wx.navigateTo({ url: '/pages/storage/pound-list/index' })
} else if(e.currentTarget.dataset.status == 2){
wx.navigateTo({ url: '/pages/storage/order-list/index?status=1' })
diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js
index 240b131..bd50048 100644
--- a/pages/storage/order-create/index.js
+++ b/pages/storage/order-create/index.js
@@ -11,7 +11,8 @@ Scene({
*/
data: {
safeBottom: app.globalData.safeBottom,
- form: null,
+ form: {},
+ poundInfo: null,
activeNames: [],
columns: [],
visible: false,
@@ -36,8 +37,21 @@ Scene({
})
getPoundInfo(options.id).then(result => {
wx.hideLoading()
- result.data.sign = 1
- this.setData({ form: result.data })
+ result.data.emptyWeighingPicture = []
+ if(result.data.firstWeightImageUrls1){
+ result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrls1)
+ }
+ if(result.data.firstWeightImageUrls2){
+ result.data.emptyWeighingPicture.push(result.data.firstWeightImageUrls2)
+ }
+ result.data.totalWeighingPicture = []
+ if(result.data.secondWeightImageUrls1){
+ result.data.totalWeighingPicture.push(result.data.secondWeightImageUrls1)
+ }
+ if(result.data.secondWeightImageUrls2){
+ result.data.totalWeighingPicture.push(result.data.secondWeightImageUrls2)
+ }
+ this.setData({ poundInfo: result.data })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
@@ -51,7 +65,13 @@ Scene({
events: {
onCallback: (data) => {
if (data.what == 140) {
- that.data.form.facttoryId = data.detail.id
+ if(data.detail.paperMillId){
+ that.data.form.deliveryChannelType = 2
+ that.data.form.factoryDeliveryChannelId = data.detail.paperMillId
+ } else {
+ that.data.form.deliveryChannelType = 1
+ that.data.form.factoryDeliveryChannelId = data.detail.id
+ }
that.setData({ ['form.factoryName']: data.detail.name })
}
}
@@ -105,6 +125,7 @@ Scene({
util.showToast('请输入车牌号码')
return
}
+ this.data.form.weightNoteId = this.data.poundInfo.id
wx.showLoading({ title: '正在处理', mask: true })
createOutOrder(this.data.form).then(result => {
wx.hideLoading()
@@ -114,5 +135,18 @@ Scene({
wx.hideLoading()
util.showToast(err)
})
+ },
+ viewImage: function (e) {
+ var imgList = []
+ if(e.currentTarget.dataset.type == 0){
+ for (let index = 0; index < this.data.poundInfo.totalWeighingPicture.length; index++) {
+ imgList.push(this.data.poundInfo.totalWeighingPicture[index])
+ }
+ } else {
+ for (let index = 0; index < this.data.poundInfo.emptyWeighingPicture.length; index++) {
+ imgList.push(this.data.poundInfo.emptyWeighingPicture[index])
+ }
+ }
+ wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
}
})
\ No newline at end of file
diff --git a/pages/storage/order-create/index.wxml b/pages/storage/order-create/index.wxml
index 50fcb40..1208dcb 100644
--- a/pages/storage/order-create/index.wxml
+++ b/pages/storage/order-create/index.wxml
@@ -1,4 +1,5 @@
+
出货信息
@@ -25,8 +26,8 @@
纸品包数
-
+
@@ -50,53 +51,53 @@
-
+
-
+
第一次过磅(皮重)
- {{form.factoryCustomerName}}
+ {{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}
-
-
+
+
-
+
第二次过磅(毛重)
- 重量(公斤):34250
+ 重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}
-
-
+
+
-
+
净重(公斤)
- {{form.createTime}}
+ {{form.netWeight}}
-
+
过磅人
- {{form.createTime}}
+ {{poundInfo.operaterName}}
-
-
+
+
+
+
+
+ 纸品品类
+ {{orderInfo.categoryName || ''}}
+
+
+
+
+ 结算单价(元/吨)
+ {{orderInfo.settleUnitPrice || ''}}
+
+
+
+
+ 净重(吨)
+ {{formate.formateWeight(orderInfo.netWeight)}}
+
+
+
+
+ 结算重量(吨)
+ {{formate.formateWeight(orderInfo.settleWeight)}}
+
+
+
+
+ 扣点(%)
+ {{ orderInfo.deductPercent || ''}}
+
+
+
+
+ 其他费用(元)
+ {{ orderInfo.otherFee}}
+
+
+
+
+ 结算金额(元)
+ {{ orderInfo.settlePrice}}
+
+
+
+
+ 纸厂磅单
+
+
-
+
+
+
+
+
- 净重(公斤)
- {{form.createTime}}
+ 收货方名称
+ {{orderInfo.consigneeName || ''}}
-
+
- 过磅人
- {{form.createTime}}
+ 废纸品类
+ {{orderInfo.productName || ''}}
+
+
+ 纸品包数
+ {{orderInfo.packageNumber || ''}}
+
+
+
+
+ 车牌号码
+ {{orderInfo.plateNumber || ''}}
+
+
+
+
+ 司机姓名
+ {{ orderInfo.driverName || ''}}
+
+
+
-
-
-
-
+
+
+
+
+ function statusOrder(status) {
+ if(status == 0){
+ return '待审核'
+ } else if(status == 1){
+ return '待收款'
+ } else if(status == 2){
+ return '已完成'
+ } else if(status == 3){
+ return '已关闭'
+ }
+ }
+ module.exports = statusOrder
+
diff --git a/pages/storage/order-list/index.js b/pages/storage/order-list/index.js
index e0f4fc5..11f58ed 100644
--- a/pages/storage/order-list/index.js
+++ b/pages/storage/order-list/index.js
@@ -136,7 +136,11 @@ Scene({
},
lookItem: function (e) {
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
- wx.navigateTo({ url: `/pages/storage/order-price/index?id=${item.id}` })
+ if(item.status == 1){
+ wx.navigateTo({ url: `/pages/storage/order-settlement/index?id=${item.id}` })
+ } else [
+ wx.navigateTo({ url: `/pages/storage/order-info/index?id=${item.id}` })
+ ]
},
onUnload: function(){
event.remove('OrderMessage', this)
diff --git a/pages/storage/order-settlement/index.js b/pages/storage/order-settlement/index.js
index 8ddc1b1..b07c16c 100644
--- a/pages/storage/order-settlement/index.js
+++ b/pages/storage/order-settlement/index.js
@@ -14,6 +14,7 @@ Scene({
data: {
safeBottom: app.globalData.safeBottom,
form: {},
+ poundInfo: null,
orderInfo: null,
activeNames: [],
columns: [],
@@ -39,9 +40,35 @@ Scene({
util.showToast(err)
})
getOutOrderInfo(options.id).then(result => {
+ result.data.weightNote.emptyWeighingPicture = []
+ if(result.data.weightNote.firstWeightImageUrls1){
+ result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrls1)
+ }
+ if(result.data.weightNote.firstWeightImageUrls2){
+ result.data.weightNote.emptyWeighingPicture.push(result.data.weightNote.firstWeightImageUrls2)
+ }
+ result.data.weightNote.totalWeighingPicture = []
+ if(result.data.weightNote.secondWeightImageUrls1){
+ result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrls1)
+ }
+ if(result.data.weightNote.secondWeightImageUrls2){
+ result.data.weightNote.totalWeighingPicture.push(result.data.weightNote.secondWeightImageUrls2)
+ }
+ if(result.data.outboundDeliveryOrderSettlementInfo){
+ this.setData({
+ safeBottom: app.globalData.safeBottom,
+ poundInfo: result.data.weightNote,
+ orderInfo: result.data.outboundDeliveryOrder,
+ form: result.data.outboundDeliveryOrderSettlementInfo
+ })
+ } else {
+ this.setData({
+ safeBottom: app.globalData.safeBottom,
+ poundInfo: result.data.weightNote,
+ orderInfo: result.data.outboundDeliveryOrder
+ })
+ }
wx.hideLoading()
- this.data.form.id = result.data.id
- this.setData({ orderInfo: result.data })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
@@ -165,5 +192,18 @@ Scene({
wx.hideLoading()
util.showToast(err)
})
+ },
+ viewImage: function (e) {
+ var imgList = []
+ if(e.currentTarget.dataset.type == 0){
+ for (let index = 0; index < this.data.poundInfo.totalWeighingPicture.length; index++) {
+ imgList.push(this.data.poundInfo.totalWeighingPicture[index])
+ }
+ } else {
+ for (let index = 0; index < this.data.poundInfo.emptyWeighingPicture.length; index++) {
+ imgList.push(this.data.poundInfo.emptyWeighingPicture[index])
+ }
+ }
+ wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })
}
})
\ No newline at end of file
diff --git a/pages/storage/order-settlement/index.wxml b/pages/storage/order-settlement/index.wxml
index 80f6c29..039c62a 100644
--- a/pages/storage/order-settlement/index.wxml
+++ b/pages/storage/order-settlement/index.wxml
@@ -1,4 +1,5 @@
+
出货结算
@@ -75,13 +76,13 @@
收货方名称
- {{orderInfo.factoryName || ''}}
+ {{orderInfo.consigneeName || ''}}
废纸品类
- {{orderInfo.categoryName || ''}}
+ {{orderInfo.productName || ''}}
@@ -106,51 +107,51 @@
-
+
第一次过磅(皮重)
- {{orderInfo.factoryCustomerName}}
+ {{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}
-
-
+
+
-
+
第二次过磅(毛重)
- 重量(公斤):34250
+ 重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}
-
-
+
+
-
+
净重(公斤)
- {{orderInfo.createTime}}
+ {{form.netWeight}}
-
+
过磅人
- {{orderInfo.createTime}}
+ {{poundInfo.operaterName}}
-
-