Commit 1a5799db by chenwq

商品管理-会员价,带货模式

1 parent 5cabd198
...@@ -94,7 +94,9 @@ ...@@ -94,7 +94,9 @@
<span class="associationLists-X">{{ editForm.relatedDiscountType }}</span> <span class="associationLists-X">{{ editForm.relatedDiscountType }}</span>
<span class="associationLists-X">{{ editForm.relatedUseChannel }}</span> <span class="associationLists-X">{{ editForm.relatedUseChannel }}</span>
<span class="associationLists" v-if="routeInfo.addOrEdit !== 3"><el-button type="text" @click="del()">删除</el-button></span> <span class="associationLists" v-if="routeInfo.addOrEdit !== 3">
<el-button type="text" @click="del()">删除</el-button>
</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -167,8 +169,28 @@ ...@@ -167,8 +169,28 @@
<template slot="originalPrice"> <template slot="originalPrice">
<p class="edit-tips">作为商品划线展示的价格</p> <p class="edit-tips">作为商品划线展示的价格</p>
</template> </template>
<template slot="supplyPrice"> <!-- <template slot="supplyPrice">
<p class="edit-tips">作为货源供给门店的价格</p> <p class="edit-tips">作为货源供给门店的价格</p>
</template> -->
<template slot="memberPrice">
<p class="edit-tips">作为会员商城购买的价格</p>
</template>
<template slot="takeGoodMode" slot-scope="scope">
<el-radio-group :disabled="isDisabled" v-model="editForm[scope.scope.name]">
<div v-for="(n, idx) in baseData.takeGoodModeList" :key="idx">
<el-radio :label="n.confId" class="take-good-mode-block">
<span class="mode-radio">{{ n.confName }}</span>
<span class="mode-radio radio-tip-txt" @click.stop.prevent="e => handleCancelBubble(e)">{{ scope.scope.tipObj[n.confId] }}</span>
<el-form-item v-show="n.confId == '1'" prop="profitRatio" label="分润比例:">
<el-input v-model="editForm.profitRatio" :disabled="editForm[scope.scope.name] != '1'" placeholder="请输入分润比例"><span slot="append">%</span></el-input>
</el-form-item>
<el-form-item v-show="n.confId == '2'" prop="supplyPrice" label="供货价:">
<el-input v-model="editForm.supplyPrice" :disabled="editForm[scope.scope.name] != '2'" placeholder="请输入供货价"><span slot="append">元</span></el-input>
<!-- <p class="edit-tips">作为货源供给门店的价格</p> -->
</el-form-item>
</el-radio>
</div>
</el-radio-group>
</template> </template>
<div slot="selectMerchant" slot-scope="scope" class="select-merchant"> <div slot="selectMerchant" slot-scope="scope" class="select-merchant">
<el-button :disabled="isDisabled" type="default" @click="handleRelateStoreClose(scope)">{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}</el-button> <el-button :disabled="isDisabled" type="default" @click="handleRelateStoreClose(scope)">{{ editForm.supplyMerchantList.length ? '更换门店' : '+选择门店' }}</el-button>
...@@ -466,7 +488,10 @@ export default { ...@@ -466,7 +488,10 @@ export default {
// specificationDetailList: [], // specificationDetailList: [],
retailPrice: '', retailPrice: '',
originalPrice: '', originalPrice: '',
takeGoodMode: 2,
supplyPrice: '', supplyPrice: '',
profitRatio: '',
memberPrice: '',
goodsStock: '', goodsStock: '',
deliveryType: 2, deliveryType: 2,
install: 'Y', install: 'Y',
...@@ -655,13 +680,32 @@ export default { ...@@ -655,13 +680,32 @@ export default {
suffixSlot: 'originalPrice', suffixSlot: 'originalPrice',
isDisabled: false isDisabled: false
}, },
// {
// label: '供货价',
// name: 'supplyPrice',
// type: 'input',
// append: '元',
// width: '320px',
// suffixSlot: 'supplyPrice',
// isDisabled: false
// },
{ {
label: '供货价', label: '会员价',
name: 'supplyPrice', name: 'memberPrice',
type: 'input', type: 'input',
append: '元', append: '元',
width: '320px', width: '320px',
suffixSlot: 'supplyPrice', suffixSlot: 'memberPrice',
isDisabled: false
},
{
label: '带货模式',
name: 'takeGoodMode',
addHtml: 'takeGoodMode',
tipObj: {
'1': '集团上架自己的商品分发到门店,每个月安装分润比例分成给门店',
'2': '门店需要配置零售价并上架商品,需要集团设置供货价给门店'
},
isDisabled: false isDisabled: false
}, },
{ {
...@@ -765,7 +809,17 @@ export default { ...@@ -765,7 +809,17 @@ export default {
dialogImageUrl: '', dialogImageUrl: '',
baseData: { baseData: {
classifyList: [], classifyList: [],
zoneList: [] zoneList: [],
takeGoodModeList: [
{
confId: 1,
confName: '集团总控'
},
{
confId: 2,
confName: '门店总控'
}
]
} }
} }
}, },
...@@ -793,6 +847,14 @@ export default { ...@@ -793,6 +847,14 @@ export default {
'editForm.supplyPrice'(newValue, oldValue) { 'editForm.supplyPrice'(newValue, oldValue) {
this.editForm.supplyPrice = limitPrice(newValue, oldValue, 5, 2) this.editForm.supplyPrice = limitPrice(newValue, oldValue, 5, 2)
}, },
// 分润比例
'editForm.profitRatio'(newValue, oldValue) {
this.editForm.profitRatio = limitPrice(newValue, oldValue, 1, 2)
},
// 会员价
'editForm.memberPrice'(newValue, oldValue) {
this.editForm.memberPrice = limitPrice(newValue, oldValue, 5, 2)
},
// 库存 // 库存
'editForm.goodsStock'(newValue, oldValue) { 'editForm.goodsStock'(newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg') this.editForm.goodsStock = limitPrice(newValue, oldValue, 10, 0, 0, 10000000000, 'zNumReg')
...@@ -887,6 +949,7 @@ export default { ...@@ -887,6 +949,7 @@ export default {
}) })
}) })
}, },
handleCancelBubble(e) { },
// 小程序展示 // 小程序展示
getWechatImgList() { getWechatImgList() {
this.wechatImgList = [] this.wechatImgList = []
...@@ -932,11 +995,11 @@ export default { ...@@ -932,11 +995,11 @@ export default {
{ {
name: 'zoneId', name: 'zoneId',
pIdx: 0 pIdx: 0
},
{
name: 'supplyPrice',
pIdx: 1
} }
// {
// name: 'supplyPrice',
// pIdx: 1
// }
] ]
this.hideOrShowAttr(attrObj) this.hideOrShowAttr(attrObj)
this.externalFormList.splice(3, 1) this.externalFormList.splice(3, 1)
...@@ -1220,15 +1283,18 @@ export default { ...@@ -1220,15 +1283,18 @@ export default {
classifyIdList: res.classifyList.map(item => item.id), classifyIdList: res.classifyList.map(item => item.id),
originalPrice: (res.originalPrice / 100).toFixed(2), originalPrice: (res.originalPrice / 100).toFixed(2),
retailPrice: '', retailPrice: '',
takeGoodMode: res.takeGoodMode || 2,
memberPrice: res.memberPrice ? (res.memberPrice / 100).toFixed(2) : '',
goodsStock: res.goodsStock + '', goodsStock: res.goodsStock + '',
supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : '', supplyPrice: res.supplyPrice ? (res.supplyPrice / 100).toFixed(2) : '',
profitRatio: res.profitRatio ? (res.profitRatio / 100).toFixed(2) : '',
describeTxt: '', describeTxt: '',
relatedCouponId: '', relatedCouponId: '',
descImgList: [], descImgList: [],
businessType: [] businessType: []
} }
this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType) this.editForm.businessType = this.editForm.businessTypeList.filter(item => item.isChoose == 1).map(item => item.businessType)
console.log(this.editForm) // console.log(this.editForm)
if (res.relatedCoupon) { if (res.relatedCoupon) {
this.editForm.relatedCouponId = res.relatedCoupon.id this.editForm.relatedCouponId = res.relatedCoupon.id
this.editForm.relatedCouponName = res.relatedCoupon.couponName this.editForm.relatedCouponName = res.relatedCoupon.couponName
...@@ -1372,7 +1438,7 @@ export default { ...@@ -1372,7 +1438,7 @@ export default {
} }
var params = this.$common.utils.deepClone(this.editForm) var params = this.$common.utils.deepClone(this.editForm)
var deleteAttrList = ['descImgList', 'describeTxt', 'specificationList'] var deleteAttrList = ['descImgList', 'describeTxt', 'specificationList']
var priceList = ['retailPrice', 'originalPrice', 'supplyPrice', 'expressFee'] var priceList = ['retailPrice', 'originalPrice', 'supplyPrice', 'expressFee', 'memberPrice']
if (this.routeInfo.addOrEdit == 2) { if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id params.id = this.routeInfo.id
} }
...@@ -1468,7 +1534,7 @@ export default { ...@@ -1468,7 +1534,7 @@ export default {
.then(() => { .then(() => {
this.cancelJump() this.cancelJump()
}) })
.catch(() => {}) .catch(() => { })
} else { } else {
this.cancelJump() this.cancelJump()
} }
...@@ -1537,6 +1603,21 @@ export default { ...@@ -1537,6 +1603,21 @@ export default {
.edit-pro .w-320 { .edit-pro .w-320 {
width: 320px; width: 320px;
} }
.edit-pro .take-good-mode-block {
display: flex;
align-items: center;
}
.edit-pro .mode-radio {
height: 32px;
line-height: 32px;
margin-right: 12px;
}
.edit-pro .take-good-mode-block .el-radio__input {
height: 32px;
}
.edit-pro .take-good-mode-block .el-radio__input.is-checked + .el-radio__label .radio-tip-txt {
color: #606266;
}
.edit-pro .wechat-container .wechat-footer { .edit-pro .wechat-container .wechat-footer {
position: absolute; position: absolute;
width: 252px; width: 252px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!