疗程提交

master
曾嘉俊 3 years ago
parent 51ee2ab9df
commit 232b640c8a

Binary file not shown.

@ -350,13 +350,20 @@ export function recEditStaff(params) {
} }
//添加疗程单 //添加疗程单
// export function addcourse(params) {
// return service({
// url: "/api" + "/demay/ssm/course/add",
// method: "post",
// data: params
// });
// }
export function addcourse(params) { export function addcourse(params) {
return service({ return service({
url: "/api" + "/demay/ssm/course/add", url: "/api" + "/demay/ssm/course/addList",
method: "post", method: "post",
data: params data: params
}); });
} }
//疗程单列表 //疗程单列表
export function coursepage(params) { export function coursepage(params) {
return service({ return service({

@ -1,5 +1,5 @@
<template> <template>
<el-dialog :close-on-click-modal="false" v-dialogDrag title="取消欠款" :visible.sync="cancelDialogVisible" width="650px" append-to-body :before-close="handleCloseCancel"> <el-dialog :close-on-click-modal="false" v-dialogDrag title="取消欠款" :visible.sync="cancelDialogVisible" width="45%" append-to-body :before-close="handleCloseCancel">
<el-form label-width="120px" inline> <el-form label-width="120px" inline>
<div v-if="form.docType=='promotion_card_use'"> <div v-if="form.docType=='promotion_card_use'">
<el-form-item label="会员名称"> <el-form-item label="会员名称">
@ -60,6 +60,12 @@
</el-table> </el-table>
</div> </div>
<div v-else> <div v-else>
<el-form-item label="会员名称">
{{form.memberName}}
</el-form-item>
<el-form-item label="手机号码">
{{form.mobilePhone}}
</el-form-item>
<el-form-item label="欠款帐户"> <el-form-item label="欠款帐户">
{{form.tradeName}} {{form.tradeName}}
</el-form-item> </el-form-item>

@ -12,7 +12,7 @@
<el-table-column align="center" prop="ratio" label="占比(%)" width="80"> <el-table-column align="center" prop="ratio" label="占比(%)" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)"> <div class="form-input-width" v-if="editIndex!=scope.$index" @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }} {{ scope.row.ratio?scope.row.ratio.toFixed(0)*1:0 }}
<i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i> <i class="el-icon-edit text-cyan" v-if="scope.$index!=0"></i>
</div> </div>
<el-input v-focus class="form-input-width-xs" size="samll" type="number" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)" :disabled="scope.$index==0"></el-input> <el-input v-focus class="form-input-width-xs" size="samll" type="number" v-else v-model="scope.row.ratio" @blur="endStaffRatio(scope.row, scope.$index)" :disabled="scope.$index==0"></el-input>

@ -16,7 +16,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div class="form-input-width" v-if="editIndex != scope.$index" <div class="form-input-width" v-if="editIndex != scope.$index"
@click="openStaffRatio(scope.$index, scope.row)"> @click="openStaffRatio(scope.$index, scope.row)">
{{ scope.row.ratio }} {{ scope.row.ratio?scope.row.ratio.toFixed(0)*1:0 }}
<i class="el-icon-edit text-cyan" v-if="scope.$index != 0"></i> <i class="el-icon-edit text-cyan" v-if="scope.$index != 0"></i>
</div> </div>
<el-input v-focus class="form-input-width-xs" size="samll" type="number" v-else v-model="scope.row.ratio" <el-input v-focus class="form-input-width-xs" size="samll" type="number" v-else v-model="scope.row.ratio"

@ -259,6 +259,9 @@ export default {
if(item.accountType == 'project_consume'&& item.docType == 'card_change'){ if(item.accountType == 'project_consume'&& item.docType == 'card_change'){
item.docTypeName = '加价转疗程转出' item.docTypeName = '加价转疗程转出'
} }
if(item.accountType == 'project' && item.docType=='promotion'){
item.docTypeName = '促销活动'
}
if(item.accountType == 'project'){ if(item.accountType == 'project'){
item.docTypeName = '加价转疗程转入' item.docTypeName = '加价转疗程转入'
} }

@ -262,9 +262,25 @@ export default {
} }
}); });
}, },
},
watch:{
dialogFormVisible:{
handler(show){
if(show){
this.queryForm= {
pageNum: 1,
pageSize: 10,
},
this.init()
}
},
immediate:true
}
}, },
created() { created() {
this.getOption() // this.getOption()
// this.init()
}, },
}; };
</script> </script>

