diff --git a/src/api/product.js b/src/api/product.js
index a5d064f..bac1947 100644
--- a/src/api/product.js
+++ b/src/api/product.js
@@ -299,6 +299,12 @@ export function seckillChangeApi(id, status) {
export function toVirtualSalesApi(id) {
return request.get(`store/product/ficti/form/${id}`)
}
+/**
+ * @description 商品列表 -- 标记标记
+ */
+export function setTagNameApi(id) {
+ return request.get(`store/product/tag_name/form/${id}`)
+}
/**
* @description 预售 -- 列表
*/
diff --git a/src/views/product/productExamine/editAttr.vue b/src/views/product/productExamine/editAttr.vue
index ecfe174..916e02b 100644
--- a/src/views/product/productExamine/editAttr.vue
+++ b/src/views/product/productExamine/editAttr.vue
@@ -358,12 +358,22 @@ export default {
}
},
+ calculatePercentage(number) {
+ // 假设输入的是0.6,50%
+ // 首先计算百分比
+ var percentage = 100 - (number - 0.1) * 100;
+ // 确保百分比在0到100之间
+ percentage = Math.min(Math.max(percentage, 0), 100);
+ // 返回百分比
+ return percentage + "%";
+ },
handleCost(val,i){
switch(i){
case 'cost':
val.cost=val.cost.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
- val.growth = parseInt(val.price*(0.9-(val.cost/val.price)))
+ // val.growth = parseInt(val.price*(0.9-(val.cost/val.price)))
val.proportion = (val.cost/val.price).toFixed(2)
+ val.growth = parseInt(val.price*val.proportion)
break;
case 'ot_price':
val.ot_price=val.ot_price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
@@ -373,8 +383,8 @@ export default {
break;
case 'price':
val.price=val.price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
- val.growth = parseInt(val.price*(0.9-(val.cost/val.price)))
val.proportion = (val.cost/val.price).toFixed(2)
+ val.growth = parseInt(val.price*val.proportion)
break;
case 'growth':
val.growth=val.growth.replace(/[^\d]/g,'')
diff --git a/src/views/product/productExamine/index.vue b/src/views/product/productExamine/index.vue
index 2e8f59c..a69d12e 100644
--- a/src/views/product/productExamine/index.vue
+++ b/src/views/product/productExamine/index.vue
@@ -51,6 +51,9 @@
+
+
+
+
{{ productTypeList[scope.row.audit_type].label }}
@@ -212,7 +216,8 @@
查看评价
- 编辑标签
+
+ 编辑标签
已售数量
强制下架
@@ -395,7 +400,8 @@ import {
batchesLabelsApi,
batchesRecommendApi,
batchesOnOffApi,
- exportProductApi
+ exportProductApi,
+ setTagNameApi
} from '@/api/product'
import { roterPre } from '@/settings'
import infoFrom from './info'
@@ -512,6 +518,7 @@ export default {
cate_id: '',
sys_labels: '',
pid: '',
+ tag_name:'',
store_name: '',
audit_type:'',
type: '6',
@@ -776,6 +783,10 @@ export default {
toVirtualSales(id) {
this.$modalForm(toVirtualSalesApi(id)).then(() => this.getList(''))
},
+ // 编辑标签
+ setTagName(id) {
+ this.$modalForm(setTagNameApi(id)).then(() => this.getList(''))
+ },
// 提交
handleSubmit(name) {
console.log(this.formValidate)