-
+
@@ -196,13 +196,18 @@ export default {
}
\ No newline at end of file
diff --git a/src/utils/common.js b/src/utils/common.js
index f2af514..a3a9bf8 100644
--- a/src/utils/common.js
+++ b/src/utils/common.js
@@ -8,11 +8,11 @@ export function setHighActive(dom) {
},1000)
}
-export function getServicePriceDesc(price, price_unit, unit_num) {
+export function getServicePriceDesc(price, price_unit, unit_num, unit_name) {
let unit = 0;
let unit_str = "";
- if (unit_num == 1) return price + price_unit +'/篇';
+ if (unit_num == 1) return price + price_unit +'/'+unit_name;
if (unit_num/10000 < 10) {
unit = Math.ceil(unit_num/10000);
@@ -27,6 +27,6 @@ export function getServicePriceDesc(price, price_unit, unit_num) {
unit_str = unit == 1 ? '百' : unit+'百';
}
- return price + price_unit + "/" +unit_str + "字符";
+ return price + price_unit + "/" +unit_str + unit_name;
}
diff --git a/src/views/agent/siteServiceList.vue b/src/views/agent/siteServiceList.vue
index 7ad2724..853151b 100644
--- a/src/views/agent/siteServiceList.vue
+++ b/src/views/agent/siteServiceList.vue
@@ -40,9 +40,9 @@
-
+
/
-
+
@@ -362,6 +362,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; // 关闭弹框
@@ -388,7 +399,7 @@ export default {
let obj = {}
obj.uid = this.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{
@@ -396,7 +407,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 = {}