新增批发价

This commit is contained in:
weipengfei 2024-03-19 14:25:17 +08:00
parent b3477f03fe
commit 70d5e103d5

View File

@ -224,7 +224,7 @@
/> -->
<el-select v-model="formValidate.unit_name" placeholder="请选择" class="perW50 mr10" clearable filterable="">
<el-option v-for="item in unitList" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</el-select>
<el-button
type="primary"
size="small"
@ -233,7 +233,7 @@
添加单位
</el-button>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="商品关键字:">
@ -445,7 +445,7 @@
:span="24"
class="noForm"
>
<el-form-item :label="'批量设置:'" class="labeltop">
<el-table
:data="oneFormBatch"
@ -504,7 +504,7 @@
<el-input
v-if="
formThead[iii].title !== '付费会员价' &&
formThead[iii].title !== '商品编号' &&
formThead[iii].title !== '商品编号' &&
formThead[iii].title !== '库存'
"
v-model="scope.row[iii]"
@ -556,7 +556,7 @@
class="priceBox"
controls-position="right"
/>
</div>
</div>
</template>
</el-table-column>
<template v-if="formValidate.type == 2">
@ -573,7 +573,7 @@
>添加卡密</el-button>
<span v-else class="seeCatMy" @click="seeVirtual(oneFormBatch[0], 'oneFormBatch', 0)">已设置</span>
</template>
</el-table-column>
</el-table-column>
</template>
<template v-if="formValidate.extension_type === 1">
<el-table-column
@ -680,7 +680,7 @@
@blur="memberPrice(formThead[iii], scope.row)"
class="priceBox"
controls-position="right"
/>
/>
<el-input
v-if="formThead[iii].title === '库存' && formValidate.type == 2"
v-model="scope.row[iii]"
@ -697,7 +697,7 @@
class="priceBox"
/>
</div>
<div v-else>
<el-input
v-if="formThead[iii].title === '商品编号'"
@ -816,7 +816,7 @@
:key="iii"
:label="formThead[iii].title"
align="center"
min-width="120"
min-width="120"
>
<template slot-scope="scope">
<div v-if="formValidate.svip_price_type != 0 && formThead[iii]">
@ -838,7 +838,7 @@
/>
<el-input-number
v-if="formThead[iii].title !== '付费会员价' &&
formThead[iii].title !== '商品编号' &&
formThead[iii].title !== '商品编号' &&
formThead[iii].title !== '库存'"
v-model="scope.row[iii]"
:min="0"
@ -1075,7 +1075,7 @@
active-text="开启"
inactive-text="关闭"
/>
</el-form-item>
</el-form-item>
</el-col>
<el-col v-if="deliveryList.length > 0" :span="24">
<el-form-item label="送货方式:" prop="delivery_way">
@ -1293,7 +1293,7 @@
v-for="item in merSpecsSelect"
:key="item.value"
:label="item.label"
:value="item.value"
:value="item.value"
/>
</el-select>
<el-button
@ -1555,6 +1555,7 @@ const defaultObj = {
{
image: '',
price: null,
wholesale_price: null,
cost: null,
ot_price: null,
svip_price: null,
@ -1582,11 +1583,8 @@ const objTitle = {
price: {
title: '售价'
},
cost: {
title: '成本价'
},
ot_price: {
title: '市场价'
wholesale_price: {
title: '批发价'
},
svip_price: {
title: '付费会员价'
@ -1602,7 +1600,13 @@ const objTitle = {
},
volume: {
title: '体积(m³)'
}
},
cost: {
title: '成本价'
},
ot_price: {
title: '市场价'
},
}
const proOptions = [{ name: '店铺推荐', value: 'is_good' }]
export default {
@ -1811,6 +1815,7 @@ export default {
modals: false,
attrVal: {
price: null,
wholesale_price: null,
cost: null,
ot_price: null,
stock: null,
@ -1842,6 +1847,7 @@ export default {
attr:"全部",
image: "",
price: "",
wholesale_price: "",
cost: "",
ot_price: "",
svip_price: "",
@ -1878,7 +1884,7 @@ export default {
// }
},
watch: {
'formValidate.attr': {
'formValidate.attr': {
handler: function(val) {
this.createCount+=1
if (this.formValidate.spec_type === 1) this.watCh(val)
@ -1905,7 +1911,7 @@ export default {
this.getCategoryList()
this.getBrandListApi()
this.getShippingList()
this.getGuaranteeList()
this.getGuaranteeList()
this.productGetRule()
this.getLabelLst()
this.getFormList()
@ -1950,7 +1956,7 @@ export default {
this.elChangeExForArray(evt.oldIndex, evt.newIndex, this.formValidate.params)
}
})
},
},
elChangeExForArray(index1, index2, array) {
const temp = array[index1]
array[index1] = array[index2]
@ -2065,7 +2071,7 @@ export default {
.catch(res => {
this.$message.error(res.message)
})
},
},
//
productCon() {
productConfigApi()
@ -2088,7 +2094,7 @@ export default {
{ value: '1', name: '到店自提' },
{ value: '2', name: name }
]
}
}
} else {
if (this.deliveryType.length == 1 && this.deliveryType[0] == '1' && this.formValidate.type != 2) {
this.deliveryList = [{ value: '1', name: '到店自提' }]
@ -2137,7 +2143,7 @@ export default {
// .catch((res) => {
// this.$message.error(res.message)
// })
}
}
},
//
openRecommend(){
@ -2205,7 +2211,7 @@ export default {
},
//
addVirtual(index, name) {
this.$refs.addCarMy.carMyShow = true;
this.$refs.addCarMy.carMyShow = true;
this.tabIndex = index;
this.tabName = name;
this.virtualListClear();
@ -2227,10 +2233,10 @@ export default {
this[this.tabName][this.tabIndex]['cdkey'].key = '';
}
this.$set(this[this.tabName][this.tabIndex]['cdkey'],"is_type",e.is_type);
this.$refs.addCarMy.carMyShow = false;
this.$refs.addCarMy.carMyShow = false;
},
closeCarMy(){
this.$refs.addCarMy.carMyShow = false;
this.$refs.addCarMy.carMyShow = false;
},
//
virtualListClear(){
@ -2250,7 +2256,7 @@ export default {
is_type: 0,
key:'',
stock:0
}
}
if (data.cdkey && data.cdkey.list && data.cdkey.list.length && data.cdkey.is_type == 1) {
this.$refs.addCarMy.fixedCar.is_type = 1;
this.virtualList = data.cdkey.list;
@ -2314,6 +2320,7 @@ export default {
const rep4 = {
image: '',
price: 0,
wholesale_price: 0,
cost: 0,
ot_price: 0,
select: true,
@ -2351,6 +2358,7 @@ export default {
res[kk] = {
image: '',
price: 0,
wholesale_price: 0,
cost: 0,
ot_price: 0,
select: true,
@ -2369,12 +2377,13 @@ export default {
})
})
})
data.push(dataArr.join('$&'))
data.push(dataArr.join('$&'))
}
if(that.generateArr.length>0){
that.generateArr.forEach((v, i) => {
res[i]['image'] = v.pic
res[i]['price'] = v.price
res[i]['wholesale_price'] = v.wholesale_price
res[i]['cost'] = v.cost
res[i]['ot_price'] = v.ot_price
res[i]['sku'] = v.sku
@ -2468,7 +2477,7 @@ export default {
confirm() {
if (!this.selectRule) {
return this.$message.warning('请选择属性')
}
}
this.ruleList.forEach(item => {
if (item.attr_template_id === this.selectRule) {
this.formValidate.attr = item.template_value
@ -2617,6 +2626,7 @@ export default {
this.formThead.svip_price = { title: "付费会员价" }
this.attrVal = {
price: null,
wholesale_price: null,
cost: null,
ot_price: null,
svip_price: null,
@ -2638,6 +2648,7 @@ export default {
delete this.formThead.svip_price
this.attrVal = {
price: null,
wholesale_price: null,
cost: null,
ot_price: null,
stock: null,
@ -2679,6 +2690,7 @@ export default {
if(this.oneFormBatch[0].attr!= '')this.$set(val, 'attr', this.oneFormBatch[0].attr)
if(this.oneFormBatch[0].image!= '')this.$set(val, 'image', this.oneFormBatch[0].image)
if(this.oneFormBatch[0].price!= null && this.oneFormBatch[0].price!= '')this.$set(val, 'price', this.oneFormBatch[0].price)
if(this.oneFormBatch[0].wholesale_price!= null && this.oneFormBatch[0].wholesale_price!= '')this.$set(val, 'wholesale_price', this.oneFormBatch[0].wholesale_price)
if(this.oneFormBatch[0].cost!= null && this.oneFormBatch[0].cost!= '')this.$set(val, 'cost', this.oneFormBatch[0].cost)
if(this.oneFormBatch[0].ot_price!= null && this.oneFormBatch[0].ot_price!= '')this.$set(val, 'ot_price', this.oneFormBatch[0].ot_price)
if(this.oneFormBatch[0].svip_price!= null && this.oneFormBatch[0].svip_price!= '')this.$set(val, 'svip_price', this.oneFormBatch[0].svip_price)
@ -2698,7 +2710,7 @@ export default {
}else if(this.oneFormBatch[0]['cdkey'].key){
this.$set(val.cdkey, "key", this.oneFormBatch[0]['cdkey'].key);
}
this.$set(val.cdkey, "is_type",this.oneFormBatch[0]['cdkey'].is_type);
this.$set(val.cdkey, "is_type",this.oneFormBatch[0]['cdkey'].is_type);
}
}
}
@ -2784,7 +2796,7 @@ export default {
if (this.$route.params.id !== "0") {
this.addmanyData(info.value);
}
if (!this.$route.params.id && this.formValidate.spec_type === 1) {
if (!this.$route.params.id && this.formValidate.spec_type === 1) {
this.ManyAttrValue.map((item) => {
item.image = this.formValidate.is_copy!=1 ? this.formValidate.slider_image[0] : item.pic;
// this.$set(item, 'select', true)
@ -2882,6 +2894,7 @@ export default {
if (info.svip_price_type != 0 && info.mer_svip_status)
this.attrVal = {
price: null,
wholesale_price: null,
cost: null,
ot_price: null,
svip_price: null,
@ -2896,7 +2909,7 @@ export default {
}
if (this.formValidate.spec_type === 0) {
info.attrValue[0].list = [],
this.OneattrValue = info.attrValue;
this.OneattrValue = info.attrValue;
} else {
this.ManyAttrValue = info.attrValue;
if(info.is_copy){
@ -3224,10 +3237,10 @@ export default {
.seeCatMy {
color: var(--prev-color-primary);
cursor: pointer;
}
}
.selectOn{
color: var(--prev-color-primary);
}
}
.virtual_boder {
border: 1px solid var(--prev-color-primary);
}