This commit is contained in:
faiz 2024-05-29 10:16:56 +08:00
parent 593e06ffe7
commit 200b52b569
3 changed files with 17 additions and 15 deletions

View File

@ -19,7 +19,9 @@ export const getCookies = key => {
// 保留两位小数;
// num
export function toFixedNoRounding(num) {
return Math.floor(num * 100) / 100;
var re = /([0-9]+.[0-9]{2})[0-9]*/;
return `${num}`.replace(re, "$1");
}
export const removeCookies = key => {
return Cookies.remove(key);

View File

@ -2108,7 +2108,7 @@ const defaultObj = {
ot_price: null,
svip_price: null,
select: false,
proportion:0.6,
proportion:0.60,
coupon:'',
growth:0,
stock: null,
@ -2247,7 +2247,7 @@ export default {
value: '0.50',
label: '0.50',
coupon:0.4,
growth:0.6
growth:0.60
},
{
value: '0.45',
@ -2270,7 +2270,7 @@ export default {
{
value: '0.30',
label: '0.30',
coupon:0.6,
coupon:0.60,
growth:0.8
},
{
@ -2545,7 +2545,7 @@ export default {
price: null,
cost: null,
ot_price: null,
proportion:0.6,
proportion:0.60,
coupon:'',
stock: null,
// growth:0,
@ -2583,7 +2583,7 @@ export default {
cost: '',
ot_price: '',
svip_price: '',
proportion:'0.6',
proportion:'0.60',
coupon:'',
gist_url:'',
growth:0,
@ -2724,7 +2724,7 @@ export default {
//
handleCost(val,i,e,type){
if(type == 'batchAdd'){
i=='price'?val.cost = toFixedNoRounding(val.price * 0.6):''
i=='price'?val.cost = toFixedNoRounding(val.price * val.proportion):''
}
if(i=='price'){
val.price=val.price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
@ -3217,7 +3217,7 @@ export default {
weight: 0,
volume: 0,
growth:0,
proportion:'0.6',
proportion:'0.60',
coupon:'',
extension_one: 0,
extension_two: 0
@ -3257,7 +3257,7 @@ export default {
weight: 0,
volume: 0,
growth:0,
proportion:'0.6',
proportion:'0.60',
coupon:'',
extension_one: 0,
extension_two: 0,
@ -3525,7 +3525,7 @@ export default {
ot_price: null,
svip_price: null,
stock: null,
proportion:0.6,
proportion:0.60,
coupon:'',
growth:0,
bar_code: '',
@ -3552,7 +3552,7 @@ export default {
bar_code: '',
weight: null,
volume: null,
proportion:0.6,
proportion:0.60,
coupon:'',
growth:0,
gist_url:''
@ -3687,7 +3687,7 @@ export default {
}, []);
this.formValidate.attr[idx].inputVisible = false;
} else {
this.$message.warning("请添加属性");
if(this.formValidate.attr[idx].inputVisible)this.$message.warning("请添加属性");
}
this.attrs = this.formValidate.attr;
},
@ -3814,7 +3814,7 @@ export default {
ot_price: null,
svip_price: null,
stock: null,
proportion:0.6,
proportion:0.60,
coupon:'',
growth:0,
// cdkey: {},

View File

@ -409,14 +409,14 @@
</el-table>
</div>
</li>
<li class="item item100">
<!-- <li class="item item100">
<div class="item-title">关联系统表单</div>
<div v-if="!productData.mer_form_id" class="value">关闭</div>
<div v-else-if="productData.mer_form_id && formData.length==0" class="value">表单已被删除</div>
<div v-else-if="formData.length>0 && productData.mer_form_id && activeName=='others'" style="width: 350px;">
<iframe class="iframe-box" :src="formUrl" frameborder="0" ref="iframe" style="min-height: 300px;"></iframe>
</div>
</li>
</li> -->
</ul>
</div>
</el-tab-pane>