Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
ad3f8cc8dd
34 changed files with 494 additions and 155 deletions
  1. 16
      pages/process/order-check/index.js
  2. 4
      pages/process/order-check/index.json
  3. 15
      pages/process/order-check/index.wxml
  4. 45
      pages/process/order-check/index.wxss
  5. 16
      pages/process/order-info/index.js
  6. 3
      pages/process/order-info/index.json
  7. 4
      pages/process/order-info/index.wxml
  8. 15
      pages/process/order-price/index.js
  9. 4
      pages/process/order-price/index.json
  10. 23
      pages/process/order-price/index.wxml
  11. 45
      pages/process/order-price/index.wxss
  12. 38
      pages/process/outside-add/index.js
  13. 4
      pages/process/outside-add/index.json
  14. 24
      pages/process/outside-add/index.wxml
  15. 35
      pages/process/outside-add/index.wxss
  16. 12
      pages/process/outside-check-item/index.js
  17. 4
      pages/process/outside-check-item/index.json
  18. 15
      pages/process/outside-check-item/index.wxml
  19. 45
      pages/process/outside-check-item/index.wxss
  20. 12
      pages/process/outside-check/index.js
  21. 2
      pages/process/outside-check/index.wxml
  22. 6
      pages/process/outside-item/index.wxml
  23. 22
      pages/setting/paper-detial/index.js
  24. 4
      pages/setting/paper-detial/index.json
  25. 15
      pages/setting/paper-detial/index.wxml
  26. 46
      pages/setting/paper-detial/index.wxss
  27. 18
      pages/storage/order-create/index.js
  28. 4
      pages/storage/order-create/index.json
  29. 15
      pages/storage/order-create/index.wxml
  30. 46
      pages/storage/order-create/index.wxss
  31. 27
      pages/storage/order-settlement/index.js
  32. 4
      pages/storage/order-settlement/index.json
  33. 15
      pages/storage/order-settlement/index.wxml
  34. 46
      pages/storage/order-settlement/index.wxss

16
pages/process/order-check/index.js

