Browse Source

no message

feature/v2.3
xpz2018 4 years ago
parent
commit
ee395d8204
28 changed files with 71 additions and 250 deletions
  1. 22
      pages/process/order-add/index.js
  2. 5
      pages/process/order-add/index.json
  3. 17
      pages/process/order-add/index.wxml
  4. 11
      pages/process/order-check/index.js
  5. 5
      pages/process/order-check/index.json
  6. 17
      pages/process/order-check/index.wxml
  7. 11
      pages/process/order-price/index.js
  8. 5
      pages/process/order-price/index.json
  9. 17
      pages/process/order-price/index.wxml
  10. 11
      pages/process/outside-add/index.js
  11. 3
      pages/process/outside-add/index.json
  12. 17
      pages/process/outside-add/index.wxml
  13. 25
      pages/process/outside-check-item/index.js
  14. 5
      pages/process/outside-check-item/index.json
  15. 17
      pages/process/outside-check-item/index.wxml
  16. 4
      pages/process/payment/index.js
  17. 2
      pages/process/payment/index.wxml
  18. 13
      pages/setting/paper-detial/index.js
  19. 5
      pages/setting/paper-detial/index.json
  20. 18
      pages/setting/paper-detial/index.wxml
  21. 4
      pages/setting/paper-select/index.js
  22. 10
      pages/setting/paper-select/index.wxml
  23. 15
      pages/storage/order-create/index.js
  24. 5
      pages/storage/order-create/index.json
  25. 17
      pages/storage/order-create/index.wxml
  26. 19
      pages/storage/order-settlement/index.js
  27. 4
      pages/storage/order-settlement/index.json
  28. 17
      pages/storage/order-settlement/index.wxml

22
pages/process/order-add/index.js

