服务包明细中增加优惠价格,增加服务项目,修改价格,数量,状态时更新服务包现价
This commit is contained in:
parent
f6eaa90f9d
commit
0afe64710f
|
@ -514,6 +514,7 @@
|
||||||
:visible.sync="dialogFormVisibleDetail"
|
:visible.sync="dialogFormVisibleDetail"
|
||||||
center
|
center
|
||||||
width="80%"
|
width="80%"
|
||||||
|
@close="closeDetail"
|
||||||
>
|
>
|
||||||
<div style="text-align: right; display: inline-block">
|
<div style="text-align: right; display: inline-block">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -567,7 +568,7 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
@change="changeDetailStatus(scope.row.massageTypeId, scope.row.status)"
|
@change="changeDetailStatus(scope.row)"
|
||||||
:active-value="openValue"
|
:active-value="openValue"
|
||||||
:inactive-value="closeValue"
|
:inactive-value="closeValue"
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
|
@ -576,6 +577,20 @@
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="packagePrice" label="优惠价" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.packagePrice }}</span>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="showUpdatePriceView(scope.row)"
|
||||||
|
style="margin: 5px"
|
||||||
|
>修改
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="serviceCount" label="次数" width="150">
|
<el-table-column prop="serviceCount" label="次数" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.serviceCount }}</span>
|
<span>{{ scope.row.serviceCount }}</span>
|
||||||
|
@ -630,20 +645,35 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 修改价格 -->
|
||||||
|
<el-dialog title="修改优惠价" :visible.sync="dialogFormVisiblePrice" center>
|
||||||
|
<div style="margin-bottom: 10px">
|
||||||
|
<span style="width: 200px; display: inline-block; text-align: right">优惠价:</span>
|
||||||
|
<el-input
|
||||||
|
style="width: 50%"
|
||||||
|
v-model="packagePrice"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
placeholder="请输入优惠价"
|
||||||
|
></el-input>
|
||||||
|
</div>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisiblePrice = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="updatePrice()">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 修改次数 -->
|
<!-- 修改次数 -->
|
||||||
<el-dialog title="修改次数" :visible.sync="dialogFormVisibleCount" center>
|
<el-dialog title="修改次数" :visible.sync="dialogFormVisibleCount" center>
|
||||||
<div style="margin-bottom: 10px">
|
<div style="margin-bottom: 10px">
|
||||||
<span style="width: 200px; display: inline-block; text-align: right"
|
<span style="width: 200px; display: inline-block; text-align: right">次数:</span>
|
||||||
>次数:</span
|
|
||||||
>
|
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 50%"
|
style="width: 50%"
|
||||||
v-model="serviceCount"
|
v-model="serviceCount"
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
placeholder="请输入次数"
|
placeholder="请输入次数"
|
||||||
>
|
></el-input>
|
||||||
</el-input>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogFormVisibleCount = false">取 消</el-button>
|
<el-button @click="dialogFormVisibleCount = false">取 消</el-button>
|
||||||
|
@ -654,17 +684,14 @@
|
||||||
<!-- 修改间隔 -->
|
<!-- 修改间隔 -->
|
||||||
<el-dialog title="修改间隔" :visible.sync="dialogFormVisibleIntervalDays" center>
|
<el-dialog title="修改间隔" :visible.sync="dialogFormVisibleIntervalDays" center>
|
||||||
<div style="margin-bottom: 10px">
|
<div style="margin-bottom: 10px">
|
||||||
<span style="width: 200px; display: inline-block; text-align: right"
|
<span style="width: 200px; display: inline-block; text-align: right">间隔(天):</span>
|
||||||
>间隔(天):</span
|
|
||||||
>
|
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 50%"
|
style="width: 50%"
|
||||||
v-model="intervalDays"
|
v-model="intervalDays"
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
placeholder="请输入天数"
|
placeholder="请输入天数"
|
||||||
>
|
></el-input>
|
||||||
</el-input>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogFormVisibleIntervalDays = false">取 消</el-button>
|
<el-button @click="dialogFormVisibleIntervalDays = false">取 消</el-button>
|
||||||
|
@ -873,7 +900,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 项目列表弹框 -->
|
<!-- 项目列表弹框 -->
|
||||||
<el-dialog title="服务项目列表" :visible.sync="dialogFormVisibleMassageList" width="80%">
|
<el-dialog title="服务项目列表" :visible.sync="dialogFormVisibleMassageList" width="80%" center>
|
||||||
<div style="position: relative; display: inline-block; margin: 5px">
|
<div style="position: relative; display: inline-block; margin: 5px">
|
||||||
<span>项目类型:</span>
|
<span>项目类型:</span>
|
||||||
<el-select
|
<el-select
|
||||||
|
@ -1030,6 +1057,7 @@ export default {
|
||||||
detailTableData: {},
|
detailTableData: {},
|
||||||
mainId: "",//主表ID
|
mainId: "",//主表ID
|
||||||
massageTypeId: "",//按摩类型ID
|
massageTypeId: "",//按摩类型ID
|
||||||
|
packagePrice: 0,
|
||||||
serviceCount: 1,
|
serviceCount: 1,
|
||||||
intervalDays: 0,
|
intervalDays: 0,
|
||||||
detailPage: 1,
|
detailPage: 1,
|
||||||
|
@ -1039,6 +1067,7 @@ export default {
|
||||||
applyPeople: "",//适用人群
|
applyPeople: "",//适用人群
|
||||||
duration: "",//时长
|
duration: "",//时长
|
||||||
jianjie: "",//简介
|
jianjie: "",//简介
|
||||||
|
dialogFormVisiblePrice: false,
|
||||||
dialogFormVisibleCount: false,
|
dialogFormVisibleCount: false,
|
||||||
dialogFormVisibleIntervalDays: false,
|
dialogFormVisibleIntervalDays: false,
|
||||||
dialogFormVisibleAddMassage: false,
|
dialogFormVisibleAddMassage: false,
|
||||||
|
@ -1543,6 +1572,10 @@ export default {
|
||||||
},
|
},
|
||||||
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>服务项目>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>服务项目>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||||
|
|
||||||
|
closeDetail(){
|
||||||
|
this.handleSelect();
|
||||||
|
},
|
||||||
|
|
||||||
showDetailView(row){
|
showDetailView(row){
|
||||||
this.mainId = row.id;
|
this.mainId = row.id;
|
||||||
this.handleSelectDetail();
|
this.handleSelectDetail();
|
||||||
|
@ -1588,14 +1621,16 @@ export default {
|
||||||
this.handleSelectDetail();
|
this.handleSelectDetail();
|
||||||
},
|
},
|
||||||
|
|
||||||
changeDetailStatus(massageTypeId, status){
|
//修改状态
|
||||||
|
changeDetailStatus(row){
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`massage/packageDetail/updateStatus`),
|
url: this.$http.adornUrl(`massage/packageDetail/updateStatus`),
|
||||||
method: "post",
|
method: "post",
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
// data: this.$http.adornData({
|
// data: this.$http.adornData({
|
||||||
massageTypeId: massageTypeId,
|
massageTypeId: row.massageTypeId,
|
||||||
status: status,
|
status: row.status,
|
||||||
|
mainId: row.mainId,
|
||||||
}),
|
}),
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
@ -1603,15 +1638,58 @@ export default {
|
||||||
type: "success",
|
type: "success",
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.handleSelect();
|
this.handleSelectDetail();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 修改价格
|
||||||
|
showUpdatePriceView(row) {
|
||||||
|
this.id = row.id;
|
||||||
|
this.mainId = row.mainId;
|
||||||
|
this.packagePrice = row.packagePrice;
|
||||||
|
this.dialogFormVisiblePrice = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 修改价格
|
||||||
|
updatePrice() {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl("massage/packageDetail/updatePrice"),
|
||||||
|
method: "post",
|
||||||
|
params: this.$http.adornParams({
|
||||||
|
// data: this.$http.adornData({
|
||||||
|
id: this.id,
|
||||||
|
packagePrice: this.packagePrice,
|
||||||
|
mainId: this.mainId,
|
||||||
|
}),
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data.code == 0) {
|
||||||
|
this.$message({
|
||||||
|
message: "修改成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.handleSelectDetail();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
this.dialogFormVisiblePrice = false;
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: "warning",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 修改次数
|
// 修改次数
|
||||||
showUpdateCountView(row) {
|
showUpdateCountView(row) {
|
||||||
this.id = row.id;
|
this.id = row.id;
|
||||||
|
this.mainId = row.mainId;
|
||||||
this.serviceCount = row.serviceCount;
|
this.serviceCount = row.serviceCount;
|
||||||
this.dialogFormVisibleCount = true;
|
this.dialogFormVisibleCount = true;
|
||||||
},
|
},
|
||||||
|
@ -1625,6 +1703,7 @@ export default {
|
||||||
// data: this.$http.adornData({
|
// data: this.$http.adornData({
|
||||||
id: this.id,
|
id: this.id,
|
||||||
serviceCount: this.serviceCount,
|
serviceCount: this.serviceCount,
|
||||||
|
mainId: this.mainId,
|
||||||
}),
|
}),
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
if (data.code == 0) {
|
if (data.code == 0) {
|
||||||
|
@ -1702,6 +1781,7 @@ export default {
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
// data: this.$http.adornData({
|
// data: this.$http.adornData({
|
||||||
id: row.id,
|
id: row.id,
|
||||||
|
mainId: row.mainId
|
||||||
}),
|
}),
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
if (data.code == 0) {
|
if (data.code == 0) {
|
||||||
|
@ -1864,6 +1944,7 @@ export default {
|
||||||
type: this.type,
|
type: this.type,
|
||||||
jianjie: this.jianjie,
|
jianjie: this.jianjie,
|
||||||
mainId: this.mainId,
|
mainId: this.mainId,
|
||||||
|
packagePrice: this.price,
|
||||||
serviceCount: this.serviceCount,
|
serviceCount: this.serviceCount,
|
||||||
intervalDays: this.intervalDays,
|
intervalDays: this.intervalDays,
|
||||||
}),
|
}),
|
||||||
|
@ -1897,6 +1978,7 @@ export default {
|
||||||
params: this.$http.adornParams({
|
params: this.$http.adornParams({
|
||||||
// data: this.$http.adornData({
|
// data: this.$http.adornData({
|
||||||
mainId: this.mainId,
|
mainId: this.mainId,
|
||||||
|
packagePrice: row.price,
|
||||||
massageTypeId: row.massageTypeId,
|
massageTypeId: row.massageTypeId,
|
||||||
serviceCount: this.serviceCount,
|
serviceCount: this.serviceCount,
|
||||||
intervalDays: this.intervalDays,
|
intervalDays: this.intervalDays,
|
||||||
|
@ -1925,7 +2007,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
showMassageView(){
|
showMassageView(){
|
||||||
|
|
||||||
this.serviceCount = 1;
|
this.serviceCount = 1;
|
||||||
this.intervalDays = 0;
|
this.intervalDays = 0;
|
||||||
this.handleSelectMassage();
|
this.handleSelectMassage();
|
||||||
|
|
Loading…
Reference in New Issue