diff --git a/pages/process/order-add/index.js b/pages/process/order-add/index.js
index 32eb877..9d27d1d 100644
--- a/pages/process/order-add/index.js
+++ b/pages/process/order-add/index.js
@@ -60,27 +60,21 @@ Scene({
showCategory: function(){
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
}
- 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.productName = this.data.nowItem.name
+ this.data.form.productName = detail.name
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
}
this.statAmount()
},
- onHide: function(){
- this.setData({ visible: false })
- },
changeDeductType: function(e){
var type = Number(e.currentTarget.dataset.type)
this.setData({ ['form.deductType']: type, focus: type })
@@ -126,7 +120,7 @@ Scene({
} else {
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}){
this.data.imageList = detail.fileList
diff --git a/pages/process/order-add/index.json b/pages/process/order-add/index.json
index 1b50c29..f5a599e 100644
--- a/pages/process/order-add/index.json
+++ b/pages/process/order-add/index.json
@@ -6,10 +6,7 @@
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/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",
"submit-layout": "/components/submit-layout/index",
"vip-dialog": "/pages/message/vip-dialog/index",
diff --git a/pages/process/order-add/index.wxml b/pages/process/order-add/index.wxml
index 5d7a403..eaa99a8 100644
--- a/pages/process/order-add/index.wxml
+++ b/pages/process/order-add/index.wxml
@@ -86,22 +86,7 @@
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
+
\ No newline at end of file
diff --git a/pages/process/order-check/index.js b/pages/process/order-check/index.js
index 0da3ae8..5c0c0e2 100644
--- a/pages/process/order-check/index.js
+++ b/pages/process/order-check/index.js
@@ -76,11 +76,9 @@ Scene({
showCategory: function(){
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){
- this.onHide()
return
}
this.data.form.productId = this.data.nowItem.id
@@ -90,9 +88,6 @@ Scene({
this.data.form.productName = this.data.nowItem.name
this.statAmount()
},
- onHide: function(){
- this.setData({ visible: false })
- },
changeDeductType: function(e){
var type = Number(e.currentTarget.dataset.type)
this.setData({ ['form.deductType']: type, focus: type })
@@ -131,7 +126,7 @@ Scene({
} else {
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(){
if(util.isEmpty(this.data.form.productId) || Number(this.data.form.productId) <= 0){
diff --git a/pages/process/order-check/index.json b/pages/process/order-check/index.json
index 5a9516c..fb2defa 100644
--- a/pages/process/order-check/index.json
+++ b/pages/process/order-check/index.json
@@ -6,10 +6,7 @@
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/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",
"submit-layout": "/components/submit-layout/index",
"vip-dialog": "/pages/message/vip-dialog/index",
diff --git a/pages/process/order-check/index.wxml b/pages/process/order-check/index.wxml
index 6c5536a..c817bc5 100644
--- a/pages/process/order-check/index.wxml
+++ b/pages/process/order-check/index.wxml
@@ -118,22 +118,7 @@
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
+
\ No newline at end of file
diff --git a/pages/process/order-price/index.js b/pages/process/order-price/index.js
index 89894a8..22726e9 100644
--- a/pages/process/order-price/index.js
+++ b/pages/process/order-price/index.js
@@ -92,23 +92,18 @@ Scene({
showCategory: function(){
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){
- this.onHide()
return
}
this.data.form.productId = this.data.nowItem.id
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(){
return false
},
- onHide: function(){
- this.setData({ visible: false })
- },
changeDeductType: function(e){
var type = Number(e.currentTarget.dataset.type)
this.setData({ ['form.deductType']: type, focus: type })
diff --git a/pages/process/order-price/index.json b/pages/process/order-price/index.json
index 868b5c8..5aa26e3 100644
--- a/pages/process/order-price/index.json
+++ b/pages/process/order-price/index.json
@@ -5,10 +5,7 @@
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/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-field": "/components/field/index",
"van-switch": "/components/switch/index",
diff --git a/pages/process/order-price/index.wxml b/pages/process/order-price/index.wxml
index c38b192..8062b0e 100644
--- a/pages/process/order-price/index.wxml
+++ b/pages/process/order-price/index.wxml
@@ -156,22 +156,7 @@
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
+
\ No newline at end of file
diff --git a/pages/process/outside-add/index.js b/pages/process/outside-add/index.js
index 7469c83..332302a 100644
--- a/pages/process/outside-add/index.js
+++ b/pages/process/outside-add/index.js
@@ -107,11 +107,9 @@ Scene({
onConfirm: function({detail}){
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){
- this.setData({ visible2: false })
return
}
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}
product.highestUnitPrice = nowItem.highestUnitPrice
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) {
this.data.form.productCategoryInfos[e.currentTarget.dataset.index].unitPrice = e.detail
diff --git a/pages/process/outside-add/index.json b/pages/process/outside-add/index.json
index cc7fee0..e390cf7 100644
--- a/pages/process/outside-add/index.json
+++ b/pages/process/outside-add/index.json
@@ -7,8 +7,7 @@
"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",
+ "paper-select": "/pages/setting/paper-select/index",
"van-icon": "/components/icon/index",
"van-popup": "/components/popup/index",
"van-dialog": "/components/dialog/index",
diff --git a/pages/process/outside-add/index.wxml b/pages/process/outside-add/index.wxml
index 26c24a7..38d1f08 100644
--- a/pages/process/outside-add/index.wxml
+++ b/pages/process/outside-add/index.wxml
@@ -94,22 +94,7 @@
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
+
\ No newline at end of file
diff --git a/pages/process/outside-check-item/index.js b/pages/process/outside-check-item/index.js
index 174fb44..6eb2970 100644
--- a/pages/process/outside-check-item/index.js
+++ b/pages/process/outside-check-item/index.js
@@ -22,34 +22,27 @@ Component({
showCategory: function(){
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
}
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('纸品已经存在,请不要重复添加')
return
}
}
- this.data.item.productId = nowItem.id
+ this.data.item.productId = detail.id
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()
wx.nextTick(() => {
this.triggerEvent('change', {index: this.data.index, item: this.data.item });
})
},
- onHide: function(){
- this.setData({ visible: false })
- },
bindInput: function (e) {
this.data.item[e.currentTarget.id] = e.detail
if(e.currentTarget.id == 'deductPercent'){
@@ -85,7 +78,7 @@ Component({
} else {
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){
var type = Number(e.currentTarget.dataset.type)
diff --git a/pages/process/outside-check-item/index.json b/pages/process/outside-check-item/index.json
index b39a924..824d1d8 100644
--- a/pages/process/outside-check-item/index.json
+++ b/pages/process/outside-check-item/index.json
@@ -5,10 +5,7 @@
"van-field": "/components/field/index",
"van-button": "/components/button/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"
}
}
\ No newline at end of file
diff --git a/pages/process/outside-check-item/index.wxml b/pages/process/outside-check-item/index.wxml
index fb050e9..9c8a0af 100644
--- a/pages/process/outside-check-item/index.wxml
+++ b/pages/process/outside-check-item/index.wxml
@@ -78,19 +78,4 @@
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/pages/process/payment/index.js b/pages/process/payment/index.js
index af6d0e5..fcbcedc 100644
--- a/pages/process/payment/index.js
+++ b/pages/process/payment/index.js
@@ -175,7 +175,9 @@ Scene({
agentPayment: function(settleType){
wx.showLoading({ title: '正在处理', mask: 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)
paymentOrder(this.data.params).then(result => {
wx.hideLoading()
diff --git a/pages/process/payment/index.wxml b/pages/process/payment/index.wxml
index 95a827d..05e19a2 100644
--- a/pages/process/payment/index.wxml
+++ b/pages/process/payment/index.wxml
@@ -71,7 +71,7 @@
支付凭证
6张以内,每张图片大小限制5M
-
+
diff --git a/pages/setting/paper-detial/index.js b/pages/setting/paper-detial/index.js
index 134a103..ad64d09 100644
--- a/pages/setting/paper-detial/index.js
+++ b/pages/setting/paper-detial/index.js
@@ -46,15 +46,10 @@ Scene({
chooseMethod: function(e){
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){
this.data.form[e.currentTarget.id] = e.detail
diff --git a/pages/setting/paper-detial/index.json b/pages/setting/paper-detial/index.json
index 4ab7fbc..9c8e53a 100644
--- a/pages/setting/paper-detial/index.json
+++ b/pages/setting/paper-detial/index.json
@@ -3,10 +3,7 @@
"van-button": "/components/button/index",
"van-field": "/components/field/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",
"notification": "/pages/message/notification/index"
}
diff --git a/pages/setting/paper-detial/index.wxml b/pages/setting/paper-detial/index.wxml
index c9f1fd1..d8f2169 100644
--- a/pages/setting/paper-detial/index.wxml
+++ b/pages/setting/paper-detial/index.wxml
@@ -18,21 +18,7 @@
保存
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.categoryName}}
-
-
-
-
+
+
\ No newline at end of file
diff --git a/pages/setting/paper-select/index.js b/pages/setting/paper-select/index.js
index 423e05c..28d35c2 100644
--- a/pages/setting/paper-select/index.js
+++ b/pages/setting/paper-select/index.js
@@ -20,8 +20,8 @@ Component({
this.data.cIndex = e.currentTarget.dataset.index
var item = this.data.paperList[this.data.cIndex]
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(){
diff --git a/pages/setting/paper-select/index.wxml b/pages/setting/paper-select/index.wxml
index fd3d746..3d8d32a 100644
--- a/pages/setting/paper-select/index.wxml
+++ b/pages/setting/paper-select/index.wxml
@@ -6,16 +6,16 @@
-
-
+
+
-
-
+
+
- {{item.categoryName}}
+ {{item.categoryName}}
diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js
index b912c44..644a18d 100644
--- a/pages/storage/order-create/index.js
+++ b/pages/storage/order-create/index.js
@@ -17,7 +17,6 @@ Scene({
activeNames: ['1'],
paperList: [],
visible: false,
- cIndex: -1,
imageList: []
},
/**
@@ -123,12 +122,10 @@ Scene({
onHide: function() {
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.statAmount()
},
@@ -146,7 +143,7 @@ Scene({
},
statAmount: function(){
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
}
this.data.form.settleWeight = this.data.form.netWeight
@@ -157,7 +154,7 @@ Scene({
} else {
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){
this.data.form[e.currentTarget.id] = e.detail
diff --git a/pages/storage/order-create/index.json b/pages/storage/order-create/index.json
index 7db5740..7b3c90c 100644
--- a/pages/storage/order-create/index.json
+++ b/pages/storage/order-create/index.json
@@ -7,10 +7,7 @@
"van-checkbox": "/components/checkbox/index",
"van-loading": "/components/loading/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",
"van-collapse": "/components/collapse/index",
"van-collapse-item": "/components/collapse-item/index",
diff --git a/pages/storage/order-create/index.wxml b/pages/storage/order-create/index.wxml
index 61ad15a..8ffafa1 100644
--- a/pages/storage/order-create/index.wxml
+++ b/pages/storage/order-create/index.wxml
@@ -130,22 +130,7 @@
提交
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
+
diff --git a/pages/storage/order-settlement/index.js b/pages/storage/order-settlement/index.js
index 840a5a6..521d659 100644
--- a/pages/storage/order-settlement/index.js
+++ b/pages/storage/order-settlement/index.js
@@ -110,24 +110,19 @@ Scene({
onHide: function() {
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
}
- 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({
- visible: false,
- ['form.categoryName']: this.data.nowItem.name,
+ ['form.categoryName']: detail.name,
['form.settleUnitPrice']: '',
- ['form.konePrice']: '指导价格:' + math.times(this.data.nowItem.defaultUnitPrice, 1000),
- cIndex: this.data.cIndex
+ ['form.konePrice']: '指导价格:' + math.times(detail.defaultUnitPrice, 1000),
})
} else {
- this.setData({ visible: false, ['form.categoryName']: this.data.nowItem.name, cIndex: this.data.cIndex })
+ this.setData({ ['form.categoryName']: detail.name })
}
},
bindInput: function (e) {
diff --git a/pages/storage/order-settlement/index.json b/pages/storage/order-settlement/index.json
index fd72124..f73cf55 100644
--- a/pages/storage/order-settlement/index.json
+++ b/pages/storage/order-settlement/index.json
@@ -8,10 +8,8 @@
"van-uploader": "/components/uploader/index",
"van-collapse": "/components/collapse/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-popup": "/components/popup/index",
+ "paper-select": "/pages/setting/paper-select/index",
"van-dialog": "/components/dialog/index",
"submit-layout": "/components/submit-layout/index",
"notification": "/pages/message/notification/index"
diff --git a/pages/storage/order-settlement/index.wxml b/pages/storage/order-settlement/index.wxml
index ded6689..d495492 100644
--- a/pages/storage/order-settlement/index.wxml
+++ b/pages/storage/order-settlement/index.wxml
@@ -157,21 +157,6 @@
确认收款
-
-
-
- 选择纸品
-
-
-
-
-
-
-
- {{item.name}}
-
-
-
-
+