Commit 785c486a by 胡悦

提交补录订单

1 parent 8ec22121
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<radio-group class="radio-group value" @change="onRadioChange($event, item)"> <radio-group class="radio-group value" @change="onRadioChange($event, item)">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList" <label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList"
:key="radio.value + item.value"> :key="radio.value + item.value">
<radio style="transform:scale(0.7)" :value="radio.value" :disabled="radio.disabled" <radio style="transform:scale(0.7)" :value="radio.value" :disabled="item.disabled || radio.disabled"
:checked="radio.value == item.current" /> :checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view> <view class="radio-name">{{ radio.name }}</view>
</label> </label>
......
...@@ -60,17 +60,20 @@ export default { ...@@ -60,17 +60,20 @@ export default {
handler(newVal) { handler(newVal) {
if (newVal) { if (newVal) {
console.log('接收到的交易数据:', newVal) console.log('接收到的交易数据:', newVal)
this.orderCreateType = 'supplementOrder' this.orderCreateType = newVal.type
if (this.orderCreateType == 'supplementOrder') {
this.orderObj.outTradeNo = newVal.selectedItems.map(item => item.outTradeNo).join(',') this.orderObj.outTradeNo = newVal.selectedItems.map(item => item.outTradeNo).join(',')
this.orderObj.tradeNo = newVal.selectedItems.map(item => item.tradeNo).join(',') this.orderObj.tradeNo = newVal.selectedItems.map(item => item.tradeNo).join(',')
} }
}
}, },
immediate: true immediate: true
} }
}, },
data() { data() {
return { return {
orderCreateType: 'createWithPay', // supplementOrder(补录订单) createWithPay(新增) orderCreateType: 'createWithPay', // supplementOrder(补录订单) createWithPay(新增) editWithPay(编辑、修改)
formList: utils.deepClone(FORM_LIST), formList: utils.deepClone(FORM_LIST),
userInfo: {}, userInfo: {},
baseConfigData: {}, baseConfigData: {},
...@@ -136,11 +139,29 @@ export default { ...@@ -136,11 +139,29 @@ export default {
}, },
methods: { methods: {
initData() { initData() {
console.log('initData', this.orderCreateType)
const { userInfo } = this const { userInfo } = this
this.getShopMerchantPointConfig(userInfo.shopMerchantId) this.getShopMerchantPointConfig(userInfo.shopMerchantId)
this.getSubShopMerchantList(userInfo.shopMerchantId) this.getSubShopMerchantList(userInfo.shopMerchantId)
this.getSetting() this.getSetting()
// 补录订单默认为嘀加收款,不需要获取园区店支付方式
if (this.orderCreateType == 'supplementOrder') {
this.orderObj.payeeType = 0
const cell = this.formList[2].find(item => item.value == 'payeeType')
if (cell) {
cell.current = 0
cell.radioList[1].disabled = true // 禁用4s店收款
}
this.djPayList = [
{
value: '5',
name: '嘀加收款'
}
]
this.changePayee()
} else {
this.getConfig() this.getConfig()
}
// this.getEmployeeList() // this.getEmployeeList()
this.getSelectOrderGoodsList() this.getSelectOrderGoodsList()
this.getPositionList() this.getPositionList()
...@@ -361,19 +382,18 @@ export default { ...@@ -361,19 +382,18 @@ export default {
} }
}) })
obj.subOrderList = subGoodsList obj.subOrderList = subGoodsList
// obj.subOrderList = goodsList.map(item => {
// return {
// totalPrice: item.goods.sellPrice,
// number: item.goods.number,
// merchantGoodsId: item.goods.merchantGoodsId
// }
// })
} }
delete obj.carBrand delete obj.carBrand
delete obj.couponInfo delete obj.couponInfo
console.log(obj, 'rucan') console.log(obj, 'rucan')
const res = await uni.$api.boutiqueApi[orderCreateType](obj)
console.log(res, '===submit') uni.showLoading({
title: '提交中...',
mask: true
})
const res = await uni.$api.boutiqueApi[orderCreateType](obj).finally(() => {
uni.hideLoading()
})
if (res) { if (res) {
uni.showToast({ uni.showToast({
title: '保存成功', title: '保存成功',
...@@ -475,6 +495,7 @@ export default { ...@@ -475,6 +495,7 @@ export default {
if (cell) cell.required = res[key] == 'Y' if (cell) cell.required = res[key] == 'Y'
} }
}, },
// 获取园区店支付方式
async getConfig() { async getConfig() {
const res = await uni.$api.boutiqueApi.getYqStoreConfig({ const res = await uni.$api.boutiqueApi.getYqStoreConfig({
yqMerchantId: this.orderObj.sellerMerchantId yqMerchantId: this.orderObj.sellerMerchantId
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!