Sigo 3 years ago
commit 260388e68f

@ -4,7 +4,8 @@
<el-form inline>
<el-form-item label="手机号码:" :label-width="labelWidth">
<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-input>
</div>
@ -16,13 +17,15 @@
</el-form-item>
<el-form-item label="待付金额:" :label-width="labelWidth">
<div class="form-width-ms">
{{debtMoney < 0 ?'超出 '+(debtMoney*-1):debtMoney}}
</div>
{{ debtMoney < 0 ? '超出 ' + (debtMoney * -1) : debtMoney }} </div>
</el-form-item>
<el-form-item label="业务时间:" :label-width="labelWidth" v-show="isAddition == 1">
<div class="form-width-ms">
<span style="cursor: pointer;" @click="(recDateShow=true)" v-show="!recDateShow">{{proForm.additionDate }} <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="选择日期">
<span style="cursor: pointer;" @click="(recDateShow = true)" v-show="!recDateShow">{{ proForm.additionDate }}
<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>
</div>
</el-form-item>
@ -30,12 +33,15 @@
<div class="into-table-width margin-right-xs padding-left-lg">
<div class="raisetable bg-white margin-bottom-xs">
<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>
</div>
<div style="width: 150px;">总金额 : {{ outMoneys }}</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="courseProjectName" min-width="140"></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="changeOutTime" min-width="100">
<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"
@click="openEditOut(scope.row, scope.$index, scope.row.changeOutTimeShow = true)">
{{ scope.row.changeOutTime }}
<i class="el-icon-edit text-cyan"></i>
</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>
</el-table-column>
<el-table-column label="转出金额" align="center" prop="changeOutMoney" min-width="100">
<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"
@click="openOutMoney(scope.row, scope.$index)">
{{ scope.row.changeOutMoney }}
<i class="el-icon-edit text-cyan"></i>
</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>
</el-table-column>
<el-table-column align="center" fixed="right" min-width="80">
@ -69,43 +80,50 @@
</div>
<div class="raisetable bg-white ">
<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>
</div>
<div style="width: 150px;">总金额 : {{ inMoneys }}</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-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 :data="inList" max-height="150" empty-text=' , '
:header-cell-style="{ background: 'linear-gradient(#6cb3ff, #1873d4)', color: '#eeeeee' }"
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="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'>
<div class="form-input-width" v-if="inNumberIndex!=scope.$index" @click="openEdit(scope.row,scope.$index,inNumberIndex=scope.$index)">
{{scope.row.changeInTime}}
<div class="form-input-width" v-if="inNumberIndexs != scope.$index"
@click="openEdit(scope.row, scope.$index, inNumberIndexs = scope.$index)">
{{ scope.row.prices }}
<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.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>
</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'>
<div class="form-input-width" v-if="!scope.row.changeInMoneyShow" @click="openEdit(scope.row,scope.$index,scope.row.changeInMoneyShow=true)">
{{scope.row.changeInMoney}}
<div class="form-input-width" v-if="inNumberIndex != scope.$index"
@click="openEdit(scope.row, scope.$index, inNumberIndex = scope.$index)">
{{ scope.row.changeInTime }}
<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.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>
</el-table-column>
<el-table-column label="欠款金额" v-if="sessionStorageData.allowdebt" align="center" prop="debtMoney" min-width="90">
<template slot-scope='scope'>
<div class="form-input-width" v-if="!scope.row.debtMoneyShow" @click="openEdit(scope.row,scope.$index,scope.row.debtMoneyShow=true)">
{{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>
<el-table-column label="转入金额" align="center" min-width="90">
<template >
<div>{{outMoneys}}</div>
</template>
</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>
</el-table>
@ -121,7 +139,9 @@
{{ scope.row.payMoney }}
<i class="el-icon-edit text-cyan"></i>
</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>
</el-table-column>
</el-table>
@ -138,7 +158,8 @@
<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" 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>
</el-form>
<member ref="member" @memberData="memberData"></member>
@ -176,11 +197,13 @@ export default {
return time.getTime() > Date.now();
},
},
nums,
projectDialogVisible: false,
recDateShow: false,
activeName: "现付",
outMoneyIndex: -1,
inNumberIndex: -1,
inNumberIndexs: -1,
proForm: {
additionDate: null,
manageStaffName: null,
@ -371,9 +394,10 @@ export default {
form.storeId = this.proForm.storeId;
form.storeName = this.proForm.storeName;
form.memberIdentityCard = this.proForm.identityCard;
if (this.openProText == 0) {
form.changeInMoney =
(form.priceMember * form.minumumTimes).toFixed(2) * 1;
form.prices = form.priceMember
form.changeInTime = form.minumumTimes;
form.projectId = form.id;
form.debtMoney = 0;
@ -381,6 +405,12 @@ export default {
form.changeInMoneyShow = false;
form.debtMoneyShow = 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) {
this.inList.push(form);
} else {
@ -399,7 +429,7 @@ export default {
// form.changeOutMoney =
// (form.courseConsumeCount * form.unitMoney).toFixed(2) * 1;
form.changeOutMoney = 0;
form.changeOutTime = form.courseConsumeCount;
form.changeOutTime = 1;
form.changeOutTimeShow = false;
form.accountId = form.id;
this.outList.push(form);
@ -541,9 +571,40 @@ export default {
row.debtMoneyShow = false;
this.sumMoney();
},
endChangeOutTime(row, index) {
endChangeOutTime(row, index, time, price) {
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) {
let form = { ...row };
@ -578,11 +639,23 @@ export default {
// });
// 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;
this.inNumberIndex = -1;
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) {
if (row) {
this.proRadio = row.id;

Loading…
Cancel
Save