|
|
|
|
@ -154,7 +154,7 @@
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="适用门店:" rop="suitableObject" :rules="{
|
|
|
|
|
<el-form-item label="适用门店:" prop="suitableObject" :rules="{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择适用门店',
|
|
|
|
|
trigger: 'blur'
|
|
|
|
|
@ -215,6 +215,28 @@
|
|
|
|
|
<el-input type="number" class="form-input-wdith-xs" v-focus v-else oninput="this.value=this.value.replace(/\D/g,'')" pattern="[0-9]*" v-model="scope.row.projectTotalMoney" @blur="endEditMoney(scope.row)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="typeInfo" label="有效类型" align="center" width="215">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="1" @change="typeChange(scope.row)">有效期(月)</el-radio>
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="2" @change="typeChange(scope.row)">截止日期</el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="日期操作" align="center" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.typeInfo == 1">
|
|
|
|
|
<el-input v-model="scope.row.validTime" placeholder="有效日期(月)" style="width:150px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="scope.row.useEndDate"
|
|
|
|
|
type="date"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择截止日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="160">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="primary" @click="editPro(editIndex=scope.$index,projectListName='修改')">修改</el-button>
|
|
|
|
|
@ -263,6 +285,28 @@
|
|
|
|
|
<el-input type="number" class="form-input-wdith-xs" v-focus v-else oninput="this.value=this.value.replace(/\D/g,'')" pattern="[0-9]*\.?[0-9]{0,3}" v-model="scope.row.projectTotalMoney" @blur="endTotalMoney(scope.row,scope.$index)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="typeInfo" label="有效类型" align="center" width="215">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="1" @change="typeChange(scope.row)">有效期(月)</el-radio>
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="2" @change="typeChange(scope.row)">截止日期</el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="日期操作" align="center" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.typeInfo == 1">
|
|
|
|
|
<el-input v-model="scope.row.validTime" placeholder="有效日期(月)" style="width:150px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="scope.row.useEndDate"
|
|
|
|
|
type="date"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择截止日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="160">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="primary" @click="editPro(editIndex=scope.$index,projectListName='赠送修改')">修改</el-button>
|
|
|
|
|
@ -422,6 +466,28 @@
|
|
|
|
|
<el-input type="number" class="form-input-wdith-xs" v-focus v-else oninput="this.value=this.value.replace(/\D/g,'')" pattern="[0-9]*" v-model="scope.row.projectTotalMoney" @blur="endEditMoney(scope.row)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="typeInfo" label="有效类型" align="center" width="215">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="1" @change="typeChange(scope.row)">有效期(月)</el-radio>
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="2" @change="typeChange(scope.row)">截止日期</el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="日期操作" align="center" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.typeInfo == 1">
|
|
|
|
|
<el-input v-model="scope.row.validTime" placeholder="有效日期(月)" style="width:150px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="scope.row.useEndDate"
|
|
|
|
|
type="date"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择截止日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="160" v-if="titles!='明细'">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="primary" @click="editPro(editIndex=scope.$index,projectListName='修改的添加修改')">修改</el-button>
|
|
|
|
|
@ -475,6 +541,28 @@
|
|
|
|
|
<el-input type="number" class="form-input-wdith-xs" v-focus v-else oninput="this.value=this.value.replace(/\D/g,'')" pattern="[0-9]*\.?[0-9]{0,3}" v-model="scope.row.projectTotalMoney" @blur="endTotalMoney(scope.row,scope.$index)"></el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="typeInfo" label="有效类型" align="center" width="215">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="1" @change="typeChange(scope.row)">有效期(月)</el-radio>
|
|
|
|
|
<el-radio v-model="scope.row.typeInfo" label="2" @change="typeChange(scope.row)">截止日期</el-radio>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="日期操作" align="center" width="200">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div v-if="scope.row.typeInfo == 1">
|
|
|
|
|
<el-input v-model="scope.row.validTime" placeholder="有效日期(月)" style="width:150px"></el-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else>
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="scope.row.useEndDate"
|
|
|
|
|
type="date"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="选择截止日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" fixed="right" label="操作" width="160" v-if="titles!='明细'">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="primary" @click="editPro(editIndex=scope.$index,projectListName='修改的赠送修改')">修改</el-button>
|
|
|
|
|
@ -657,6 +745,13 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
typeChange(row){
|
|
|
|
|
if(row.typeInfo == '1'){
|
|
|
|
|
row.useEndDate = null
|
|
|
|
|
}else{
|
|
|
|
|
row.validTime = null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
editPro() {
|
|
|
|
|
this.$refs.project.show(0);
|
|
|
|
|
},
|
|
|
|
|
@ -788,6 +883,9 @@ export default {
|
|
|
|
|
promotionName: this.packingForm.promotionName,
|
|
|
|
|
standardTimes: item.standardTimes,
|
|
|
|
|
type: 0,
|
|
|
|
|
typeInfo:item.typeInfo,
|
|
|
|
|
validTime:item.validTime,
|
|
|
|
|
useEndDate:item.useEndDate
|
|
|
|
|
};
|
|
|
|
|
promotionProjectLists.push(items);
|
|
|
|
|
});
|
|
|
|
|
@ -804,6 +902,9 @@ export default {
|
|
|
|
|
promotionName: this.packingForm.promotionName,
|
|
|
|
|
standardTimes: item.standardTimes,
|
|
|
|
|
type: 1,
|
|
|
|
|
typeInfo:item.typeInfo,
|
|
|
|
|
validTime:item.validTime,
|
|
|
|
|
useEndDate:item.useEndDate
|
|
|
|
|
};
|
|
|
|
|
promotionProjectLists.push(items);
|
|
|
|
|
});
|
|
|
|
|
@ -842,6 +943,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
//添加项目
|
|
|
|
|
projectData(form) {
|
|
|
|
|
form = {...form,typeInfo:"1"}
|
|
|
|
|
form.projectId = form.id;
|
|
|
|
|
form.times = form.minumumTimes;
|
|
|
|
|
form.projectTotalMoney =
|
|
|
|
|
@ -991,6 +1093,7 @@ export default {
|
|
|
|
|
detail() {
|
|
|
|
|
this.titles = "明细";
|
|
|
|
|
promotionProList({ id: this.radioRowValueList.id }).then((res) => {
|
|
|
|
|
res.rows.forEach(item=>item.typeInfo += '')
|
|
|
|
|
this.packingForm = { promotionProjectLists: [] };
|
|
|
|
|
this.packingForm = { ...this.radioRowValueList };
|
|
|
|
|
let givePromotionProjectLists = [];
|
|
|
|
|
@ -1017,6 +1120,7 @@ export default {
|
|
|
|
|
this.titles = "";
|
|
|
|
|
this.titles = "修改";
|
|
|
|
|
promotionProList({ id: this.radioRowValueList.id }).then((res) => {
|
|
|
|
|
res.rows.forEach(item=>item.typeInfo+='')
|
|
|
|
|
this.packingForm = { promotionProjectLists: [] };
|
|
|
|
|
this.packingForm = { ...this.radioRowValueList };
|
|
|
|
|
let givePromotionProjectLists = [];
|
|
|
|
|
@ -1052,6 +1156,9 @@ export default {
|
|
|
|
|
projectTotalMoney: item.projectTotalMoney,
|
|
|
|
|
promotionName: this.packingForm.promotionName,
|
|
|
|
|
type: 0,
|
|
|
|
|
typeInfo:item.typeInfo,
|
|
|
|
|
validTime:item.validTime,
|
|
|
|
|
useEndDate:item.useEndDate
|
|
|
|
|
};
|
|
|
|
|
if (item.projectId != undefined) {
|
|
|
|
|
items.projectId = item.projectId;
|
|
|
|
|
@ -1072,6 +1179,9 @@ export default {
|
|
|
|
|
projectTotalMoney: item.projectTotalMoney,
|
|
|
|
|
promotionName: this.packingForm.promotionName,
|
|
|
|
|
type: 1,
|
|
|
|
|
typeInfo:item.typeInfo,
|
|
|
|
|
validTime:item.validTime,
|
|
|
|
|
useEndDate:item.useEndDate
|
|
|
|
|
};
|
|
|
|
|
if (item.projectId != undefined) {
|
|
|
|
|
items.projectId = item.projectId;
|
|
|
|
|
@ -1214,6 +1324,7 @@ export default {
|
|
|
|
|
copyForm() {
|
|
|
|
|
this.titles = "复制";
|
|
|
|
|
promotionProList({ id: this.radioRowValueList.id }).then((res) => {
|
|
|
|
|
res.rows.forEach(item=>item.typeInfo+='')
|
|
|
|
|
this.packingForm = { promotionProjectLists: [] };
|
|
|
|
|
this.packingForm = { ...this.radioRowValueList };
|
|
|
|
|
let givePromotionProjectLists = [];
|
|
|
|
|
@ -1241,7 +1352,6 @@ export default {
|
|
|
|
|
let items = {
|
|
|
|
|
storeId: item.storeId,
|
|
|
|
|
storeName: item.storeName,
|
|
|
|
|
|
|
|
|
|
projectNum: item.projectNum,
|
|
|
|
|
projectName: item.projectName,
|
|
|
|
|
priceMember: item.priceMember,
|
|
|
|
|
@ -1250,6 +1360,9 @@ export default {
|
|
|
|
|
projectTotalMoney: item.projectTotalMoney,
|
|
|
|
|
promotionName: this.packingForm.promotionName,
|
|
|
|
|
type: 0,
|
|
|
|
|
typeInfo:item.typeInfo,
|
|
|
|
|
validTime:item.validTime,
|
|
|
|
|
useEndDate:item.useEndDate
|
|
|
|
|
};
|
|
|
|
|
if (item.projectId != undefined) {
|
|
|
|
|
items.projectId = item.projectId;
|
|
|
|
|
@ -1262,7 +1375,6 @@ export default {
|
|
|
|
|
let items = {
|
|
|
|
|
storeId: item.storeId,
|
|
|
|
|
storeName: item.storeName,
|
|
|
|
|
|
|
|
|
|
projectNum: item.projectNum,
|
|
|
|
|
projectName: item.projectName,
|
|
|
|
|
priceMember: item.priceMember,
|
|
|
|
|
@ -1271,6 +1383,9 @@ export default {
|
|
|
|
|
projectTotalMoney: item.projectTotalMoney,
|
|
|
|
|
promotionName: this.packingForm.promotionName,
|
|
|
|
|
type: 1,
|
|
|
|
|
typeInfo:item.typeInfo,
|
|
|
|
|
validTime:item.validTime,
|
|
|
|
|
useEndDate:item.useEndDate
|
|
|
|
|
};
|
|
|
|
|
if (item.projectId != undefined) {
|
|
|
|
|
items.projectId = item.projectId;
|
|
|
|
|
@ -1295,7 +1410,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.packingForm.type = 1;
|
|
|
|
|
addPromotion(this.packingForm).then((res) => {
|
|
|
|
|
addPromotion(Object.assign(this.packingForm,{pushCount:null,pushState:null})).then((res) => {
|
|
|
|
|
//console.log(res);
|
|
|
|
|
if (res.code == "000000") {
|
|
|
|
|
this.$message.success({ message: res.message });
|
|
|
|
|
|