Commit 8a15f552 by 张立顺

feat 3月中版本功能开发

1 parent b22061de
...@@ -43,7 +43,7 @@ Component({ ...@@ -43,7 +43,7 @@ Component({
}, },
{ {
labelName: '实际支付', labelName: '实际支付',
orderType: 'success', // orderType: 'success',
key: 'finalPrice' key: 'finalPrice'
}, },
{ {
......
...@@ -91,7 +91,8 @@ Component({ ...@@ -91,7 +91,8 @@ Component({
confirmName: '下一步(1/4)', confirmName: '下一步(1/4)',
cancelName: '存草稿' cancelName: '存草稿'
}, },
vinValid:true vinValid: true,
createAllGoodsFlag: 1
}, },
lifetimes: { lifetimes: {
...@@ -109,17 +110,20 @@ Component({ ...@@ -109,17 +110,20 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
getShopMerchantPointConfig(){ getShopMerchantPointConfig() {
console.log(1111111111) console.log(1111111111)
let { userInfo } = this.data; let { userInfo } = this.data
let oParams = {}; let oParams = {}
oParams.merchantId = userInfo.shopMerchantId; oParams.merchantId = userInfo.shopMerchantId
commonApi.getShopMerchantPointConfig(oParams).then(res=>{ commonApi.getShopMerchantPointConfig(oParams).then(res => {
// if(res.data.pointsMultiRole=='Y'){ const { pointsMultiRole, createAllGoodsFlag } = res.data
// toastList.userId='销售顾问/录单员不能为空'
// }
this.setData({ this.setData({
pointsMultiRole:res.data.pointsMultiRole pointsMultiRole,
createAllGoodsFlag
})
// 触发事件通知父页面更新配置
this.triggerEvent('updateConfig', {
createAllGoodsFlag
}) })
}) })
}, },
......
...@@ -79,6 +79,10 @@ Component({ ...@@ -79,6 +79,10 @@ Component({
totalFee: { totalFee: {
type: Number, type: Number,
value: 0 value: 0
},
createAllGoodsFlag: {
type: Number,
value: 1
} }
}, },
observers: { observers: {
...@@ -229,6 +233,7 @@ Component({ ...@@ -229,6 +233,7 @@ Component({
}, },
// 打开订单类型选择 // 打开订单类型选择
openOrderType() { openOrderType() {
if (this.data.createAllGoodsFlag == 0) return
this.setData({ this.setData({
orderTypeBox: true orderTypeBox: true
}) })
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
<gl-cell <gl-cell
border border
valueAlign="right" valueAlign="right"
class="goodsCom" class="goodsCom {{ createAllGoodsFlag == 0 ? 'item-disabled' : '' }}"
label="订单类型" label="订单类型"
labelWidth="var(--fontSize140)" labelWidth="var(--fontSize140)"
haveArrow haveArrow="{{ createAllGoodsFlag != 0 }}"
requiredAfter requiredAfter
required required
value="{{ orderTypeName }}" value="{{ orderTypeName }}"
......
...@@ -125,6 +125,27 @@ Page({ ...@@ -125,6 +125,27 @@ Page({
tempVin: "", tempVin: "",
showZyPopup: false, // 上传合同协议弹窗 showZyPopup: false, // 上传合同协议弹窗
paymentMethod: 1, paymentMethod: 1,
createAllGoodsFlag: 1
},
handleUpdateConfig(e) {
const { createAllGoodsFlag } = e.detail
// let updateData = { createAllGoodsFlag }
console.log(createAllGoodsFlag, 'createAllGoodsFlag')
if (createAllGoodsFlag == 0) {
const { orderInfo } = this.data
// 如果是历史订单(有ID)且类型不是正常订单,则不强制重置
const isExistingOrder = orderInfo && !!orderInfo.id
const isNonNormal = orderInfo && orderInfo.orderType && orderInfo.orderType != 1
if (isExistingOrder && isNonNormal) {
// do nothing
} else {
// updateData['orderInfo.orderType'] = 1 // 强制正常订单
this.setData({ 'orderInfo.orderType': 1 })
}
}
this.setData({ createAllGoodsFlag })
}, },
tipsEvent() { tipsEvent() {
this.setData({ this.setData({
...@@ -778,6 +799,7 @@ Page({ ...@@ -778,6 +799,7 @@ Page({
: "", : "",
goodsPrice: item.price, goodsPrice: item.price,
finalPrice: price, finalPrice: price,
singleProductFinalPrice: price,
discountType: item.discountType, discountType: item.discountType,
discountValue: item.discountValue, discountValue: item.discountValue,
discountAmount: item.discountAmount || 0, discountAmount: item.discountAmount || 0,
...@@ -812,6 +834,7 @@ Page({ ...@@ -812,6 +834,7 @@ Page({
// specificationsValue: item.specificationData ? item.specificationData.replace(reg, ' ') : '', // specificationsValue: item.specificationData ? item.specificationData.replace(reg, ' ') : '',
goodsPrice: ele.price, goodsPrice: ele.price,
finalPrice: price, finalPrice: price,
singleProductFinalPrice: price,
discountType: ele.discountType, discountType: ele.discountType,
discountValue: ele.discountValue, discountValue: ele.discountValue,
discountAmount: ele.discountAmount || 0, discountAmount: ele.discountAmount || 0,
...@@ -840,6 +863,7 @@ Page({ ...@@ -840,6 +863,7 @@ Page({
: "", : "",
goodsPrice: item.price, goodsPrice: item.price,
finalPrice: price, finalPrice: price,
singleProductFinalPrice: price,
discountType: item.discountType, discountType: item.discountType,
discountValue: item.discountValue, discountValue: item.discountValue,
discountAmount: item.discountAmount || 0, discountAmount: item.discountAmount || 0,
......
...@@ -18,9 +18,11 @@ ...@@ -18,9 +18,11 @@
orderInfo="{{ orderInfo }}" orderInfo="{{ orderInfo }}"
subBtnShow="{{ false }}" subBtnShow="{{ false }}"
mode="{{ mode }}" mode="{{ mode }}"
bind:updateConfig="handleUpdateConfig"
/> />
<second-step <second-step
id="SecondStep" id="SecondStep"
createAllGoodsFlag="{{ createAllGoodsFlag }}"
orderInfo="{{ orderInfo }}" orderInfo="{{ orderInfo }}"
quotationGoodsList="{{ quotationGoodsList }}" quotationGoodsList="{{ quotationGoodsList }}"
bindconfirm="handleSecondConfirm" bindconfirm="handleSecondConfirm"
......
...@@ -140,7 +140,8 @@ ProductStrategy.prototype.applyDiscount = function () { ...@@ -140,7 +140,8 @@ ProductStrategy.prototype.applyDiscount = function () {
if (type == DISCOUNT_TYPE.RATIO && value) { if (type == DISCOUNT_TYPE.RATIO && value) {
if (value > 0 && value <= 10) { if (value > 0 && value <= 10) {
finalPrice = NP.times(basePrice, NP.divide(value, 10)) finalPrice = NP.times(basePrice, NP.divide(value, 10))
finalPrice = Math.round(finalPrice) // 折扣比例计算:向上取整到“分”(两位小数)
finalPrice = Math.ceil(finalPrice)
} }
} else if (type == DISCOUNT_TYPE.AMOUNT && value) { } else if (type == DISCOUNT_TYPE.AMOUNT && value) {
finalPrice = NP.minus(basePrice, NP.times(value, 100)) finalPrice = NP.minus(basePrice, NP.times(value, 100))
...@@ -390,7 +391,8 @@ PackageProductStrategy.prototype.applySubItemDiscount = function (subItem) { ...@@ -390,7 +391,8 @@ PackageProductStrategy.prototype.applySubItemDiscount = function (subItem) {
if (type == DISCOUNT_TYPE.RATIO && value) { if (type == DISCOUNT_TYPE.RATIO && value) {
if (value > 0 && value <= 10) { if (value > 0 && value <= 10) {
finalPrice = NP.times(basePrice, NP.divide(value, 10)) finalPrice = NP.times(basePrice, NP.divide(value, 10))
finalPrice = Math.round(finalPrice) // 折扣比例计算:向上取整到“分”(两位小数)
finalPrice = Math.ceil(finalPrice)
} }
} else if (type == DISCOUNT_TYPE.AMOUNT && value) { } else if (type == DISCOUNT_TYPE.AMOUNT && value) {
finalPrice = NP.minus(basePrice, NP.times(value, 100)) finalPrice = NP.minus(basePrice, NP.times(value, 100))
......
...@@ -1321,41 +1321,7 @@ Component({ ...@@ -1321,41 +1321,7 @@ Component({
orderCode: item.payId orderCode: item.payId
}) })
if (refundStep?.data == 'Y') return _this.showRefundAlert('error') if (refundStep?.data == 'Y') return _this.showRefundAlert('error')
wx.$modal(this, {
show: true,
title: '工单标记',
tabTitleShow: false,
success: res => {
this.showErrorType(item)
},
error: () => {}
})
}
)
},
selectType(e) {
let { type } = e.currentTarget.dataset
this.setData({
selectType: type
})
},
// 确定是否要显示
showErrorType(item) {
wx.$modal(
this,
{
show: true,
title: '请选择录单入口',
tabTitleShow: false,
success: async res => {
// 再次校验 防止二次确认弹窗弹起后长时间未操作,导致订单状态变更异常
let canRefundStep = await commonApi.getOrderRefundStep({
orderCode: item.payId
})
if (canRefundStep?.data == 'Y') return this.showRefundAlert()
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
let { selectType } = this.data
if (selectType == 1) {
wx.$router.go( wx.$router.go(
item.mode != 0 item.mode != 0
? 'createOrderCarQuotationSimple' ? 'createOrderCarQuotationSimple'
...@@ -1365,26 +1331,7 @@ Component({ ...@@ -1365,26 +1331,7 @@ Component({
resetOrder: true resetOrder: true
} }
) )
} else {
// 无需补录
errorOrderById({
oldQuotationId: item.id,
needCreateNewOrder: false
})
.then(res => {
let { code, message } = res
if (code == 0) {
this.search()
} else {
wx.$util.showToast(message)
}
})
.catch(() => {})
} }
},
error: () => {}
},
'#modal2'
) )
}, },
jumpReception(e) { jumpReception(e) {
......
...@@ -171,7 +171,8 @@ Page({ ...@@ -171,7 +171,8 @@ Page({
configPayTypeList: [], // 园区店配置支持的支付方式 configPayTypeList: [], // 园区店配置支持的支付方式
recordOrderFlag: true, // 补录订单入口标识 recordOrderFlag: true, // 补录订单入口标识
skuGoodsData: {}, //多规格商品数据 skuGoodsData: {}, //多规格商品数据
vinValid: true vinValid: true,
createAllGoodsFlag: 1 // 当前门店是否能创建全部类型订单 0-否 1-是
}, },
onCloseOrderType() { onCloseOrderType() {
this.setData({ orderTypeBox: false }) this.setData({ orderTypeBox: false })
...@@ -466,10 +467,12 @@ Page({ ...@@ -466,10 +467,12 @@ Page({
copyGoodsData, copyGoodsData,
packageList, packageList,
orderObj: { selectPayType }, orderObj: { selectPayType },
baseConfigData baseConfigData,
createAllGoodsFlag
} = this.data } = this.data
let { showName, positionnnum: positionNum } = let { showName, positionnnum: positionNum } =
e.currentTarget.dataset || e.detail e.currentTarget.dataset || e.detail
if (showName == 'orderTypeBox' && createAllGoodsFlag == 0) return
console.log(positionNum, 'positionNum') console.log(positionNum, 'positionNum')
console.log(copyGoodsData, 'copyGoodsData') console.log(copyGoodsData, 'copyGoodsData')
let obj = { let obj = {
...@@ -869,6 +872,13 @@ Page({ ...@@ -869,6 +872,13 @@ Page({
e.goods.discountAmount || 0, e.goods.discountAmount || 0,
e.count || 1 e.count || 1
) )
const finalPrice =
discountType == 4
? 0
: NP.minus(
NP.times(Number(e.goods.sellPrice), e.count || 1),
discountAmount
)
let obj = { let obj = {
baseGoodsId: e.goods.baseGoodsId, baseGoodsId: e.goods.baseGoodsId,
totalPrice: Number(e.goods.sellPrice), totalPrice: Number(e.goods.sellPrice),
...@@ -877,13 +887,8 @@ Page({ ...@@ -877,13 +887,8 @@ Page({
discountType: discountType, discountType: discountType,
discountValue: e.goods.discountValue, discountValue: e.goods.discountValue,
discountAmount: discountAmount, discountAmount: discountAmount,
finalPrice: finalPrice,
discountType == 4 singleProductFinalPrice: finalPrice,
? 0
: NP.minus(
NP.times(Number(e.goods.sellPrice), e.count || 1),
discountAmount
),
djOrderType: orderObj.djOrderType djOrderType: orderObj.djOrderType
} }
if ( if (
...@@ -904,6 +909,13 @@ Page({ ...@@ -904,6 +909,13 @@ Page({
discountType = 5 discountType = 5
} }
let discountAmount = NP.times(g.discountAmount || 0, e.count || 1) let discountAmount = NP.times(g.discountAmount || 0, e.count || 1)
const finalPrice =
discountType == 4
? 0
: NP.minus(
NP.times(g.sellPrice, e.count || 1),
discountAmount
)
// console.log(e) // console.log(e)
// console.log(g) // console.log(g)
// console.log(2222) // console.log(2222)
...@@ -918,13 +930,8 @@ Page({ ...@@ -918,13 +930,8 @@ Page({
discountType: discountType, discountType: discountType,
discountValue: g.discountValue, discountValue: g.discountValue,
discountAmount: discountAmount, discountAmount: discountAmount,
finalPrice: finalPrice,
discountType == 4 singleProductFinalPrice: finalPrice,
? 0
: NP.minus(
NP.times(g.sellPrice, e.count || 1),
discountAmount
),
djOrderType: orderObj.djOrderType djOrderType: orderObj.djOrderType
}) })
}) })
...@@ -943,6 +950,16 @@ Page({ ...@@ -943,6 +950,16 @@ Page({
e.multipleSpecificationsGoods.goods.discountAmount || 0, e.multipleSpecificationsGoods.goods.discountAmount || 0,
e.count || 1 e.count || 1
) )
const finalPrice =
discountType == 4
? 0
: NP.minus(
NP.times(
Number(e.multipleSpecificationsGoods.goods.sellPrice),
e.count || 1
),
discountAmount
)
let obj = { let obj = {
baseGoodsId: e.multipleSpecificationsGoods.goods.baseGoodsId, baseGoodsId: e.multipleSpecificationsGoods.goods.baseGoodsId,
totalPrice: Number(e.multipleSpecificationsGoods.goods.sellPrice), totalPrice: Number(e.multipleSpecificationsGoods.goods.sellPrice),
...@@ -953,16 +970,8 @@ Page({ ...@@ -953,16 +970,8 @@ Page({
discountType: discountType, discountType: discountType,
discountValue: e.multipleSpecificationsGoods.goods.discountValue, discountValue: e.multipleSpecificationsGoods.goods.discountValue,
discountAmount: discountAmount, discountAmount: discountAmount,
finalPrice: finalPrice,
discountType == 4 singleProductFinalPrice: finalPrice,
? 0
: NP.minus(
NP.times(
Number(e.multipleSpecificationsGoods.goods.sellPrice),
e.count || 1
),
discountAmount
),
djOrderType: orderObj.djOrderType djOrderType: orderObj.djOrderType
} }
subOrderList.push(obj) subOrderList.push(obj)
...@@ -1700,7 +1709,8 @@ Page({ ...@@ -1700,7 +1709,8 @@ Page({
if (discountType == 1 && discountValue) { if (discountType == 1 && discountValue) {
if (discountValue > 0 && discountValue <= 10) { if (discountValue > 0 && discountValue <= 10) {
finalPrice = NP.times(basePrice, NP.divide(discountValue, 10)) finalPrice = NP.times(basePrice, NP.divide(discountValue, 10))
finalPrice = Math.round(finalPrice * 100) / 100 // 折扣比例: 结果向上取整到分
finalPrice = Math.ceil(finalPrice * 100) / 100
} }
} else if (discountType == 2 && discountValue) { } else if (discountType == 2 && discountValue) {
finalPrice = NP.minus(basePrice, discountValue) finalPrice = NP.minus(basePrice, discountValue)
...@@ -1812,7 +1822,8 @@ Page({ ...@@ -1812,7 +1822,8 @@ Page({
if (discountType == 1 && discountValue) { if (discountType == 1 && discountValue) {
if (discountValue > 0 && discountValue <= 10) { if (discountValue > 0 && discountValue <= 10) {
finalPrice = NP.times(basePrice, NP.divide(discountValue, 10)) finalPrice = NP.times(basePrice, NP.divide(discountValue, 10))
finalPrice = Math.round(finalPrice * 100) / 100 // 折扣比例: 结果向上取整到分
finalPrice = Math.ceil(finalPrice * 100) / 100
} }
} else if (discountType == 2 && discountValue) { } else if (discountType == 2 && discountValue) {
finalPrice = NP.minus(basePrice, discountValue) finalPrice = NP.minus(basePrice, discountValue)
...@@ -1958,7 +1969,8 @@ Page({ ...@@ -1958,7 +1969,8 @@ Page({
if (discountType == 1 && discountValue) { if (discountType == 1 && discountValue) {
if (discountValue > 0 && discountValue <= 10) { if (discountValue > 0 && discountValue <= 10) {
finalPrice = NP.times(basePrice, NP.divide(discountValue, 10)) finalPrice = NP.times(basePrice, NP.divide(discountValue, 10))
finalPrice = Math.round(finalPrice * 100) / 100 // 折扣比例: 结果向上取整到分
finalPrice = Math.ceil(finalPrice * 100) / 100
} }
} else if (discountType == 2 && discountValue) { } else if (discountType == 2 && discountValue) {
finalPrice = NP.minus(basePrice, discountValue) finalPrice = NP.minus(basePrice, discountValue)
...@@ -1992,12 +2004,13 @@ Page({ ...@@ -1992,12 +2004,13 @@ Page({
console.log(skuArr) console.log(skuArr)
return skuArr return skuArr
}, },
// 金额展示:分转元,保留两位小数(包括末尾 0)
divideByHundred: str => { divideByHundred: str => {
let floatVal = parseFloat(str) let floatVal = parseFloat(str)
if (isNaN(floatVal)) { if (isNaN(floatVal)) {
return 0 return '0.00'
} }
floatVal = Math.round(str * 100) / 10000 floatVal = Math.round(floatVal) / 100
let strVal = floatVal.toString() let strVal = floatVal.toString()
let searchVal = strVal.indexOf('.') let searchVal = strVal.indexOf('.')
if (searchVal < 0) { if (searchVal < 0) {
...@@ -2007,7 +2020,7 @@ Page({ ...@@ -2007,7 +2020,7 @@ Page({
while (strVal.length <= searchVal + 2) { while (strVal.length <= searchVal + 2) {
strVal += '0' strVal += '0'
} }
return parseFloat(strVal) return strVal
}, },
getSetting() { getSetting() {
// 动态获取 车型 车架 车牌 是否必填 // 动态获取 车型 车架 车牌 是否必填
...@@ -2176,11 +2189,41 @@ Page({ ...@@ -2176,11 +2189,41 @@ Page({
let oParams = {} let oParams = {}
oParams.merchantId = userInfo.shopMerchantId oParams.merchantId = userInfo.shopMerchantId
api.getShopMerchantPointConfig(oParams).then(res => { api.getShopMerchantPointConfig(oParams).then(res => {
if (res.data.pointsMultiRole == 'Y') { let { pointsMultiRole, createAllGoodsFlag } = res.data
console.log(res.data,'getShopMerchantPointConfig')
// createAllGoodsFlag = 0
if (pointsMultiRole == 'Y') {
toastList.userId = '销售顾问/录单员不能为空' toastList.userId = '销售顾问/录单员不能为空'
} }
// let updateData = {
// pointsMultiRole,
// createAllGoodsFlag
// }
// 如果不可以创建全部类型订单,强制设置为正常订单
if (createAllGoodsFlag == 0) {
// updateData['orderObj.djOrderType'] = ORDER_TYPE.NORMAL
// updateData.orderTypeName = '正常订单'
const { orderObj } = this.data
// 如果是历史订单(有ID)且类型不是正常订单,则不强制重置
const isExistingOrder = orderObj && !!orderObj.id
const isNonNormal = orderObj && orderObj.djOrderType && orderObj.djOrderType != ORDER_TYPE.NORMAL
if (isExistingOrder && isNonNormal) {
// do nothing, keep history type
} else {
this.setData({
orderTypeName: '正常订单',
['orderObj.djOrderType']: ORDER_TYPE.NORMAL
})
}
}
// this.setData(updateData)
this.setData({ this.setData({
pointsMultiRole: res.data.pointsMultiRole createAllGoodsFlag,
pointsMultiRole
}) })
}) })
}, },
......
...@@ -275,13 +275,14 @@ value="{{ orderObj.remark }}" ...@@ -275,13 +275,14 @@ value="{{ orderObj.remark }}"
valueAlign="right" valueAlign="right"
label="订单类型" label="订单类型"
labelWidth="var(--fontSize140)" labelWidth="var(--fontSize140)"
haveArrow haveArrow="{{ createAllGoodsFlag != 0 }}"
requiredAfter requiredAfter
required required
value="{{ orderTypeName }}" value="{{ orderTypeName }}"
placeholder="点击选择" placeholder="点击选择"
bindclick="showPopup" bindclick="showPopup"
data-show-name="orderTypeBox" data-show-name="orderTypeBox"
disabled="{{ createAllGoodsFlag == 0 }}"
/> />
<block wx:if="{{ isErrorOrder }}"> <block wx:if="{{ isErrorOrder }}">
<gl-cell <gl-cell
......
...@@ -130,7 +130,8 @@ ProductStrategy.prototype.applyDiscount = function () { ...@@ -130,7 +130,8 @@ ProductStrategy.prototype.applyDiscount = function () {
if (type == DISCOUNT_TYPE.RATIO && value) { if (type == DISCOUNT_TYPE.RATIO && value) {
if (value > 0 && value <= 10) { if (value > 0 && value <= 10) {
finalPrice = NP.times(basePrice, NP.divide(value, 10)) finalPrice = NP.times(basePrice, NP.divide(value, 10))
finalPrice = Math.round(finalPrice * 100) / 100 // 折扣比例:结果向上取整到分(两位小数)
finalPrice = Math.ceil(finalPrice * 100) / 100
} }
} else if (type == DISCOUNT_TYPE.AMOUNT && value) { } else if (type == DISCOUNT_TYPE.AMOUNT && value) {
finalPrice = NP.minus(basePrice, value) finalPrice = NP.minus(basePrice, value)
...@@ -375,7 +376,8 @@ PackageProductStrategy.prototype.applySubItemDiscount = function (subItem) { ...@@ -375,7 +376,8 @@ PackageProductStrategy.prototype.applySubItemDiscount = function (subItem) {
if (type == DISCOUNT_TYPE.RATIO && value) { if (type == DISCOUNT_TYPE.RATIO && value) {
if (value > 0 && value <= 10) { if (value > 0 && value <= 10) {
finalPrice = NP.times(basePrice, NP.divide(value, 10)) finalPrice = NP.times(basePrice, NP.divide(value, 10))
finalPrice = Math.round(finalPrice * 100) / 100 // 折扣比例:结果向上取整到分(两位小数)
finalPrice = Math.ceil(finalPrice * 100) / 100
} }
} else if (type == DISCOUNT_TYPE.AMOUNT && value) { } else if (type == DISCOUNT_TYPE.AMOUNT && value) {
finalPrice = NP.minus(basePrice, value) finalPrice = NP.minus(basePrice, value)
......
...@@ -103,25 +103,11 @@ Page({ ...@@ -103,25 +103,11 @@ Page({
// constructionVisible: false // constructionVisible: false
// }) // })
}, },
// 确定是否要显示 // 跳转新增订单页面
showErrorType() { goToCreateOrder() {
console.log('showErrorType') let { orderInfo } = this.data
wx.$modal(
this,
{
show: true,
title: '请选择录单入口',
tabTitleShow: false,
success: async res => {
// 再次校验 防止二次确认弹窗弹起后长时间未操作,导致订单状态变更异常
let { orderInfo, selectType } = this.data
let canRefundStep = await commonApi.getOrderRefundStep({
orderCode: orderInfo.orderCode
})
if (canRefundStep?.data == 'Y') return this.showRefundAlert()
// 跳转新增订单页面 并带特定参数 // 跳转新增订单页面 并带特定参数
console.log(orderInfo) console.log(orderInfo)
if (selectType == 1) {
orderInfo.associateOrderCode = orderInfo.orderCode orderInfo.associateOrderCode = orderInfo.orderCode
delete orderInfo.orderCode delete orderInfo.orderCode
if (orderInfo.technicianList) { if (orderInfo.technicianList) {
...@@ -130,33 +116,6 @@ Page({ ...@@ -130,33 +116,6 @@ Page({
orderInfo.selectPayType = 2 orderInfo.selectPayType = 2
let urlName = 'createOrder' let urlName = 'createOrder'
wx.$router.redirectTo(urlName, orderInfo) wx.$router.redirectTo(urlName, orderInfo)
} else {
// 无需补录
api
.noNeedSupplementOrder({ oldOrderCode: orderInfo.orderCode })
.then(res => {
console.log(res)
if (res.code == 0) {
wx.$util.refreshPageData()
wx.$router.go('pages.index')
this.setData({
modalShow: false
})
wx.$modal(this, { show: false }, '#modal2')
} else {
wx.$util.showToast(res.message)
}
})
.catch(err => {
console.log(err)
})
}
},
error: () => {}
},
'#modal2'
)
}, },
// 确定是否要显示 // 确定是否要显示
async targetError() { async targetError() {
...@@ -193,28 +152,16 @@ Page({ ...@@ -193,28 +152,16 @@ Page({
tabTitleShow: false, tabTitleShow: false,
success: res => { success: res => {
console.log(res, 'res') console.log(res, 'res')
this.showTarget() this.goToCreateOrder()
}, },
error: () => {} error: () => {}
}, },
'#modal5' '#modal5'
) )
} else { } else {
this.showTarget() this.goToCreateOrder()
} }
}, },
showTarget() {
wx.$modal(this, {
show: true,
title: '工单标记',
tabTitleShow: false,
success: res => {
console.log(res, 'res')
this.showErrorType()
},
error: () => {}
})
},
targetOperate() { targetOperate() {
let { showTip } = this.data let { showTip } = this.data
this.setData({ this.setData({
......
...@@ -1133,7 +1133,7 @@ Page({ ...@@ -1133,7 +1133,7 @@ Page({
if (item.firstBrandId == carBandId) { if (item.firstBrandId == carBandId) {
hmPresent = true hmPresent = true
} }
if (item.brandId == 3574 || item.brandName == '尚界') { if (item.brandId == 3574 || (item.brandName && item.brandName.indexOf('界') > -1 && item.brandName.indexOf('问界') == -1)) {
containsShangJie = true containsShangJie = true
} }
if (item.brandType == 0) { if (item.brandType == 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!