@ -13,7 +13,7 @@ Scene({
safeBottom: app.globalData.safeBottom,
paperList: null,
form: null,
columns: [],
paperList: [],
focus: 0,
visible: false,
amout: 0,
@ -26,12 +26,7 @@ Scene({
if(options.id){
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].name)
}
this.setData({ safeBottom: app.globalData.safeBottom, columns: this.data.columns })
this.setData({ safeBottom: app.globalData.safeBottom, paperList: result.data.records })
}).catch(err => {
this.setData({ safeBottom: app.globalData.safeBottom })
util.showToast(err)
@ -62,8 +57,9 @@ Scene({
showCategory: function(){
this.setData({ visible: true })
},
onConfirm: function({detail}){
this.data.nowItem = this.data.paperList[detail.index]
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
this.data.form.productId = this.data.nowItem.id
this.data.form.unitPrice = this.data.nowItem.defaultUnitPrice
this.data.form.productName = detail.value
@ -106,7 +102,7 @@ Scene({
} else {
this.data.amout = null
}
this.setData({ visible: false, form: this.data.form, amout: this.data.amout })
this.setData({ visible: false, form: this.data.form, amout: this.data.amout, cIndex: this.data.cIndex })
},
checkOrder: function(){
if(util.isEmpty(this.data.form.productId) || Number(this.data.form.productId) <= 0){

4
pages/process/order-check/index.json

@ -6,7 +6,9 @@
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/index",
"van-image": "/components/image/index",
"van-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"vehicle-keyboard": "/components/vehicle-keyboard/index",
"submit-layout": "/components/submit-layout/index",

15
pages/process/order-check/index.wxml

@ -113,6 +113,19 @@
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view class="van-picker__cancel" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<scroll-view scroll-y="true" style="height:480rpx;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<notification id="qn-notification"/>

45
pages/process/order-check/index.wxss

@ -9,4 +9,49 @@
.big-icon{
margin-top: 24rpx;
}
.van-picker__toolbar {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
height: 44px;
height: var(--picker-toolbar-height, 44px);
line-height: 44px;
line-height: var(--picker-toolbar-height, 44px)
}
.van-picker__cancel {
padding: 0 16px;
width: 96rpx;
padding: var(--picker-action-padding, 0 16px);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #666666;
color: var(--picker-action-text-color, #666666)
}
.van-picker__confirm {
padding: 0 24rpx;
padding: var(--picker-action-padding, 0 24rpx);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #1989fa;
color: var(--picker-action-text-color, #1989fa)
}
.van-picker__cancel--hover,
.van-picker__confirm--hover {
background-color: #f2f3f5;
background-color: var(--picker-action-active-color, #f2f3f5)
}
.van-picker__title {
max-width: 50%;
text-align: center;
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
font-size: 16px;
font-size: var(--picker-option-font-size, 16px)
}

16
pages/process/order-info/index.js

@ -55,22 +55,6 @@ Scene({
util.showToast(err)
})
},
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 })
}
},
bindInput: function (e) {
this.data.form[e.target.id] = e.detail.value
},
onChange: function({ detail }) {
// 需要手动对 checked 状态进行更新
this.setData({ ['form.isDefault']: detail ? 1 : 0 })
},
printOrderInfo: function(){
wx.showLoading({ title: '正在处理', mask: true })
printOrder({id: this.data.form.id, printType: 1}).then(result => {

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

@ -6,9 +6,6 @@
"van-loading": "/components/loading/index",
"van-image": "/components/image/index",
"van-dialog": "/components/dialog/index",
"van-popup": "/components/popup/index",
"van-picker": "/components/picker/index",
"vehicle-keyboard": "/components/vehicle-keyboard/index",
"submit-layout": "/components/submit-layout/index",
"notification": "/pages/message/notification/index"
}

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

@ -184,9 +184,5 @@
</van-button>
</view>
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
</van-popup>
<van-dialog id="van-dialog" />
<notification id="qn-notification"/>

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

@ -16,7 +16,6 @@ Scene({
paperList: null,
form: null,
step: 1,
columns: [],
focus: 0,
visible: false,
nowItem: null
@ -28,12 +27,7 @@ Scene({
if(options.id){
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].name)
}
this.setData({ safeBottom: app.globalData.safeBottom, columns: this.data.columns })
this.setData({ safeBottom: app.globalData.safeBottom, paperList: result.data.records })
}).catch(err => {
this.setData({ safeBottom: app.globalData.safeBottom })
util.showToast(err)
@ -70,11 +64,12 @@ Scene({
showCategory: function(){
this.setData({ visible: true })
},
onConfirm: function({detail}){
this.data.nowItem = this.data.paperList[detail.index]
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
this.data.form.productId = this.data.nowItem.id
var unitPrice = this.data.nowItem.defaultUnitPrice
this.setData({ visible: false, ['form.productName']: detail.value, ['form.unitPrice']: unitPrice })
this.setData({ visible: false, ['form.productName']: this.data.nowItem.categoryName, ['form.unitPrice']: unitPrice, cIndex: this.data.cIndex })
},
onHide: function(){
this.setData({ visible: false })

4
pages/process/order-price/index.json

@ -5,7 +5,9 @@
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/index",
"van-image": "/components/image/index",
"van-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"van-dialog": "/components/dialog/index",
"van-field": "/components/field/index",

23
pages/process/order-price/index.wxml

@ -44,7 +44,7 @@
<van-cell clickable center is-link arrow-direction="down" bind:click="showPlate">
<view slot="title" class="flex flex-justify">
<view class="text-black">车牌号码</view>
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码'}}</view>
<view class="{{form.plateNumber ? 'text-black' : 'text-gray'}}">{{form.plateNumber || '请输入车牌号码(选填)'}}</view>
</view>
</van-cell>
<van-cell clickable center is-link arrow-direction="down" bind:click="showCategory">
@ -77,7 +77,7 @@
<text style="margin-left:8rpx">扣重(公斤)</text>
</view>
<input id="deductWeight" type="digit" disabled="{{form.sign == 2}}" focus="{{focus == 1}}"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣重重量(选填)"
value="{{form.deductWeight}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</view>
</van-cell>
@ -88,7 +88,7 @@
<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="请输入扣点比例"
placeholder-style="color:#aaa" style="text-align: right" maxlength="10" placeholder="请输入扣点比例(选填)"
value="{{form.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view>
</van-cell>
@ -102,7 +102,7 @@
</view>
</view>
</van-cell>
<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 class="flex flex-center bg-white margin-top" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
<view style="height:30rpx;width:6rpx;background-image: linear-gradient(180deg, #007AFF 0%, #027BFF 15%, #5AABFF 45%, #CAF4FE 100%);"></view>
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">过磅信息</view>
@ -136,6 +136,19 @@
<van-dialog id="van-dialog" />
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view class="van-picker__cancel" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<scroll-view scroll-y="true" style="height:480rpx;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<notification id="qn-notification"/>

45
pages/process/order-price/index.wxss

@ -8,4 +8,49 @@
.big-icon{
margin-top: 24rpx;
}
.van-picker__toolbar {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
height: 44px;
height: var(--picker-toolbar-height, 44px);
line-height: 44px;
line-height: var(--picker-toolbar-height, 44px)
}
.van-picker__cancel {
padding: 0 16px;
width: 96rpx;
padding: var(--picker-action-padding, 0 16px);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #666666;
color: var(--picker-action-text-color, #666666)
}
.van-picker__confirm {
padding: 0 24rpx;
padding: var(--picker-action-padding, 0 24rpx);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #1989fa;
color: var(--picker-action-text-color, #1989fa)
}
.van-picker__cancel--hover,
.van-picker__confirm--hover {
background-color: #f2f3f5;
background-color: var(--picker-action-active-color, #f2f3f5)
}
.van-picker__title {
max-width: 50%;
text-align: center;
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
font-size: 16px;
font-size: var(--picker-option-font-size, 16px)
}

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

@ -18,9 +18,9 @@ Scene({
},
columns: [],
visible: false,
visible2: false,
cateIndex: -1,
nowItem: null,
column1: [],
column4: [
{
values: [],
@ -44,10 +44,6 @@ Scene({
}
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.column1 = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.column1.push(this.data.paperList[index].name)
}
if(!options.id){
wx.hideLoading()
}
@ -103,31 +99,31 @@ Scene({
},
showCategory: function(e){
if(e.currentTarget.dataset.index >= 0){
this.setData({ visible: true, columns: this.data.column1, cateIndex: e.currentTarget.dataset.index })
this.setData({ visible2: true, paperList: this.data.paperList, cateIndex: e.currentTarget.dataset.index })
} else {
this.setData({ visible: true, columns: this.data.column4, cateIndex: -1 })
}
},
onConfirm: function({detail}){
if(Array.isArray(detail.index)){
this.setData({ visible: false, ['form.predictDeliveryToFactoryTime']: (detail.value[0] + ' ' + detail.value[1]) })
} else {
var nowItem = this.data.paperList[detail.index]
for (var index = 0; index < this.data.form.productCategoryInfos.length; index++) {
if (this.data.form.productCategoryInfos[index].productId == nowItem.id && this.data.cateIndex != index){
this.setData({ visible: false })
util.showToast('纸品已经存在,请不要重复添加')
return
}
this.setData({ visible: false, ['form.predictDeliveryToFactoryTime']: (detail.value[0] + ' ' + detail.value[1]) })
},
onCateConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
var nowItem = this.data.paperList[this.data.cIndex]
for (var index = 0; index < this.data.form.productCategoryInfos.length; index++) {
if (this.data.form.productCategoryInfos[index].productId == nowItem.id && this.data.cateIndex != index){
this.setData({ visible: false })
util.showToast('纸品已经存在,请不要重复添加')
return
}
var product = {productId: nowItem.id, productCategoryName: detail.value, unitPrice: nowItem.defaultUnitPrice}
product.highestUnitPrice = nowItem.highestUnitPrice
product.lowestUnitPrice = nowItem.lowestUnitPrice
this.setData({ visible: false, ['form.productCategoryInfos[' + this.data.cateIndex + ']']: product })
}
var product = {productId: nowItem.id, productCategoryName: nowItem.categoryName, unitPrice: nowItem.defaultUnitPrice}
product.highestUnitPrice = nowItem.highestUnitPrice
product.lowestUnitPrice = nowItem.lowestUnitPrice
this.setData({ visible2: false, ['form.productCategoryInfos[' + this.data.cateIndex + ']']: product })
},
onHide: function(){
this.setData({ visible: false })
this.setData({ visible: false, visible2: false })
},
bindInput: function (e) {
this.data.form.productCategoryInfos[e.currentTarget.dataset.index].unitPrice = e.detail

4
pages/process/outside-add/index.json

@ -2,12 +2,14 @@
"usingComponents": {
"van-index-anchor": "/components/index-anchor/index",
"van-cell": "/components/cell/index",
"van-icon": "/components/icon/index",
"van-button": "/components/button/index",
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/index",
"van-image": "/components/image/index",
"van-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"van-dialog": "/components/dialog/index",
"van-field": "/components/field/index",

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

@ -37,16 +37,16 @@
<van-cell id="operatorName" clickable center is-link bind:click="chooseEmploy">
<view slot="title" class="flex flex-justify">
<view class="text-black">操作员</view>
<view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员'}}</view>
<view class="{{form.operatorName ? 'text-black' : 'text-gray'}}">{{form.operatorName || '请选择操作员(选填)'}}</view>
</view>
</van-cell>
<van-cell clickable center is-link arrow-direction="down" bind:click="showCategory">
<view slot="title" class="flex flex-justify">
<view class="text-black">预计到厂时间</view>
<view class="{{form.predictDeliveryToFactoryTime ? 'text-black' : 'text-gray'}}">{{form.predictDeliveryToFactoryTime || '请选择预计到厂时间'}}</view>
<view class="{{form.predictDeliveryToFactoryTime ? 'text-black' : 'text-gray'}}">{{form.predictDeliveryToFactoryTime || '请选择预计到厂时间(选填)'}}</view>
</view>
</van-cell>
<van-field label="辅助设备" value="{{ form.equipmentRemark }}" input-align="right" clearable bind:change="onChange" placeholder="请输入辅助设备" border="{{ false }}" />
<van-field label="辅助设备" value="{{ form.equipmentRemark }}" input-align="right" clearable bind:change="onChange" placeholder="请输入辅助设备(选填)" border="{{ false }}" />
<view style="height:16rpx"></view>
<!-- <van-index-anchor index="纸品信息" /> -->
<view class="flex flex-center bg-white" style="justify-content: flex-start;padding: 24rpx 32rpx;border-bottom:1rpx solid #f3f3f3">
@ -93,6 +93,22 @@
<van-dialog id="van-dialog" />
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="{{cateIndex >= 0 ? '选择纸品' : '选择预估时间'}}" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
<van-picker show-toolbar title="选择预估时间" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
</van-popup>
<van-popup position="bottom" show="{{ visible2 }}" bind:close="onHide" z-index="29">
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view style="width: 96rpx;" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<scroll-view scroll-y="true" style="height:480rpx;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onCateConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<notification id="qn-notification"/>

35
pages/process/outside-add/index.wxss

@ -19,3 +19,38 @@
border: 1px solid #666666;
margin-left: 12rpx
}
.van-picker__toolbar {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
height: 44px;
height: var(--picker-toolbar-height, 44px);
line-height: 44px;
line-height: var(--picker-toolbar-height, 44px)
}
.van-picker__confirm {
padding: 0 24rpx;
padding: var(--picker-action-padding, 0 24rpx);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #1989fa;
color: var(--picker-action-text-color, #1989fa)
}
.van-picker__cancel--hover,
.van-picker__confirm--hover {
background-color: #f2f3f5;
background-color: var(--picker-action-active-color, #f2f3f5)
}
.van-picker__title {
max-width: 50%;
text-align: center;
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
font-size: 16px;
font-size: var(--picker-option-font-size, 16px)
}

12
pages/process/outside-check-item/index.js

@ -12,7 +12,6 @@ Component({
item: { type: Object, value: null },
index: { type: Number, value: 0 },
list: { type: Array, value: [] },
columns: { type: Array, value: [] },
status: { type: Number, value: 0 }
},
data: {
@ -23,8 +22,9 @@ Component({
showCategory: function(){
this.setData({ visible: true })
},
onConfirm: function({detail}){
var nowItem = this.data.list[detail.index]
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
var nowItem = this.data.list[this.data.cIndex]
for (var i = 0; i < this.data.form.productCategoryInfos.length; i++) {
if (this.data.form.productCategoryInfos[i].productId == nowItem.id){
this.setData({ visible: false })
@ -36,10 +36,10 @@ Component({
this.data.item.settleUnitPrice = nowItem.defaultUnitPrice
this.data.item.highestUnitPrice = nowItem.highestUnitPrice
this.data.item.lowestUnitPrice = nowItem.lowestUnitPrice
this.data.item.productCategoryName = detail.value
this.data.item.productCategoryName = nowItem.categoryName
this.statAmount()
wx.nextTick(() => {
this.triggerEvent('change', {index: this.data.index, item: this.data.item});
this.triggerEvent('change', {index: this.data.index, item: this.data.item });
})
},
onHide: function(){
@ -80,7 +80,7 @@ Component({
} else {
this.data.item.settlePrice = null
}
this.setData({ item: this.data.item, visible: false })
this.setData({ item: this.data.item, visible: false, cIndex: this.data.cIndex })
},
changeDeductType: function(e){
this.setData({ ['item.sign']: e.currentTarget.dataset.type, focus: e.currentTarget.dataset.type })

4
pages/process/outside-check-item/index.json

@ -4,7 +4,9 @@
"van-cell": "/components/cell/index",
"van-field": "/components/field/index",
"van-checkbox": "/components/checkbox/index",
"van-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"van-uploader": "/components/uploader/index"
}

15
pages/process/outside-check-item/index.wxml

@ -79,5 +79,18 @@
</van-cell>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view class="van-picker__cancel" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<scroll-view scroll-y="true" style="height:480rpx;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ list }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>

45
pages/process/outside-check-item/index.wxss

@ -21,3 +21,48 @@
transform-origin: 50% 50%;
transform: rotate(180deg);
}
.van-picker__toolbar {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
height: 44px;
height: var(--picker-toolbar-height, 44px);
line-height: 44px;
line-height: var(--picker-toolbar-height, 44px)
}
.van-picker__cancel {
padding: 0 16px;
width: 96rpx;
padding: var(--picker-action-padding, 0 16px);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #666666;
color: var(--picker-action-text-color, #666666)
}
.van-picker__confirm {
padding: 0 24rpx;
padding: var(--picker-action-padding, 0 24rpx);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #1989fa;
color: var(--picker-action-text-color, #1989fa)
}
.van-picker__cancel--hover,
.van-picker__confirm--hover {
background-color: #f2f3f5;
background-color: var(--picker-action-active-color, #f2f3f5)
}
.van-picker__title {
max-width: 50%;
text-align: center;
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
font-size: 16px;
font-size: var(--picker-option-font-size, 16px)
}

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

@ -13,9 +13,8 @@ Scene({
*/
data: {
safeBottom: app.globalData.safeBottom,
paperList: null,
form: null,
columns: []
paperList: [],
form: null
},
/**
* 生命周期函数--监听页面加载
@ -24,12 +23,7 @@ Scene({
if(options.id){
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].name)
}
this.setData({ safeBottom: app.globalData.safeBottom, columns: this.data.columns, paperList: this.data.paperList })
this.setData({ safeBottom: app.globalData.safeBottom, paperList: result.data.records })
}).catch(err => {
this.setData({ safeBottom: app.globalData.safeBottom })
util.showToast(err)

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

@ -32,7 +32,7 @@
<view class="text-black text-sg text-bold" style="margin-left: 12rpx">纸品信息</view>
</view>
<view wx:for="{{form.productCategoryInfos}}" wx:key="index">
<outside-check-item form="{{form}}" item="{{item}}" index="{{index}}" list="{{paperList}}" columns="{{columns}}" bind:change="onProductChange"/>
<outside-check-item form="{{form}}" item="{{item}}" index="{{index}}" list="{{paperList}}" bind:change="onProductChange"/>
</view>
</view>
<view style="height:16rpx"></view>

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

@ -36,7 +36,7 @@
<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="bg-white" style="padding: 24rpx 32rpx 20rpx 32rpx" wx:if="{{status != 0 && fileList.length}}">
<view class="flex flex-justify" style="padding-bottom: 24rpx">
<view class="flex flex-center text-black">
<text>过磅凭证</text>
@ -73,7 +73,7 @@
value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" />
</view>
</van-cell> -->
<van-field id="deductWeight" value="{{ item.deductWeight || '' }}" data-type="1" type="digit" placeholder="请输入扣重重量" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" bind:click-input="changeDeductType" wx:if="{{status == 1}}">
<van-field id="deductWeight" value="{{ item.deductWeight || '' }}" data-type="1" type="digit" placeholder="请输入扣重重量(选填)" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" bind:click-input="changeDeductType" wx:if="{{status == 1}}">
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="1" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 1 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣重(公斤)</text>
@ -90,7 +90,7 @@
value="{{item.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" />
</view>
</van-cell> -->
<van-field id="deductPercent" value="{{ item.deductPercent || '' }}" type="digit" placeholder="请输入扣点比例" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" data-type="2" maxlength="10" bind:click-input="changeDeductType" wx:if="{{status == 1}}">
<van-field id="deductPercent" value="{{ item.deductPercent || '' }}" type="digit" placeholder="请输入扣点比例(选填)" clearable disabled="{{item.sign == 2}}" input-align="right" bind:change="bindInput" data-type="2" maxlength="10" bind:click-input="changeDeductType" wx:if="{{status == 1}}">
<view slot="label" class="flex flex-center text-black" style="justify-content: flex-start" data-type="2" bindtap="changeDeductType">
<van-checkbox value="{{ item.sign == 2 }}" icon-size="32rpx"></van-checkbox>
<text style="margin-left:8rpx">扣点(%)</text>

22
pages/setting/paper-detial/index.js

@ -12,7 +12,6 @@ Scene({
data: {
paperList: null,
form: {},
columns: [],
visible: false,
},
/**
@ -22,12 +21,7 @@ Scene({
if(options.id){
wx.showLoading({ title: '正在获取', mask: true })
getCategoryList().then(result => {
this.data.paperList = result.data
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].categoryName)
}
this.setData({ columns: this.data.columns })
this.setData({ paperList: result.data })
}).catch(err => {
util.showToast(err)
})
@ -41,12 +35,7 @@ Scene({
} else {
wx.showLoading({ title: '正在获取', mask: true })
getCategoryList().then(result => {
this.data.paperList = result.data
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].categoryName)
}
this.setData({ columns: this.data.columns })
this.setData({ paperList: result.data })
wx.hideLoading()
}).catch(err => {
wx.hideLoading()
@ -57,11 +46,12 @@ Scene({
chooseMethod: function(e){
this.setData({ visible: true })
},
onConfirm: function({detail}){
var nowItem = this.data.paperList[detail.index]
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
var nowItem = this.data.paperList[this.data.cIndex]
this.data.form.categoryId = nowItem.categoryId
this.data.form.categoryName = nowItem.categoryName
this.setData({ visible: false, ['form.productName']: detail.value, ['form.categoryName']: detail.value })
this.setData({ visible: false, ['form.productName']: nowItem.categoryName, ['form.categoryName']: nowItem.categoryName, cIndex: this.data.cIndex })
},
onHide: function(){
this.setData({ visible: false })

4
pages/setting/paper-detial/index.json

@ -4,7 +4,9 @@
"van-field": "/components/field/index",
"van-dialog": "/components/dialog/index",
"van-popup": "/components/popup/index",
"van-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-notice-bar": "/components/notice-bar/index",
"notification": "/pages/message/notification/index"
}

15
pages/setting/paper-detial/index.wxml

@ -19,7 +19,20 @@
</view>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view class="van-picker__cancel" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<scroll-view scroll-y="true" style="height:480rpx;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<van-dialog id="van-dialog" />
<notification id="qn-notification"/>

46
pages/setting/paper-detial/index.wxss

@ -1 +1,45 @@
/* pages/setting/paper-detial/index.wxss */
/* pages/setting/paper-detial/index.wxss */
.van-picker__toolbar {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
height: 44px;
height: var(--picker-toolbar-height, 44px);
line-height: 44px;
line-height: var(--picker-toolbar-height, 44px)
}
.van-picker__cancel {
padding: 0 16px;
width: 96rpx;
padding: var(--picker-action-padding, 0 16px);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #666666;
color: var(--picker-action-text-color, #666666)
}
.van-picker__confirm {
padding: 0 24rpx;
padding: var(--picker-action-padding, 0 24rpx);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #1989fa;
color: var(--picker-action-text-color, #1989fa)
}
.van-picker__cancel--hover,
.van-picker__confirm--hover {
background-color: #f2f3f5;
background-color: var(--picker-action-active-color, #f2f3f5)
}
.van-picker__title {
max-width: 50%;
text-align: center;
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
font-size: 16px;
font-size: var(--picker-option-font-size, 16px)
}

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

@ -15,7 +15,7 @@ Scene({
form: {},
poundInfo: null,
activeNames: ['1'],
columns: [],
paperList: [],
visible: false,
},
/**
@ -25,12 +25,7 @@ Scene({
if(options.id){
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].name)
}
this.setData({ safeBottom: app.globalData.safeBottom, columns: this.data.columns })
this.setData({ safeBottom: app.globalData.safeBottom, paperList: result.data.records })
}).catch(err => {
wx.hideLoading()
this.setData({ safeBottom: app.globalData.safeBottom })
@ -100,15 +95,10 @@ Scene({
}
},
showCategory: function(){
if(this.data.columns.length <= 0){
if(this.data.paperList.length <= 0){
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].name)
}
this.setData({ visible: true, columns: this.data.columns })
this.setData({ visible: true, paperList: result.data.records })
}).catch(err => {
util.showToast(err)
})

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

@ -8,7 +8,9 @@
"van-loading": "/components/loading/index",
"van-image": "/components/image/index",
"van-popup": "/components/popup/index",
"van-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"vehicle-keyboard": "/components/vehicle-keyboard/index",
"van-collapse": "/components/collapse/index",
"van-collapse-item": "/components/collapse-item/index",

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

@ -109,6 +109,19 @@
</submit-layout>
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" bind:change="onPlatenumber"></vehicle-keyboard>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view class="van-picker__cancel" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<scroll-view scroll-y="true" style="height:480rpx;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<notification id="qn-notification"/>

46
pages/storage/order-create/index.wxss

@ -1 +1,45 @@
/* pages/storage/index/index.wxss */
/* pages/storage/index/index.wxss */
.van-picker__toolbar {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
height: 44px;
height: var(--picker-toolbar-height, 44px);
line-height: 44px;
line-height: var(--picker-toolbar-height, 44px)
}
.van-picker__cancel {
padding: 0 16px;
width: 96rpx;
padding: var(--picker-action-padding, 0 16px);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #666666;
color: var(--picker-action-text-color, #666666)
}
.van-picker__confirm {
padding: 0 24rpx;
padding: var(--picker-action-padding, 0 24rpx);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #1989fa;
color: var(--picker-action-text-color, #1989fa)
}
.van-picker__cancel--hover,
.van-picker__confirm--hover {
background-color: #f2f3f5;
background-color: var(--picker-action-active-color, #f2f3f5)
}
.van-picker__title {
max-width: 50%;
text-align: center;
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
font-size: 16px;
font-size: var(--picker-option-font-size, 16px)
}

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

@ -17,7 +17,7 @@ Scene({
poundInfo: null,
orderInfo: null,
activeNames: [],
columns: [],
paperList: [],
visible: false,
fileList: []
},
@ -28,12 +28,7 @@ Scene({
if(options.id){
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].name)
}
this.setData({ safeBottom: app.globalData.safeBottom, columns: this.data.columns })
this.setData({ safeBottom: app.globalData.safeBottom, paperList: result.data.records })
}).catch(err => {
wx.hideLoading()
this.setData({ safeBottom: app.globalData.safeBottom })
@ -81,15 +76,10 @@ Scene({
this.setData({ activeNames: detail });
},
showCategory: function(){
if(this.data.columns.length <= 0){
if(this.data.paperList.length <= 0){
wx.showLoading({ title: '正在获取', mask: true })
getPaperList({pageNum: 1, pageSize: 100}).then(result => {
this.data.paperList = result.data.records
this.data.columns = []
for (let index = 0; index < this.data.paperList.length; index++) {
this.data.columns.push(this.data.paperList[index].name)
}
this.setData({ visible: true, columns: this.data.columns })
this.setData({ visible: true, paperList: result.data.records })
}).catch(err => {
util.showToast(err)
})
@ -100,14 +90,15 @@ Scene({
onHide: function() {
this.setData({ visible: false })
},
onConfirm: function({detail}){
this.data.nowItem = this.data.paperList[detail.index]
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
this.data.form.categoryId = this.data.nowItem.id
if(!util.isEmpty(this.data.nowItem.defaultUnitPrice) && Number(this.data.nowItem.defaultUnitPrice) > 0){
var price = math.times(this.data.nowItem.defaultUnitPrice, 1000)
this.setData({ visible: false, ['form.categoryName']: detail.value, ['form.settleUnitPrice']: price })
this.setData({ visible: false, ['form.categoryName']: this.data.nowItem.categoryName, ['form.settleUnitPrice']: price, cIndex: this.data.cIndex })
} else {
this.setData({ visible: false, ['form.categoryName']: detail.value })
this.setData({ visible: false, ['form.categoryName']: this.data.nowItem.categoryName, cIndex: this.data.cIndex })
}
},
bindInput: function (e) {

4
pages/storage/order-settlement/index.json

@ -8,7 +8,9 @@
"van-uploader": "/components/uploader/index",
"van-collapse": "/components/collapse/index",
"van-collapse-item": "/components/collapse-item/index",
"van-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"van-dialog": "/components/dialog/index",
"submit-layout": "/components/submit-layout/index",

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

@ -155,7 +155,20 @@
</submit-layout>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="选择纸品" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class">
<view class="van-picker__cancel" hover-stay-time="70"></view>
<view class="van-picker__title van-ellipsis">选择纸品</view>
<view class="van-picker__confirm flex flex-cener" hover-class="van-picker__confirm--hover" hover-stay-time="70" bindtap="onHide">
<van-icon name="cross" size="24" color="#999999" />
</view>
</view>
<scroll-view scroll-y="true" style="height:480rpx;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx">
<van-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:208rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<van-dialog id="van-dialog" />
<notification id="qn-notification"/>

46
pages/storage/order-settlement/index.wxss

@ -1 +1,45 @@
/* pages/storage/index/index.wxss */
/* pages/storage/index/index.wxss */
.van-picker__toolbar {
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-between;
justify-content: space-between;
height: 44px;
height: var(--picker-toolbar-height, 44px);
line-height: 44px;
line-height: var(--picker-toolbar-height, 44px)
}
.van-picker__cancel {
padding: 0 16px;
width: 96rpx;
padding: var(--picker-action-padding, 0 16px);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #666666;
color: var(--picker-action-text-color, #666666)
}
.van-picker__confirm {
padding: 0 24rpx;
padding: var(--picker-action-padding, 0 24rpx);
font-size: 14px;
font-size: var(--picker-action-font-size, 14px);
color: #1989fa;
color: var(--picker-action-text-color, #1989fa)
}
.van-picker__cancel--hover,
.van-picker__confirm--hover {
background-color: #f2f3f5;
background-color: var(--picker-action-active-color, #f2f3f5)
}
.van-picker__title {
max-width: 50%;
text-align: center;
font-weight: 500;
font-weight: var(--font-weight-bold, 500);
font-size: 16px;
font-size: var(--picker-option-font-size, 16px)
}
Loading…
Cancel
Save