This commit is contained in:
weipengfei 2024-01-16 16:44:28 +08:00
parent 6fe9ee6142
commit 05bf13f861

View File

@ -639,6 +639,28 @@
</template>
</el-table-column>
</template>
<el-table-column
key="single_price_ss"
v-if="$store.state.user.merchantType.type_code == 'TypeSupplyChain'"
align="center"
label="单个售价"
min-width="80"
>
<template slot-scope="scope">
<span>{{ scope.row.single_price }}</span>
</template>
</el-table-column>
<el-table-column
v-if="$store.state.user.merchantType.type_code == 'TypeSupplyChain'"
key="single_procure_price_ss"
align="center"
label="单个批发价"
min-width="80"
>
<template slot-scope="scope">
<span>{{ scope.row.single_procure_price }}</span>
</template>
</el-table-column>
</el-table>
</el-form-item>
<!-- 多规格表格-->
@ -767,6 +789,28 @@
</template>
</el-table-column>
</template>
<el-table-column
key="single_price_dd"
v-if="$store.state.user.merchantType.type_code == 'TypeSupplyChain'"
align="center"
label="单个售价"
min-width="80"
>
<template slot-scope="scope">
<span>{{ scope.row.single_price }}</span>
</template>
</el-table-column>
<el-table-column
v-if="$store.state.user.merchantType.type_code == 'TypeSupplyChain'"
key="single_procure_price_dd"
align="center"
label="单个批发价"
min-width="80"
>
<template slot-scope="scope">
<span>{{ scope.row.single_procure_price }}</span>
</template>
</el-table-column>
<el-table-column
key="3"
align="center"
@ -1293,6 +1337,7 @@ const defaultObj = {
cost: null,
ot_price: null,
procure_price: null,
single_number: null,
svip_price: null,
stock: null,
bar_code: '',
@ -1328,6 +1373,9 @@ const objTitle = {
procure_price: {
title: '批发价'
},
single_number: {
title: '单件数量'
},
svip_price: {
title: '付费会员价'
},
@ -1552,6 +1600,7 @@ export default {
cost: null,
ot_price: null,
procure_price: null,
single_number: null,
stock: null,
bar_code: '',
weight: null,
@ -1603,6 +1652,9 @@ export default {
// console.log(this.$store.state.user.merchantType.type_code); // ,
if (this.$store.state.user.merchantType.type_code != 'TypeSupplyChain') {
delete this.attrVal.procure_price
delete this.attrVal.single_number
delete this.attrVal.single_procure_price
delete this.attrVal.single_price
}
this.formValidate.slider_image = []
if (this.$route.params.id) {
@ -2388,7 +2440,8 @@ export default {
}
let priceObj = {
price: false,
procure_price: false
procure_price: false,
single_number: false,
}
this.formValidate.attrValue.forEach(e => {
if (!e.price || e.price == 0) priceObj.price = true;
@ -2396,6 +2449,7 @@ export default {
})
if (priceObj.price) return Message.error('零售价不能为小于等于0');
if (priceObj.procure_price && this.$store.state.user.merchantType.type_code == 'TypeSupplyChain') return Message.error('批发价不能为小于等于0');
if (priceObj.single_number && this.$store.state.user.merchantType.type_code == 'TypeSupplyChain') return Message.error('单件数量不能为小于等于0');
this.$refs[name].validate(valid => {
if (valid) {
this.validateAttr();