提交 33cafc2c 编写于 作者: zhangzhiwei's avatar zhangzhiwei

.

......@@ -40,6 +40,7 @@ export default {
localStorage.setItem('priceformulaId',data.priceformulaId||null)
localStorage.setItem('actSw',data.actSw)
localStorage.setItem('allowCustomActDate',data.allowCustomActDate||null)
localStorage.setItem('isCustomPriceMode',data.isCustomPriceMode||0)
}
})
},
......
......@@ -207,6 +207,20 @@
</div>
</div>
</div>
<div class="m_t_20 m_b_20" style="font-size: 18px;font-weight: bold" v-if="isCustomPriceMode==1">
自定义价格模式<el-tooltip placement="top">
<div slot="content">
自定义价格模式:可以设置商品的供货价、批发价、优惠价、零售价
</div>
<span style="margin-left: 10px;margin-right: 20px"><i style="color: #ff6600" class="el-icon-question"></i></span>
</el-tooltip>
<el-switch
:active-value="1"
:inactive-value="0"
v-model="isCustomPriceModeS"
>
</el-switch>
</div>
<div class="m_t_20 m_b_20">
商品SKU设置
<span class="f_14 f_c_disable form_tip">SKU图必须为高清无底图,推荐图片像素为800*800PX, 大小不可超过512k,格式为png</span>
......@@ -323,7 +337,7 @@
</template>
</el-table-column>
<el-table-column prop="purchasePrice" label="采购价" width="120" v-if="!priceformulaId&&false">
<el-table-column prop="purchasePrice" label="批发价" width="120" v-if="isCustomPriceModeS==1">
<!-- <template slot="header" slot-scope="scope">
<el-tooltip placement="top" effect="light" v-if="pifaTip">
<div slot="content">
......@@ -333,9 +347,12 @@
</el-tooltip>
<div v-else>采购价</div>
</template> -->
<template slot="header" slot-scope="slot">
批发价
</template>
<template slot-scope="scope">
<!--:disabled="hasFormula?true:false"-->
<el-input v-model.trim="scope.row.purchasePrice" placeholder="采购价"
<el-input v-model.trim="scope.row.purchasePrice" placeholder="批发价"
>
<i slot="prefix" class="iconfont iconrenminbi1 f_12 l_h_32 p_l_5"></i>
</el-input>
......@@ -343,7 +360,7 @@
</el-table-column>
<el-table-column prop="salePrice" label="优惠价" width="120" v-if="!priceformulaId&&false">
<el-table-column prop="salePrice" label="优惠价" width="120" v-if="isCustomPriceModeS==1">
<!-- <template slot="header" slot-scope="scope">
<el-tooltip placement="top" effect="light" v-if="youhuiTip">
<div slot="content">
......@@ -353,6 +370,18 @@
</el-tooltip>
<div v-else>优惠价</div>
</template> -->
<template slot="header" slot-scope="slot">
<el-tooltip class="item" placement="top">
<div slot="content">
批发价:是指经销商购买的价格<br/>
优惠价:是指消费者购买的结算价<br/>
零售价:是指消费者看到的商品划线价<br/>
锁定价格:所有系统看到的优惠价、零售价都与填写的价格一致
</div>
<span><i style="color: #ff6600;font-size: 18px" class="el-icon-question"></i>&nbsp&nbsp&nbsp优惠价<i @click="Lock" style="color: #575758;font-size: 18px;cursor: pointer" :class="isPriceLock==1?'el-icon-lock':'el-icon-unlock'"></i>
</span>
</el-tooltip>
</template>
<template slot-scope="scope">
<!--:disabled="hasFormula?true:false"-->
<el-input
......@@ -364,7 +393,10 @@
</el-input>
</template>
</el-table-column>
<el-table-column prop="productPrice" label="零售价" width="120" v-if="!priceformulaId&&false">
<el-table-column prop="productPrice" label="零售价" width="120" v-if="isCustomPriceModeS==1">
<template slot="header" slot-scope="slot">
零售价<i @click="Lock" style="color: #575758;font-size: 18px;cursor: pointer" :class="isPriceLock==1?'el-icon-lock':'el-icon-unlock'"></i>
</template>
<!-- <template slot="header" slot-scope="scope">
<el-tooltip placement="top" effect="light" v-if="lingshouTip">
<div slot="content">
......@@ -834,6 +866,9 @@ export default {
}
};
return {
isPriceLock:0,
isCustomPriceModeS:0,
isCustomPriceMode:0,
priceformulaId:null,
beforeArr:[],//批量上传顺序
isDetails:false,
......@@ -958,11 +993,19 @@ export default {
}
},
mounted() {
this.isCustomPriceMode = _getStorage('isCustomPriceMode')
this.priceformulaId = _getStorage('priceformulaId')
this.init()
window.addEventListener('scroll', this.dataScroll,true);
},
methods: {
Lock(){
if(this.isPriceLock==1){
this.isPriceLock=0
}else {
this.isPriceLock=1
}
},
loadingStart(tx){
this.loading = this.$loading({
lock: true,
......@@ -1003,9 +1046,9 @@ export default {
let { code, data,msg,message} = r.data
if(code == 200){
row.supplyPrice = this.inputSupplyPrice
row.purchasePrice = data.purchasePrice;
row.salePrice = data.salePrice;
row.productPrice = data.productPrice;
// row.purchasePrice = data.purchasePrice;
// row.salePrice = data.salePrice;
// row.productPrice = data.productPrice;
// this.$message.success('自动计算成功');
}else{
this.$message.error(msg || message);
......@@ -1134,6 +1177,8 @@ export default {
}}).then(r => {
let { code, data } = r.data
if(code == 200){
this.isPriceLock=data.isPriceLock
this.isCustomPriceModeS=data.isCustomPriceMode
this.editJson = data
// this.baseJson = { ...this.baseJson, ...data} //编辑源数据
// console.log(this.baseJson)
......@@ -1247,7 +1292,7 @@ export default {
})
this.specsData = specs
console.log(this.skuList,'this.skuList');
}
})
.catch(r => console.log(r));
......@@ -2030,6 +2075,8 @@ export default {
postUrl = '/products/sdAdd'
}
// 提交数据
baseJson.isCustomPriceMode=this.isCustomPriceModeS
baseJson.isPriceLock=this.isPriceLock
this.$axios.post(postUrl,baseJson).then(r => {
let {code, data, msg,message} = r.data
if(code == 200){
......
......@@ -28,7 +28,7 @@
<!--<div class="actHead" @click="dialogVisible=true" style="cursor: pointer">-->
<!--查看活动规则-->
<!--</div>-->
<el-button type="primary" @click="goback" v-if="showUpdateBtn">
<el-button type="primary" @click="goback" v-if="!showUpdateBtn">
添加活动商品
</el-button>
</div>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册