Commit 09d82a46 by 张立顺

Merge branch 'SAAS-V4.37.0' of http://192.168.3.233:8090/saas_plus/dj-car-boutiq…

…ue-work-wechat into SAAS-V4.37.0
2 parents 6b56ccf4 086b7b9d
...@@ -322,7 +322,6 @@ ...@@ -322,7 +322,6 @@
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
height: var(--fontSize64); height: var(--fontSize64);
text-align: end;
min-height: 100%; min-height: 100%;
font-size: var(--fontSize28); font-size: var(--fontSize28);
padding: 0 var(--fontSize16) 0 var(--fontSize50); padding: 0 var(--fontSize16) 0 var(--fontSize50);
......
...@@ -445,7 +445,7 @@ Page({ ...@@ -445,7 +445,7 @@ Page({
wx.$router.redirectTo('CarQuotationPay', obj) wx.$router.redirectTo('CarQuotationPay', obj)
}, },
getOrderInfo() { getOrderInfo() {
let { id, orderInfo } = this.data let { id, orderInfo, quotationGoodsList } = this.data
// 先写死调试 // 先写死调试
getQuotationInfoById({ getQuotationInfoById({
id id
...@@ -468,8 +468,10 @@ Page({ ...@@ -468,8 +468,10 @@ Page({
let obj = { let obj = {
...item, ...item,
upgradeGoodsId: item.goodsId, upgradeGoodsId: item.goodsId,
merchantGoodsId: item.id, merchantGoodsId: item.goodsId,
price: this.divideByHundred(item.goodsPrice) price: this.divideByHundred(item.goodsPrice),
minSellPrice: quotationGoodsList?.find(val => val?.goods?.merchantGoodsId == item.goodsId)?.goods?.minSellPrice, // 按商品数据对比补充详情商品最低价
validMinSellPrice: quotationGoodsList?.find(val => val?.goods?.merchantGoodsId == item.goodsId)?.goods?.validMinSellPrice // 按商品数据对比补充详情商品校验最低价字段
} }
pre.push({ goods: obj, packageGoods: null }) pre.push({ goods: obj, packageGoods: null })
} }
...@@ -478,15 +480,16 @@ Page({ ...@@ -478,15 +480,16 @@ Page({
...item, ...item,
merchantGoodsId: item.goodsId, merchantGoodsId: item.goodsId,
upgradeGoodsId: item.goodsId, upgradeGoodsId: item.goodsId,
price: this.divideByHundred(item.goodsPrice) price: this.divideByHundred(item.goodsPrice),
minSellPrice: quotationGoodsList?.find(val => val.packageGoods?.goodsList?.length)?.packageGoods?.goodsList?.find(subV => subV.merchantGoodsId == item.goodsId)?.minSellPrice, // 按商品数据对比补充详情商品最低价
validMinSellPrice: quotationGoodsList?.find(val => val.packageGoods?.goodsList?.length)?.packageGoods?.goodsList?.find(subV => subV.merchantGoodsId == item.goodsId)?.validMinSellPrice // 按商品数据对比补充详情商品校验最低价字段
} }
let index = pre.findIndex(ele => { let index = pre.findIndex(ele => {
if (ele.packageGoods) { if (ele.packageGoods) {
return ele.packageGoods.packageId == item.packageId return ele.packageGoods.packageId == item.packageId
} }
}) })
console.log(index, 'index'); // console.log(index, 'index');
if (index != -1) { if (index != -1) {
pre[index].packageGoods.goodsList.push(obj) pre[index].packageGoods.goodsList.push(obj)
pre[index].price = NP.plus(pre[index].price, obj.price) pre[index].price = NP.plus(pre[index].price, obj.price)
...@@ -517,7 +520,7 @@ Page({ ...@@ -517,7 +520,7 @@ Page({
owner: tableInfo.owner owner: tableInfo.owner
// ...insuranceTypeObj // ...insuranceTypeObj
}) })
this.getQuotationInfo() // this.getQuotationInfo()
} }
}) })
.catch(err => { }) .catch(err => { })
...@@ -612,7 +615,8 @@ Page({ ...@@ -612,7 +615,8 @@ Page({
// debugger // debugger
let { let {
owner: { price }, owner: { price },
orderInfo orderInfo,
id
} = this.data } = this.data
quotationGoodsList({ quotationGoodsList({
merchantId: default4SStoreInfo.merchantId, merchantId: default4SStoreInfo.merchantId,
...@@ -674,8 +678,17 @@ Page({ ...@@ -674,8 +678,17 @@ Page({
}) })
// 判断有没有勾选商品,有的话调用一下 // 判断有没有勾选商品,有的话调用一下
orderInfo.vdQuotationGoodsList.length && this.totalFee() orderInfo.vdQuotationGoodsList.length && this.totalFee()
// 获取订单详情
if (id) {
this.getOrderInfo()
}
})
.catch(err => {
// 获取订单详情
if (id) {
this.getOrderInfo()
}
}) })
.catch(err => { })
}, },
// 后面改成全局方法 // 后面改成全局方法
// 除以100保留两位小数点 // 除以100保留两位小数点
...@@ -753,10 +766,9 @@ Page({ ...@@ -753,10 +766,9 @@ Page({
this.setData({ this.setData({
id id
}) })
this.getOrderInfo() // this.getOrderInfo()
} else {
this.getQuotationInfo()
} }
this.getQuotationInfo()
//客户线索回显客户信息 //客户线索回显客户信息
if (customerInfo) this.setCustomerInfo(customerInfo) if (customerInfo) this.setCustomerInfo(customerInfo)
this.setData({ this.setData({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!