|
|
@ -15,7 +15,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="query"> |
|
|
<div class="query"> |
|
|
<span class="spanClass">手机号</span> |
|
|
<span class="spanClass">手机号</span> |
|
|
<el-input placeholder="手机号" v-model="query.mobilePhone" size="small" clearable style="width: 110px" /> |
|
|
|
|
|
|
|
|
<el-input placeholder="预约手机号" v-model="query.mobilePhone" size="small" clearable style="width: 110px" /> |
|
|
</div> |
|
|
</div> |
|
|
<div class="query"> |
|
|
<div class="query"> |
|
|
<span class="spanClass">身份证号</span> |
|
|
<span class="spanClass">身份证号</span> |
|
|
@ -40,27 +40,73 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-table :data="tableData" border style="width: 100%" row-key="id" height="300" highlight-current-row |
|
|
|
|
|
size="small" @row-click="rowClick"> |
|
|
|
|
|
<el-table-column label="姓名" width="80" prop="personName" align="center"/> |
|
|
|
|
|
<el-table-column label="身份证号" width="150" prop="idNo" align="center"/> |
|
|
|
|
|
<el-table-column label="预约时间" width="150" prop="appointDate" align="center"/> |
|
|
|
|
|
<el-table-column label="性别" width="40" prop="sexName" align="center"/> |
|
|
|
|
|
<el-table-column label="婚姻" width="40" prop="maritalStatusName" align="center"/> |
|
|
|
|
|
<el-table-column label="单位" width="150" prop="customerOrgName" align="center"/> |
|
|
|
|
|
|
|
|
<el-table :data="tableData" border style="width: 100%" row-key="id" height="200" highlight-current-row |
|
|
|
|
|
size="small" @row-click="rowClick" ref="webBooking"> |
|
|
|
|
|
<el-table-column label="姓名" width="80" prop="personName" align="center" /> |
|
|
|
|
|
<el-table-column label="身份证号" width="150" prop="idNo" align="center" /> |
|
|
|
|
|
<el-table-column label="预约时间" width="150" prop="appointDate" align="center" /> |
|
|
|
|
|
<el-table-column label="性别" width="40" prop="sexName" align="center" /> |
|
|
|
|
|
<el-table-column label="婚姻" width="40" prop="maritalStatusName" align="center" /> |
|
|
|
|
|
<el-table-column label="单位" width="150" prop="customerOrgName" align="center" /> |
|
|
<el-table-column label="分组/套餐" width="120" prop="customerOrgGroupName" align="center"> |
|
|
<el-table-column label="分组/套餐" width="120" prop="customerOrgGroupName" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div>{{ scope.row.customerOrgGroupName ? scope.row.customerOrgGroupName:scope.row.medicalPackageName }}</div> |
|
|
|
|
|
|
|
|
<div>{{ scope.row.customerOrgGroupName ? scope.row.customerOrgGroupName : scope.row.medicalPackageName }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="怀孕" width="40" prop="pregnantFlagName" align="center" /> |
|
|
|
|
|
<el-table-column label="身高" width="40" prop="height" align="center" /> |
|
|
|
|
|
<el-table-column label="体重" width="40" prop="weight" align="center" /> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<el-table :data="tableDataDetails" border style="width: 100%" row-key="id" height="300" highlight-current-row |
|
|
|
|
|
:summary-method="getSummaries" show-summary size="small" ref="webBookingDetaills"> |
|
|
|
|
|
<el-table-column label="序号" width="40" type="index"/> |
|
|
|
|
|
<el-table-column label="已选组合项目" min-width="150" prop="asbitemName"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="top"> |
|
|
|
|
|
<i v-if="scope.row.isBelongGroupPackage == 'Y'" class="el-icon-star-on" |
|
|
|
|
|
style="padding: 3px; font-size: 14px;color: purple;" /> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
{{ scope.row.asbitemName }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="标准价格" prop="standardPrice" min-width="70" align="center" /> |
|
|
|
|
|
<el-table-column label="折扣" prop="discount" min-width="60"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input type="number" v-model="scope.row.discount" size="small" disabled/> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="数量" prop="amount" min-width="50"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input type="number" v-model="scope.row.amount" size="small" disabled/> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="实收价格" prop="chargePrice" min-width="70"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input type="number" v-model="scope.row.chargePrice" size="small" disabled/> |
|
|
|
|
|
<!--立即触发保存 @blur="onSubmit('')" --> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="total" label="金额" min-width="70" align="center" /> |
|
|
|
|
|
<el-table-column prop="standardPrice" label="标准金额" min-width="70" v-if="false" /> |
|
|
|
|
|
<el-table-column label="支付方式" prop="payTypeFlag" width="80"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-select v-model="scope.row.payTypeFlag" size="small" disabled> |
|
|
|
|
|
<el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
|
|
</el-select> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="怀孕" width="40" prop="pregnantFlagName" align="center"/> |
|
|
|
|
|
<el-table-column label="身高" width="40" prop="height" align="center"/> |
|
|
|
|
|
<el-table-column label="体重" width="40" prop="weight" align="center"/> |
|
|
|
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-top: 10px; display: flex;justify-content: space-between;"> |
|
|
<div style="margin-top: 10px; display: flex;justify-content: space-between;"> |
|
|
|
|
|
<div style="margin: -8px 0 0 0; font-size: 12px;"> |
|
|
|
|
|
{{ asbDesc }} |
|
|
|
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-button v-if="true" @click="btnTest">测试</el-button> |
|
|
|
|
|
|
|
|
<el-button v-if="false" @click="btnTest">测试</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-button class="commonbutton" @click="btnOk">确定</el-button> |
|
|
<el-button class="commonbutton" @click="btnOk">确定</el-button> |
|
|
@ -94,6 +140,7 @@ export default { |
|
|
appointStopDate: "", |
|
|
appointStopDate: "", |
|
|
completeFlag: "0" |
|
|
completeFlag: "0" |
|
|
}, |
|
|
}, |
|
|
|
|
|
asbDesc: '', //所选套餐描述 |
|
|
pickerOptions: { |
|
|
pickerOptions: { |
|
|
// disabledDate(time) { |
|
|
// disabledDate(time) { |
|
|
// return time.getTime() > Date.now(); |
|
|
// return time.getTime() > Date.now(); |
|
|
@ -126,8 +173,16 @@ export default { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
updated() { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs['webBookingDetaills'].doLayout() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
//挂载完成 |
|
|
//挂载完成 |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
//回车替代查询 |
|
|
|
|
|
this.enterToQuery() |
|
|
|
|
|
|
|
|
this.funMounted() |
|
|
this.funMounted() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -202,11 +257,11 @@ export default { |
|
|
|
|
|
|
|
|
// 查询 |
|
|
// 查询 |
|
|
btnQuery() { |
|
|
btnQuery() { |
|
|
if(!(this.query.appointStartDate && this.query.appointStopDate)){ |
|
|
|
|
|
|
|
|
if (!(this.query.appointStartDate && this.query.appointStopDate)) { |
|
|
this.$message.error({ showClose: true, message: "必须选择日期段!" }) |
|
|
this.$message.error({ showClose: true, message: "必须选择日期段!" }) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if(!(this.query.idNo || this.query.mobilePhone)){ |
|
|
|
|
|
|
|
|
if (!(this.query.idNo || this.query.mobilePhone)) { |
|
|
this.$message.error({ showClose: true, message: "手机号或身份证号必须填写一项!" }) |
|
|
this.$message.error({ showClose: true, message: "手机号或身份证号必须填写一项!" }) |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -224,6 +279,10 @@ export default { |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
if (res.code > -1) { |
|
|
if (res.code > -1) { |
|
|
this.tableData = res.data |
|
|
this.tableData = res.data |
|
|
|
|
|
if (res.data && Array.isArray(res.data) && res.data.length == 1) { |
|
|
|
|
|
this.rowClick(res.data[0]) |
|
|
|
|
|
this.$refs['webBooking'].setCurrentRow(res.data[0]); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -243,7 +302,17 @@ export default { |
|
|
thirdInterFaceId: this.query.thirdInterfaceId, |
|
|
thirdInterFaceId: this.query.thirdInterfaceId, |
|
|
appointPatientRegisterId: row.appointPatientRegisterId |
|
|
appointPatientRegisterId: row.appointPatientRegisterId |
|
|
}).then(res => { |
|
|
}).then(res => { |
|
|
if(res.code > -1){ |
|
|
|
|
|
|
|
|
if (res.code > -1) { |
|
|
|
|
|
|
|
|
|
|
|
res.data.forEach(e => { |
|
|
|
|
|
e.discount = e.standardPrice == 0 ? 100: Math.floor(e.chargePrice * 10000/e.standardPrice)/100 |
|
|
|
|
|
if(!e.isBelongGroupPackage){ |
|
|
|
|
|
e.isBelongGroupPackage = e.isInMedicalPackage |
|
|
|
|
|
} |
|
|
|
|
|
// e.standTotal = e.amount * e.standardPrice |
|
|
|
|
|
e.total = e.amount * e.chargePrice |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
this.tableDataDetails = res.data |
|
|
this.tableDataDetails = res.data |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -268,6 +337,107 @@ export default { |
|
|
this.dialogWin.WebBooking = false |
|
|
this.dialogWin.WebBooking = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//自定义计算列 |
|
|
|
|
|
getSummaries(param) { |
|
|
|
|
|
const { columns, data } = param; |
|
|
|
|
|
const sumCol = [6] //需合计的列 |
|
|
|
|
|
const sums = []; |
|
|
|
|
|
|
|
|
|
|
|
let count = this.tableDataDetails.length |
|
|
|
|
|
let pack = this.tableDataDetails.filter(e => { return e.isBelongGroupPackage == 'Y' }).length |
|
|
|
|
|
|
|
|
|
|
|
this.asbDesc = `共选 ${count} 个项目,其中套餐/分组 ${pack} 个,加做 ${count - pack} 个` |
|
|
|
|
|
|
|
|
|
|
|
columns.forEach((column, index) => { |
|
|
|
|
|
//console.log('column, index,data',column, index,data) |
|
|
|
|
|
//显示合计列 |
|
|
|
|
|
if (index == 1) { |
|
|
|
|
|
sums[index] = `合计`; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//不合计的列 |
|
|
|
|
|
if (sumCol.indexOf(index) == -1) { |
|
|
|
|
|
sums[index] = ''; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sums[index] = 0 |
|
|
|
|
|
data.forEach(e => { |
|
|
|
|
|
if (!isNaN(e[column.property])) { |
|
|
|
|
|
if (index == 1) { |
|
|
|
|
|
sums[index] += e[column.property] * e['amount'] |
|
|
|
|
|
} else { |
|
|
|
|
|
sums[index] += e[column.property] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
sums[index] = Math.round(sums[index] * 100) / 100 //+ ' 元'; |
|
|
|
|
|
|
|
|
|
|
|
// const values = data.map(item => Number(item[column.property])); |
|
|
|
|
|
// if (!values.every(value => isNaN(value))) { |
|
|
|
|
|
// sums[index] = values.reduce((prev, curr) => { |
|
|
|
|
|
// const value = Number(curr); |
|
|
|
|
|
// if (!isNaN(value)) { |
|
|
|
|
|
// //return prev + curr; //原始 |
|
|
|
|
|
// return prev + curr; //改造 |
|
|
|
|
|
// } else { |
|
|
|
|
|
// return prev; |
|
|
|
|
|
// } |
|
|
|
|
|
// }, 0); |
|
|
|
|
|
// sums[index] = sums[index].toFixed(2) + ' 元'; |
|
|
|
|
|
// } else { |
|
|
|
|
|
// sums[index] = 'N/A'; |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
this.totalStand = sums[1]; |
|
|
|
|
|
//console.log('this.totalFoucs/this.discountFoucs',this.totalFoucs,this.discountFoucs) |
|
|
|
|
|
if (!this.totalFoucs) this.total = sums[5]; |
|
|
|
|
|
if (!this.discountFoucs) this.discount = Math.round(this.total * 10000 / this.totalStand) / 100; |
|
|
|
|
|
return sums; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//回车替代查询 |
|
|
|
|
|
enterToQuery() { |
|
|
|
|
|
// console.log('enterToTab'); |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
let inputs = document.querySelectorAll(["input"]); //用数组可以读取多个标签的元素 //.inline-input |
|
|
|
|
|
|
|
|
|
|
|
// 为每个输入框添加键盘事件监听器 |
|
|
|
|
|
inputs.forEach((input, i) => { |
|
|
|
|
|
// console.log('input',input); |
|
|
|
|
|
input.addEventListener('keydown', (event) => { |
|
|
|
|
|
if (event.keyCode === 13) { |
|
|
|
|
|
// 阻止回车键的默认行为(换行) |
|
|
|
|
|
event.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
// 如果按下的是回车查询 |
|
|
|
|
|
// console.log(input.getAttribute('placeholder'),input.value) |
|
|
|
|
|
let placeholder = input.getAttribute('placeholder') |
|
|
|
|
|
switch (placeholder) { |
|
|
|
|
|
case '预约手机号': |
|
|
|
|
|
case '身份证号': |
|
|
|
|
|
this.btnQuery() |
|
|
|
|
|
input.select() |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
input.addEventListener('click', (event) => { |
|
|
|
|
|
let placeholder = input.getAttribute('placeholder') |
|
|
|
|
|
switch (placeholder) { |
|
|
|
|
|
case '预约手机号': |
|
|
|
|
|
case '身份证号': |
|
|
|
|
|
input.select() |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//监听事件() |
|
|
//监听事件() |
|
|
|