Browse Source

no message

feature/v1.3
xpz2018 5 years ago
parent
commit
caa06ce0d9
14 changed files with 458 additions and 141 deletions
  1. 1
      components/icon/index.wxss
  2. 30
      pages/formate.wxs
  3. 1
      pages/process/index/index.js
  4. 42
      pages/storage/order-create/index.js
  5. 39
      pages/storage/order-create/index.wxml
  6. 43
      pages/storage/order-info/index.js
  7. 2
      pages/storage/order-info/index.json
  8. 287
      pages/storage/order-info/index.wxml
  9. 6
      pages/storage/order-list/index.js
  10. 44
      pages/storage/order-settlement/index.js
  11. 37
      pages/storage/order-settlement/index.wxml
  12. 26
      pages/storage/pound-info/index.js
  13. 32
      pages/storage/pound-info/index.wxml
  14. 9
      pages/storage/pound-list/index.wxml

1
components/icon/index.wxss

@ -940,7 +940,6 @@
display: -webkit-inline-flex; display: -webkit-inline-flex;
display: inline-flex; display: inline-flex;
padding-top: 4rpx; padding-top: 4rpx;
margin-right: -8rpx;
-webkit-align-items: center; -webkit-align-items: center;
align-items: center; align-items: center;
-webkit-justify-content: center; -webkit-justify-content: center;

30
pages/formate.wxs