@ -60,27 +60,21 @@ Scene({
showCategory: function(){ showCategory: function(){
this.setData({ visible: true }) this.setData({ visible: true })
}, },
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
if(this.data.form.productId == this.data.nowItem.id){
this.onHide()
onSelect: function({detail}){
this.data.nowItem = detail
if(this.data.form.productId == detail.id){
return return
} }
this.data.form.productId = this.data.nowItem.id
// this.data.form.unitPrice = this.data.nowItem.defaultUnitPrice
this.data.form.konePrice = '指导价格:' + this.data.nowItem.defaultUnitPrice
this.data.form.productId = detail.id
this.data.form.konePrice = '指导价格:' + detail.defaultUnitPrice
this.data.form.unitPrice = '' this.data.form.unitPrice = ''
this.data.form.productName = this.data.nowItem.name
this.data.form.productName = detail.name
if(util.isEmpty(this.data.form.netWeight) || Number(this.data.form.netWeight) <= 0){ if(util.isEmpty(this.data.form.netWeight) || Number(this.data.form.netWeight) <= 0){
this.setData({ visible: false, form: this.data.form, amout: null })
this.setData({ form: this.data.form, amout: null })
return return
} }
this.statAmount() this.statAmount()
}, },
onHide: function(){
this.setData({ visible: false })
},
changeDeductType: function(e){ changeDeductType: function(e){
var type = Number(e.currentTarget.dataset.type) var type = Number(e.currentTarget.dataset.type)
this.setData({ ['form.deductType']: type, focus: type }) this.setData({ ['form.deductType']: type, focus: type })
@ -126,7 +120,7 @@ Scene({
} else { } else {
this.data.amout = null this.data.amout = null
} }
this.setData({ visible: false, form: this.data.form, amout: this.data.amout, cIndex: this.data.cIndex })
this.setData({ form: this.data.form, amout: this.data.amout })
}, },
fileChange: function({detail}){ fileChange: function({detail}){
this.data.imageList = detail.fileList this.data.imageList = detail.fileList

5
pages/process/order-add/index.json

@ -6,10 +6,7 @@
"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-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"paper-select": "/pages/setting/paper-select/index",
"vehicle-keyboard": "/components/vehicle-keyboard/index", "vehicle-keyboard": "/components/vehicle-keyboard/index",
"submit-layout": "/components/submit-layout/index", "submit-layout": "/components/submit-layout/index",
"vip-dialog": "/pages/message/vip-dialog/index", "vip-dialog": "/pages/message/vip-dialog/index",

17
pages/process/order-add/index.wxml

@ -86,22 +86,7 @@
</submit-layout> </submit-layout>
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard> <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">
<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.name}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<paper-select visible="{{visible}}" paper-list="{{paperList}}" bind:select="onSelect"></paper-select>
<vip-dialog id="vip-dialog"/> <vip-dialog id="vip-dialog"/>
<notification id="qn-notification"/> <notification id="qn-notification"/>

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

@ -76,11 +76,9 @@ Scene({
showCategory: function(){ showCategory: function(){
this.setData({ visible: true }) this.setData({ visible: true })
}, },
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
onSelect: function({detail}){
this.data.nowItem = detail
if(this.data.form.productId == this.data.nowItem.id){ if(this.data.form.productId == this.data.nowItem.id){
this.onHide()
return return
} }
this.data.form.productId = this.data.nowItem.id this.data.form.productId = this.data.nowItem.id
@ -90,9 +88,6 @@ Scene({
this.data.form.productName = this.data.nowItem.name this.data.form.productName = this.data.nowItem.name
this.statAmount() this.statAmount()
}, },
onHide: function(){
this.setData({ visible: false })
},
changeDeductType: function(e){ changeDeductType: function(e){
var type = Number(e.currentTarget.dataset.type) var type = Number(e.currentTarget.dataset.type)
this.setData({ ['form.deductType']: type, focus: type }) this.setData({ ['form.deductType']: type, focus: type })
@ -131,7 +126,7 @@ Scene({
} else { } else {
this.data.amout = null this.data.amout = null
} }
this.setData({ visible: false, form: this.data.form, amout: this.data.amout, cIndex: this.data.cIndex })
this.setData({ form: this.data.form, amout: this.data.amout })
}, },
checkOrder: function(){ checkOrder: function(){
if(util.isEmpty(this.data.form.productId) || Number(this.data.form.productId) <= 0){ if(util.isEmpty(this.data.form.productId) || Number(this.data.form.productId) <= 0){

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

@ -6,10 +6,7 @@
"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-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"paper-select": "/pages/setting/paper-select/index",
"vehicle-keyboard": "/components/vehicle-keyboard/index", "vehicle-keyboard": "/components/vehicle-keyboard/index",
"submit-layout": "/components/submit-layout/index", "submit-layout": "/components/submit-layout/index",
"vip-dialog": "/pages/message/vip-dialog/index", "vip-dialog": "/pages/message/vip-dialog/index",

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

@ -118,22 +118,7 @@
</submit-layout> </submit-layout>
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard> <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">
<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.name}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<paper-select visible="{{visible}}" paper-list="{{paperList}}" bind:select="onSelect"></paper-select>
<vip-dialog id="vip-dialog"/> <vip-dialog id="vip-dialog"/>
<notification id="qn-notification"/> <notification id="qn-notification"/>

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

@ -92,23 +92,18 @@ Scene({
showCategory: function(){ showCategory: function(){
this.setData({ visible: true }) this.setData({ visible: true })
}, },
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
onSelect: function({detail}){
this.data.nowItem = detail
if(this.data.form.productId == this.data.nowItem.id){ if(this.data.form.productId == this.data.nowItem.id){
this.onHide()
return return
} }
this.data.form.productId = this.data.nowItem.id this.data.form.productId = this.data.nowItem.id
var konePrice = '指导价格:' + this.data.nowItem.defaultUnitPrice var konePrice = '指导价格:' + this.data.nowItem.defaultUnitPrice
this.setData({ visible: false, ['form.productName']: this.data.nowItem.name, ['form.unitPrice']: '', konePrice, cIndex: this.data.cIndex })
this.setData({ ['form.productName']: this.data.nowItem.name, ['form.unitPrice']: '', konePrice })
}, },
loop: function(){ loop: function(){
return false return false
}, },
onHide: function(){
this.setData({ visible: false })
},
changeDeductType: function(e){ changeDeductType: function(e){
var type = Number(e.currentTarget.dataset.type) var type = Number(e.currentTarget.dataset.type)
this.setData({ ['form.deductType']: type, focus: type }) this.setData({ ['form.deductType']: type, focus: type })

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

@ -5,10 +5,7 @@
"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-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"paper-select": "/pages/setting/paper-select/index",
"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",

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

@ -156,22 +156,7 @@
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" plateList="{{plateList}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard> <vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" plateList="{{plateList}}" triplet="{{1}}" bind:change="onPlatenumber"></vehicle-keyboard>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class" catchtouchmove="loop">
<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" catchtouchmove="loop">
<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.name}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<paper-select visible="{{visible}}" paper-list="{{paperList}}" bind:select="onSelect"></paper-select>
<vip-dialog id="vip-dialog"/> <vip-dialog id="vip-dialog"/>
<notification id="qn-notification"/> <notification id="qn-notification"/>

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

@ -107,11 +107,9 @@ Scene({
onConfirm: function({detail}){ onConfirm: function({detail}){
this.setData({ visible: false, ['form.predictDeliveryToFactoryTime']: (detail.value[0] + ' ' + detail.value[1]) }) 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]
onSelect: function({detail}){
var nowItem = detail
if(nowItem.id == this.data.form.productCategoryInfos[this.data.cateIndex].productId){ if(nowItem.id == this.data.form.productCategoryInfos[this.data.cateIndex].productId){
this.setData({ visible2: false })
return return
} }
for (var index = 0; index < this.data.form.productCategoryInfos.length; index++) { for (var index = 0; index < this.data.form.productCategoryInfos.length; index++) {
@ -124,10 +122,7 @@ Scene({
var product = {productId: nowItem.id, productCategoryName: nowItem.name, unitPrice: '', konePrice} var product = {productId: nowItem.id, productCategoryName: nowItem.name, unitPrice: '', konePrice}
product.highestUnitPrice = nowItem.highestUnitPrice product.highestUnitPrice = nowItem.highestUnitPrice
product.lowestUnitPrice = nowItem.lowestUnitPrice product.lowestUnitPrice = nowItem.lowestUnitPrice
this.setData({ visible2: false, ['form.productCategoryInfos[' + this.data.cateIndex + ']']: product })
},
onHide: function(){
this.setData({ visible: false, visible2: false })
this.setData({ ['form.productCategoryInfos[' + this.data.cateIndex + ']']: product })
}, },
bindInput: function (e) { bindInput: function (e) {
this.data.form.productCategoryInfos[e.currentTarget.dataset.index].unitPrice = e.detail this.data.form.productCategoryInfos[e.currentTarget.dataset.index].unitPrice = e.detail

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

@ -7,8 +7,7 @@
"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-picker": "/components/picker/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"paper-select": "/pages/setting/paper-select/index",
"van-icon": "/components/icon/index", "van-icon": "/components/icon/index",
"van-popup": "/components/popup/index", "van-popup": "/components/popup/index",
"van-dialog": "/components/dialog/index", "van-dialog": "/components/dialog/index",

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

@ -94,22 +94,7 @@
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29"> <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-picker show-toolbar title="选择预估时间" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
</van-popup> </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.name}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<paper-select visible="{{visible2}}" paper-list="{{paperList}}" bind:select="onSelect"></paper-select>
<vip-dialog id="vip-dialog"/> <vip-dialog id="vip-dialog"/>
<notification id="qn-notification"/> <notification id="qn-notification"/>

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

@ -22,34 +22,27 @@ Component({
showCategory: function(){ showCategory: function(){
this.setData({ visible: true }) this.setData({ visible: true })
}, },
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
var nowItem = this.data.list[this.data.cIndex]
if(this.data.item.productId == nowItem.id){
this.onHide()
onSelect: function({detail}){
if(this.data.item.productId == detail.id){
return return
} }
for (var i = 0; i < this.data.form.productCategoryInfos.length; i++) { for (var i = 0; i < this.data.form.productCategoryInfos.length; i++) {
if (this.data.form.productCategoryInfos[i].productId == nowItem.id){
this.setData({ visible: false })
if (this.data.form.productCategoryInfos[i].productId == detail.id){
util.showToast('纸品已经存在,请不要重复添加') util.showToast('纸品已经存在,请不要重复添加')
return return
} }
} }
this.data.item.productId = nowItem.id
this.data.item.productId = detail.id
this.data.item.settleUnitPrice = '' this.data.item.settleUnitPrice = ''
this.data.item.konePrice = '指导价格:' + nowItem.defaultUnitPrice
this.data.item.highestUnitPrice = nowItem.highestUnitPrice
this.data.item.lowestUnitPrice = nowItem.lowestUnitPrice
this.data.item.productCategoryName = nowItem.name
this.data.item.konePrice = '指导价格:' + detail.defaultUnitPrice
this.data.item.highestUnitPrice = detail.highestUnitPrice
this.data.item.lowestUnitPrice = detail.lowestUnitPrice
this.data.item.productCategoryName = detail.name
this.statAmount() this.statAmount()
wx.nextTick(() => { 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(){
this.setData({ visible: false })
},
bindInput: function (e) { bindInput: function (e) {
this.data.item[e.currentTarget.id] = e.detail this.data.item[e.currentTarget.id] = e.detail
if(e.currentTarget.id == 'deductPercent'){ if(e.currentTarget.id == 'deductPercent'){
@ -85,7 +78,7 @@ Component({
} else { } else {
this.data.item.settlePrice = null this.data.item.settlePrice = null
} }
this.setData({ item: this.data.item, visible: false, cIndex: this.data.cIndex })
this.setData({ item: this.data.item, cIndex: this.data.cIndex })
}, },
changeDeductType: function(e){ changeDeductType: function(e){
var type = Number(e.currentTarget.dataset.type) var type = Number(e.currentTarget.dataset.type)

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

@ -5,10 +5,7 @@
"van-field": "/components/field/index", "van-field": "/components/field/index",
"van-button": "/components/button/index", "van-button": "/components/button/index",
"van-checkbox": "/components/checkbox/index", "van-checkbox": "/components/checkbox/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"paper-select": "/pages/setting/paper-select/index",
"van-uploader": "/components/uploader/index" "van-uploader": "/components/uploader/index"
} }
} }

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

@ -78,19 +78,4 @@
</view> </view>
</van-cell> </van-cell>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<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.name}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<paper-select visible="{{visible}}" paper-list="{{paperList}}" bind:select="onSelect"></paper-select>

4
pages/process/payment/index.js

@ -175,7 +175,9 @@ Scene({
agentPayment: function(settleType){ agentPayment: function(settleType){
wx.showLoading({ title: '正在处理', mask: true }) wx.showLoading({ title: '正在处理', mask: true })
this.data.requesting = true this.data.requesting = true
if(this.data.imageList && this.data.imageList.length){
this.data.params.paymentImageList = this.data.imageList
}
this.data.params.settleType = Number(settleType) this.data.params.settleType = Number(settleType)
paymentOrder(this.data.params).then(result => { paymentOrder(this.data.params).then(result => {
wx.hideLoading() wx.hideLoading()

2
pages/process/payment/index.wxml

@ -71,7 +71,7 @@
<view class="flex flex-center text-black">支付凭证</view> <view class="flex flex-center text-black">支付凭证</view>
<text class="text-gray">6张以内,每张图片大小限制5M</text> <text class="text-gray">6张以内,每张图片大小限制5M</text>
</view> </view>
<van-uploader file-list="{{ imageList }}" multiple max-count="6" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />
<van-uploader multiple max-count="6" max-size="{{1024 * 1024 * 5}}" bind:file-change="fileChange" />
</view> </view>
<view style="height:16rpx" wx:if="{{orderList}}"></view> <view style="height:16rpx" wx:if="{{orderList}}"></view>

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

@ -46,15 +46,10 @@ Scene({
chooseMethod: function(e){ chooseMethod: function(e){
this.setData({ visible: true }) this.setData({ visible: true })
}, },
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.name
this.setData({ visible: false, ['form.productName']: nowItem.name, ['form.categoryName']: nowItem.categoryName, cIndex: this.data.cIndex })
},
onHide: function(){
this.setData({ visible: false })
onSelect: function({detail}){
this.data.form.categoryId = detail.categoryId
this.data.form.categoryName = detail.categoryName
this.setData({ ['form.productName']: detail.categoryName, ['form.categoryName']: detail.categoryName })
}, },
bindInput: function(e){ bindInput: function(e){
this.data.form[e.currentTarget.id] = e.detail this.data.form[e.currentTarget.id] = e.detail

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

@ -3,10 +3,7 @@
"van-button": "/components/button/index", "van-button": "/components/button/index",
"van-field": "/components/field/index", "van-field": "/components/field/index",
"van-dialog": "/components/dialog/index", "van-dialog": "/components/dialog/index",
"van-popup": "/components/popup/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"paper-select": "/pages/setting/paper-select/index",
"van-notice-bar": "/components/notice-bar/index", "van-notice-bar": "/components/notice-bar/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"
} }

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

@ -18,21 +18,7 @@
<van-button block type="info" bind:click="submitForm">保存</van-button> <van-button block type="info" bind:click="submitForm">保存</van-button>
</view> </view>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<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>
<paper-select visible="{{visible}}" paper-list="{{paperList}}" bind:select="onSelect"></paper-select>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
<notification id="qn-notification"/> <notification id="qn-notification"/>

4
pages/setting/paper-select/index.js

@ -20,8 +20,8 @@ Component({
this.data.cIndex = e.currentTarget.dataset.index this.data.cIndex = e.currentTarget.dataset.index
var item = this.data.paperList[this.data.cIndex] var item = this.data.paperList[this.data.cIndex]
wx.nextTick(() => { wx.nextTick(() => {
this.setData({ visible: false })
this.triggerEvent('select', {index: this.data.cIndex, item })
this.setData({ visible: false, cIndex: this.data.cIndex })
this.triggerEvent('select', item)
}) })
}, },
onHide: function(){ onHide: function(){

10
pages/setting/paper-select/index.wxml

@ -6,16 +6,16 @@
<van-icon name="cross" size="24" color="#999999" /> <van-icon name="cross" size="24" color="#999999" />
</view> </view>
</view> </view>
<view class="flex" style="height:480rpx;">
<scroll-view scroll-y class="van-tree-select__nav" style="height:100%;flex: 1">
<view class="flex" style="height:580rpx;">
<scroll-view scroll-y class="van-tree-select__nav" style="height:100%;width: 200rpx;">
<van-sidebar active-key="{{ activeIndex }}" bind:change="onClickNav" custom-class="van-tree-select__nav__inner"> <van-sidebar active-key="{{ activeIndex }}" bind:change="onClickNav" custom-class="van-tree-select__nav__inner">
<van-sidebar-item wx:for="{{ items }}" wx:key="index" title="{{ item.text }}" /> <van-sidebar-item wx:for="{{ items }}" wx:key="index" title="{{ item.text }}" />
</van-sidebar> </van-sidebar>
</scroll-view> </scroll-view>
<scroll-view scroll-y="true" style="height:100%;flex: 2;padding: 12rpx 0rpx">
<van-grid column-num="3" border="{{fasle}}">
<scroll-view scroll-y="true" style="height:100%;flex: 1;padding: 12rpx 0rpx">
<van-grid column-num="2" border="{{fasle}}">
<van-grid-item use-slot wx:for="{{ paperList }}" wx:key="index" content-style="padding:12rpx"> <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-button plain type="{{index == cIndex ? 'info' : 'default'}}" custom-style="height:88rpx;width:228rpx;padding: 0rpx" data-index="{{index}}" bind:click="onConfirm">{{item.categoryName}}</van-button>
</van-grid-item> </van-grid-item>
</van-grid> </van-grid>
</scroll-view> </scroll-view>

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

@ -17,7 +17,6 @@ Scene({
activeNames: ['1'], activeNames: ['1'],
paperList: [], paperList: [],
visible: false, visible: false,
cIndex: -1,
imageList: [] imageList: []
}, },
/** /**
@ -123,12 +122,10 @@ Scene({
onHide: function() { onHide: function() {
this.setData({ visible: false }) this.setData({ visible: false })
}, },
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.productName = this.data.nowItem.name
this.data.form.konePrice = '指导价格:' + math.times(this.data.nowItem.defaultUnitPrice, 1000)
onSelect: function({detail}){
this.data.form.productId = detail.id
this.data.form.productName = detail.name
this.data.form.konePrice = '指导价格:' + math.times(detail.defaultUnitPrice, 1000)
this.data.form.unitPrice = '' this.data.form.unitPrice = ''
this.statAmount() this.statAmount()
}, },
@ -146,7 +143,7 @@ Scene({
}, },
statAmount: function(){ statAmount: function(){
if(util.isEmpty(this.data.form.netWeight) && util.isEmpty(this.data.poundInfo)){ if(util.isEmpty(this.data.form.netWeight) && util.isEmpty(this.data.poundInfo)){
this.setData({ visible: false, form: this.data.form, cIndex: this.data.cIndex })
this.setData({ visible: false, form: this.data.form })
return return
} }
this.data.form.settleWeight = this.data.form.netWeight this.data.form.settleWeight = this.data.form.netWeight
@ -157,7 +154,7 @@ Scene({
} else { } else {
this.data.form.estimatedAmount = null this.data.form.estimatedAmount = null
} }
this.setData({ visible: false, form: this.data.form, cIndex: this.data.cIndex })
this.setData({ visible: false, form: this.data.form })
}, },
onInputChange: function(e){ onInputChange: function(e){
this.data.form[e.currentTarget.id] = e.detail this.data.form[e.currentTarget.id] = e.detail

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

@ -7,10 +7,7 @@
"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-popup": "/components/popup/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index",
"paper-select": "/pages/setting/paper-select/index",
"vehicle-keyboard": "/components/vehicle-keyboard/index", "vehicle-keyboard": "/components/vehicle-keyboard/index",
"van-collapse": "/components/collapse/index", "van-collapse": "/components/collapse/index",
"van-collapse-item": "/components/collapse-item/index", "van-collapse-item": "/components/collapse-item/index",

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

@ -130,22 +130,7 @@
<van-button type="info" custom-style="height:88rpx;width:680rpx" bind:click="submitForm">提交</van-button> <van-button type="info" custom-style="height:88rpx;width:680rpx" bind:click="submitForm">提交</van-button>
</submit-layout> </submit-layout>
<vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" bind:change="onPlatenumber"></vehicle-keyboard> <vehicle-keyboard id="wux-keyboard" safeBottom="{{safeBottom}}" bind:change="onPlatenumber"></vehicle-keyboard>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<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.name}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<paper-select visible="{{visible}}" paper-list="{{paperList}}" bind:select="onSelect"></paper-select>
<vip-dialog id="vip-dialog"/> <vip-dialog id="vip-dialog"/>
<notification id="qn-notification"/> <notification id="qn-notification"/>

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

@ -110,24 +110,19 @@ Scene({
onHide: function() { onHide: function() {
this.setData({ visible: false }) this.setData({ visible: false })
}, },
onConfirm: function(e){
this.data.cIndex = e.currentTarget.dataset.index
this.data.nowItem = this.data.paperList[this.data.cIndex]
if(this.data.form.categoryId == this.data.nowItem.id){
this.setData({ visible: false })
onSelect: function({detail}){
if(this.data.form.categoryId == detail.id){
return return
} }
this.data.form.categoryId = this.data.nowItem.id
if(!util.isEmpty(this.data.nowItem.defaultUnitPrice) && Number(this.data.nowItem.defaultUnitPrice) > 0){
this.data.form.categoryId = detail.id
if(!util.isEmpty(detail.defaultUnitPrice) && Number(detail.defaultUnitPrice) > 0){
this.setData({ this.setData({
visible: false,
['form.categoryName']: this.data.nowItem.name,
['form.categoryName']: detail.name,
['form.settleUnitPrice']: '', ['form.settleUnitPrice']: '',
['form.konePrice']: '指导价格:' + math.times(this.data.nowItem.defaultUnitPrice, 1000),
cIndex: this.data.cIndex
['form.konePrice']: '指导价格:' + math.times(detail.defaultUnitPrice, 1000),
}) })
} else { } else {
this.setData({ visible: false, ['form.categoryName']: this.data.nowItem.name, cIndex: this.data.cIndex })
this.setData({ ['form.categoryName']: detail.name })
} }
}, },
bindInput: function (e) { bindInput: function (e) {

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

@ -8,10 +8,8 @@
"van-uploader": "/components/uploader/index", "van-uploader": "/components/uploader/index",
"van-collapse": "/components/collapse/index", "van-collapse": "/components/collapse/index",
"van-collapse-item": "/components/collapse-item/index", "van-collapse-item": "/components/collapse-item/index",
"van-grid": "/components/grid/index",
"van-grid-item": "/components/grid-item/index",
"van-icon": "/components/icon/index", "van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"paper-select": "/pages/setting/paper-select/index",
"van-dialog": "/components/dialog/index", "van-dialog": "/components/dialog/index",
"submit-layout": "/components/submit-layout/index", "submit-layout": "/components/submit-layout/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"

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

@ -157,21 +157,6 @@
<van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="settlementForm">确认收款</van-button> <van-button type="info" custom-style="margin-left:32rpx;height:88rpx;width:400rpx" bind:click="settlementForm">确认收款</van-button>
</submit-layout> </submit-layout>
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<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.name}}</van-button>
</van-grid-item>
</van-grid>
</scroll-view>
</van-popup>
<paper-select visible="{{visible}}" paper-list="{{paperList}}" bind:select="onSelect"/>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
<notification id="qn-notification"/> <notification id="qn-notification"/>
Loading…
Cancel
Save