|
|
|
@ -155,13 +155,12 @@
|
|
|
|
|
<el-input type="text" v-model="scope.row.stock" maxlength="7" :disabled="true"/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column prop="stock" label="拼团价" align="center"> |
|
|
|
|
<el-table-column prop="pink_price" label="拼团价" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input type="text" v-model="scope.row.pink_price"/> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="stock" label="拼团库存" align="center"> |
|
|
|
|
<el-table-column prop="pink_stock" label="拼团库存" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-input type="text" v-model="scope.row.pink_stock" maxlength="7"/> |
|
|
|
|
</template> |
|
|
|
@ -228,6 +227,12 @@ export default {
|
|
|
|
|
components: {editor, picUpload, mulpicUpload, Treeselect, MaterialList, UeditorWrap, singlePic, cgood}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
rule:{ |
|
|
|
|
phone: [ |
|
|
|
|
{ required: true, message: '请输入手机号码', trigger: 'blur' }, |
|
|
|
|
{ pattern: /^((1[3,5,8][0-9])|(14[5,7])|(17[0,5,6,7,8])|(19[7]))\d{8}$/, message: '请检查手机号是否正确', trigger: 'blur' }, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
spinShow: false, |
|
|
|
|
// 批量设置表格data |
|
|
|
|
oneFormBatch: [ |
|
|
|
@ -356,6 +361,8 @@ export default {
|
|
|
|
|
loading: false, |
|
|
|
|
treeSelect: [], |
|
|
|
|
tableIndex: 0, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ruleValidate: { |
|
|
|
|
title: [ |
|
|
|
|
{required: true, message: '请输入拼团名称', trigger: 'blur'} |
|
|
|
@ -379,8 +386,14 @@ export default {
|
|
|
|
|
{required: true, message: '请选择运费模板', trigger: 'change', type: 'number'} |
|
|
|
|
], |
|
|
|
|
price: [ |
|
|
|
|
{required: true, message: '请输入拼团价格', trigger: 'blur'} |
|
|
|
|
{required: true, message: '请输入商品售价', trigger: 'blur'} |
|
|
|
|
], |
|
|
|
|
// pink_price: [ |
|
|
|
|
// {required: true, message: '请输入拼团价格', trigger: 'blur'} |
|
|
|
|
// ], |
|
|
|
|
// pink_stock: [ |
|
|
|
|
// {required: true,message: '库存设置不能小于0', trigger: 'blur',min: 1, }, |
|
|
|
|
// ], |
|
|
|
|
people: [ |
|
|
|
|
{required: true, message: '请选择拼团人数', trigger: 'change', type: 'number'} |
|
|
|
|
], |
|
|
|
@ -651,6 +664,7 @@ export default {
|
|
|
|
|
if (valid) { |
|
|
|
|
if (this.formValidate.spec_type === 0) { |
|
|
|
|
this.formValidate.attrs = this.oneFormValidate; |
|
|
|
|
console.log('this.oneFormValidate',this.oneFormValidate) |
|
|
|
|
this.formValidate.header = []; |
|
|
|
|
this.formValidate.items = []; |
|
|
|
|
} else { |
|
|
|
@ -661,12 +675,16 @@ export default {
|
|
|
|
|
return this.$message.warning('请点击生成规格!'); |
|
|
|
|
} |
|
|
|
|
add(this.formValidate).then(async res => { |
|
|
|
|
if (res.status==500){ |
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.$message({ |
|
|
|
|
message: '操作成功', |
|
|
|
|
type: 'success' |
|
|
|
|
}); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.$router.push({path: '/activity/combination'}); |
|
|
|
|
this.$router.push({path: '/bxg/activity/combination'}); |
|
|
|
|
}, 500); |
|
|
|
|
}).catch(res => { |
|
|
|
|
this.$message.error(res.msg); |
|
|
|
|