@ -63,9 +63,37 @@ function formateWeight(weight) {
return (parseFloat(weight) / 1000).toFixed(2) 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 = { module.exports = {
formateAmount: formateAmount, formateAmount: formateAmount,
formateWeight: formateWeight, formateWeight: formateWeight,
formatTime: formatTime, formatTime: formatTime,
formateDate: formateDate
formateDate: formateDate,
maxWeight: maxWeight,
minWeight: minWeight
} }

1
pages/process/index/index.js

@ -110,7 +110,6 @@ Component({
}, },
outList: function(e){ outList: function(e){
if(e.currentTarget.dataset.status == 1){ if(e.currentTarget.dataset.status == 1){
// wx.navigateTo({ url: '/pages/storage/order-settlement/index?id=579730676195135488' })
wx.navigateTo({ url: '/pages/storage/pound-list/index' }) wx.navigateTo({ url: '/pages/storage/pound-list/index' })
} else if(e.currentTarget.dataset.status == 2){ } else if(e.currentTarget.dataset.status == 2){
wx.navigateTo({ url: '/pages/storage/order-list/index?status=1' }) wx.navigateTo({ url: '/pages/storage/order-list/index?status=1' })

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

@ -11,7 +11,8 @@ Scene({
*/ */
data: { data: {
safeBottom: app.globalData.safeBottom, safeBottom: app.globalData.safeBottom,
form: null,
form: {},
poundInfo: null,
activeNames: [], activeNames: [],
columns: [], columns: [],
visible: false, visible: false,
@ -36,8 +37,21 @@ Scene({
}) })
getPoundInfo(options.id).then(result => { getPoundInfo(options.id).then(result => {
wx.hideLoading() 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 => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -51,7 +65,13 @@ Scene({
events: { events: {
onCallback: (data) => { onCallback: (data) => {
if (data.what == 140) { 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 }) that.setData({ ['form.factoryName']: data.detail.name })
} }
} }
@ -105,6 +125,7 @@ Scene({
util.showToast('请输入车牌号码') util.showToast('请输入车牌号码')
return return
} }
this.data.form.weightNoteId = this.data.poundInfo.id
wx.showLoading({ title: '正在处理', mask: true }) wx.showLoading({ title: '正在处理', mask: true })
createOutOrder(this.data.form).then(result => { createOutOrder(this.data.form).then(result => {
wx.hideLoading() wx.hideLoading()
@ -114,5 +135,18 @@ Scene({
wx.hideLoading() wx.hideLoading()
util.showToast(err) 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 })
} }
}) })

39
pages/storage/order-create/index.wxml

@ -1,4 +1,5 @@
<!--pages/storage/index/index.wxml--> <!--pages/storage/index/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">出货信息</view> <view slot="content">出货信息</view>
</cu-custom> </cu-custom>
@ -25,8 +26,8 @@
<van-cell> <van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">纸品包数</view> <view class="text-black">纸品包数</view>
<input id="packageNumber" type="number" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入纸品包数" value="{{form.packageNumber || ''}}" bindinput="bindInput" />
<input id="packageQuantity" type="number" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入纸品包数" value="{{form.packageQuantity || ''}}" bindinput="bindInput" />
</view> </view>
</van-cell> </van-cell>
<van-cell center bind:click="showPlate"> <van-cell center bind:click="showPlate">
@ -50,53 +51,53 @@
<van-field label="备注" type="textarea" input-align="right" placeholder="请输入备注" autosize border="{{ false }}" /> <van-field label="备注" type="textarea" input-align="right" placeholder="请输入备注" autosize border="{{ false }}" />
</view> </view>
<view class="margin-top"></view> <view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{form}}">
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{poundInfo}}">
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1"> <van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-cell wx:if="{{form.emptyWeighingPicture && form.emptyWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view> <view class="text-black">第一次过磅(皮重)</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
<view class="text-gray">{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.emptyWeighingPicture && form.emptyWeighingPicture.length}}">
<van-image wx:for="{{form.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="0" src="{{item.url}}" bind:click="viewImage">
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="0" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading"> <view class="image-load" slot="loading">
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
</view> </view>
</van-image> </van-image>
</view> </view>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.secondWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第二次过磅(毛重)</view> <view class="text-black">第二次过磅(毛重)</view>
<view class="text-gray">重量(公斤):34250</view>
<view class="text-gray">重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-image wx:for="{{form.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="1" src="{{item.url}}" bind:click="viewImage">
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="1" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading"> <view class="image-load" slot="loading">
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
</view> </view>
</van-image> </van-image>
</view> </view>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.netWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view> <view class="text-black">净重(公斤)</view>
<view class="text-gray">{{form.createTime}}</view>
<view class="text-gray">{{form.netWeight}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.operaterId}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">过磅人</view> <view class="text-black">过磅人</view>
<view class="text-gray">{{form.createTime}}</view>
<view class="text-gray">{{poundInfo.operaterName}}</view>
</view> </view>
</van-cell> </van-cell>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{form}}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{form}}">
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{poundInfo}}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{poundInfo}}">
<van-button type="info" custom-style="height:88rpx;width:680rpx" bind:click="submitForm">提交</van-button> <van-button type="info" custom-style="height:88rpx;width:680rpx" bind:click="submitForm">提交</van-button>
</view> </view>
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" bind:change="onPlatenumber"></vehicle-keyboard> <vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" bind:change="onPlatenumber"></vehicle-keyboard>

43
pages/storage/order-info/index.js

@ -13,7 +13,10 @@ Scene({
data: { data: {
safeBottom: app.globalData.safeBottom, safeBottom: app.globalData.safeBottom,
form: null, form: null,
poundInfo: null,
orderInfo: null,
activeNames: [], activeNames: [],
fileList: []
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -22,8 +25,43 @@ Scene({
if(options.id){ if(options.id){
wx.showLoading({ title: '正在获取', mask: true }) wx.showLoading({ title: '正在获取', mask: true })
getOutOrderInfo(options.id).then(result => { 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.data.fileList = []
if(result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr){
for (let index = 0; index < result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr.length; index++) {
const element = result.data.outboundDeliveryOrderSettlementInfo.weightNoteImageUrlsArr[index]
this.data.fileList.push({ url: element})
}
}
this.setData({
safeBottom: app.globalData.safeBottom,
poundInfo: result.data.weightNote,
orderInfo: result.data.outboundDeliveryOrder,
form: result.data.outboundDeliveryOrderSettlementInfo,
fileList: this.data.fileList
})
} else {
this.setData({
safeBottom: app.globalData.safeBottom,
poundInfo: result.data.weightNote,
orderInfo: result.data.outboundDeliveryOrder
})
}
wx.hideLoading() wx.hideLoading()
this.setData({ safeBottom: app.globalData.safeBottom, form: result.data })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -57,5 +95,8 @@ Scene({
util.showToast(err) util.showToast(err)
}) })
} }
},
settleForm: function(){
wx.redirectTo({ url: `/pages/storage/order-settlement/index?id=${this.data.orderInfo.id}` })
} }
}) })

2
pages/storage/order-info/index.json

@ -6,9 +6,11 @@
"van-loading": "/components/loading/index", "van-loading": "/components/loading/index",
"van-image": "/components/image/index", "van-image": "/components/image/index",
"van-button": "/components/button/index", "van-button": "/components/button/index",
"van-notice-bar": "/components/notice-bar/index",
"van-dialog": "/components/dialog/index", "van-dialog": "/components/dialog/index",
"van-collapse": "/components/collapse/index", "van-collapse": "/components/collapse/index",
"van-collapse-item": "/components/collapse-item/index", "van-collapse-item": "/components/collapse-item/index",
"van-uploader": "/components/uploader/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"
} }
} }