@ -206,8 +206,10 @@ export default {
); );
this.getData(form); this.getData(form);
form.rechargeConsumeList.forEach((items) => { form.rechargeConsumeList.forEach((items) => {
items.cardOver = items.cardConsumeMoney + items.spendMoney; let cardOver = (items.cardConsumeMoney + items.spendMoney).toFixed(2)*1;
items.cardOvers = items.cardConsumeMoney; let cardOvers = items.cardConsumeMoney.toFixed(2)*1;
items.cardOver = cardOver
items.cardOvers = cardOvers
}); });
}, },
getData(row) { getData(row) {

@ -10,7 +10,7 @@
<el-button icon="el-icon-circle-plus-outline" type="text" @click="openAddMember"></el-button> <el-button icon="el-icon-circle-plus-outline" type="text" @click="openAddMember"></el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="会员名字:" label-width="160px"> <el-form-item label="会员名字:" label-width="140px">
<div class="form-width-ms"> <div class="form-width-ms">
<span>{{ form.memberName }} <i v-if="form.sex==1" class="el-icon-male text-blue"></i> <span>{{ form.memberName }} <i v-if="form.sex==1" class="el-icon-male text-blue"></i>
<i v-if="form.sex==0" class="el-icon-female text-pink"></i></span> <i v-if="form.sex==0" class="el-icon-female text-pink"></i></span>
@ -29,6 +29,18 @@
<el-button size="mini" type="text" @click="openMoney()"></el-button> <el-button size="mini" type="text" @click="openMoney()"></el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-if="form.mobilePhone" label="成交额">
<div class="form-width-ms"><span class="text-price text-red">{{ amountType(1) }}</span></div>
</el-form-item>
<el-form-item v-if="form.mobilePhone" label="卡付">
<div class="form-width-ms"><span class="text-price text-red">{{ amountType(2) }}</span></div>
</el-form-item>
<el-form-item v-if="form.mobilePhone" label="现付">
<div class="form-width-ms"><span class="text-price text-red">{{ amountType(3) }}</span></div>
</el-form-item>
<el-form-item v-if="form.mobilePhone" label="欠款">
<div class="form-width-ms"><span class="text-price text-red">{{ amountType(4) }}</span></div>
</el-form-item>
<br /> <br />
<!-- <el-form-item label="疗程编码:"> <!-- <el-form-item label="疗程编码:">
<div class="form-width-ms flex "> <div class="form-width-ms flex ">
@ -228,7 +240,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="reat" style="display:flex;margin-top:20px;align-content:space-between"> <div class="reat">
<div class="margin-bottom-xs marginAuto"> <div class="margin-bottom-xs marginAuto">
<span style="flex:1">员工/门店管理层/高管业绩</span> <span style="flex:1">员工/门店管理层/高管业绩</span>
<div style="display: flex"> <div style="display: flex">
@ -259,7 +271,7 @@
<el-button size="mini" type="primary" plain @click="getList" v-role="5004001" style="width:100%;height:35px;;margin:10px 10px"></el-button> <el-button size="mini" type="primary" plain @click="getList" v-role="5004001" style="width:100%;height:35px;;margin:10px 10px"></el-button>
<el-button size="mini" type="primary" @click="save((saveloading = true))" :loading="saveloading" v-role="5004002" style="width:100%;height:35px;;margin:10px 10px"></el-button> <el-button size="mini" type="primary" @click="save((saveloading = true))" :loading="saveloading" v-role="5004002" style="width:100%;height:35px;;margin:10px 10px"></el-button>
</div> </div>
<div class="right"> <!-- <div class="right">
<el-form ref="form" label-width="65px"> <el-form ref="form" label-width="65px">
<el-form-item label="成交额:"> <el-form-item label="成交额:">
<span class="text-price text-red">{{ amountType(1) }}</span> <span class="text-price text-red">{{ amountType(1) }}</span>
@ -274,7 +286,7 @@
<span class="text-price text-red">{{ amountType(4) }}</span> <span class="text-price text-red">{{ amountType(4) }}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div> -->
</div> </div>
<div class="reatmen"> <div class="reatmen">
<!-- 保存列表弹窗 --> <!-- 保存列表弹窗 -->
@ -561,7 +573,7 @@ export default {
sessionStorageData: {}, // sessionStorageData: {}, //
editStaffRatioRow: "", editStaffRatioRow: "",
radioEditStaffList: {}, radioEditStaffList: {},
formLabelwidth: "80px", formLabelwidth: "70px",
rechargeAccountList: [], // rechargeAccountList: [], //
collectionCashAmount: "", collectionCashAmount: "",
editStaffDailogtitle: "", editStaffDailogtitle: "",
@ -1500,7 +1512,6 @@ export default {
// //
save() { save() {
// this.payLists
// this.form.courseReatmentAmount = parseInt(this.paidAmount) // this.form.courseReatmentAmount = parseInt(this.paidAmount)
// this.form.debtMoney = parseInt(this.treatAmount) // this.form.debtMoney = parseInt(this.treatAmount)
// ---- // ----
@ -1627,16 +1638,36 @@ export default {
}, 3000); }, 3000);
let courseLists = this.list.map(item=>{ let courseLists = this.list.map(item=>{
return { return {
...item,...this.form ...item,
mobilePhone:this.form.mobilePhone,
memberName:this.form.memberName,
memberId:this.form.memberId,
sex:this.form.sex,
isDebt:item.debtMoney?1:0,
isAddition:this.isAddition,
collectionCashAmount:item.nowAmount
} }
}) })
let from = { var payLists = [];
//
const auxiliaryArr = ['isShow','state','collectionType','id','collectionTypeName']
for (let i =0;i<this.payLists.length;i++) {
let params = {...this.payLists[i]}
params.payId = this.payLists[i].id;
params.payName = this.payLists[i].collectionTypeName;
auxiliaryArr.forEach(item=>{
delete params[item]
})
if (this.payLists[i].payMoney * 1 > 0) {
payLists.push(params);
}
}
let form = {
...val, ...val,
payLists:this.payLists, payLists,
courseLists courseLists
} }
return addcourse(form).then((res) => {
addcourse(this.form).then((res) => {
this.loading = false; this.loading = false;
if (res.code == "000000") { if (res.code == "000000") {
this.empty(); this.empty();
@ -2023,7 +2054,11 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
*>>>.el-input-group--append .el-input__inner{ .form-width-ms{
width: 0.65rem !important;
z-index: 999999999 !important;
}
>>>.el-input-group--append .el-input__inner{
width: 123px; width: 123px;
} }
.reatmen { .reatmen {
@ -2096,6 +2131,9 @@ export default {
padding: 20px 20px; padding: 20px 20px;
} }
.reat{ .reat{
margin-top: 20px;
display: flex;
justify-content: space-around;
overflow:auto overflow:auto
} }
.right{ .right{

@ -297,19 +297,19 @@ export default {
this.form.minumumTimes = 1; this.form.minumumTimes = 1;
} }
if (this.title == "添加") { if (this.title == "添加") {
if ( // if (
this.sessionStorageData.allowValid == 1 && // this.sessionStorageData.allowValid == 1 &&
this.form.directConsumption == 0 && // this.form.directConsumption == 0 &&
this.form.validTime == null // this.form.validTime == null
) { // ) {
this.$alert("请设置项目有效期限", "提示", { // this.$alert("", "", {
confirmButtonText: "确定", // confirmButtonText: "",
confirmButtonClass: "confirmbtnFalses", // confirmButtonClass: "confirmbtnFalses",
type: "warning", // type: "warning",
center: true, // center: true,
callback: (action) => {}, // callback: (action) => {},
}); // });
} else { // } else {
if (this.form.directConsumption == 1) { if (this.form.directConsumption == 1) {
this.form.validTime == 0; this.form.validTime == 0;
} }
@ -350,7 +350,7 @@ export default {
}); });
} }
}); });
} // }
} else { } else {
let falg = false; let falg = false;
if (this.form.directConsumption == true) { if (this.form.directConsumption == true) {
@ -360,19 +360,19 @@ export default {
} }
} }
if (falg == false) { if (falg == false) {
if ( // if (
this.sessionStorageData.allowValid == 1 && // this.sessionStorageData.allowValid == 1 &&
this.form.directConsumption == 0 && // this.form.directConsumption == 0 &&
this.form.validTime == null // this.form.validTime == null
) { // ) {
this.$alert("请设置项目有效期", "提示", { // this.$alert("", "", {
confirmButtonText: "确定", // confirmButtonText: "",
confirmButtonClass: "confirmbtnFalses", // confirmButtonClass: "confirmbtnFalses",
type: "warning", // type: "warning",
center: true, // center: true,
callback: (action) => {}, // callback: (action) => {},
}); // });
} else { // } else {
if (this.form.directConsumption == 1) { if (this.form.directConsumption == 1) {
this.form.validTime = 0; this.form.validTime = 0;
} }
@ -407,7 +407,7 @@ export default {
}); });
} }
}); });
} // }
} else { } else {
this.$alert("直接消费项目需要设置散客价格 / 散客最低价", "提示", { this.$alert("直接消费项目需要设置散客价格 / 散客最低价", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",

Loading…
Cancel
Save