Browse Source

no message

feature/v1.5
xpz2018 4 years ago
parent
commit
818b171211
17 changed files with 605 additions and 484 deletions
  1. 13
      api/saas.js
  2. 1
      pages/home/index/index.js
  3. 67
      pages/process/outside-add/index.js
  4. 21
      pages/process/outside-add/index.wxml
  5. 13
      pages/process/outside-check/index.js
  6. 66
      pages/process/outside-info/index.js
  7. 3
      pages/process/outside-info/index.json
  8. 256
      pages/process/outside-info/index.wxml
  9. 103
      pages/process/outside-item/index.js
  10. 8
      pages/process/outside-item/index.json
  11. 100
      pages/process/outside-item/index.wxml
  12. 23
      pages/process/outside-item/index.wxss
  13. 30
      pages/process/outside-list/index.js
  14. 68
      pages/process/outside-list/index.wxml
  15. 130
      pages/process/outside-price/index.js
  16. 1
      pages/process/outside-price/index.json
  17. 186
      pages/process/outside-price/index.wxml

13
api/saas.js

@ -66,8 +66,13 @@ const bindBankCard = (params) => mPost(`/ztb-factory/factory/binding/bank-card`,
const getBankCardList = () => mGet(`/ztb-factory/get/factory-bank-card-list`, null, sconfig) const getBankCardList = () => mGet(`/ztb-factory/get/factory-bank-card-list`, null, sconfig)
const deleteBankcard = (params) => mPost(`/ztb-factory/delete/factory-bank-card`, params, sconfig) const deleteBankcard = (params) => mPost(`/ztb-factory/delete/factory-bank-card`, params, sconfig)
const getSideOrderList = (params) => mGet(`/ztb-factory/get/scrap-paper-offsite-receipt-order-list`, params, sconfig)
const createSideOrder = (params) => mPost(`/ztb-factory/create/scrap-paper-offsite-receipt-order`, params, sconfig) const createSideOrder = (params) => mPost(`/ztb-factory/create/scrap-paper-offsite-receipt-order`, params, sconfig)
const getSideOrderInfo = (params) => mPost(`/ztb-factory/get/scrap-paper-offsite-receipt-order-detail`, params, sconfig)
const getSideOrderInfo = (params) => mGet(`/ztb-factory/get/scrap-paper-offsite-receipt-order-detail`, params, sconfig)
const editSideOrder = (params) => mPost(`/ztb-factory/modify/scrap-paper-offsite-receipt-order`, params, sconfig)
const poundSideOrder = (params) => mPost(`/ztb-factory/submit/scrap-paper-offsite-receipt-weight-note`, params, sconfig)
const priceSideOrder = (params) => mPost(`/ztb-factory/submit/scrap-paper-offsite-receipt-order-price`, params, sconfig)
export { export {
sconfig, sconfig,
@ -127,5 +132,9 @@ export {
getBankCardList, getBankCardList,
deleteBankcard, deleteBankcard,
createSideOrder, createSideOrder,
getSideOrderInfo
getSideOrderInfo,
editSideOrder,
getSideOrderList,
poundSideOrder,
priceSideOrder
} }

1
pages/home/index/index.js

@ -61,7 +61,6 @@ Component({
userInfo: app.userInfo, userInfo: app.userInfo,
userName: nickname, userName: nickname,
isAdmin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0, isAdmin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0,
}) })
}, },
toUserInfo: function(){ toUserInfo: function(){

67
pages/process/outside-add/index.js

@ -1,7 +1,7 @@
// pages/process/order-check/index.js // pages/process/order-check/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog' import Dialog from '../../../components/dialog/dialog'
import { createSideOrder, getSideOrderInfo, getPaperList} from "../../../api/saas"
import { createSideOrder, getSideOrderInfo, editSideOrder, getPaperList, cancelOrder} from "../../../api/saas"
const event = require('../../../utils/event') const event = require('../../../utils/event')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -14,7 +14,7 @@ Scene({
safeBottom: app.globalData.safeBottom, safeBottom: app.globalData.safeBottom,
paperList: null, paperList: null,
form: { form: {
productCategoryInfo: [{ id: '', productName: '', price: ''}],
productCategoryInfos: [{ productId: '', productCategoryName: '', unitPrice: ''}],
predictDeliveryToFactoryTime: null predictDeliveryToFactoryTime: null
}, },
columns: [], columns: [],
@ -118,35 +118,35 @@ Scene({
this.setData({ visible: false, ['form.predictDeliveryToFactoryTime']: (detail.value[0] + ' ' + detail.value[1]) }) this.setData({ visible: false, ['form.predictDeliveryToFactoryTime']: (detail.value[0] + ' ' + detail.value[1]) })
} else { } else {
var nowItem = this.data.paperList[detail.index] var nowItem = this.data.paperList[detail.index]
for (var i = 0; i < this.data.form.productCategoryInfo.length; i++) {
if (this.data.form.productCategoryInfo[i].productId == nowItem.id){
for (var i = 0; i < this.data.form.productCategoryInfos.length; i++) {
if (this.data.form.productCategoryInfos[i].productId == nowItem.id){
this.setData({ visible: false }) this.setData({ visible: false })
util.showToast('纸品已经存在,请不要重复添加') util.showToast('纸品已经存在,请不要重复添加')
return return
} }
} }
var product = {id: nowItem.id, productName: detail.value, price: nowItem.defaultUnitPrice}
var product = {productId: nowItem.id, productCategoryName: detail.value, unitPrice: nowItem.defaultUnitPrice}
product.highestUnitPrice = nowItem.highestUnitPrice product.highestUnitPrice = nowItem.highestUnitPrice
product.lowestUnitPrice = nowItem.lowestUnitPrice product.lowestUnitPrice = nowItem.lowestUnitPrice
this.setData({ visible: false, ['form.productCategoryInfo[' + this.data.cateIndex + ']']: product })
this.setData({ visible: false, ['form.productCategoryInfos[' + this.data.cateIndex + ']']: product })
} }
}, },
onHide: function(){ onHide: function(){
this.setData({ visible: false }) this.setData({ visible: false })
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.form.productCategoryInfo[e.currentTarget.dataset.index].price = e.detail.value
this.data.form.productCategoryInfos[e.currentTarget.dataset.index].unitPrice = e.detail.value
}, },
onChange: function({detail}) { onChange: function({detail}) {
this.data.form.equipmentRemark = detail this.data.form.equipmentRemark = detail
}, },
addCate: function(e){ addCate: function(e){
this.data.form.productCategoryInfo.push({ id: '', productName: '', price: ''})
this.setData({ ['form.productCategoryInfo']: this.data.form.productCategoryInfo })
this.data.form.productCategoryInfos.push({ productId: '', productCategoryName: '', unitPrice: ''})
this.setData({ ['form.productCategoryInfos']: this.data.form.productCategoryInfos })
}, },
deleteCate: function(e){ deleteCate: function(e){
this.data.form.productCategoryInfo.splice(e.currentTarget.dataset.index, 1)
this.setData({ ['form.productCategoryInfo']: this.data.form.productCategoryInfo })
this.data.form.productCategoryInfos.splice(e.currentTarget.dataset.index, 1)
this.setData({ ['form.productCategoryInfos']: this.data.form.productCategoryInfos })
}, },
findCateById: function(productId){ findCateById: function(productId){
for (let index = 0; index < this.data.paperList.length; index++) { for (let index = 0; index < this.data.paperList.length; index++) {
@ -160,7 +160,7 @@ Scene({
cancelOrder: function(e){ cancelOrder: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => {
wx.showLoading({ title: '处理中', mask: true }) wx.showLoading({ title: '处理中', mask: true })
cancelOrder(this.data.form.id).then(result => {
cancelOrder(this.data.form.scrapPaperReceiptId).then(result => {
wx.hideLoading() wx.hideLoading()
util.showBackToast('订单已经删除') util.showBackToast('订单已经删除')
event.emit('OrderMessage', { what: 12, desc: 'cancelOrder' }) event.emit('OrderMessage', { what: 12, desc: 'cancelOrder' })
@ -183,36 +183,49 @@ Scene({
util.showToast('请选择司机') util.showToast('请选择司机')
return return
} }
for (let index = 0; index < this.data.form.productCategoryInfo.length; index++) {
const element = this.data.form.productCategoryInfo[index]
if(util.isEmpty(element.id)){
for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) {
const element = this.data.form.productCategoryInfos[index]
if(util.isEmpty(element.productId)){
util.showToast('请选择第' + (index + 1) + '项废纸品类') util.showToast('请选择第' + (index + 1) + '项废纸品类')
return return
} }
if(!util.isEmpty(this.data.form.id)){
var cate = this.findCateById(element.id)
if(!util.isEmpty(this.data.form.scrapPaperReceiptId)){
var cate = this.findCateById(element.productId)
if(cate){ if(cate){
element.highestUnitPrice = cate.highestUnitPrice element.highestUnitPrice = cate.highestUnitPrice
element.lowestUnitPrice = cate.lowestUnitPrice element.lowestUnitPrice = cate.lowestUnitPrice
} }
} }
if(element.highestUnitPrice && Number(element.price) > Number(element.highestUnitPrice)){
if(element.highestUnitPrice && Number(element.unitPrice) > Number(element.highestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价过高,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') util.showToast('第' + (index + 1) + '项废纸品类单价过高,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤')
return return
} }
if(element.lowestUnitPrice && Number(element.price) < Number(element.lowestUnitPrice)){
if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价过低,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤') util.showToast('第' + (index + 1) + '项废纸品类单价过低,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤')
return return
} }
} }
wx.showLoading({ title: '处理中', mask: true }) wx.showLoading({ title: '处理中', mask: true })
createSideOrder(this.data.form).then(result => {
wx.hideLoading()
util.showBackToast('创建订单成功!')
event.emit('OrderMessage', { what: 12, desc: 'createSideOrder' })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
if(this.data.form.scrapPaperReceiptId){
editSideOrder(this.data.form).then(result => {
wx.hideLoading()
util.showToast('修改订单成功')
wx.redirectTo({ url: `/pages/process/outside-price/index?id=${this.data.form.scrapPaperReceiptId}` })
event.emit('OrderMessage', { what: 12, desc: 'createSideOrder' })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
} else {
createSideOrder(this.data.form).then(result => {
wx.hideLoading()
util.showBackToast('创建订单成功')
event.emit('OrderMessage', { what: 12, desc: 'createSideOrder' })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
}
} }
}) })

21
pages/process/outside-add/index.wxml

@ -1,6 +1,6 @@
<!--pages/process/order-check/index.wxml--> <!--pages/process/order-check/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}"> <cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">新增厂外收货</view>
<view slot="content">{{form.scrapPaperReceiptId ? '修改订单' : '新增厂外收货'}}</view>
</cu-custom> </cu-custom>
<van-index-anchor index="订单信息" /> <van-index-anchor index="订单信息" />
@ -34,13 +34,13 @@
<van-index-anchor index="纸品信息" /> <van-index-anchor index="纸品信息" />
<scroll-view class="bg-white" scroll-y> <scroll-view class="bg-white" scroll-y>
<view wx:for="{{form.productCategoryInfo}}" wx:key="index" class="cate-list">
<view wx:for="{{form.productCategoryInfos}}" wx:key="index" class="cate-list">
<view class="flex flex-justify cate-header"> <view class="flex flex-justify cate-header">
<view class="flex flex-center"> <view class="flex flex-center">
<text class="text-black text-lg">品类</text> <text class="text-black text-lg">品类</text>
<text class="cate-index text-black">{{index + 1}}</text> <text class="cate-index text-black">{{index + 1}}</text>
</view> </view>
<van-icon name="close" size="44rpx" wx:if="{{form.productCategoryInfo.length>1}}" data-index="{{index}}" bind:click="deleteCate"/>
<van-icon name="close" size="44rpx" wx:if="{{form.productCategoryInfos.length>1}}" data-index="{{index}}" bind:click="deleteCate"/>
</view> </view>
<van-cell clickable center is-link data-index="{{index}}" bind:click="showCategory"> <van-cell clickable center is-link data-index="{{index}}" bind:click="showCategory">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
@ -48,7 +48,7 @@
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
<text>废纸品类</text> <text>废纸品类</text>
</view> </view>
<view class="{{item.productName ? 'text-black' : 'text-gray'}}">{{item.productName || '请选择废纸品类'}}</view>
<view class="{{item.productCategoryName ? 'text-black' : 'text-gray'}}">{{item.productCategoryName || '请选择废纸品类'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell border="{{false}}"> <van-cell border="{{false}}">
@ -58,7 +58,7 @@
<text>单价(元/公斤)</text> <text>单价(元/公斤)</text>
</view> </view>
<input data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8" <input data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right" maxlength="8"
placeholder="请输入单价" value="{{item.price || ''}}" bindinput="bindInput" />
placeholder="请输入单价" value="{{item.unitPrice || ''}}" bindinput="bindInput" />
</view> </view>
</van-cell> </van-cell>
</view> </view>
@ -83,11 +83,12 @@
</van-cell> </van-cell>
<van-field label="辅助设备" type="textarea" value="{{ form.equipmentRemark }}" input-align="right" bind:change="onChange" placeholder="请输入辅助设备" autosize border="{{ false }}" /> <van-field label="辅助设备" type="textarea" value="{{ form.equipmentRemark }}" input-align="right" bind:change="onChange" 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 wx:if="{{form.scrapPaperReceiptId}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelOrder">取消</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 type="info" custom-style="height:88rpx;width:686rpx" bind:click="submitForm">保存</van-button>
</submit-layout> </submit-layout>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />

13
pages/process/outside-check/index.js

@ -1,6 +1,6 @@
// pages/process/order-check/index.js // pages/process/order-check/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import { checkingOrder, getFactoryOrderInfo, getPaperList} from "../../../api/saas"
import { checkingOrder, getPaperList, getSideOrderInfo} from "../../../api/saas"
const event = require('../../../utils/event') const event = require('../../../utils/event')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const math = require('../../../utils/math') const math = require('../../../utils/math')
@ -39,7 +39,7 @@ Scene({
this.setData({ safeBottom: app.globalData.safeBottom }) this.setData({ safeBottom: app.globalData.safeBottom })
util.showToast(err) util.showToast(err)
}) })
getFactoryOrderInfo(options.id).then(result => {
getSideOrderInfo({ id: options.id }).then(result => {
wx.hideLoading() wx.hideLoading()
result.data.sign = 1 result.data.sign = 1
if(Number(result.data.deductPercent) <= 0){ if(Number(result.data.deductPercent) <= 0){
@ -53,15 +53,6 @@ Scene({
}) })
} }
}, },
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(){ showCategory: function(){
this.setData({ visible: true }) this.setData({ visible: true })
}, },

66
pages/process/outside-info/index.js

@ -1,7 +1,6 @@
// pages/process/order-check/index.js // pages/process/order-check/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog'
import { pricingOrder, getFactoryOrderInfo} from "../../../api/saas"
import { pricingOrder, getSideOrderInfo} from "../../../api/saas"
const event = require('../../../utils/event') const event = require('../../../utils/event')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -11,18 +10,17 @@ Scene({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
form: {
orderPapers: [{ productId: '', productName: '', unitPrice: ''}],
appointDate: null
}
id: null,
form: null
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
if(options.id){ if(options.id){
this.data.id = options.id
wx.showLoading({ title: '正在获取', mask: true }) wx.showLoading({ title: '正在获取', mask: true })
getFactoryOrderInfo(options.id).then(result => {
getSideOrderInfo({id: options.id}).then(result => {
wx.hideLoading() wx.hideLoading()
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 }) this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 })
}).catch(err => { }).catch(err => {
@ -31,60 +29,10 @@ Scene({
}) })
} }
}, },
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)
checkForm: function(){
wx.redirectTo({url: `/pages/process/outside-check/index?id=${this.data.id}` })
}, },
submitForm: function(){ 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 }) wx.showLoading({ title: '处理中', mask: true })
pricingOrder(this.data.form).then(result => { pricingOrder(this.data.form).then(result => {
wx.hideLoading() wx.hideLoading()

3
pages/process/outside-info/index.json

@ -7,9 +7,6 @@
"van-checkbox": "/components/checkbox/index", "van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/index", "van-loading": "/components/loading/index",
"van-image": "/components/image/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-field": "/components/field/index",
"van-switch": "/components/switch/index", "van-switch": "/components/switch/index",
"van-uploader": "/components/uploader/index", "van-uploader": "/components/uploader/index",

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

@ -3,154 +3,155 @@
<view slot="content">厂外收货</view> <view slot="content">厂外收货</view>
</cu-custom> </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">
<view wx:if="{{form}}">
<van-index-anchor index="订单信息" />
<van-cell clickable center> <van-cell clickable center>
<view slot="title" class="flex flex-justify"> <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 class="text-black">客户姓名</view>
<view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable center>
<view slot="title" class="flex flex-justify"> <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 class="text-black">车牌号码</view>
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable center>
<view slot="title" class="flex flex-justify"> <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 class="text-black">司机</view>
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable center wx:if="{{form.operatorName}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view>
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view>
<view class="text-black">操作员</view>
<view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable center wx:if="{{form.appointDate}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">预估金额(元)</view>
<view class="{{item.price ? 'text-black' : 'text-gray'}}">{{item.price || ''}}</view>
<view class="text-black">预计到厂时间</view>
<view class="{{form.appointDate ? 'text-black' : 'text-gray'}}">{{form.appointDate || '请选择预计到厂时间'}}</view>
</view> </view>
</van-cell> </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>
<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> </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>
</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> </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>
</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> </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>
</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> </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" />
</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> </view>
</van-cell>
<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" 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 slot="title" class="flex flex-justify">
<view class="text-black">结算重量(公斤)</view>
<view class="text-gray">{{form.settleWeight || '- -'}}</view>
<view class="text-black">总净重(公斤)</view>
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable 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.settleWeight || '- -'}}</view>
<view class="text-black">预计总金额(元)</view>
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view>
</view> </view>
</van-cell> </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>
<van-cell>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black"> <view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
@ -170,15 +171,10 @@
placeholder="请输入厂外毛重" value="{{item.unitPrice || ''}}" bindinput="bindInput" /> placeholder="请输入厂外毛重" value="{{item.unitPrice || ''}}" bindinput="bindInput" />
</view> </view>
</van-cell> </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>
</view>
<submit-layout wx:if="{{form && admin && form.orderStatus == 3}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="checkForm">重新定价</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">审核通过</van-button>
</submit-layout> </submit-layout>
<van-dialog id="van-dialog" />
<notification id="qn-notification"/> <notification id="qn-notification"/>

103
pages/process/outside-item/index.js

@ -0,0 +1,103 @@
// pages/message/index.js
const util = require('../../../utils/util')
const math = require('../../../utils/math')
Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
properties: {
item: {
type: Object,
value: null,
observer(value) {
this.setValues(value);
}},
index: { type: Number, value: 0 },
status: { type: Number, value: 0 }
},
data: {
focus: 0,
fileList: []
},
methods: {
setValues: function(value){
if(value && value.weightNoteImage){
this.data.fileList = []
for (let index = 0; index < value.weightNoteImage.length; index++) {
this.data.fileList.push({url: value.weightNoteImage[index]})
}
this.setData({fileList: this.data.fileList})
}
},
bindInput: function (e) {
this.data.item[e.currentTarget.id] = e.detail.value
if(e.currentTarget.id == 'grossWeight' || e.currentTarget.id == 'tareWeight'){
if(Number(this.data.item.grossWeight) > 0){
if(Number(this.data.item.tareWeight) > 0){
if(Number(this.data.item.grossWeight) > Number(this.data.item.tareWeight)){
var netWeight = math.minus(this.data.item.grossWeight, this.data.item.tareWeight)
var estimatedAmount = math.times(netWeight, this.data.item.unitPrice).toFixed(2)
this.setData({['item.netWeight']: netWeight, ['item.estimatedAmount']: estimatedAmount})
} else {
this.setData({['item.netWeight']: null, ['item.estimatedAmount']: null})
}
} else {
this.setData({['item.netWeight']: Number(this.data.item.grossWeight), ['item.estimatedAmount']: null})
}
} else {
this.setData({['item.netWeight']: null, ['item.estimatedAmount']: null})
}
} else if(e.currentTarget.id == 'deductPercent'){
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){
this.data.item.deductWeight = null
this.data.item.deductPercent = null
} else {
this.data.item.deductWeight = math.divide(math.times(this.data.item.totalWeight, Number(e.detail.value)), 100).toFixed(2)
}
this.statAmount()
} else if(e.currentTarget.id == 'deductWeight'){
if(util.isEmpty(e.detail.value) || Number(e.detail.value) <= 0){
this.data.item.deductWeight = null
this.data.item.deductPercent = null
} else {
this.data.item.deductPercent = math.times(math.divide(Number(e.detail.value), this.data.item.totalWeight), 100).toFixed(2)
}
this.statAmount()
} else if(e.currentTarget.id == 'settleUnitPrice'){
this.statAmount()
}
wx.nextTick(() => {
this.triggerEvent('change', {index: this.data.index, item: this.data.item});
})
},
statAmount: function(){
this.data.item.settleWeight = this.data.item.netWeight
if(!util.isEmpty(this.data.item.deductWeight)){
this.data.item.settleWeight = math.minus(this.data.item.netWeight, this.data.item.deductWeight)
}
if(!util.isEmpty(this.data.item.settleUnitPrice) && Number(this.data.item.settleUnitPrice) > 0){
this.data.item.settlePrice = math.times(this.data.item.settleWeight, this.data.item.settleUnitPrice)
} else {
this.data.item.settlePrice = null
}
this.setData({ item: this.data.item })
},
changeDeductType: function(e){
this.setData({ ['item.sign']: e.currentTarget.dataset.type, focus: e.currentTarget.dataset.type })
},
fileChange: function({detail}){
this.data.fileList = detail.fileList
var imageUrls = []
for (let index = 0; index < this.data.fileList.length; index++) {
imageUrls.push(this.data.fileList[index].url)
}
this.data.item.weightNoteImage = imageUrls
wx.nextTick(() => {
this.triggerEvent('change', {index: this.data.index, item: this.data.item});
})
}
}
})

8
pages/process/outside-item/index.json

@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"van-cell": "/components/cell/index",
"van-checkbox": "/components/checkbox/index",
"van-uploader": "/components/uploader/index"
}
}

100
pages/process/outside-item/index.wxml

@ -0,0 +1,100 @@
<!--pages/message/index.wxml-->
<van-cell clickable center>
<view slot="title" class="flex flex-justify">
<view class="text-black">废纸品类{{index + 1}}</view>
<view class="{{item.productCategoryName ? 'text-black' : 'text-gray'}}">{{item.productCategoryName || '请选择废纸品类'}}</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" wx:if="{{status == 0}}">*</view>
<text>毛重(公斤)</text>
</view>
<input id="grossWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入毛重" disabled="{{status != 0}}" value="{{item.grossWeight || ''}}" 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" wx:if="{{status == 0}}">*</view>
<text>皮重(公斤)</text>
</view>
<input id="tareWeight" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入皮重" disabled="{{status != 0}}" value="{{item.tareWeight || ''}}" 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.estimatedAmount ? 'text-black' : 'text-gray'}}">{{item.estimatedAmount || ''}}</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" wx:if="{{status == 0}}">*</view>
<text>过磅凭证</text>
</view>
<text class="text-gray">3-6张,每图片大小限制5M</text>
</view>
<van-uploader file-list="{{ item.fileList }}" multiple max-count="6" deletable="{{status == 0}}" show-upload="{{status == 0}}"
max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />
</view>
<van-cell wx:if="{{status == 1}}">
<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="settleUnitPrice" data-index="{{index}}" type="digit" placeholder-style="color:#aaa" style="text-align: right"
maxlength="8" placeholder="请输入结算单价" value="{{item.settleUnitPrice || ''}}" bindinput="bindInput" />
</view>
</van-cell>
<van-cell wx:if="{{status == 1}}">
<view slot="title" class="flex flex-justify">
<view class="flex flex-center text-black" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ !item.sign || 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 wx:if="{{status == 1}}">
<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="{{item.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view>
</van-cell>
<van-cell wx:if="{{status == 1}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">结算重量(公斤)</view>
<view class="text-gray">{{form.settleWeight || '- -'}}</view>
</view>
</van-cell>
<van-cell wx:if="{{status == 1}}">
<view slot="title" class="flex flex-justify">
<view class="text-black">结算金额(元)</view>
<view class="text-gray">{{form.settlePrice || '- -'}}</view>
</view>
</van-cell>

23
pages/process/outside-item/index.wxss

@ -0,0 +1,23 @@
/* pages/mall/shops/index.wxss */
.item-content {
background: rgba(255, 255, 255, 1);
padding: 32rpx;
}
.item-cate {
flex: 5;
padding: 10rpx 30rpx;
border-radius: 10rpx;
border: 1rpx solid #f3f3f3;
background-color: #f3f3f3;
}
.cate-tag {
background-color: #e6f7ff;
border: 1rpx solid #1890ff;
}
.transform {
transform-origin: 50% 50%;
transform: rotate(180deg);
}

30
pages/process/outside-list/index.js

@ -1,7 +1,7 @@
// pages/process/order-list/index.js // pages/process/order-list/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog' import Dialog from '../../../components/dialog/dialog'
import { getFactoryOrderList, cancelOrder } from "../../../api/saas"
import { getSideOrderList, cancelOrder } from "../../../api/saas"
const event = require('../../../utils/event') const event = require('../../../utils/event')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -14,15 +14,14 @@ Scene({
tabIndex: 0, tabIndex: 0,
tabList: [ tabList: [
{id: 0, name: '全部', badge: 0, status: '' }, {id: 0, name: '全部', badge: 0, status: '' },
{id: 1, name: '待收货', badge: 0, status: 1 },
{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 }
{id: 1, name: '待收货', badge: 0, status: 0 },
{id: 2, name: '待定价', badge: 0, status: 1 },
{id: 4, name: '待过榜审核', badge: 0, status: 3 },
{id: 5, name: '待付款', badge: 0, status: 4 },
{id: 6, name: '代付中', badge: 0, status: 41 },
{id: 7, name: '待结算', badge: 0, status: 42 },
{id: 8, name: '已完成', badge: 0, status: 5 },
{id: 9, name: '已取消', badge: 0, status: 6 }
], ],
loading: true, loading: true,
requesting: false, requesting: false,
@ -91,7 +90,7 @@ Scene({
} else { } else {
this.setData({ requesting: true }) this.setData({ requesting: true })
} }
getFactoryOrderList(this.data.form).then(result => {
getSideOrderList(this.data.form).then(result => {
if (result.data && result.data.records && result.data.records.length) { if (result.data && result.data.records && result.data.records.length) {
var respList = result.data.records var respList = result.data.records
// 对返回的消息列表进行处理,将同一天的消息显示在一起 // 对返回的消息列表进行处理,将同一天的消息显示在一起
@ -143,15 +142,12 @@ 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]
if(item.status == 1){
wx.navigateTo({ url: `/pages/process/order-price/index?id=${item.id}` })
if(item.orderStatus == 0 || item.orderStatus == 1){
wx.navigateTo({ url: `/pages/process/outside-price/index?id=${item.orderId}` })
} else { } else {
wx.navigateTo({ url: `/pages/process/order-info/index?id=${item.id}` })
wx.navigateTo({ url: `/pages/process/outside-info/index?id=${item.orderId}` })
} }
}, },
priceOrder: function(e){
wx.navigateTo({ url: '/pages/process/order-price/index?id=' + e.currentTarget.dataset.id })
},
addOutside: function(e){ addOutside: function(e){
wx.navigateTo({ url: '/pages/process/outside-add/index' }) wx.navigateTo({ url: '/pages/process/outside-add/index' })
}, },

68
pages/process/outside-list/index.wxml

@ -21,54 +21,26 @@
<text class="text-sg" style="line-height:64rpx;padding-left:32rpx">{{item.tipsTime}}</text> <text class="text-sg" style="line-height:64rpx;padding-left:32rpx">{{item.tipsTime}}</text>
</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" 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 class="flex flex-justify">
<view class="flex flex-center">
<text>客户名称:{{item.factoryCustomerName}}</text>
<text wx:if="{{item.factoryCustomerMobile}}">({{item.factoryCustomerMobile}})</text>
</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 class="flex" >
<view class="text-df" style="color:#FA541C" wx:if="{{item.orderStatus == 0}}">待收货</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.orderStatus == 1}}">待定价</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.orderStatus == 3}}">过磅待审核</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.orderStatus == 4}}">待付款</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.orderStatus == 41}}">代付中</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.orderStatus == 42}}">待结算</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.orderStatus == 5}}">已完成</view>
<view class="text-df" style="color:#028A00" wx:elif="{{item.orderStatus == 6}}">已取消</view>
</view> </view>
</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 class="flex flex-justify" style="margin-top:12rpx">
<view class="text-sm text-gray">车牌号码:{{item.plateNumber}}</view>
<view class="text-sm text-gray">品类:{{item.productCategoryName}}</view>
<view class="text-sm text-gray">金额:{{item.settlePrice}}元</view>
</view> </view>
</view> </view>
</view> </view>
@ -80,10 +52,8 @@
</van-divider> </van-divider>
</refresh-view> </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 style="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;"></van-button>
</view> </view>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />

130
pages/process/outside-price/index.js

@ -1,9 +1,10 @@
// pages/process/order-check/index.js // pages/process/order-check/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog' import Dialog from '../../../components/dialog/dialog'
import { pricingOrder, getFactoryOrderInfo} from "../../../api/saas"
import { poundSideOrder, getSideOrderInfo} from "../../../api/saas"
const event = require('../../../utils/event') const event = require('../../../utils/event')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const math = require('../../../utils/math')
const app = getApp() const app = getApp()
Scene({ Scene({
@ -11,9 +12,12 @@ Scene({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
form: {
orderPapers: [{ productId: '', productName: '', unitPrice: ''}],
appointDate: null
id: null,
form: null,
param: {
scrapPaperReceiptId: null,
offsiteGrossWeight: null,
offsiteTareWeight: null,
} }
}, },
/** /**
@ -21,20 +25,41 @@ Scene({
*/ */
onLoad: function (options) { onLoad: function (options) {
if(options.id){ 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)
})
this.data.id = options.id
this.fetchOrderInfo()
}
},
fetchOrderInfo: function(){
wx.showLoading({ title: '正在获取', mask: true })
getSideOrderInfo({id: this.data.id}).then(result => {
wx.hideLoading()
this.data.param.offsiteGrossWeight = result.data.offsiteGrossWeight
this.data.param.offsiteTareWeight = result.data.offsiteTareWeight
this.setData({ form: result.data, admin: app.userInfo.type && app.userInfo.type.indexOf('ADMIN') >= 0 })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
},
onProductChange: function({detail}){
this.data.form.productCategoryInfos[detail.index] = detail.item
var netWeight = 0
var estimatedAmount = 0
for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) {
const element = this.data.form.productCategoryInfos[index]
if(!util.isEmpty(element.netWeight) && Number(element.netWeight) > 0){
netWeight = math.plus(netWeight, element.netWeight)
}
if(!util.isEmpty(element.estimatedAmount) && Number(element.estimatedAmount) > 0){
estimatedAmount = math.plus(estimatedAmount, element.estimatedAmount)
}
} }
this.setData({ ['form.netWeight']: netWeight, ['form.estimatedAmount']: estimatedAmount.toFixed(2) })
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.form.orderPapers[e.currentTarget.dataset.index].unitPrice = e.detail.value
this.data.param[e.currentTarget.id] = e.detail.value
}, },
cancelOrder: function(e){
cancelForm: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => {
wx.showLoading({ title: '处理中', mask: true }) wx.showLoading({ title: '处理中', mask: true })
cancelOrder(this.data.form.id).then(result => { cancelOrder(this.data.form.id).then(result => {
@ -47,52 +72,75 @@ Scene({
}) })
}) })
}, },
fileChange: function({detail}){
console.log(detail)
eidtForm: function(){
wx.redirectTo({url: `/pages/process/outside-add/index?id=${this.data.id}` })
}, },
submitForm: function(){
if(util.isEmpty(this.data.form.factoryCustomerName)){
util.showToast('请选择客户')
return
saveForm: function(){
var weightNoteList = []
for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) {
const element = this.data.form.productCategoryInfos[index]
var item = {grossWeight: element.grossWeight, tareWeight: element.tareWeight,weightNoteImage: element.weightNoteImage }
item.scrapPaperPurchaseOrderId = element.scrapPaperPurchaseOrderId
weightNoteList.push(item)
} }
if(util.isEmpty(this.data.form.plateNumber)){
util.showToast('请输入车牌号码')
this.data.param.weightNoteList = weightNoteList
wx.showLoading({ title: '处理中', mask: true })
poundSideOrder(this.data.param).then(result => {
wx.hideLoading()
util.showBackToast('保存成功')
event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' })
}).catch(err => {
wx.hideLoading()
util.showToast(err)
})
},
submitForm: function(){
if(util.isEmpty(this.data.param.offsiteGrossWeight)){
util.showToast('请输入厂外毛重')
return return
} }
if(util.isEmpty(this.data.form.driverName)){
util.showToast('请选择司机')
if(util.isEmpty(this.data.param.offsiteTareWeight)){
util.showToast('请输入厂外皮重')
return 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) + '项废纸品类')
var weightNoteList = []
for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) {
const element = this.data.form.productCategoryInfos[index]
if(util.isEmpty(element.grossWeight)){
util.showToast('请输入第' + (index + 1) + '项废纸品类毛重')
return 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 + '元/公斤')
if(util.isEmpty(element.weightNoteImage)){
util.showToast('请上传第' + (index + 1) + '项废纸品类过磅凭证')
return return
} }
if(element.lowestUnitPrice && Number(element.unitPrice) < Number(element.lowestUnitPrice)){
util.showToast('第' + (index + 1) + '项废纸品类单价过低,价格范围:' + element.lowestUnitPrice + '元/公斤-'+ element.highestUnitPrice + '元/公斤')
if(element.weightNoteImage.length < 3){
util.showToast('每个品类过磅凭证图片必须3张以上')
return return
} }
var item = {grossWeight: element.grossWeight, tareWeight: element.tareWeight,weightNoteImage: element.weightNoteImage }
item.scrapPaperPurchaseOrderId = element.scrapPaperPurchaseOrderId
weightNoteList.push(item)
} }
this.data.param.scrapPaperReceiptId = this.data.form.scrapPaperReceiptId
this.data.param.weightNoteList = weightNoteList
wx.showLoading({ title: '处理中', mask: true }) wx.showLoading({ title: '处理中', mask: true })
pricingOrder(this.data.form).then(result => {
poundSideOrder(this.data.param).then(result => {
wx.hideLoading() wx.hideLoading()
util.showBackToast('定价成功')
util.showBackToast('提交成功')
event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' })
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
}) })
},
repeatForm: function(){
wx.redirectTo({url: `/pages/process/outside-check/index?id=${this.data.id}` })
},
priceForm: function(){
},
checkForm: function(){
} }
}) })