287
pages/storage/order-info/index.wxml

@ -1,93 +1,242 @@
<!--pages/storage/index/index.wxml--> <!--pages/storage/index/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">出货详情</view> <view slot="content">出货详情</view>
</cu-custom> </cu-custom>
<view wx:if="{{form}}">
<van-index-anchor index="出货信息" />
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">收货方名称</view>
<view class="text-gray">{{form.factoryName || ''}}</view>
</view>
</van-cell>
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">废纸品类</view>
<view class="text-gray">{{form.productName || ''}}</view>
</view>
</van-cell>
<van-cell wx:if="{{form.packageNumber}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">纸品包数</view>
<view class="text-gray">{{form.packageNumber || ''}}</view>
</view>
</van-cell>
<van-cell center>
<view class="flex flex-justify text-black">
<view class="text-black">车牌号码</view>
<view class="text-gray">{{form.plateNumber || ''}}</view>
</view>
</van-cell>
<van-cell wx:if="{{form.driverName}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">司机姓名</view>
<view class="text-gray">{{ form.driverName || ''}}</view>
</view>
</van-cell>
<van-field label="备注" type="textarea" input-align="right" readonly autosize border="{{ false }}" />
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{form}}">
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-cell wx:if="{{form.emptyWeighingPicture && form.emptyWeighingPicture.length}}">
<van-notice-bar color="#1989fa" background="#008AFF" left-icon="info-o" text="{{ statusOrder(orderInfo.status) }}" wx:if="{{orderInfo}}"/>
<view wx:if="{{orderInfo.status == 0 || orderInfo.status == 1 || orderInfo.status == 3}}">
<view wx:if="{{orderInfo}}">
<van-index-anchor index="出货信息" />
<van-cell center>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>
<view class="text-gray">{{form.factoryCustomerName}}</view>
<view class="text-black">收货方名称</view>
<view class="text-gray">{{orderInfo.consigneeName || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.emptyWeighingPicture && form.emptyWeighingPicture.length}}">
<van-image wx:for="{{form.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="0" src="{{item.url}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">废纸品类</view>
<view class="text-gray">{{orderInfo.productName || ''}}</view>
</view>
</van-cell>
<van-cell wx:if="{{orderInfo.packageNumber}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">纸品包数</view>
<view class="text-gray">{{orderInfo.packageNumber || ''}}</view>
</view>
</van-cell>
<van-cell center>
<view class="flex flex-justify text-black">
<view class="text-black">车牌号码</view>
<view class="text-gray">{{orderInfo.plateNumber || ''}}</view>
</view>
</van-cell>
<van-cell wx:if="{{orderInfo.driverName}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第二次过磅(毛重)</view>
<view class="text-gray">重量(公斤):34250</view>
<view class="text-black">司机姓名</view>
<view class="text-gray">{{ orderInfo.driverName || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-image wx:for="{{form.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="1" src="{{item.url}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
<van-field label="备注" type="textarea" input-align="right" readonly autosize border="{{ false }}" />
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{poundInfo}}">
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>
<view class="text-gray">{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="0" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
<van-cell wx:if="{{poundInfo.secondWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第二次过磅(毛重)</view>
<view class="text-gray">重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="1" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
<van-cell wx:if="{{poundInfo.netWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view>
<view class="text-gray">{{form.netWeight}}</view>
</view>
</van-cell>
<van-cell wx:if="{{poundInfo.operaterId}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">过磅人</view>
<view class="text-gray">{{poundInfo.operaterName}}</view>
</view> </view>
</van-image>
</van-cell>
</van-collapse-item>
</van-collapse>
</view>
<view wx:elif="{{orderInfo.status == 2}}">
<view wx:if="{{form}}">
<van-index-anchor index="结算信息" />
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">纸品品类</view>
<view class="text-gray">{{orderInfo.categoryName || ''}}</view>
</view>
</van-cell>
<van-cell center>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算单价(元/吨)</view>
<view class="text-gray">{{orderInfo.settleUnitPrice || ''}}</view>
</view>
</van-cell>
<van-cell wx:if="{{orderInfo.packageNumber}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">净重(吨)</view>
<view class="text-gray">{{formate.formateWeight(orderInfo.netWeight)}}</view>
</view>
</van-cell>
<van-cell center>
<view class="flex flex-justify text-black">
<view class="text-black">结算重量(吨)</view>
<view class="text-gray">{{formate.formateWeight(orderInfo.settleWeight)}}</view>
</view>
</van-cell>
<van-cell wx:if="{{orderInfo.deductPercent}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">扣点(%)</view>
<view class="text-gray">{{ orderInfo.deductPercent || ''}}</view>
</view>
</van-cell>
<van-cell wx:if="{{orderInfo.otherFee}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">其他费用(元)</view>
<view class="text-gray">{{ orderInfo.otherFee}}</view>
</view>
</van-cell>
<van-cell>
<view slot="title" class="flex flex-justify">
<view class="text-black">结算金额(元)</view>
<view class="text-gray">{{ orderInfo.settlePrice}}</view>
</view>
</van-cell>
<view class="bg-white" style="padding: 20rpx 32rpx" wx:if="{{fileList.length}}">
<view class="flex flex-justify" style="padding-bottom: 20rpx">
<text class="text-black">纸厂磅单</text>
</view>
<van-uploader file-list="{{ fileList }}" deletable="{{false}}" show-upload="{{false}}" />
</view> </view>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
</view>
<view class="margin-top"></view>
<van-collapse value="{{ activeNames }}" bind:change="onChange" wx:if="{{poundInfo}}">
<van-collapse-item title="出货信息" content-class="collapse-item" name="2">
<van-cell center>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view>
<view class="text-gray">{{form.createTime}}</view>
<view class="text-black">收货方名称</view>
<view class="text-gray">{{orderInfo.consigneeName || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell center>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">过磅人</view>
<view class="text-gray">{{form.createTime}}</view>
<view class="text-black">废纸品类</view>
<view class="text-gray">{{orderInfo.productName || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell wx:if="{{orderInfo.packageNumber}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">纸品包数</view>
<view class="text-gray">{{orderInfo.packageNumber || ''}}</view>
</view>
</van-cell>
<van-cell center>
<view class="flex flex-justify text-black">
<view class="text-black">车牌号码</view>
<view class="text-gray">{{orderInfo.plateNumber || ''}}</view>
</view>
</van-cell>
<van-cell wx:if="{{orderInfo.driverName}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">司机姓名</view>
<view class="text-gray">{{ orderInfo.driverName || ''}}</view>
</view>
</van-cell>
<van-field label="备注" type="textarea" input-align="right" readonly autosize border="{{ false }}" />
</van-collapse-item> </van-collapse-item>
</van-collapse>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{form }}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{form && form.status == 1}}">
<van-button id="refuse" type="danger" custom-style="height:88rpx;width:254rpx" bind:click="submitForm" wx:if="{{form.status == 1}}">审核不通过</van-button>
<van-button id="agree" type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm" wx:if="{{form.status == 1}}">审核通过</van-button>
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view>
<view class="text-gray">{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="0" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
<van-cell wx:if="{{poundInfo.secondWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">第二次过磅(毛重)</view>
<view class="text-gray">重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view>
</van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="1" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading">
<van-loading type="spinner" size="32" />
</view>
</van-image>
</view>
<van-cell wx:if="{{poundInfo.netWeight}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view>
<view class="text-gray">{{form.netWeight}}</view>
</view>
</van-cell>
<van-cell wx:if="{{poundInfo.operaterId}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">过磅人</view>
<view class="text-gray">{{poundInfo.operaterName}}</view>
</view>
</van-cell>
</van-collapse-item>
</van-collapse>
</view>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{orderInfo.status == 0 || orderInfo.status == 1}}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{orderInfo.status == 0 || orderInfo.status == 1}}">
<van-button id="refuse" type="danger" custom-style="height:88rpx;width:254rpx" bind:click="submitForm" wx:if="{{orderInfo.status == 0}}">审核不通过</van-button>
<van-button id="agree" type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm" wx:if="{{orderInfo.status == 0}}">审核通过</van-button>
<van-button type="info" custom-style="height:88rpx;width:686rpx" bind:click="settleForm" wx:if="{{orderInfo.status == 1}}">收款结算</van-button>
</view> </view>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
<notification id="qn-notification"/> <notification id="qn-notification"/>
<wxs module="statusOrder">
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
</wxs>

6
pages/storage/order-list/index.js

@ -136,7 +136,11 @@ Scene({
}, },
lookItem: function (e) { lookItem: function (e) {
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] 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(){ onUnload: function(){
event.remove('OrderMessage', this) event.remove('OrderMessage', this)

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

@ -14,6 +14,7 @@ Scene({
data: { data: {
safeBottom: app.globalData.safeBottom, safeBottom: app.globalData.safeBottom,
form: {}, form: {},
poundInfo: null,
orderInfo: null, orderInfo: null,
activeNames: [], activeNames: [],
columns: [], columns: [],
@ -39,9 +40,35 @@ Scene({
util.showToast(err) util.showToast(err)
}) })
getOutOrderInfo(options.id).then(result => { 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() wx.hideLoading()
this.data.form.id = result.data.id
this.setData({ orderInfo: result.data })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -165,5 +192,18 @@ Scene({
wx.hideLoading() wx.hideLoading()
util.showToast(err) 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 })
} }
}) })

37
pages/storage/order-settlement/index.wxml

@ -1,4 +1,5 @@
<!--pages/storage/index/index.wxml--> <!--pages/storage/index/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">出货结算</view> <view slot="content">出货结算</view>
</cu-custom> </cu-custom>
@ -75,13 +76,13 @@
<van-cell center> <van-cell center>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">收货方名称</view> <view class="text-black">收货方名称</view>
<view class="text-gray">{{orderInfo.factoryName || ''}}</view>
<view class="text-gray">{{orderInfo.consigneeName || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell center> <van-cell center>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">废纸品类</view> <view class="text-black">废纸品类</view>
<view class="text-gray">{{orderInfo.categoryName || ''}}</view>
<view class="text-gray">{{orderInfo.productName || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell wx:if="{{orderInfo.packageNumber}}"> <van-cell wx:if="{{orderInfo.packageNumber}}">
@ -106,51 +107,51 @@
</van-collapse-item> </van-collapse-item>
<view class="margin-top"></view> <view class="margin-top"></view>
<van-collapse-item title="过磅信息" content-class="collapse-item" name="1"> <van-collapse-item title="过磅信息" content-class="collapse-item" name="1">
<van-cell wx:if="{{orderInfo.emptyWeighingPicture && orderInfo.emptyWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.firstWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view> <view class="text-black">第一次过磅(皮重)</view>
<view class="text-gray">{{orderInfo.factoryCustomerName}}</view>
<view class="text-gray">{{formate.minWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{orderInfo.emptyWeighingPicture && orderInfo.emptyWeighingPicture.length}}">
<van-image wx:for="{{orderInfo.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="0" src="{{item.url}}" bind:click="viewImage">
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.emptyWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="0" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading"> <view class="image-load" slot="loading">
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
</view> </view>
</van-image> </van-image>
</view> </view>
<van-cell wx:if="{{orderInfo.totalWeighingPicture && orderInfo.totalWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.secondWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第二次过磅(毛重)</view> <view class="text-black">第二次过磅(毛重)</view>
<view class="text-gray">重量(公斤):34250</view>
<view class="text-gray">重量(公斤):{{formate.maxWeight(poundInfo.firstWeight, poundInfo.secondWeight)}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{orderInfo.totalWeighingPicture && orderInfo.totalWeighingPicture.length}}">
<van-image wx:for="{{orderInfo.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="1" src="{{item.url}}" bind:click="viewImage">
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{poundInfo.totalWeighingPicture.length}}">
<van-image wx:for="{{poundInfo.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item}}" fit="cover" data-type="1" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading"> <view class="image-load" slot="loading">
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
</view> </view>
</van-image> </van-image>
</view> </view>
<van-cell wx:if="{{orderInfo.totalWeighingPicture && orderInfo.totalWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.netWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view> <view class="text-black">净重(公斤)</view>
<view class="text-gray">{{orderInfo.createTime}}</view>
<view class="text-gray">{{form.netWeight}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell wx:if="{{orderInfo.totalWeighingPicture && orderInfo.totalWeighingPicture.length}}">
<van-cell wx:if="{{poundInfo.operaterId}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">过磅人</view> <view class="text-black">过磅人</view>
<view class="text-gray">{{orderInfo.createTime}}</view>
<view class="text-gray">{{poundInfo.operaterName}}</view>
</view> </view>
</van-cell> </van-cell>
</van-collapse-item> </van-collapse-item>
</van-collapse> </van-collapse>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{orderInfo }}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{orderInfo && orderInfo.status == 2}}">
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{orderInfo && orderInfo.status == 1 }}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{orderInfo && orderInfo.status == 1}}">
<van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="closeForm">关闭订单</van-button> <van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="closeForm">关闭订单</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="settlementForm">确认收款</van-button> <van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="settlementForm">确认收款</van-button>
</view> </view>

26
pages/storage/pound-info/index.js

@ -2,6 +2,8 @@
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog' import Dialog from '../../../components/dialog/dialog'
import { getPoundInfo, repeatPound, deletePound } from "../../../api/saas" import { getPoundInfo, repeatPound, deletePound } from "../../../api/saas"
const event = require('../../../utils/event')
const util = require('../../../utils/util')
const app = getApp() const app = getApp()
Scene({ Scene({
@ -20,6 +22,20 @@ Scene({
wx.showLoading({ title: '正在获取', mask: true }) wx.showLoading({ title: '正在获取', mask: true })
getPoundInfo(options.id).then(result => { getPoundInfo(options.id).then(result => {
wx.hideLoading() wx.hideLoading()
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({ safeBottom: app.globalData.safeBottom, form: result.data }) this.setData({ safeBottom: app.globalData.safeBottom, form: result.data })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
@ -30,9 +46,10 @@ Scene({
repeatForm: function(){ repeatForm: function(){
Dialog.confirm({ title: '温馨提示', message: '磅单数据有问题,确定重新过磅?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '磅单数据有问题,确定重新过磅?' }).then(() => {
wx.showLoading({ title: '正在处理', mask: true }) wx.showLoading({ title: '正在处理', mask: true })
repeatPound(this.data.form.id).then(result => {
repeatPound({id: this.data.form.id}).then(result => {
wx.hideLoading() wx.hideLoading()
util.showBackToast('磅单处理成功') util.showBackToast('磅单处理成功')
event.emit('OrderMessage', { what: 20, desc: 'cancelPound' })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -42,9 +59,10 @@ Scene({
deleteForm: function(){ deleteForm: function(){
Dialog.confirm({ title: '温馨提示', message: '确定删除该磅单?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '确定删除该磅单?' }).then(() => {
wx.showLoading({ title: '正在处理', mask: true }) wx.showLoading({ title: '正在处理', mask: true })
deletePound(this.data.form.id).then(result => {
deletePound({id: this.data.form.id}).then(result => {
wx.hideLoading() wx.hideLoading()
util.showBackToast('磅单已经删除') util.showBackToast('磅单已经删除')
event.emit('OrderMessage', { what: 20, desc: 'cancelPound' })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
@ -58,11 +76,11 @@ Scene({
var imgList = [] var imgList = []
if(e.currentTarget.dataset.type == 0){ if(e.currentTarget.dataset.type == 0){
for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) { for (let index = 0; index < this.data.form.totalWeighingPicture.length; index++) {
imgList.push(this.data.form.totalWeighingPicture[index].url)
imgList.push(this.data.form.totalWeighingPicture[index])
} }
} else { } else {
for (let index = 0; index < this.data.form.emptyWeighingPicture.length; index++) { for (let index = 0; index < this.data.form.emptyWeighingPicture.length; index++) {
imgList.push(this.data.form.emptyWeighingPicture[index].url)
imgList.push(this.data.form.emptyWeighingPicture[index])
} }
} }
wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url })

32
pages/storage/pound-info/index.wxml

@ -1,58 +1,58 @@
<!--pages/storage/index/index.wxml--> <!--pages/storage/index/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">磅单处理</view> <view slot="content">磅单处理</view>
</cu-custom> </cu-custom>
<van-cell wx:if="{{form.emptyWeighingPicture && form.emptyWeighingPicture.length}}">
<van-cell wx:if="{{form.firstWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第一次过磅(皮重)</view> <view class="text-black">第一次过磅(皮重)</view>
<view class="text-gray">重量(公斤):{{form.factoryCustomerName}}</view>
<view class="text-gray">重量(公斤):{{formate.minWeight(form.firstWeight, form.secondWeight)}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.emptyWeighingPicture && form.emptyWeighingPicture.length}}">
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.emptyWeighingPicture.length}}">
<van-image wx:for="{{form.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx" <van-image wx:for="{{form.emptyWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="0" src="{{item.url}}" bind:click="viewImage">
data-url="{{item}}" fit="cover" data-type="0" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading"> <view class="image-load" slot="loading">
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
</view> </view>
</van-image> </van-image>
</view> </view>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell wx:if="{{form.secondWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">第二次过磅(毛重)</view> <view class="text-black">第二次过磅(毛重)</view>
<view class="text-gray">重量(公斤):34250</view>
<view class="text-gray">重量(公斤):{{formate.maxWeight(form.firstWeight, form.secondWeight)}}</view>
</view> </view>
</van-cell> </van-cell>
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<view class="bg-white flex flex-justify" style="padding:24rpx 32rpx" wx:if="{{form.totalWeighingPicture.length}}">
<van-image wx:for="{{form.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx" <van-image wx:for="{{form.totalWeighingPicture}}" wx:key="index" use-loading-slot width="320rpx" height="240rpx"
data-url="{{item.url}}" fit="cover" data-type="1" src="{{item.url}}" bind:click="viewImage">
data-url="{{item}}" fit="cover" data-type="1" src="{{item}}" bind:click="viewImage">
<view class="image-load" slot="loading"> <view class="image-load" slot="loading">
<van-loading type="spinner" size="32" /> <van-loading type="spinner" size="32" />
</view> </view>
</van-image> </van-image>
</view> </view>
<view class="bg-white flex justify-end" style="padding-right:32rpx" wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<view class="bg-white flex justify-end" style="padding-right:32rpx" wx:if="{{form.secondWeight}}">
<van-button plain type="info" size="small" bind:click="repeatForm">重新过磅</van-button> <van-button plain type="info" size="small" bind:click="repeatForm">重新过磅</van-button>
</view> </view>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell wx:if="{{form.netWeight}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view> <view class="text-black">净重(公斤)</view>
<view class="text-gray">{{form.createTime}}</view>
<view class="text-gray">{{form.netWeight}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">
<van-cell wx:if="{{form.operaterId}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">过磅人</view> <view class="text-black">过磅人</view>
<view class="text-gray">{{form.createTime}}</view>
<view class="text-gray">{{form.operaterName}}</view>
</view> </view>
</van-cell> </van-cell>
<view style="height:{{136 + safeBottom}}rpx;" wx:if="{{ form }}"></view> <view style="height:{{136 + safeBottom}}rpx;" wx:if="{{ form }}"></view>
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{form}}">
<view class="cu-bar bg-white foot justify-end" style="height:{{120 + safeBottom}}rpx;padding:0rpx 32rpx {{safeBottom}}rpx 32rpx;" wx:if="{{form}}">
<van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="deleteForm">删除</van-button> <van-button type="danger" custom-style="height:88rpx;width:254rpx" bind:click="deleteForm">删除</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm" wx:if="{{form.totalWeighingPicture && form.totalWeighingPicture.length}}">关联出货单</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm" wx:if="{{form.status == 1}}">关联出货单</van-button>
</view> </view>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />

9
pages/storage/pound-list/index.wxml

@ -1,4 +1,5 @@
<!--pages/process/order-list/index.wxml--> <!--pages/process/order-list/index.wxml-->
<wxs module="formate" src="../../formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">磅单列表</view> <view slot="content">磅单列表</view>
</cu-custom> </cu-custom>
@ -18,16 +19,16 @@
</view> </view>
<view class="item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem"> <view class="item-content" data-page="{{pageIndex}}" data-index="{{index}}" bindtap="lookItem">
<view class="flex flex-justify"> <view class="flex flex-justify">
<view class="text-df">磅单编号:{{item.factoryCustomerName}}</view>
<view class="text-df">磅单编号:{{item.id}}</view>
<view class="flex"> <view class="flex">
<view class="text-df" style="color:#FA541C" wx:if="{{item.status == 0}}">过磅中</view> <view class="text-df" style="color:#FA541C" wx:if="{{item.status == 0}}">过磅中</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.status == 1}}">已过磅</view> <view class="text-df" style="color:#028A00" wx:elif="{{item.status == 1}}">已过磅</view>
</view> </view>
</view> </view>
<view class="flex flex-justify" style="margin-top:12rpx"> <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.netWeight}}公斤</view>
<view class="text-sm text-gray">皮重(公斤):{{formate.minWeight(item.firstWeight, item.secondWeight)}}</view>
<view class="text-sm text-gray">毛重(公斤):{{formate.maxWeight(item.firstWeight, item.secondWeight)}}</view>
<view class="text-sm text-gray">净重(公斤):{{item.netWeight || '- -'}}</view>
</view> </view>
</view> </view>
</view> </view>

Loading…
Cancel
Save