Commit 9b79a6c3 by 张立顺

bug修复

1 parent 03615c6e
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{ {
"root": "tabWorkOrder", "root": "tabWorkOrder",
"name": "tabWorkOrder", "name": "tabWorkOrder",
"pages": ["pages/createOrder/createOrder", "pages/additionRecordOrder/additionRecordOrder", "pages/orderDetail/orderDetail", "pages/constructionOrderDetail/constructionOrderDetail", "pages/confirmOrder/confirmOrder", "pages/updateOrderInfo/updateOrderInfo", "pages/createArchives/createArchives", "pages/orderSignature/orderSignature", "pages/fullSignture/fullSignture", "tpages/ocr/ocr"] "pages": ["pages/createOrder/createOrder", "pages/additionRecordOrder/additionRecordOrder", "pages/orderDetail/orderDetail", "pages/constructionOrderDetail/constructionOrderDetail", "pages/confirmOrder/confirmOrder", "pages/updateOrderInfo/updateOrderInfo", "pages/createArchives/createArchives", "pages/orderSignature/orderSignature", "pages/fullSignture/fullSignture", "pages/ocr/ocr"]
}, },
{ {
"root": "packageEquity", "root": "packageEquity",
......
...@@ -22,7 +22,7 @@ Page({ ...@@ -22,7 +22,7 @@ Page({
payItems: [ payItems: [
{ id: 1, name: '微信支付', icon: 'wxPay' }, { id: 1, name: '微信支付', icon: 'wxPay' },
{ id: 3, name: 'POS机', icon: 'posPay' }, { id: 3, name: 'POS机', icon: 'posPay' },
{ id: 2, name: '门店收款', icon: 'storePay' }, { id: 2, name: '门店收款', icon: 'storePay' }
], ],
timer: null, timer: null,
orderList: [ orderList: [
...@@ -94,23 +94,23 @@ Page({ ...@@ -94,23 +94,23 @@ Page({
// // 没有生成过二维码 // // 没有生成过二维码
// if (!posqrcode) { // if (!posqrcode) {
// console.log(text) // console.log(text)
let size = 0 let size = 0
try { try {
const info = wx.getSystemInfoSync() const info = wx.getSystemInfoSync()
let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽 let scale = info.windowWidth / 750 //不同屏幕下QRcode的适配比例;设计稿是750宽
let width = 300 * scale let width = 300 * scale
size = width size = width
} catch (e) { } catch (e) {
size = 150 size = 150
} }
console.log(outTradeNo); console.log(outTradeNo)
let _img = qrcode.createQrCodeImg(outTradeNo, { let _img = qrcode.createQrCodeImg(outTradeNo, {
size: parseInt(size) size: parseInt(size)
}) })
this.setData({ this.setData({
posqrcode: _img posqrcode: _img
}) })
// } // }
}, },
input(e) { input(e) {
...@@ -136,8 +136,7 @@ Page({ ...@@ -136,8 +136,7 @@ Page({
wx.$util.showLoading('上传中...') wx.$util.showLoading('上传中...')
uploadImg({ uploadImg({
file: `${type}@${_res.data}` file: `${type}@${_res.data}`
}) }).then(img => {
.then(img => {
wx.$util.hideLoading() wx.$util.hideLoading()
let { code, data, message } = img let { code, data, message } = img
if (code == 0) { if (code == 0) {
...@@ -165,14 +164,14 @@ Page({ ...@@ -165,14 +164,14 @@ Page({
wx.showModal({ wx.showModal({
title: '门店收款确认', title: '门店收款确认',
content: '确定将此订单标记为门店收款', content: '确定将此订单标记为门店收款',
complete: (res) => { complete: res => {
if (res.confirm) { if (res.confirm) {
let {accountName} = wx.$util.getUserInfo() let { accountName } = wx.$util.getUserInfo()
let params = { let params = {
subOrderCode: orderCode, subOrderCode: orderCode,
orderPaySource: orderPaySource, orderPaySource: orderPaySource,
shopmallGoodsId: shopmallGoodsId, shopmallGoodsId: shopmallGoodsId,
selectPayType:2, // 线下收款 (门店收款) selectPayType: 2, // 线下收款 (门店收款)
updatedBy: accountName, updatedBy: accountName,
outTradeNo: customOutTradeNo, // 交易流水号 outTradeNo: customOutTradeNo, // 交易流水号
payVoucher: customPayVoucher, // 付款凭证 payVoucher: customPayVoucher, // 付款凭证
...@@ -180,7 +179,7 @@ Page({ ...@@ -180,7 +179,7 @@ Page({
} }
wx.showLoading() wx.showLoading()
createPayOrderAPI(params).then(async res => { createPayOrderAPI(params).then(async res => {
let {code, data, message} = res let { code, data, message } = res
wx.hideLoading() wx.hideLoading()
if (code == '0') { if (code == '0') {
wx.$router.back() wx.$router.back()
...@@ -202,7 +201,7 @@ Page({ ...@@ -202,7 +201,7 @@ Page({
}, },
remarkCancel() { remarkCancel() {
this.setData({ this.setData({
showRemark: false, showRemark: false
}) })
}, },
remarkConfirm(e) { remarkConfirm(e) {
...@@ -227,7 +226,7 @@ Page({ ...@@ -227,7 +226,7 @@ Page({
if (time) clearInterval(time) if (time) clearInterval(time)
let { orderCode, orderPaySource, selectPayType, orderDetail } = this.data let { orderCode, orderPaySource, selectPayType, orderDetail } = this.data
let value = e?.detail || {} let value = e?.detail || {}
let {accountName} = wx.$util.getUserInfo() let { accountName } = wx.$util.getUserInfo()
this.setData({ this.setData({
shopmallGoodsId: value.specialGoodsId shopmallGoodsId: value.specialGoodsId
}) })
...@@ -241,7 +240,7 @@ Page({ ...@@ -241,7 +240,7 @@ Page({
} }
wx.$util.showLoading() wx.$util.showLoading()
createPayOrderAPI(params).then(async res => { createPayOrderAPI(params).then(async res => {
let {code, data, message} = res let { code, data, message } = res
wx.$util.hideLoading() wx.$util.hideLoading()
if (code == '0') { if (code == '0') {
// 创建支付单 刷新pos机支付二维码 // 创建支付单 刷新pos机支付二维码
...@@ -256,14 +255,14 @@ Page({ ...@@ -256,14 +255,14 @@ Page({
} }
this.getDetail() this.getDetail()
} else { } else {
wx.$util.showToast(message || '接口异常') wx.$util.showToast(message || '接口异常')
} }
}) })
}, },
initOrderInfo() { initOrderInfo() {
const { orderObj, orderList, paramsActivityPrice, paramsActivityId, goodsNumber } = this.data const { orderObj, orderList, paramsActivityPrice, paramsActivityId, goodsNumber } = this.data
// 商品 (购买多个商品数量 定金过滤 总定价/购买数量) // 商品 (购买多个商品数量 定金过滤 总定价/购买数量)
getSamePriceGoodsAPI({actId: paramsActivityId, activityPrice: paramsActivityPrice ? (paramsActivityPrice / goodsNumber) : ''}).then(res => { getSamePriceGoodsAPI({ actId: paramsActivityId, activityPrice: paramsActivityPrice ? paramsActivityPrice / goodsNumber : '' }).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
if (data && orderObj?.shopFormList) { if (data && orderObj?.shopFormList) {
...@@ -362,7 +361,8 @@ Page({ ...@@ -362,7 +361,8 @@ Page({
this.setData({ this.setData({
selectPayType selectPayType
}) })
if (selectPayType == 3) { // pos机支付 if (selectPayType == 3) {
// pos机支付
let result = await createPayOrder({ let result = await createPayOrder({
orderCode, orderCode,
payType: selectPayType payType: selectPayType
...@@ -370,10 +370,10 @@ Page({ ...@@ -370,10 +370,10 @@ Page({
let { code, data } = result let { code, data } = result
if (code != 0) return if (code != 0) return
this.posPay(data.outTradeNo) this.posPay(data.outTradeNo)
}else{ } else {
this.createWxQrcode() this.createWxQrcode()
} }
// selectPayType == 3 ? this.posPay(outTradeNo) : this.createWxQrcode() // selectPayType == 3 ? this.posPay(outTradeNo) : this.createWxQrcode()
}, },
back() { back() {
...@@ -401,14 +401,8 @@ Page({ ...@@ -401,14 +401,8 @@ Page({
this.initOrderInfo() this.initOrderInfo()
// 获取支付订单详情 // 获取支付订单详情
this.getDetail() this.getDetail()
<<<<<<< HEAD
console.log(outTradeNo,'outTradeNo');
orderPaySource == 3 ? this.posPay(outTradeNo) : this.createWxQrcode()
// let { orderCode, selectPayType } = options
=======
selectPayType == 3 ? this.posPay(outTradeNo) : this.createWxQrcode() selectPayType == 3 ? this.posPay(outTradeNo) : this.createWxQrcode()
>>>>>>> f0d439bccf21ca123e2910a4f875d150060c8283
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
...@@ -76,7 +76,23 @@ if (code!= 0 ) return ...@@ -76,7 +76,23 @@ if (code!= 0 ) return
}) })
}, },
reset() {}, reset() {
let {formData} = this.data
formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList');
// if(item.isMult) params[item.name] = []
item?.optionList?.forEach(subItem => {
subItem.active = false
// if (subItem.active) {
// item.isMult? params[item.name].push(subItem.confId):( params[item.name] = subItem.confId)
// }
})
})
this.setData({
formData
})
},
dealParam() { dealParam() {
let { formData } = this.data let { formData } = this.data
...@@ -140,7 +156,7 @@ if (code!= 0 ) return ...@@ -140,7 +156,7 @@ if (code!= 0 ) return
// } // }
this.setData({ this.setData({
customerId, customerId,
customerSex:customer.customerSex customerSex:customer?.customerSex||1
}) })
console.log(customerId, 'customerId') console.log(customerId, 'customerId')
this.recoverPortrait(customerId) this.recoverPortrait(customerId)
......
/* tabWorkOrder/pages/ocr/ocr.wxss */
\ No newline at end of file \ No newline at end of file
// tabWorkOrder/tpages/ocr/ocr.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/tpages/ocr/ocr.wxss */
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/tpages/ocr/ocr.wxml-->
<text>tabWorkOrder/tpages/ocr/ocr.wxml</text>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!