Commit ae1c6f28 by 张立顺

功能开发完成

1 parent 96d21fc8
...@@ -73,7 +73,7 @@ const domain_items = { ...@@ -73,7 +73,7 @@ const domain_items = {
prod: 'https://dj.glsx.com.cn', prod: 'https://dj.glsx.com.cn',
preRelease: 'https://dj.beta.glsx.com.cn' preRelease: 'https://dj.beta.glsx.com.cn'
} }
const target = ['ip', 'dev', 'uat', 'prod','preRelease'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
// console.log(domain_items[target[index]]); // console.log(domain_items[target[index]]);
module.exports = { module.exports = {
domain: domain_items[target[index]], domain: domain_items[target[index]],
......
...@@ -39,12 +39,12 @@ App({ ...@@ -39,12 +39,12 @@ App({
}) })
let { query } = options let { query } = options
// 判断对象是否满足任意一个key // 判断对象是否满足任意一个key
console.log(query, ' query') // console.log(query, ' query')
wx.$SCENE = null // 解决不是外部跳转进来的问题, 重置 wx.$SCENE = null // 解决不是外部跳转进来的问题, 重置
if (query && (query.scene || query.merchantId || query.type)) { if (query && (query.supplementId || query.merchantId || query.type)) {
if (query.merchantId) { if (query.merchantId) {
// 判断是首页还是待补录页面 // 判断是首页还是待补录页面
options.patch = query.scene ? 'tabWorkOrder/pages/additionRecordOrder/additionRecordOrder' : 'pages/index/index' options.patch = query.supplementId ? 'tabWorkOrder/pages/additionRecordOrder/additionRecordOrder' : 'pages/index/index'
// options.patch == 'tabIndex/pages/index/index' // options.patch == 'tabIndex/pages/index/index'
let userInfo = util.getStorageSync('dj_boutique_user_info') let userInfo = util.getStorageSync('dj_boutique_user_info')
// 需要当前门店的 不是就重新登录 // 需要当前门店的 不是就重新登录
...@@ -73,7 +73,7 @@ App({ ...@@ -73,7 +73,7 @@ App({
wx.$SCENE = options wx.$SCENE = options
// tabIndex/pages/index/index?supplement=true // tabIndex/pages/index/index?supplement=true
} }
console.log(wx.$SCENE, ' wx.$SCENE') // console.log(wx.$SCENE, ' wx.$SCENE')
// if (options.query.scene) // if (options.query.scene)
}, },
login(relogin) { login(relogin) {
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
{ {
"name": "订单补录", "name": "订单补录",
"pathName": "tabWorkOrder/pages/additionRecordOrder/additionRecordOrder", "pathName": "tabWorkOrder/pages/additionRecordOrder/additionRecordOrder",
"query": "tradeNo=354293022030&totalFee=1000.00&accountDate=07/06 16:53", "query": "supplementId=100&merchantId=44209880",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
......
...@@ -94,6 +94,10 @@ module.exports = { ...@@ -94,6 +94,10 @@ module.exports = {
notUpgradeOrder(data) { notUpgradeOrder(data) {
return api.post('dj.api.smartcarlife.order.notUpgrade.batchInsert', data) return api.post('dj.api.smartcarlife.order.notUpgrade.batchInsert', data)
}, },
/** 批量新建预录工单 */
createPrerecordedOrderBatch(data) {
return api.post('dj.api.smartcarlife.order.preliminaryOrder.batch', data)
},
/** 新建预录工单 */ /** 新建预录工单 */
createPrerecordedOrder(data) { createPrerecordedOrder(data) {
return api.post('dj.api.smartcarlife.order.preliminaryOrder', data) return api.post('dj.api.smartcarlife.order.preliminaryOrder', data)
...@@ -102,9 +106,12 @@ module.exports = { ...@@ -102,9 +106,12 @@ module.exports = {
createBarCode(data) { createBarCode(data) {
return api.post('dj.api.smartcarlife.common.createBarCode', data) return api.post('dj.api.smartcarlife.common.createBarCode', data)
}, },
/** 获取商户基本信息 */ /** 获取商户基本信息 */
getServiceBaseInfo(data) { getServiceBaseInfo(data) {
return api.post('dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo', data) return api.post('dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo', data)
},
/** 根据id查询待补录订单 */
waitinputorderSelectById(data) {
return api.post('dj.api.smartcarlife.weapp.waitinputorder.selectById', data)
} }
} }
...@@ -723,7 +723,9 @@ Page({ ...@@ -723,7 +723,9 @@ Page({
// if (options.scene) { // if (options.scene) {
// this.setData(options) // this.setData(options)
// } // }
options?.scene && this.checkShowOrderInfo(options) // let { supplementId } = options
console.log(options)
options?.supplementId && this.checkShowOrderInfo(options)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
...@@ -746,28 +748,34 @@ Page({ ...@@ -746,28 +748,34 @@ Page({
}, },
checkShowOrderInfo(options) { checkShowOrderInfo(options) {
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info') let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
console.log(options)
// debugger
if (userInfo?.subLoginUser?.merchantId != options.merchantId) { if (userInfo?.subLoginUser?.merchantId != options.merchantId) {
wx.$router.go('index') // wx.$router.go('pages/index')
wx.$router.go('tabIndex.index')
} else { } else {
// 查询补单信息 // 查询补单信息
api api
.supplementOrder({ scene: options }) .waitinputorderSelectById({ id: options.supplementId })
.then(result => { .then(result => {
let { outTradeNo, totalFee, accountDate } = result // console.log(result)
let { outTradeNo, totalFee, accountDate } = result.data
accountDate && (accountDate = new Date(accountDate).format('yyyy-MM-dd'))
this.setData({ this.setData({
outTradeNo, outTradeNo,
totalFee: totalFee, totalFee,
accountDate accountDate
}) })
}) })
.catch(err => {}) .catch(err => {})
} }
}, },
onRoute(res) { onRoute(options) {
let { outTradeNo, totalFee, accountDate, scene } = res let { outTradeNo, totalFee, accountDate, supplementId } = options
// 如果是扫码进来的 // 如果是扫码进来的
if (scene) { if (supplementId) {
return this.checkShowOrderInfo(res) return this.checkShowOrderInfo(options)
} else { } else {
this.setData({ this.setData({
outTradeNo, outTradeNo,
......
...@@ -276,7 +276,9 @@ Page({ ...@@ -276,7 +276,9 @@ Page({
submit(i) { submit(i) {
this.checkPhoneUseConfig() this.checkPhoneUseConfig()
// let { save } = i.currentTarget.dataset console.log(i);
let { type } = i.currentTarget.dataset
console.log(type);
let { orderObj, notUpgradeOrderList, dateObj, isStandNo } = this.data let { orderObj, notUpgradeOrderList, dateObj, isStandNo } = this.data
let key = this.checkRequired(orderObj) let key = this.checkRequired(orderObj)
...@@ -313,7 +315,8 @@ Page({ ...@@ -313,7 +315,8 @@ Page({
this.showLoading('提交中...') this.showLoading('提交中...')
console.log('orderObj', orderObj) console.log('orderObj', orderObj)
// return // return
api.notUpgradeOrder(orderObj).then(res => { const apiName = type=='success'? 'createPrerecordedOrderBatch':'notUpgradeOrder'
api[apiName](orderObj).then(res => {
wx.hideLoading() wx.hideLoading()
// console.log(orderObj, res) // console.log(orderObj, res)
let { code, data, message } = res let { code, data, message } = res
...@@ -323,8 +326,9 @@ Page({ ...@@ -323,8 +326,9 @@ Page({
icon: 'success', icon: 'success',
title: '提交成功' title: '提交成功'
}) })
wx.$router.back() // wx.$router.back()
// wx.$router.go('tabindex.index')
wx.$router.go('tabIndex.index')
// if (save) { // if (save) {
// wx.showModal({ // wx.showModal({
// title: '温馨提示', // title: '温馨提示',
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
战败下单 战败下单
<!-- {{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}} --> <!-- {{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}} -->
</view> </view>
<view class="confirm save text-center" bindtap="submitUserInfo">提交</view> <view class="confirm save text-center" bindtap="submit" data-type="success">提交</view>
</view> </view>
<!-- <view class="confirm text-center" bindtap="submit"> <!-- <view class="confirm text-center" bindtap="submit">
{{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}} {{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!