|
@@ -417,7 +417,7 @@ export default {
|
|
|
} else {
|
|
|
// 不展示合同金额
|
|
|
this.$set(m.props, 'showContractMoney', false)
|
|
|
- m.label = '标准售价'
|
|
|
+ m.label = ''
|
|
|
}
|
|
|
},
|
|
|
// common: 通用修改付费类型相关逻辑
|
|
@@ -749,16 +749,44 @@ export default {
|
|
|
this.commonChangeUpgradeContentSchema(value)
|
|
|
// 产品规格
|
|
|
this.commonChangeSpecificationSchema(value)
|
|
|
+ this.commonChangeValidityCountSchema()
|
|
|
},
|
|
|
changeDataPackSchema(value) {
|
|
|
this.commonGroupChangeSchema(value)
|
|
|
// 数据条数
|
|
|
this.commonChangeValidityDataCount(value)
|
|
|
+ this.commonChangeValidityCountSchema()
|
|
|
},
|
|
|
changeMarketingSchema() {
|
|
|
// 数据条数更新,重新查询价格
|
|
|
this.getPriceRequest()
|
|
|
},
|
|
|
+ // 数据条数
|
|
|
+ commonChangeValidityCountSchema(value = this.value) {
|
|
|
+ const m = this.getSchemaItemWithKey(schemaKeyMap.validityCount)
|
|
|
+ if (!m) {
|
|
|
+ return console.error('没找到schema: ', schemaKeyMap.validityCount)
|
|
|
+ }
|
|
|
+
|
|
|
+ const { saleGifts } = value
|
|
|
+ // 2.产品属性为“会员服务”:
|
|
|
+ if (this.utilCheckIsSourcePack()) {
|
|
|
+ m.show = true
|
|
|
+ // (1)销售策略为“售卖”:
|
|
|
+ if (saleGifts === 1) {
|
|
|
+ // 1)付费类型为购买、试用,展示如下图:
|
|
|
+ // 1 付费:文本框,非必填,仅可输入1和正整数,单位可选:月(初始值)、天
|
|
|
+ // 2 赠送:文本框,非必填,仅可输入0和正整数,单位同付费,不支持选择。
|
|
|
+ // 3 合计:付费+赠送,初始值为-,单位同付费,如若为0,则提示“请输入有效周期”;
|
|
|
+ this.$set(m.props, 'showPayInput', true)
|
|
|
+ } else if (saleGifts === 2) {
|
|
|
+ // 赠送
|
|
|
+ this.$set(m.props, 'showPayInput', false)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // m.show = false
|
|
|
+ }
|
|
|
+ },
|
|
|
changeDhyServiceList(value = this.value || {}) {
|
|
|
const ma = this.getSchemaItemWithKey(schemaKeyMap.serviceList)
|
|
|
if (!ma) {
|
|
@@ -922,7 +950,14 @@ export default {
|
|
|
}
|
|
|
if (changedArr.includes('saleGifts')) {
|
|
|
// 销售策略变更,清空有效周期(通用规则)
|
|
|
- this.refreshValue({ validityPeriod: {} })
|
|
|
+ const obj = {}
|
|
|
+ if (this.value.validityPeriod) {
|
|
|
+ obj.validityPeriod = {}
|
|
|
+ }
|
|
|
+ if (this.value[schemaKeyMap.validityCount]) {
|
|
|
+ obj[schemaKeyMap.validityCount] = {}
|
|
|
+ }
|
|
|
+ this.refreshValue(obj)
|
|
|
}
|
|
|
if (changedArr.includes('saleGifts') || changedArr.includes(schemaKeyMap.specification)) {
|
|
|
// 付费类型变更,如果有主账号数量,则清空
|