Commit ae1c6f28 by 张立顺

功能开发完成

1 parent 96d21fc8
......@@ -73,7 +73,7 @@ const domain_items = {
prod: 'https://dj.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]]);
module.exports = {
domain: domain_items[target[index]],
......
......@@ -39,12 +39,12 @@ App({
})
let { query } = options
// 判断对象是否满足任意一个key
console.log(query, ' query')
// console.log(query, ' query')
wx.$SCENE = null // 解决不是外部跳转进来的问题, 重置
if (query && (query.scene || query.merchantId || query.type)) {
if (query && (query.supplementId || query.merchantId || query.type)) {
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'
let userInfo = util.getStorageSync('dj_boutique_user_info')
// 需要当前门店的 不是就重新登录
......@@ -73,7 +73,7 @@ App({
wx.$SCENE = options
// tabIndex/pages/index/index?supplement=true
}
console.log(wx.$SCENE, ' wx.$SCENE')
// console.log(wx.$SCENE, ' wx.$SCENE')
// if (options.query.scene)
},
login(relogin) {
......
......@@ -95,7 +95,7 @@
{
"name": "订单补录",
"pathName": "tabWorkOrder/pages/additionRecordOrder/additionRecordOrder",
"query": "tradeNo=354293022030&totalFee=1000.00&accountDate=07/06 16:53",
"query": "supplementId=100&merchantId=44209880",
"launchMode": "default",
"scene": null
},
......
......@@ -94,6 +94,10 @@ module.exports = {
notUpgradeOrder(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) {
return api.post('dj.api.smartcarlife.order.preliminaryOrder', data)
......@@ -102,9 +106,12 @@ module.exports = {
createBarCode(data) {
return api.post('dj.api.smartcarlife.common.createBarCode', data)
},
/** 获取商户基本信息 */
getServiceBaseInfo(data) {
/** 获取商户基本信息 */
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({
// if (options.scene) {
// this.setData(options)
// }
options?.scene && this.checkShowOrderInfo(options)
// let { supplementId } = options
console.log(options)
options?.supplementId && this.checkShowOrderInfo(options)
},
/**
* 生命周期函数--监听页面初次渲染完成
......@@ -746,28 +748,34 @@ Page({
},
checkShowOrderInfo(options) {
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
console.log(options)
// debugger
if (userInfo?.subLoginUser?.merchantId != options.merchantId) {
wx.$router.go('index')
// wx.$router.go('pages/index')
wx.$router.go('tabIndex.index')
} else {
// 查询补单信息
api
.supplementOrder({ scene: options })
.waitinputorderSelectById({ id: options.supplementId })
.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({
outTradeNo,
totalFee: totalFee,
totalFee,
accountDate
})
})
.catch(err => {})
}
},
onRoute(res) {
let { outTradeNo, totalFee, accountDate, scene } = res
onRoute(options) {
let { outTradeNo, totalFee, accountDate, supplementId } = options
// 如果是扫码进来的
if (scene) {
return this.checkShowOrderInfo(res)
if (supplementId) {
return this.checkShowOrderInfo(options)
} else {
this.setData({
outTradeNo,
......
......@@ -276,7 +276,9 @@ Page({
submit(i) {
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 key = this.checkRequired(orderObj)
......@@ -313,7 +315,8 @@ Page({
this.showLoading('提交中...')
console.log('orderObj', orderObj)
// return
api.notUpgradeOrder(orderObj).then(res => {
const apiName = type=='success'? 'createPrerecordedOrderBatch':'notUpgradeOrder'
api[apiName](orderObj).then(res => {
wx.hideLoading()
// console.log(orderObj, res)
let { code, data, message } = res
......@@ -323,8 +326,9 @@ Page({
icon: 'success',
title: '提交成功'
})
wx.$router.back()
// wx.$router.back()
// wx.$router.go('tabindex.index')
wx.$router.go('tabIndex.index')
// if (save) {
// wx.showModal({
// title: '温馨提示',
......
......@@ -199,7 +199,7 @@
战败下单
<!-- {{notUpgradeOrderList.length==1?'提交客户工单':'提交'+notUpgradeOrderList.length+'个客户工单'}} -->
</view>
<view class="confirm save text-center" bindtap="submitUserInfo">提交</view>
<view class="confirm save text-center" bindtap="submit" data-type="success">提交</view>
</view>
<!-- <view class="confirm text-center" bindtap="submit">
{{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!