1
pages/process/outside-price/index.json

@ -12,6 +12,7 @@
"van-dialog": "/components/dialog/index", "van-dialog": "/components/dialog/index",
"van-field": "/components/field/index", "van-field": "/components/field/index",
"van-switch": "/components/switch/index", "van-switch": "/components/switch/index",
"outside-item": "/pages/process/outside-item/index",
"van-uploader": "/components/uploader/index", "van-uploader": "/components/uploader/index",
"submit-layout": "/components/submit-layout/index", "submit-layout": "/components/submit-layout/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"

186
pages/process/outside-price/index.wxml

@ -3,161 +3,68 @@
<view slot="content">厂外收货</view> <view slot="content">厂外收货</view>
</cu-custom> </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">
<view wx:if="{{form}}">
<van-index-anchor index="订单信息" />
<van-cell clickable center> <van-cell clickable center>
<view slot="title" class="flex flex-justify"> <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 class="text-black">客户姓名</view>
<view class="{{form.factoryCustomerName ? 'text-black' : 'text-gray'}}">{{form.factoryCustomerName || '请选择客户'}}
</view> </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> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable center>
<view slot="title" class="flex flex-justify"> <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 class="text-black">车牌号码</view>
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable center>
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">净重(公斤)</view>
<view class="{{item.netWeight ? 'text-black' : 'text-gray'}}">{{item.netWeight || ''}}</view>
<view class="text-black">司机</view>
<view class="{{form.driverName ? 'text-black' : 'text-gray'}}">{{form.driverName || '请选择司机'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-cell clickable center wx:if="{{form.operatorName}}">
<view slot="title" class="flex flex-justify"> <view slot="title" class="flex flex-justify">
<view class="text-black">预估金额(元)</view>
<view class="{{item.price ? 'text-black' : 'text-gray'}}">{{item.price || ''}}</view>
<view class="text-black">操作员</view>
<view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view>
</view> </view>
</van-cell> </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>
<van-cell clickable center wx:if="{{form.appointDate}}">
<view slot="title" class="flex flex-justify"> <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 class="text-black">预计到厂时间</view>
<view class="{{form.appointDate ? 'text-black' : 'text-gray'}}">{{form.appointDate || '请选择预计到厂时间'}}</view>
</view> </view>
</van-cell> </van-cell>
<van-cell>
<van-field label="辅助设备" type="textarea" value="{{ form.equipmentRemark }}" disabled input-align="right" placeholder="请输入辅助设备" autosize
border="{{ false }}" />
<van-index-anchor index="纸品信息" />
<view wx:for="{{form.productCategoryInfos}}" wx:key="index">
<outside-item item="{{item}}" index="{{index}}" status="{{form.orderStatus}}" bind:change="onProductChange"></outside-item>
</view>
<van-index-anchor index="汇总信息" />
<van-cell clickable center>
<view slot="title" class="flex flex-justify"> <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 class="text-black">总净重(公斤)</view>
<view class="{{form.netWeight ? 'text-black' : 'text-gray'}}">{{form.netWeight || ''}}</view>
</view> </view>
</van-cell> </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>
<van-cell clickable 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.settleWeight || '- -'}}</view>
<view class="text-black">预计总金额(元)</view>
<view class="{{form.estimatedAmount ? 'text-black' : 'text-gray'}}">{{form.estimatedAmount || ''}}</view>
</view> </view>
</van-cell> </van-cell>
<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 slot="title" class="flex flex-justify">
<view class="flex flex-center text-black"> <view class="flex flex-center text-black">
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
<text>厂外皮重(公斤)</text> <text>厂外皮重(公斤)</text>
</view> </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" />
<input id="offsiteTareWeight" type="digit" placeholder-style="color:#aaa"
style="text-align: right" maxlength="8" placeholder="请输入厂外皮重" value="{{form.offsiteTareWeight || ''}}"
bindinput="bindInput" />
</view> </view>
</van-cell> </van-cell>
<van-cell> <van-cell>
@ -166,19 +73,30 @@
<view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view> <view class="text-red text-xl" style="line-height: 10px; padding-top: 8px">*</view>
<text>厂外毛重(公斤)</text> <text>厂外毛重(公斤)</text>
</view> </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" />
<input id="offsiteGrossWeight" type="digit" placeholder-style="color:#aaa"
style="text-align: right" maxlength="8" placeholder="请输入厂外毛重" value="{{form.offsiteGrossWeight || ''}}"
bindinput="bindInput" />
</view> </view>
</van-cell> </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>
</view>
<submit-layout wx:if="{{admin && form && form.orderStatus == 0}}">
<van-button plain type="default" custom-style="height:88rpx;width:120rpx" bind:click="cancelForm">取消</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:175rpx;padding-left:0;padding-right:0;" bind:click="eidtForm">修改订单</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:120rpx" bind:click="saveForm">保存</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:175rpx;padding-left:0;padding-right:0;" bind:click="submitForm">提交订单</van-button>
</submit-layout> </submit-layout>
<submit-layout wx:else>
<submit-layout wx:elif="{{form && form.orderStatus == 0}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="saveForm">保存</van-button> <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> <van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="submitForm">提交订单</van-button>
</submit-layout> </submit-layout>
<submit-layout wx:if="{{admin && form && form.orderStatus == 1}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="cancelForm">取消</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="priceForm">确认</van-button>
</submit-layout>
<submit-layout wx:if="{{admin && form && form.orderStatus == 3}}">
<van-button plain type="default" custom-style="height:88rpx;width:254rpx" bind:click="repeatForm">重新定价</van-button>
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="checkForm">审核</van-button>
</submit-layout>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
<notification id="qn-notification"/>
<notification id="qn-notification" />
Loading…
Cancel
Save