From d92cd6a1e08703c08adfd943a70c9fb9a1ecaf80 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Thu, 11 Mar 2021 16:34:40 +0800 Subject: [PATCH] no message --- pages/process/order-info/index.wxml | 2 +- pages/process/payment/index.js | 43 +++++++-- pages/process/payment/index.json | 2 + pages/process/payment/index.wxml | 135 +++++++++++++++++++++++++++- pages/process/payment/index.wxss | 4 + 5 files changed, 172 insertions(+), 14 deletions(-) diff --git a/pages/process/order-info/index.wxml b/pages/process/order-info/index.wxml index b1ca8a1..32016b9 100644 --- a/pages/process/order-info/index.wxml +++ b/pages/process/order-info/index.wxml @@ -30,7 +30,7 @@ 车牌号码 - {{form.plateNumber || '请输入车牌号码'}} + {{form.plateNumber || '- -'}} diff --git a/pages/process/payment/index.js b/pages/process/payment/index.js index fe4dbe4..052a4ab 100644 --- a/pages/process/payment/index.js +++ b/pages/process/payment/index.js @@ -1,6 +1,6 @@ // pages/process/payment/index.js import Dialog from '../../../components/dialog/dialog' -import { getPeymentList, paymentOrder } from "../../../api/saas" +import { getPeymentList, paymentOrder, getFactoryOrderInfo } from "../../../api/saas" const event = require('../../../utils/event') const util = require('../../../utils/util') const math = require('../../../utils/math') //导入模块 @@ -11,6 +11,7 @@ Page({ * 页面的初始数据 */ data: { + height: app.globalData.fragmentHeight, safeBottom: app.globalData.safeBottom, form: { status: 4, @@ -24,7 +25,9 @@ Page({ ids: [], payRemark: '' }, - requesting: false + requesting: false, + popup: false, + detail: null }, /** * 生命周期函数--监听页面加载 @@ -38,7 +41,7 @@ Page({ this.amountList(result.data.records) }).catch(err => { wx.hideLoading() - this.setData({ safeBottom: app.globalData.safeBottom }) + this.setData({ height: app.globalData.fragmentHeight, safeBottom: app.globalData.safeBottom }) util.showToast(err) }) } else if(options.channel){ @@ -62,9 +65,9 @@ Page({ this.data.params.bankCardNo = element.bankCardNo } } - this.setData({ safeBottom: app.globalData.safeBottom, orderList, amount, params: this.data.params }) + this.setData({ height: app.globalData.fragmentHeight, safeBottom: app.globalData.safeBottom, orderList, amount, params: this.data.params }) } else { - this.setData({ safeBottom: app.globalData.safeBottom }) + this.setData({ height: app.globalData.fragmentHeight, safeBottom: app.globalData.safeBottom }) } }, onTypeChange: function({detail}){ @@ -78,7 +81,6 @@ Page({ this.setData({ ['params.settleType']: e.currentTarget.dataset.name }) }, onChange: function(e){ - console.log(e.detail) var item = this.data.orderList[e.currentTarget.dataset.index] item.checked = !e.detail var amount = 0 @@ -93,7 +95,14 @@ Page({ }, lookItem: function(e){ var item = this.data.orderList[e.currentTarget.dataset.index] - // wx.navigateTo({ url: `/pages/process/order-info/index?id=${item.id}` }) + wx.showLoading({ title: '正在获取', mask: true }) + getFactoryOrderInfo(item.id).then(result => { + this.setData({ popup: true, detail: result.data }) + wx.hideLoading() + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) }, bindInput: function (e) { this.data.params[e.target.id] = e.detail.value @@ -106,13 +115,13 @@ Page({ util.showToast('请选择要付款的订单') return } - Dialog.confirm({ title: '温馨提示', message: '确定要付款吗?' }).then(() => { + Dialog.confirm({ title: '温馨提示', message: '订单已经付款,在此进行确认?' }).then(() => { wx.showLoading({ title: '正在获取', mask: true }) this.data.requesting = true this.data.params.settleType = Number(this.data.params.settleType) paymentOrder(this.data.params).then(result => { wx.hideLoading() - util.showBackToast('订单已经付款') + util.showBackToast('订单已支付') const channel = this.getOpenerEventChannel() channel.emit('onOrderChange', { what: 12, desc: 'PaymentOrder' }) event.emit('OrderMessage', { what: 12, desc: 'PaymentOrder' }) @@ -123,5 +132,21 @@ Page({ }) }).catch(err => { }) + }, + onPopupClose: function(){ + this.setData({ popup: false }) + }, + viewImage: function (e) { + var imgList = [] + if(e.currentTarget.dataset.type == 0){ + for (let index = 0; index < this.data.detail.totalWeighingPicture.length; index++) { + imgList.push(this.data.detail.totalWeighingPicture[index].url) + } + } else { + for (let index = 0; index < this.data.detail.emptyWeighingPicture.length; index++) { + imgList.push(this.data.detail.emptyWeighingPicture[index].url) + } + } + wx.previewImage({ urls: imgList, current: e.currentTarget.dataset.url }) } }) \ No newline at end of file diff --git a/pages/process/payment/index.json b/pages/process/payment/index.json index 2f46fb1..14fd9e5 100644 --- a/pages/process/payment/index.json +++ b/pages/process/payment/index.json @@ -1,11 +1,13 @@ { "usingComponents": { + "van-index-anchor": "/components/index-anchor/index", "van-cell": "/components/cell/index", "van-button": "/components/button/index", "van-checkbox": "/components/checkbox/index", "van-radio": "/components/radio/index", "van-radio-group": "/components/radio-group/index", "van-image": "/components/image/index", + "van-popup": "/components/popup/index", "van-dialog": "/components/dialog/index" } } \ No newline at end of file diff --git a/pages/process/payment/index.wxml b/pages/process/payment/index.wxml index 89d8bcb..2172065 100644 --- a/pages/process/payment/index.wxml +++ b/pages/process/payment/index.wxml @@ -24,8 +24,8 @@ 银行卡转账 ({{params.bankCardNo}}) - - + + @@ -50,7 +50,8 @@ - + {{item.factoryCustomerName}} {{item.factoryCustomerMobile || ''}} @@ -66,7 +67,133 @@ - 付款 + 付款 + + + + 订单详情 + ({{detail.id}}) + + + + + 客户姓名 + {{detail.factoryCustomerName}} + + + + + 车牌号码 + {{detail.plateNumber || '- -'}} + + + + + 废纸品类 + {{detail.productName}} + + + + + 毛重(公斤) + {{detail.totalWeight}} + + + + + 皮重(公斤) + {{detail.emptyWeight || '- -'}} + + + + + 净重(公斤) + {{detail.netWeight || '- -'}} + + + + + 扣重(公斤) + -{{detail.deductWeight}} + + + + + 扣点(%) + {{detail.deductPercent}} + + + + + 定价员 + {{detail.inspectorName || '- -'}} + + + + + 定价时间 + {{detail.inspectionTime || ''}} + + + + + 过毛重照片 + + + + + + + + + + + + 过皮重照片 + + + + + + + + + + + + 备注 + {{detail.inspectionRemark}} + + + + + 单价(元/公斤) + {{formate.formateAmount(detail.settleUnitPrice)}} + + + + + 结算金额(元) + {{formate.formateAmount(detail.settlePrice) || '- -'}} + + + + + 下单时间 + {{detail.createTime || ''}} + + + + + 订单编号 + {{detail.id}} + + + + + \ No newline at end of file diff --git a/pages/process/payment/index.wxss b/pages/process/payment/index.wxss index 9e1d849..d304903 100644 --- a/pages/process/payment/index.wxss +++ b/pages/process/payment/index.wxss @@ -3,6 +3,10 @@ padding-top: 6rpx; } +.page-icon { + margin-right: 24rpx; +} + .lable{ padding: 32rpx 32rpx 24rpx 32rpx; margin-top:18rpx;