From ad3f8cc8ddf9637006720fee09c96fd5039caf02 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Wed, 30 Jun 2021 16:34:04 +0800 Subject: [PATCH] no message --- pages/process/order-check/index.js | 16 +++---- pages/process/order-check/index.json | 4 +- pages/process/order-check/index.wxml | 15 ++++++- pages/process/order-check/index.wxss | 45 ++++++++++++++++++++ pages/process/order-info/index.js | 16 ------- pages/process/order-info/index.json | 3 -- pages/process/order-info/index.wxml | 4 -- pages/process/order-price/index.js | 15 +++---- pages/process/order-price/index.json | 4 +- pages/process/order-price/index.wxml | 23 ++++++++--- pages/process/order-price/index.wxss | 45 ++++++++++++++++++++ pages/process/outside-add/index.js | 38 ++++++++--------- pages/process/outside-add/index.json | 4 +- pages/process/outside-add/index.wxml | 24 +++++++++-- pages/process/outside-add/index.wxss | 35 ++++++++++++++++ pages/process/outside-check-item/index.js | 12 +++--- pages/process/outside-check-item/index.json | 4 +- pages/process/outside-check-item/index.wxml | 15 ++++++- pages/process/outside-check-item/index.wxss | 45 ++++++++++++++++++++ pages/process/outside-check/index.js | 12 ++---- pages/process/outside-check/index.wxml | 2 +- pages/process/outside-item/index.wxml | 6 +-- pages/setting/paper-detial/index.js | 22 +++------- pages/setting/paper-detial/index.json | 4 +- pages/setting/paper-detial/index.wxml | 15 ++++++- pages/setting/paper-detial/index.wxss | 46 ++++++++++++++++++++- pages/storage/order-create/index.js | 18 ++------ pages/storage/order-create/index.json | 4 +- pages/storage/order-create/index.wxml | 15 ++++++- pages/storage/order-create/index.wxss | 46 ++++++++++++++++++++- pages/storage/order-settlement/index.js | 27 ++++-------- pages/storage/order-settlement/index.json | 4 +- pages/storage/order-settlement/index.wxml | 15 ++++++- pages/storage/order-settlement/index.wxss | 46 ++++++++++++++++++++- 34 files changed, 494 insertions(+), 155 deletions(-) diff --git a/pages/process/order-check/index.js b/pages/process/order-check/index.js index b6f8aca..1ac8f26 100644 --- a/pages/process/order-check/index.js +++ b/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){ diff --git a/pages/process/order-check/index.json b/pages/process/order-check/index.json index 95a7894..c8794b5 100644 --- a/pages/process/order-check/index.json +++ b/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", diff --git a/pages/process/order-check/index.wxml b/pages/process/order-check/index.wxml index b31ac6f..6e29859 100644 --- a/pages/process/order-check/index.wxml +++ b/pages/process/order-check/index.wxml @@ -113,6 +113,19 @@ - + + + 选择纸品 + + + + + + + + {{item.categoryName}} + + + \ No newline at end of file diff --git a/pages/process/order-check/index.wxss b/pages/process/order-check/index.wxss index 983acce..61828e3 100644 --- a/pages/process/order-check/index.wxss +++ b/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) } \ No newline at end of file diff --git a/pages/process/order-info/index.js b/pages/process/order-info/index.js index 292b891..62b2cb3 100644 --- a/pages/process/order-info/index.js +++ b/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 => { diff --git a/pages/process/order-info/index.json b/pages/process/order-info/index.json index 9629596..308b6a7 100644 --- a/pages/process/order-info/index.json +++ b/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" } diff --git a/pages/process/order-info/index.wxml b/pages/process/order-info/index.wxml index 32b82f8..c0073a5 100644 --- a/pages/process/order-info/index.wxml +++ b/pages/process/order-info/index.wxml @@ -184,9 +184,5 @@ - - - - \ No newline at end of file diff --git a/pages/process/order-price/index.js b/pages/process/order-price/index.js index d57f0f4..2e8ab36 100644 --- a/pages/process/order-price/index.js +++ b/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 }) diff --git a/pages/process/order-price/index.json b/pages/process/order-price/index.json index 6b21fc1..a67f510 100644 --- a/pages/process/order-price/index.json +++ b/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", diff --git a/pages/process/order-price/index.wxml b/pages/process/order-price/index.wxml index 2c79fde..bc415bc 100644 --- a/pages/process/order-price/index.wxml +++ b/pages/process/order-price/index.wxml @@ -44,7 +44,7 @@ 车牌号码 - {{form.plateNumber || '请输入车牌号码'}} + {{form.plateNumber || '请输入车牌号码(选填)'}} @@ -77,7 +77,7 @@ 扣重(公斤) @@ -88,7 +88,7 @@ 扣点(%) @@ -102,7 +102,7 @@ - + 过磅信息 @@ -136,6 +136,19 @@ - + + + 选择纸品 + + + + + + + + {{item.categoryName}} + + + \ No newline at end of file diff --git a/pages/process/order-price/index.wxss b/pages/process/order-price/index.wxss index 086471d..794c004 100644 --- a/pages/process/order-price/index.wxss +++ b/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) } \ No newline at end of file diff --git a/pages/process/outside-add/index.js b/pages/process/outside-add/index.js index cfd3baf..23c53ca 100644 --- a/pages/process/outside-add/index.js +++ b/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 diff --git a/pages/process/outside-add/index.json b/pages/process/outside-add/index.json index a73efa7..2a00dd4 100644 --- a/pages/process/outside-add/index.json +++ b/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", diff --git a/pages/process/outside-add/index.wxml b/pages/process/outside-add/index.wxml index 325aacb..0bd588c 100644 --- a/pages/process/outside-add/index.wxml +++ b/pages/process/outside-add/index.wxml @@ -37,16 +37,16 @@ 操作员 - {{form.operatorName || '请选择操作员'}} + {{form.operatorName || '请选择操作员(选填)'}} 预计到厂时间 - {{form.predictDeliveryToFactoryTime || '请选择预计到厂时间'}} + {{form.predictDeliveryToFactoryTime || '请选择预计到厂时间(选填)'}} - + @@ -93,6 +93,22 @@ - + + + + + + 选择纸品 + + + + + + + + {{item.categoryName}} + + + \ No newline at end of file diff --git a/pages/process/outside-add/index.wxss b/pages/process/outside-add/index.wxss index 14a8a3a..7421145 100644 --- a/pages/process/outside-add/index.wxss +++ b/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) +} diff --git a/pages/process/outside-check-item/index.js b/pages/process/outside-check-item/index.js index f89f57b..fa4bfbc 100644 --- a/pages/process/outside-check-item/index.js +++ b/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 }) diff --git a/pages/process/outside-check-item/index.json b/pages/process/outside-check-item/index.json index fefd4a8..8725549 100644 --- a/pages/process/outside-check-item/index.json +++ b/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" } diff --git a/pages/process/outside-check-item/index.wxml b/pages/process/outside-check-item/index.wxml index e4badad..c93dacd 100644 --- a/pages/process/outside-check-item/index.wxml +++ b/pages/process/outside-check-item/index.wxml @@ -79,5 +79,18 @@ - + + + 选择纸品 + + + + + + + + {{item.categoryName}} + + + \ No newline at end of file diff --git a/pages/process/outside-check-item/index.wxss b/pages/process/outside-check-item/index.wxss index d39e71b..0c35e3d 100644 --- a/pages/process/outside-check-item/index.wxss +++ b/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) +} diff --git a/pages/process/outside-check/index.js b/pages/process/outside-check/index.js index 48f3873..52ce2d4 100644 --- a/pages/process/outside-check/index.js +++ b/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) diff --git a/pages/process/outside-check/index.wxml b/pages/process/outside-check/index.wxml index afb6f66..aa502c4 100644 --- a/pages/process/outside-check/index.wxml +++ b/pages/process/outside-check/index.wxml @@ -32,7 +32,7 @@ 纸品信息 - + diff --git a/pages/process/outside-item/index.wxml b/pages/process/outside-item/index.wxml index f1bf26e..adb2609 100644 --- a/pages/process/outside-item/index.wxml +++ b/pages/process/outside-item/index.wxml @@ -36,7 +36,7 @@ {{item.estimatedAmount || ''}} - + 过磅凭证 @@ -73,7 +73,7 @@ value="{{item.deductWeight || ''}}" bindinput="bindInput" data-type="1" bindtap="changeDeductType" /> --> - + 扣重(公斤) @@ -90,7 +90,7 @@ value="{{item.deductPercent}}" bindinput="bindInput" data-type="2" bindtap="changeDeductType" /> --> - + 扣点(%) diff --git a/pages/setting/paper-detial/index.js b/pages/setting/paper-detial/index.js index 42a055a..5ec6556 100644 --- a/pages/setting/paper-detial/index.js +++ b/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 }) diff --git a/pages/setting/paper-detial/index.json b/pages/setting/paper-detial/index.json index 8571992..4ab7fbc 100644 --- a/pages/setting/paper-detial/index.json +++ b/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" } diff --git a/pages/setting/paper-detial/index.wxml b/pages/setting/paper-detial/index.wxml index e3b7fa9..db595b5 100644 --- a/pages/setting/paper-detial/index.wxml +++ b/pages/setting/paper-detial/index.wxml @@ -19,7 +19,20 @@ - + + + 选择纸品 + + + + + + + + {{item.categoryName}} + + + \ No newline at end of file diff --git a/pages/setting/paper-detial/index.wxss b/pages/setting/paper-detial/index.wxss index 26dd70a..f58a146 100644 --- a/pages/setting/paper-detial/index.wxss +++ b/pages/setting/paper-detial/index.wxss @@ -1 +1,45 @@ -/* pages/setting/paper-detial/index.wxss */ \ No newline at end of file +/* 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) +} \ No newline at end of file diff --git a/pages/storage/order-create/index.js b/pages/storage/order-create/index.js index fb24b46..8ea0fa9 100644 --- a/pages/storage/order-create/index.js +++ b/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) }) diff --git a/pages/storage/order-create/index.json b/pages/storage/order-create/index.json index 5ed4770..2417f14 100644 --- a/pages/storage/order-create/index.json +++ b/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", diff --git a/pages/storage/order-create/index.wxml b/pages/storage/order-create/index.wxml index 5756280..0f53f45 100644 --- a/pages/storage/order-create/index.wxml +++ b/pages/storage/order-create/index.wxml @@ -109,6 +109,19 @@ - + + + 选择纸品 + + + + + + + + {{item.categoryName}} + + + diff --git a/pages/storage/order-create/index.wxss b/pages/storage/order-create/index.wxss index c3de589..f7cbaa4 100644 --- a/pages/storage/order-create/index.wxss +++ b/pages/storage/order-create/index.wxss @@ -1 +1,45 @@ -/* pages/storage/index/index.wxss */ \ No newline at end of file +/* 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) +} \ No newline at end of file diff --git a/pages/storage/order-settlement/index.js b/pages/storage/order-settlement/index.js index d8745bb..335cf39 100644 --- a/pages/storage/order-settlement/index.js +++ b/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) { diff --git a/pages/storage/order-settlement/index.json b/pages/storage/order-settlement/index.json index a6e8214..fd72124 100644 --- a/pages/storage/order-settlement/index.json +++ b/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", diff --git a/pages/storage/order-settlement/index.wxml b/pages/storage/order-settlement/index.wxml index 17eeb63..c2fbf63 100644 --- a/pages/storage/order-settlement/index.wxml +++ b/pages/storage/order-settlement/index.wxml @@ -155,7 +155,20 @@ - + + + 选择纸品 + + + + + + + + {{item.categoryName}} + + + diff --git a/pages/storage/order-settlement/index.wxss b/pages/storage/order-settlement/index.wxss index c3de589..f7cbaa4 100644 --- a/pages/storage/order-settlement/index.wxss +++ b/pages/storage/order-settlement/index.wxss @@ -1 +1,45 @@ -/* pages/storage/index/index.wxss */ \ No newline at end of file +/* 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) +} \ No newline at end of file