Sigo 3 years ago
commit 260388e68f

@ -4,25 +4,28 @@
<el-form inline> <el-form inline>
<el-form-item label="手机号码:" :label-width="labelWidth"> <el-form-item label="手机号码:" :label-width="labelWidth">
<div class="form-width-ms"> <div class="form-width-ms">
<el-input oninput="this.value=this.value.replace(/\D/g,'')" pattern="[0-9]*" maxlength="11" v-model="proForm.mobilePhone" @blur="memberOne" @change="memberOne"> <el-input oninput="this.value=this.value.replace(/\D/g,'')" pattern="[0-9]*" maxlength="11"
v-model="proForm.mobilePhone" @blur="memberOne" @change="memberOne">
<el-button size="mini" slot="append" icon="el-icon-search" @click="openMember"></el-button> <el-button size="mini" slot="append" icon="el-icon-search" @click="openMember"></el-button>
</el-input> </el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="会员名字:" :label-width="labelWidth"> <el-form-item label="会员名字:" :label-width="labelWidth">
<div class="form-width-ms"> <div class="form-width-ms">
{{proForm.memberName}} {{ proForm.memberName }}
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="待付金额:" :label-width="labelWidth"> <el-form-item label="待付金额:" :label-width="labelWidth">
<div class="form-width-ms"> <div class="form-width-ms">
{{debtMoney < 0 ?'超出 '+(debtMoney*-1):debtMoney}} {{ debtMoney < 0 ? '超出 ' + (debtMoney * -1) : debtMoney }} </div>
</div>
</el-form-item> </el-form-item>
<el-form-item label="业务时间:" :label-width="labelWidth" v-show="isAddition==1"> <el-form-item label="业务时间:" :label-width="labelWidth" v-show="isAddition == 1">
<div class="form-width-ms"> <div class="form-width-ms">
<span style="cursor: pointer;" @click="(recDateShow=true)" v-show="!recDateShow">{{proForm.additionDate }} <i class="el-icon-edit"></i> </span> <span style="cursor: pointer;" @click="(recDateShow = true)" v-show="!recDateShow">{{ proForm.additionDate }}
<el-date-picker size="medium" @blur='(recDateShow=false)' v-show="recDateShow" ref="recDate" v-model="proForm.additionDate" :picker-options="pickerOptions" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择日期"> <i class="el-icon-edit"></i> </span>
<el-date-picker size="medium" @blur='(recDateShow = false)' v-show="recDateShow" ref="recDate"
v-model="proForm.additionDate" :picker-options="pickerOptions" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker> </el-date-picker>
</div> </div>
</el-form-item> </el-form-item>
@ -30,12 +33,15 @@
<div class="into-table-width margin-right-xs padding-left-lg"> <div class="into-table-width margin-right-xs padding-left-lg">
<div class="raisetable bg-white margin-bottom-xs"> <div class="raisetable bg-white margin-bottom-xs">
<div class="raisetable-sum"> <div class="raisetable-sum">
<div>转出疗程 <el-button v-if="proForm.memberName" :disabled="!proForm.memberId" size="mini" type="primary" @click='openPro(1)'>添加 <div>转出疗程 <el-button v-if="proForm.memberName" :disabled="!proForm.memberId" size="mini" type="primary"
@click='openPro(1)'>添加
</el-button> </el-button>
</div> </div>
<div style="width: 150px;">总金额 : {{outMoneys}}</div> <div style="width: 150px;">总金额 : {{ outMoneys }}</div>
</div> </div>
<el-table :data="outList" empty-text=' , ' max-height="200" :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}" style="margin-top: 5px;"> <el-table :data="outList" empty-text=' , ' max-height="200"
:header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee' }"
style="margin-top: 5px;">
<el-table-column label="项目编码" align="center" prop="courseProjectNum" min-width="80"></el-table-column> <el-table-column label="项目编码" align="center" prop="courseProjectNum" min-width="80"></el-table-column>
<el-table-column label="账户名称" align="center" prop="courseProjectName" min-width="140"></el-table-column> <el-table-column label="账户名称" align="center" prop="courseProjectName" min-width="140"></el-table-column>
<el-table-column label="可用次数" align="center" prop="courseConsumeCount" min-width="80"></el-table-column> <el-table-column label="可用次数" align="center" prop="courseConsumeCount" min-width="80"></el-table-column>
@ -44,20 +50,25 @@
<el-table-column label="疗程单价" align="center" prop="price" min-width="80"></el-table-column> <el-table-column label="疗程单价" align="center" prop="price" min-width="80"></el-table-column>
<el-table-column label="转出次数" align="center" prop="changeOutTime" min-width="100"> <el-table-column label="转出次数" align="center" prop="changeOutTime" min-width="100">
<template slot-scope='scope'> <template slot-scope='scope'>
<div class="form-input-width" v-if="!scope.row.changeOutTimeShow" @click="openEditOut(scope.row,scope.$index,scope.row.changeOutTimeShow=true)"> <div class="form-input-width" v-if="!scope.row.changeOutTimeShow"
{{scope.row.changeOutTime}} @click="openEditOut(scope.row, scope.$index, scope.row.changeOutTimeShow = true)">
{{ scope.row.changeOutTime }}
<i class="el-icon-edit text-cyan"></i> <i class="el-icon-edit text-cyan"></i>
</div> </div>
<el-input v-else v-focus class="form-input-width-xs" type='number' v-model="scope.row.changeOutTime" @blur="endChangeOutTime(scope.row,scope.$index)"></el-input> <el-input v-else v-focus class="form-input-width-xs" type='number' v-model="scope.row.changeOutTime"
@blur="endChangeOutTime(scope.row, scope.$index, scope.row.changeOutTime, scope.row.price)">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="转出金额" align="center" prop="changeOutMoney" min-width="100"> <el-table-column label="转出金额" align="center" prop="changeOutMoney" min-width="100">
<template slot-scope='scope'> <template slot-scope='scope'>
<div class="form-input-width" v-if="outMoneyIndex!=scope.$index" @click="openOutMoney(scope.row,scope.$index)"> <div class="form-input-width" v-if="outMoneyIndex != scope.$index"
{{scope.row.changeOutMoney}} @click="openOutMoney(scope.row, scope.$index)">
{{ scope.row.changeOutMoney }}
<i class="el-icon-edit text-cyan"></i> <i class="el-icon-edit text-cyan"></i>
</div> </div>
<el-input v-else v-focus class="form-input-width-xs" type='number' v-model="scope.row.changeOutMoney" @blur="endOutMoney(scope.row)"></el-input> <el-input v-else v-focus class="form-input-width-xs" type='number' v-model="scope.row.changeOutMoney"
@blur="endOutMoney(scope.row)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" fixed="right" min-width="80"> <el-table-column align="center" fixed="right" min-width="80">
@ -69,43 +80,50 @@
</div> </div>
<div class="raisetable bg-white "> <div class="raisetable bg-white ">
<div class="raisetable-sum"> <div class="raisetable-sum">
<div>转入疗程 <el-button v-if="proForm.memberName" size="mini" type="primary" @click='openPro(0)'>添加</el-button> <div>转入疗程 <el-button v-if="proForm.memberName" size="mini" type="primary" @click='openPro(0)'>添加
</el-button>
<el-button v-if="proForm.memberName" size="mini" type="warning" @click='backout'>撤销</el-button> <el-button v-if="proForm.memberName" size="mini" type="warning" @click='backout'>撤销</el-button>
</div> </div>
<div style="width: 150px;">总金额 : {{inMoneys}}</div> <div style="width: 150px;">总金额 : {{ inMoneys }}</div>
</div> </div>
<el-table :data="inList" max-height="150" empty-text=' , ' :header-cell-style="{background: 'linear-gradient(#6cb3ff, #1873d4)' ,color:'#eeeeee'}" style="margin-top: 5px;"> <el-table :data="inList" max-height="150" empty-text=' , '
<el-table-column label="项目编码" show-overflow-tooltip align="center" prop="projectNum" min-width="90"></el-table-column> :header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee' }"
<el-table-column label="账户名称" show-overflow-tooltip align="center" prop="projectName" min-width="110"></el-table-column> style="margin-top: 5px;">
<el-table-column label="项目编码" show-overflow-tooltip align="center" prop="projectNum" min-width="90">
</el-table-column>
<el-table-column label="账户名称" show-overflow-tooltip align="center" prop="projectName" min-width="110">
</el-table-column>
<el-table-column label="标准单价" align="center" prop="priceMember" min-width="70"></el-table-column> <el-table-column label="标准单价" align="center" prop="priceMember" min-width="70"></el-table-column>
<el-table-column label="最低单价" align="center" prop="minumumPriceMember" min-width="70"></el-table-column> <el-table-column label="最低单价" align="center" prop="minumumPriceMember" min-width="70"></el-table-column>
<el-table-column label="转入次数" align="center" prop="changeInTime" min-width="90"> <el-table-column label="单价" align="center" prop="prices" min-width="90">
<template slot-scope='scope'> <template slot-scope='scope'>
<div class="form-input-width" v-if="inNumberIndex!=scope.$index" @click="openEdit(scope.row,scope.$index,inNumberIndex=scope.$index)"> <div class="form-input-width" v-if="inNumberIndexs != scope.$index"
{{scope.row.changeInTime}} @click="openEdit(scope.row, scope.$index, inNumberIndexs = scope.$index)">
{{ scope.row.prices }}
<i class="el-icon-edit text-cyan"></i> <i class="el-icon-edit text-cyan"></i>
</div> </div>
<el-input v-focus class="form-input-width-xs" type="number" v-else v-model="scope.row.changeInTime" @blur="endEditTimes(scope.row)"></el-input> <el-input v-focus class="form-input-width-xs" type="number" v-else v-model="scope.row.prices"
@blur="endEditprices(scope.row)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="转入金额" align="center" prop="changeInMoney" min-width="90"> <el-table-column label="转入次数" align="center" prop="changeInTime" min-width="90">
<template slot-scope='scope'> <template slot-scope='scope'>
<div class="form-input-width" v-if="!scope.row.changeInMoneyShow" @click="openEdit(scope.row,scope.$index,scope.row.changeInMoneyShow=true)"> <div class="form-input-width" v-if="inNumberIndex != scope.$index"
{{scope.row.changeInMoney}} @click="openEdit(scope.row, scope.$index, inNumberIndex = scope.$index)">
{{ scope.row.changeInTime }}
<i class="el-icon-edit text-cyan"></i> <i class="el-icon-edit text-cyan"></i>
</div> </div>
<el-input v-focus class="form-input-width-xs" type="number" v-else v-model="scope.row.changeInMoney" @blur="endEditPrice(scope.row,scope.$index)"></el-input> <el-input v-focus class="form-input-width-xs" type="number" v-else v-model="scope.row.changeInTime"
@blur="endEditTimes(scope.row)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="欠款金额" v-if="sessionStorageData.allowdebt" align="center" prop="debtMoney" min-width="90"> <el-table-column label="转入金额" align="center" min-width="90">
<template slot-scope='scope'> <template >
<div class="form-input-width" v-if="!scope.row.debtMoneyShow" @click="openEdit(scope.row,scope.$index,scope.row.debtMoneyShow=true)"> <div>{{outMoneys}}</div>
{{scope.row.debtMoney}}
<i class="el-icon-edit text-cyan"></i>
</div>
<el-input v-focus class="form-input-width-xs" type="number" v-else v-model="scope.row.debtMoney" @blur="endDebtMoney(scope.row,scope.$index)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="欠款金额" v-if="sessionStorageData.allowdebt" align="center" prop="debtMoney"
min-width="90"></el-table-column>
<el-table-column label="成交金额" align="center" prop="transactionMoney" min-width="80"> <el-table-column label="成交金额" align="center" prop="transactionMoney" min-width="80">
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -113,15 +131,17 @@
</div> </div>
<div style="width:280px;" class="border-radius-10 border bg-white padding-xs"> <div style="width:280px;" class="border-radius-10 border bg-white padding-xs">
<el-table :data="proForm.payLists" max-height="350"> <el-table :data="proForm.payLists" max-height="350">
<el-table-column align="center" prop="payName" label="支付方式" min-width="100"></el-table-column> <el-table-column align="center" prop="payName" label="支付方式" min-width="100"></el-table-column>
<el-table-column align="center" prop="payMoney" fixed="right" label="本次支付" min-width="80"> <el-table-column align="center" prop="payMoney" fixed="right" label="本次支付" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="form-input-width" v-if="!scope.row.isShow" @click="editPay(scope.row,scope.$index)"> <div class="form-input-width" v-if="!scope.row.isShow" @click="editPay(scope.row, scope.$index)">
{{scope.row.payMoney}} {{ scope.row.payMoney }}
<i class="el-icon-edit text-cyan"></i> <i class="el-icon-edit text-cyan"></i>
</div> </div>
<el-input v-else v-focus @blur="endEdit(scope.row)" @change="endEdit(scope.row)" @keydown.enter="endEdit(scope.row)" v-model="scope.row.payMoney" type="number" class="form-input-wdith-xs"></el-input> <el-input v-else v-focus @blur="endEdit(scope.row)" @change="endEdit(scope.row)"
@keydown.enter="endEdit(scope.row)" v-model="scope.row.payMoney" type="number"
class="form-input-wdith-xs"></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -135,10 +155,11 @@
</div> </div>
<div class="into-table-width padding-top text-center padding-left-lg"> <div class="into-table-width padding-top text-center padding-left-lg">
<el-button size="mini" type="info" @click='empty()' plain>清空</el-button> <el-button size="mini" type="info" @click='empty()' plain>清空</el-button>
<el-button size="mini" v-if="isAddition==0" type="primary" @click="isAddition = 1"></el-button> <el-button size="mini" v-if="isAddition == 0" type="primary" @click="isAddition = 1"></el-button>
<el-button size="mini" v-else type="success" @click="isAddition = 0">加价</el-button> <el-button size="mini" v-else type="success" @click="isAddition = 0">加价</el-button>
<el-button size="mini" type="primary" @click='raiseProList()' plain>列表</el-button> <el-button size="mini" type="primary" @click='raiseProList()' plain>列表</el-button>
<el-button size="mini" type="primary" @click='submit(true,loading=true)' :loading="loading" :disabled="outList.length==0&&inList.length==0">提交</el-button> <el-button size="mini" type="primary" @click='submit(true, loading = true)' :loading="loading"
:disabled="outList.length == 0 && inList.length == 0">提交</el-button>
</div> </div>
</el-form> </el-form>
<member ref="member" @memberData="memberData"></member> <member ref="member" @memberData="memberData"></member>
@ -176,11 +197,13 @@ export default {
return time.getTime() > Date.now(); return time.getTime() > Date.now();
}, },
}, },
nums,
projectDialogVisible: false, projectDialogVisible: false,
recDateShow: false, recDateShow: false,
activeName: "现付", activeName: "现付",
outMoneyIndex: -1, outMoneyIndex: -1,
inNumberIndex: -1, inNumberIndex: -1,
inNumberIndexs: -1,
proForm: { proForm: {
additionDate: null, additionDate: null,
manageStaffName: null, manageStaffName: null,
@ -211,7 +234,7 @@ export default {
debtMoney: 0, debtMoney: 0,
isAddition: 0, isAddition: 0,
loading: false, loading: false,
TransactionNum:0 TransactionNum: 0
}; };
}, },
methods: { methods: {
@ -316,7 +339,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
this.loading = false; this.loading = false;
} }
@ -327,7 +350,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
this.loading = false; this.loading = false;
falg = false; falg = false;
@ -371,9 +394,10 @@ export default {
form.storeId = this.proForm.storeId; form.storeId = this.proForm.storeId;
form.storeName = this.proForm.storeName; form.storeName = this.proForm.storeName;
form.memberIdentityCard = this.proForm.identityCard; form.memberIdentityCard = this.proForm.identityCard;
if (this.openProText == 0) { if (this.openProText == 0) {
form.changeInMoney = (form.priceMember * form.minumumTimes).toFixed(2) * 1;
(form.priceMember * form.minumumTimes).toFixed(2) * 1; form.prices = form.priceMember
form.changeInTime = form.minumumTimes; form.changeInTime = form.minumumTimes;
form.projectId = form.id; form.projectId = form.id;
form.debtMoney = 0; form.debtMoney = 0;
@ -381,6 +405,12 @@ export default {
form.changeInMoneyShow = false; form.changeInMoneyShow = false;
form.debtMoneyShow = false; form.debtMoneyShow = false;
form.changeInCaseTimeShow = false; form.changeInCaseTimeShow = false;
let num = 0;
this.outList.forEach((item) => {
num = num + item.changeOutMoney
});
form.changeInMoney = num
form.changeInMoney
if (this.inList.length < 1) { if (this.inList.length < 1) {
this.inList.push(form); this.inList.push(form);
} else { } else {
@ -389,7 +419,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
} }
} }
@ -399,7 +429,7 @@ export default {
// form.changeOutMoney = // form.changeOutMoney =
// (form.courseConsumeCount * form.unitMoney).toFixed(2) * 1; // (form.courseConsumeCount * form.unitMoney).toFixed(2) * 1;
form.changeOutMoney = 0; form.changeOutMoney = 0;
form.changeOutTime = form.courseConsumeCount; form.changeOutTime = 1;
form.changeOutTimeShow = false; form.changeOutTimeShow = false;
form.accountId = form.id; form.accountId = form.id;
this.outList.push(form); this.outList.push(form);
@ -435,7 +465,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
} }
}); });
@ -451,19 +481,19 @@ export default {
// message: " , !", // message: " , !",
// }); // });
// } else { // } else {
console.log(row) console.log(row)
var form = { var form = {
...row, ...row,
}; };
console.log() console.log()
var payLists = [...this.proForm.payLists]; var payLists = [...this.proForm.payLists];
payLists[index] = form; payLists[index] = form;
form.isShow = true; form.isShow = true;
form.payMoney = (this.debtMoney + form.payMoney).toFixed(2) * 1; form.payMoney = (this.debtMoney + form.payMoney).toFixed(2) * 1;
this.proForm.payLists = []; this.proForm.payLists = [];
this.proForm.payLists = payLists; this.proForm.payLists = payLists;
this.sumMoney() this.sumMoney()
// } // }
}, },
endEdit(row) { endEdit(row) {
@ -480,13 +510,13 @@ export default {
this.openProText = num; this.openProText = num;
if (num == 0) { if (num == 0) {
this.$refs.project.show(0); this.$refs.project.show(0);
this.TransactionNum=this.inList.transactionMoney; this.TransactionNum = this.inList.transactionMoney;
} }
if (num == 1) { if (num == 1) {
this.$refs.project.show(this.proForm); this.$refs.project.show(this.proForm);
console.log(this.inList) console.log(this.inList)
} }
}, },
delOldPro(index) { delOldPro(index) {
@ -541,9 +571,40 @@ export default {
row.debtMoneyShow = false; row.debtMoneyShow = false;
this.sumMoney(); this.sumMoney();
}, },
endChangeOutTime(row, index) { endChangeOutTime(row, index, time, price) {
row.changeOutTimeShow = false; row.changeOutTimeShow = false;
this.sumMoney(); if (this.outList[index].courseConsumeCount < time) {
this.$alert("次数不可以大于可用次数", "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => { },
});
this.outList[index].changeOutTime = this.outList[index].courseConsumeCount
this.outList[index].changeOutMoney = this.outList[index].changeOutTime * price
} else if (time < 1) {
this.$alert("次数不可以小于1", "提示", {
confirmButtonText: "确定",
confirmButtonClass: "confirmbtnFalses",
type: "warning",
center: true,
callback: (action) => { },
});
this.outList[index].changeOutTime = 1
this.outList[index].changeOutMoney = this.outList[index].changeOutTime * price
} else {
this.outList[index].changeOutMoney = time * price
}
let num = 0;
this.outList.forEach((item) => {
num = num + item.changeOutMoney
});
this.outMoneys = num;
if(this.outList.length!=0){
this.inList[0].changeInMoney=num
}
}, },
openOutMoney(row, index) { openOutMoney(row, index) {
let form = { ...row }; let form = { ...row };
@ -578,11 +639,23 @@ export default {
// }); // });
// row.changeInTime = row.minumumTimes; // row.changeInTime = row.minumumTimes;
// } // }
row.changeInMoney = (row.priceMember * row.changeInTime).toFixed(2) * 1; row.changeInMoney = (row.prices * row.changeInTime).toFixed(2) * 1;
row.transactionMoney = row.changeInMoney; row.transactionMoney = row.changeInMoney;
this.inNumberIndex = -1; this.inNumberIndex = -1;
this.sumMoney(); this.sumMoney();
}, },
endEditprices(row, index) {
// if (row.changeInTime < row.minumumTimes) {
// this.$message.info({
// message: "" + row.minumumTimes + "",
// });
// row.changeInTime = row.minumumTimes;
// }
row.changeInMoney = (row.prices * row.changeInTime).toFixed(2) * 1;
row.transactionMoney = row.changeInMoney;
this.inNumberIndexs = -1;
this.sumMoney();
},
projectRadio(row) { projectRadio(row) {
if (row) { if (row) {
this.proRadio = row.id; this.proRadio = row.id;
@ -655,7 +728,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
} }
}); });
@ -677,7 +750,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
} }
}); });
@ -702,7 +775,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
} }
}); });
@ -719,7 +792,7 @@ export default {
confirmButtonClass: "confirmbtnFalses", confirmButtonClass: "confirmbtnFalses",
type: "warning", type: "warning",
center: true, center: true,
callback: (action) => {}, callback: (action) => { },
}); });
} }
}); });

Loading…
Cancel
Save