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 @@ ...@@ -240,7 +240,7 @@
</view> </view>
</template> </template>
</PublishPopup> </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> <template #content>
<view class="warranty-content"> <view class="warranty-content">
<view class="name">产品:{{ replaceItemText(warrantyEditObj.goodsName) }}</view> <view class="name">产品:{{ replaceItemText(warrantyEditObj.goodsName) }}</view>
...@@ -299,7 +299,8 @@ export default { ...@@ -299,7 +299,8 @@ export default {
selectDate: null, selectDate: null,
warrantyEditObj: {}, warrantyEditObj: {},
isShow: false, isShow: false,
bg: require('@/assets/images/boutique/tipsPopupBg.png') bg: require('@/assets/images/boutique/tipsPopupBg.png'),
popupKey: 0
} }
}, },
async mounted() {}, async mounted() {},
...@@ -353,12 +354,22 @@ export default { ...@@ -353,12 +354,22 @@ export default {
e.price = Number(utils.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2) e.price = Number(utils.decimal(Number(e.totalPrice / e.number), 2)).toFixed(2)
e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || '' e.positionStr = positionTypeList.filter(v => v.positionValue == e.upgradeGoodsPosition)[0]?.positionName || ''
if ((e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) && data.selectPayType != 0) { if ((e.upgradeWarrantyPeriod || e.upgradeWarrantyPeriod > 0) && data.selectPayType != 0) {
this.warrantyCardList.push({ const warrantyItem = {
warrantyPeriod: e.upgradeWarrantyPeriod, warrantyPeriod: e.upgradeWarrantyPeriod || '',
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName, goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName || '',
cardCode: e.cardCode, cardCode: e.cardCode || '',
warrantyPrice: e.warrantyPrice 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) { if (this.baseConfigData?.membraneTypeList?.includes(e?.upgradeGoodsType) && this.isUseFilmRoll && !this.signatureSwitch) {
...@@ -572,8 +583,7 @@ export default { ...@@ -572,8 +583,7 @@ export default {
.then(data => { .then(data => {
// 待优化 应该都有之后再一次性更新 // 待优化 应该都有之后再一次性更新
// warrantyCardList[index].barCodeUrl = 'http://qcimg01.glsx.com.cn:7060/group1/M00/02/96/wKgD3mNXkD-ALMu3AAABmn9Id4c794.png' // 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], 'barCodeUrl', data)
this.$set(this.warrantyCardList, index, warrantyCardList[index])
console.log(this.warrantyCardList, 'getBarCode') console.log(this.warrantyCardList, 'getBarCode')
}) })
.catch(err => {}) .catch(err => {})
...@@ -636,13 +646,18 @@ export default { ...@@ -636,13 +646,18 @@ export default {
this.$refs.calendarPopup.closePopup() this.$refs.calendarPopup.closePopup()
}, },
calendarChange(date) { calendarChange(date) {
console.log(date)
this.selectDate = date.year + '-' + date.month + '-' + date.date this.selectDate = date.year + '-' + date.month + '-' + date.date
}, },
warrantyEdit(item) { warrantyEdit(item) {
console.log(item) console.log(item)
// 不添加前出现Property or method "toJSON" is not defined
//this.warrantyEditOb.warrantyPrice一直不回显
//添加 popupKey 强制组件重新渲染
this.popupKey++
this.warrantyEditObj = item this.warrantyEditObj = item
this.$refs.warrantyPopup.open() this.$nextTick(() => {
this.$refs.warrantyPopup.open()
})
}, },
confirmEdit() { confirmEdit() {
uni.$api.boutiqueApi uni.$api.boutiqueApi
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!