Commit 198a62ad by 胡悦

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents b66f6d14 6a429648
......@@ -240,7 +240,7 @@
</view>
</template>
</PublishPopup>
<PublishPopup ref="warrantyPopup" popupClass="warrantyPopup" type="center" title="质保价格" :showClose="true" @confirm="confirmEdit">
<PublishPopup :key="popupKey" ref="warrantyPopup" popupClass="warrantyPopup" type="center" title="质保价格" :showClose="true" @confirm="confirmEdit">
<template #content>
<view class="warranty-content">
<view class="name">产品:{{ replaceItemText(warrantyEditObj.goodsName) }}</view>
......@@ -299,7 +299,8 @@ export default {
selectDate: null,
warrantyEditObj: {},
isShow: false,
bg: require('@/assets/images/boutique/tipsPopupBg.png')
bg: require('@/assets/images/boutique/tipsPopupBg.png'),
popupKey: 0
}
},
async mounted() {},
......@@ -353,12 +354,22 @@ export default {
e.price = Number(utils.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2)
e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
if ((e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) && data.selectPayType != 0) {
this.warrantyCardList.push({
warrantyPeriod: e.upgradeWarrantyPeriod,
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName,
cardCode: e.cardCode,
warrantyPrice: e.warrantyPrice
const warrantyItem = {
warrantyPeriod: e.upgradeWarrantyPeriod || '',
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName || '',
cardCode: e.cardCode || '',
warrantyPrice: e.warrantyPrice || '',
barCodeUrl: ''
}
Object.keys(warrantyItem).forEach(key => {
if (typeof warrantyItem[key] === 'function') {
warrantyItem[key] = ''
} else if (typeof warrantyItem[key] === 'object' && warrantyItem[key] !== null) {
warrantyItem[key] = JSON.stringify(warrantyItem[key])
}
})
this.warrantyCardList.push(warrantyItem)
}
// 膜类商品 并且服务商开通了使用膜卷号配置 不走签名流程
if (this.baseConfigData?.membraneTypeList?.includes(e?.upgradeGoodsType) && this.isUseFilmRoll && !this.signatureSwitch) {
......@@ -572,8 +583,7 @@ export default {
.then(data => {
// 待优化 应该都有之后再一次性更新
// warrantyCardList[index].barCodeUrl = 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/96/wKgD3mNXkD-ALMu3AAABmn9Id4c794.png'
warrantyCardList[index].barCodeUrl = data
this.$set(this.warrantyCardList, index, warrantyCardList[index])
this.$set(this.warrantyCardList[index], 'barCodeUrl', data)
console.log(this.warrantyCardList, 'getBarCode')
})
.catch(err => {})
......@@ -636,13 +646,18 @@ export default {
this.$refs.calendarPopup.closePopup()
},
calendarChange(date) {
console.log(date)
this.selectDate = date.year + '-' + date.month + '-' + date.date
},
warrantyEdit(item) {
console.log(item)
// 不添加前出现Property or method "toJSON" is not defined
//this.warrantyEditOb.warrantyPrice一直不回显
//添加 popupKey 强制组件重新渲染
this.popupKey++
this.warrantyEditObj = item
this.$refs.warrantyPopup.open()
this.$nextTick(() => {
this.$refs.warrantyPopup.open()
})
},
confirmEdit() {
uni.$api.boutiqueApi
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!