|
@@ -38,6 +38,9 @@
|
|
<template #can_group>
|
|
<template #can_group>
|
|
<el-option v-for="i in tfList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
<el-option v-for="i in tfList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #buy_limit>
|
|
|
|
+ <el-option v-for="i in buy_limitList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
|
|
+ </template>
|
|
</data-form>
|
|
</data-form>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -65,6 +68,16 @@ export default {
|
|
{ label: '库存', model: 'num' },
|
|
{ label: '库存', model: 'num' },
|
|
{ label: '实际销售价格', model: 'sell_money' },
|
|
{ label: '实际销售价格', model: 'sell_money' },
|
|
{ label: '划掉销售价格', model: 'flow_money' },
|
|
{ label: '划掉销售价格', model: 'flow_money' },
|
|
|
|
+ {
|
|
|
|
+ label: '购买限制',
|
|
|
|
+ model: 'buy_limit',
|
|
|
|
+ format: (i) => {
|
|
|
|
+ let data = this.buy_limitList.find((f) => f.value == i);
|
|
|
|
+ if (data) return data.label;
|
|
|
|
+ else return '暂无';
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ { label: '限制数量界限', model: 'limit_num' },
|
|
{ label: '运费', model: 'freight' },
|
|
{ label: '运费', model: 'freight' },
|
|
{ label: '团长价格', model: 'leader_price' },
|
|
{ label: '团长价格', model: 'leader_price' },
|
|
{ label: '状态', model: 'status', format: (i) => (i === '0' ? '使用中' : '已禁用') },
|
|
{ label: '状态', model: 'status', format: (i) => (i === '0' ? '使用中' : '已禁用') },
|
|
@@ -90,6 +103,8 @@ export default {
|
|
{ label: '库存', model: 'num', type: 'number' },
|
|
{ label: '库存', model: 'num', type: 'number' },
|
|
{ label: '实际销售价格', model: 'sell_money', type: 'number' },
|
|
{ label: '实际销售价格', model: 'sell_money', type: 'number' },
|
|
{ label: '划掉销售价格', model: 'flow_money', type: 'number' },
|
|
{ label: '划掉销售价格', model: 'flow_money', type: 'number' },
|
|
|
|
+ { label: '购买限制', model: 'buy_limit', type: 'select' },
|
|
|
|
+ { label: '限制数量界限', model: 'limit_num', type: 'number' },
|
|
{ label: '运费', model: 'freight', type: 'number' },
|
|
{ label: '运费', model: 'freight', type: 'number' },
|
|
{ label: '排序', model: 'sort', type: 'number' },
|
|
{ label: '排序', model: 'sort', type: 'number' },
|
|
{ label: '状态', model: 'status', type: 'select' },
|
|
{ label: '状态', model: 'status', type: 'select' },
|
|
@@ -106,6 +121,8 @@ export default {
|
|
tfList: [],
|
|
tfList: [],
|
|
// 面包屑
|
|
// 面包屑
|
|
data: [],
|
|
data: [],
|
|
|
|
+ // 购买限制
|
|
|
|
+ buy_limitList: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -127,7 +144,7 @@ export default {
|
|
...methodUtil,
|
|
...methodUtil,
|
|
// 添加自定义
|
|
// 添加自定义
|
|
initAddData() {
|
|
initAddData() {
|
|
- const obj = { goods: this.goods, status: '0', freight: 0 };
|
|
|
|
|
|
+ const obj = { goods: this.goods, status: '0', freight: 0, buy_limit: '0' };
|
|
this.$set(this, 'form', obj);
|
|
this.$set(this, 'form', obj);
|
|
},
|
|
},
|
|
// 面包屑
|
|
// 面包屑
|
|
@@ -195,6 +212,9 @@ export default {
|
|
// 是否可以团购
|
|
// 是否可以团购
|
|
res = await this.getDict({ code: 'tf' });
|
|
res = await this.getDict({ code: 'tf' });
|
|
if (this.$checkRes(res)) this.$set(this, 'tfList', res.data);
|
|
if (this.$checkRes(res)) this.$set(this, 'tfList', res.data);
|
|
|
|
+ // 购买限制
|
|
|
|
+ res = await this.getDict({ code: 'buy_limit' });
|
|
|
|
+ if (this.$checkRes(res)) this.$set(this, 'buy_limitList', res.data);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
metaInfo() {
|
|
metaInfo() {
|