edit
This commit is contained in:
parent
593e06ffe7
commit
200b52b569
|
@ -19,7 +19,9 @@ export const getCookies = key => {
|
||||||
// 保留两位小数;
|
// 保留两位小数;
|
||||||
// num
|
// num
|
||||||
export function toFixedNoRounding(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 => {
|
export const removeCookies = key => {
|
||||||
return Cookies.remove(key);
|
return Cookies.remove(key);
|
||||||
|
|
|
@ -2108,7 +2108,7 @@ const defaultObj = {
|
||||||
ot_price: null,
|
ot_price: null,
|
||||||
svip_price: null,
|
svip_price: null,
|
||||||
select: false,
|
select: false,
|
||||||
proportion:0.6,
|
proportion:0.60,
|
||||||
coupon:'',
|
coupon:'',
|
||||||
growth:0,
|
growth:0,
|
||||||
stock: null,
|
stock: null,
|
||||||
|
@ -2247,7 +2247,7 @@ export default {
|
||||||
value: '0.50',
|
value: '0.50',
|
||||||
label: '0.50',
|
label: '0.50',
|
||||||
coupon:0.4,
|
coupon:0.4,
|
||||||
growth:0.6
|
growth:0.60
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '0.45',
|
value: '0.45',
|
||||||
|
@ -2270,7 +2270,7 @@ export default {
|
||||||
{
|
{
|
||||||
value: '0.30',
|
value: '0.30',
|
||||||
label: '0.30',
|
label: '0.30',
|
||||||
coupon:0.6,
|
coupon:0.60,
|
||||||
growth:0.8
|
growth:0.8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -2545,7 +2545,7 @@ export default {
|
||||||
price: null,
|
price: null,
|
||||||
cost: null,
|
cost: null,
|
||||||
ot_price: null,
|
ot_price: null,
|
||||||
proportion:0.6,
|
proportion:0.60,
|
||||||
coupon:'',
|
coupon:'',
|
||||||
stock: null,
|
stock: null,
|
||||||
// growth:0,
|
// growth:0,
|
||||||
|
@ -2583,7 +2583,7 @@ export default {
|
||||||
cost: '',
|
cost: '',
|
||||||
ot_price: '',
|
ot_price: '',
|
||||||
svip_price: '',
|
svip_price: '',
|
||||||
proportion:'0.6',
|
proportion:'0.60',
|
||||||
coupon:'',
|
coupon:'',
|
||||||
gist_url:'',
|
gist_url:'',
|
||||||
growth:0,
|
growth:0,
|
||||||
|
@ -2724,7 +2724,7 @@ export default {
|
||||||
// 规格值变化
|
// 规格值变化
|
||||||
handleCost(val,i,e,type){
|
handleCost(val,i,e,type){
|
||||||
if(type == 'batchAdd'){
|
if(type == 'batchAdd'){
|
||||||
i=='price'?val.cost = toFixedNoRounding(val.price * 0.6):''
|
i=='price'?val.cost = toFixedNoRounding(val.price * val.proportion):''
|
||||||
}
|
}
|
||||||
if(i=='price'){
|
if(i=='price'){
|
||||||
val.price=val.price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
|
val.price=val.price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
|
||||||
|
@ -3217,7 +3217,7 @@ export default {
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
growth:0,
|
growth:0,
|
||||||
proportion:'0.6',
|
proportion:'0.60',
|
||||||
coupon:'',
|
coupon:'',
|
||||||
extension_one: 0,
|
extension_one: 0,
|
||||||
extension_two: 0
|
extension_two: 0
|
||||||
|
@ -3257,7 +3257,7 @@ export default {
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
growth:0,
|
growth:0,
|
||||||
proportion:'0.6',
|
proportion:'0.60',
|
||||||
coupon:'',
|
coupon:'',
|
||||||
extension_one: 0,
|
extension_one: 0,
|
||||||
extension_two: 0,
|
extension_two: 0,
|
||||||
|
@ -3525,7 +3525,7 @@ export default {
|
||||||
ot_price: null,
|
ot_price: null,
|
||||||
svip_price: null,
|
svip_price: null,
|
||||||
stock: null,
|
stock: null,
|
||||||
proportion:0.6,
|
proportion:0.60,
|
||||||
coupon:'',
|
coupon:'',
|
||||||
growth:0,
|
growth:0,
|
||||||
bar_code: '',
|
bar_code: '',
|
||||||
|
@ -3552,7 +3552,7 @@ export default {
|
||||||
bar_code: '',
|
bar_code: '',
|
||||||
weight: null,
|
weight: null,
|
||||||
volume: null,
|
volume: null,
|
||||||
proportion:0.6,
|
proportion:0.60,
|
||||||
coupon:'',
|
coupon:'',
|
||||||
growth:0,
|
growth:0,
|
||||||
gist_url:''
|
gist_url:''
|
||||||
|
@ -3687,7 +3687,7 @@ export default {
|
||||||
}, []);
|
}, []);
|
||||||
this.formValidate.attr[idx].inputVisible = false;
|
this.formValidate.attr[idx].inputVisible = false;
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning("请添加属性");
|
if(this.formValidate.attr[idx].inputVisible)this.$message.warning("请添加属性");
|
||||||
}
|
}
|
||||||
this.attrs = this.formValidate.attr;
|
this.attrs = this.formValidate.attr;
|
||||||
},
|
},
|
||||||
|
@ -3814,7 +3814,7 @@ export default {
|
||||||
ot_price: null,
|
ot_price: null,
|
||||||
svip_price: null,
|
svip_price: null,
|
||||||
stock: null,
|
stock: null,
|
||||||
proportion:0.6,
|
proportion:0.60,
|
||||||
coupon:'',
|
coupon:'',
|
||||||
growth:0,
|
growth:0,
|
||||||
// cdkey: {},
|
// cdkey: {},
|
||||||
|
|
|
@ -409,14 +409,14 @@
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="item item100">
|
<!-- <li class="item item100">
|
||||||
<div class="item-title">关联系统表单:</div>
|
<div class="item-title">关联系统表单:</div>
|
||||||
<div v-if="!productData.mer_form_id" class="value">关闭</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="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;">
|
<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>
|
<iframe class="iframe-box" :src="formUrl" frameborder="0" ref="iframe" style="min-height: 300px;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li> -->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
Loading…
Reference in New Issue