|
|
@ -31,9 +31,9 @@ |
|
|
|
<div style="text-align: center"> |
|
|
|
<div class="flex"> |
|
|
|
<GuipInput ref="GuipInput" width="133px" v-model="row.price" label="售价" placeholder="请输入售价" :unit="row.price_unit"></GuipInput> |
|
|
|
<template v-if="row.price_unit_num>1"> |
|
|
|
<template v-if="row.freedom_set || row.supply_unit_num>1"> |
|
|
|
<span class="shortspan">/</span> |
|
|
|
<GuipInput ref="GuipInput" width="133px" v-model="row.price_unit_num" unit="字符"> |
|
|
|
<GuipInput ref="GuipInput" width="133px" v-model="row.unit_num" :unit="row.unit_name" @input="inputPrice(row)"> |
|
|
|
</GuipInput> |
|
|
|
</template> |
|
|
|
</div> |
|
|
@ -313,6 +313,17 @@ export default { |
|
|
|
item.removeAttribute('aria-hidden') |
|
|
|
}) |
|
|
|
}, |
|
|
|
inputPrice(row){ |
|
|
|
if(row.freedom_set){ |
|
|
|
if(row.unit_num == 1) { |
|
|
|
row.unit_name = '篇'; |
|
|
|
}else{ |
|
|
|
row.unit_name = '字符'; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
row.unit_name = row.supply_unit_name; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 保存价格 |
|
|
|
saveEdit(row, type) { |
|
|
|
row[type + 'PopoverVisible'] = false; // 关闭弹框 |
|
|
@ -335,7 +346,7 @@ export default { |
|
|
|
let obj = {} |
|
|
|
obj.uid = this.siteInfo.uid |
|
|
|
obj.type = row.type |
|
|
|
obj.unit_num = row.price_unit_num |
|
|
|
obj.unit_num = row.unit_num |
|
|
|
if(row.price_unit == '元'){ |
|
|
|
obj.unit_price = row.price |
|
|
|
}else{ |
|
|
@ -343,7 +354,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
const res = await this.saveRequest('/agentnew/ajax_set_service_price', obj) |
|
|
|
if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.price_unit_num); |
|
|
|
if(res) row.price_desc = getServicePriceDesc(row.price, row.price_unit, row.unit_num, row.unit_name); |
|
|
|
}, |
|
|
|
async onSwitchChange(row){ |
|
|
|
let obj = {} |
|
|
|