|
|
@ -10,8 +10,8 @@ |
|
|
</el-cascader> |
|
|
</el-cascader> |
|
|
</div> |
|
|
</div> |
|
|
<div class="mainareaBox"> |
|
|
<div class="mainareaBox"> |
|
|
<el-table :data="dataTransOpts.copyGroup.asbItem" style="border-radius: 5px;" :height="tableHeight" @row-dblclick="dbClickChoosedAsb" |
|
|
|
|
|
highlight-current-row @selection-change="handleSelectionChange" size="small" |
|
|
|
|
|
|
|
|
<el-table :data="dataTransOpts.copyGroup.asbItem" style="border-radius: 5px;" :height="tableHeight" |
|
|
|
|
|
@row-dblclick="dbClickChoosedAsb" highlight-current-row @selection-change="handleSelectionChange" size="small" |
|
|
:row-class-name="handleRowClassName" @row-click="chooseAsbItem"> |
|
|
:row-class-name="handleRowClassName" @row-click="chooseAsbItem"> |
|
|
<!-- |
|
|
<!-- |
|
|
<el-table-column type="selection" align="center" width="40" /> |
|
|
<el-table-column type="selection" align="center" width="40" /> |
|
|
@ -19,7 +19,8 @@ |
|
|
<el-table-column prop="displayName" label="未选组合项目"> |
|
|
<el-table-column prop="displayName" label="未选组合项目"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div> |
|
|
<div> |
|
|
<i class="el-icon-view" style="font-size: 14px;color: black;cursor: pointer;" @click="getAsbItems({asbitemName:scope.row.displayName,asbitemId:scope.row.id})" /> |
|
|
|
|
|
|
|
|
<i class="el-icon-view" style="font-size: 14px;color: black;cursor: pointer;" |
|
|
|
|
|
@click="getAsbItems({ asbitemName: scope.row.displayName, asbitemId: scope.row.id })" /> |
|
|
{{ scope.row.displayName }} |
|
|
{{ scope.row.displayName }} |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -57,8 +58,8 @@ |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div v-show="checkPagePriv(pagePriv.privs, '全移除')" class="btnList"> |
|
|
<div v-show="checkPagePriv(pagePriv.privs, '全移除')" class="btnList"> |
|
|
<el-button type="danger" class="difference" @click="delAbs(patientRegisterAbsChoosed, 'all')" style="width:90px;" |
|
|
|
|
|
:disabled="isComplete"><i class="el-icon-d-arrow-left"> 全移除</i> |
|
|
|
|
|
|
|
|
<el-button type="danger" class="difference" @click="delAbs(patientRegisterAbsChoosed, 'all')" |
|
|
|
|
|
style="width:90px;" :disabled="isComplete"><i class="el-icon-d-arrow-left"> 全移除</i> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 不显示保存,当已选组合有修改时,失去焦点自动保存 |
|
|
<!-- 不显示保存,当已选组合有修改时,失去焦点自动保存 |
|
|
@ -105,7 +106,8 @@ |
|
|
<el-table-column label="已选组合项目" min-width="150" prop="asbitemName"> |
|
|
<el-table-column label="已选组合项目" min-width="150" prop="asbitemName"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div> |
|
|
<div> |
|
|
<i class="el-icon-view" style="font-size: 14px;color: black;cursor: pointer;" @click="getAsbItems(scope.row)" /> |
|
|
|
|
|
|
|
|
<i class="el-icon-view" style="font-size: 14px;color: black;cursor: pointer;" |
|
|
|
|
|
@click="getAsbItems(scope.row)" /> |
|
|
<el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="top"> |
|
|
<el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="top"> |
|
|
<i v-if="scope.row.isBelongGroupPackage == 'Y'" class="el-icon-star-on" |
|
|
<i v-if="scope.row.isBelongGroupPackage == 'Y'" class="el-icon-star-on" |
|
|
style="padding: 3px; font-size: 14px;color: purple;" /> |
|
|
style="padding: 3px; font-size: 14px;color: purple;" /> |
|
|
@ -145,8 +147,8 @@ |
|
|
<el-checkbox :value="scope.row.isCharge == 'Y'" true-label="Y" false-label="N" /> |
|
|
<el-checkbox :value="scope.row.isCharge == 'Y'" true-label="Y" false-label="N" /> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="checkCompleteFlag" label="状态" min-width="40" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
|
<el-table-column prop="checkCompleteFlag" label="状态" min-width="40" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
<div :style="`color: ${setColor(scope.row.checkCompleteFlag)}`"> |
|
|
<div :style="`color: ${setColor(scope.row.checkCompleteFlag)}`"> |
|
|
{{ dddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }} |
|
|
{{ dddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }} |
|
|
</div> |
|
|
</div> |
|
|
@ -181,11 +183,11 @@ import { getPagePriv, checkPagePriv, arrayFilter, arrayReduce, arrayExistObj, dd |
|
|
export default { |
|
|
export default { |
|
|
props: ["prForm", "prAsbOpraOpts", "refreshFormId"], |
|
|
props: ["prForm", "prAsbOpraOpts", "refreshFormId"], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
|
|
|
|
|
|
return { |
|
|
pagePriv: { |
|
|
pagePriv: { |
|
|
routeUrlorPageName: 'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称 |
|
|
routeUrlorPageName: 'PatientRegisterEdit', //当前页面归属路由或归属页面权限名称 |
|
|
privs: [] // 页面权限 |
|
|
privs: [] // 页面权限 |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
LocalConfig: { |
|
|
LocalConfig: { |
|
|
patientRegister: { |
|
|
patientRegister: { |
|
|
Edit: 'standard', //standard/qztl 人员登记组件版本 |
|
|
Edit: 'standard', //standard/qztl 人员登记组件版本 |
|
|
@ -195,7 +197,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
oldFormId: '', //配合登记人员复制新增使用 |
|
|
oldFormId: '', //配合登记人员复制新增使用 |
|
|
itemType: [], //项目类别 |
|
|
itemType: [], //项目类别 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// itemTypeIds: '', //被选中的项目类别ID |
|
|
// itemTypeIds: '', //被选中的项目类别ID |
|
|
// asbItem: [], //左侧显示的未选组合项目 |
|
|
// asbItem: [], //左侧显示的未选组合项目 |
|
|
// asbItemAll: [], //所有未选组合项目 |
|
|
// asbItemAll: [], //所有未选组合项目 |
|
|
@ -258,7 +260,7 @@ export default { |
|
|
console.log("window.localStorage.getItem('LocalConfig')", error) |
|
|
console.log("window.localStorage.getItem('LocalConfig')", error) |
|
|
} |
|
|
} |
|
|
this.dictInit() |
|
|
this.dictInit() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
updated() { |
|
|
updated() { |
|
|
@ -274,7 +276,7 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
...mapActions(['getCustomerOrgGroup', 'getPatientRegisterAbs']), |
|
|
...mapActions(['getCustomerOrgGroup', 'getPatientRegisterAbs']), |
|
|
dddw, moment, deepCopy, checkPagePriv, |
|
|
dddw, moment, deepCopy, checkPagePriv, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化字典信息 |
|
|
// 初始化字典信息 |
|
|
dictInit() { |
|
|
dictInit() { |
|
|
@ -1034,11 +1036,20 @@ export default { |
|
|
if (!this.discount || this.discount == 0) return |
|
|
if (!this.discount || this.discount == 0) return |
|
|
if (!this.dataTransOpts.tableM.register_check_asbitem || this.dataTransOpts.tableM.register_check_asbitem.length == 0) return |
|
|
if (!this.dataTransOpts.tableM.register_check_asbitem || this.dataTransOpts.tableM.register_check_asbitem.length == 0) return |
|
|
|
|
|
|
|
|
|
|
|
let total = Number(0) |
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
e.discount = this.discount |
|
|
|
|
|
e.chargePrice = Math.round(e.standardPrice * this.discount) / 100 |
|
|
|
|
|
e.total = Math.round(e.standardPrice * this.discount * e.amount) / 100 |
|
|
|
|
|
|
|
|
if (e.isCharge == 'N') { |
|
|
|
|
|
e.discount = this.discount |
|
|
|
|
|
e.chargePrice = Math.round(e.standardPrice * this.discount) / 100 |
|
|
|
|
|
e.total = Math.round(e.standardPrice * this.discount * e.amount) / 100 |
|
|
|
|
|
} |
|
|
|
|
|
total = total + Number(e.total) |
|
|
}); |
|
|
}); |
|
|
|
|
|
this.total = Math.round(total * 100) / 100 |
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$refs['patientRegister_patientRegisterAbs'].doLayout() |
|
|
|
|
|
}) |
|
|
// this.onSubmit('') |
|
|
// this.onSubmit('') |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
@ -1053,23 +1064,37 @@ export default { |
|
|
let qtyIsOneLast = 0 //数量为1的最后行项目,用于返写金额 |
|
|
let qtyIsOneLast = 0 //数量为1的最后行项目,用于返写金额 |
|
|
|
|
|
|
|
|
// console.log('this.total / this.totalStand',this.total , this.totalStand) |
|
|
// console.log('this.total / this.totalStand',this.total , this.totalStand) |
|
|
this.discount = Math.round((100 * this.total / this.totalStand) * 100) / 100 |
|
|
|
|
|
|
|
|
// 过滤已收费的项目 |
|
|
|
|
|
let unChargeTotalStand = Number(this.totalStand) //未收费的总标准价 |
|
|
|
|
|
let chargeTotal = Number(0) // |
|
|
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
|
|
|
if (e.isCharge == 'Y') { |
|
|
|
|
|
chargeTotal = chargeTotal + Math.round(e.chargePrice * e.amount * 100) / 100 |
|
|
|
|
|
unChargeTotalStand = unChargeTotalStand - Math.round(e.standardPrice * e.amount * 100) / 100 |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let total = this.total - chargeTotal |
|
|
|
|
|
this.discount = Math.round((100 * total / unChargeTotalStand) * 100) / 100 |
|
|
|
|
|
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach((e, index) => { |
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach((e, index) => { |
|
|
if (e.amount == 1 && e.standardPrice != 0) qtyIsOneLast = index |
|
|
|
|
|
e.discount = this.discount |
|
|
|
|
|
e.chargePrice = Math.round((e.standardPrice * this.discount / 100) * 100) / 100 |
|
|
|
|
|
e.total = Math.round((e.standardPrice * this.discount * e.amount / 100) * 100) / 100 |
|
|
|
|
|
sumChargeDetails += Math.round((e.standardPrice * this.discount * e.amount / 100) * 100) / 100 |
|
|
|
|
|
|
|
|
if (e.isCharge == 'N') { |
|
|
|
|
|
if (e.amount == 1 && e.standardPrice != 0) qtyIsOneLast = index |
|
|
|
|
|
e.discount = this.discount |
|
|
|
|
|
e.chargePrice = Math.round((e.standardPrice * this.discount / 100) * 100) / 100 |
|
|
|
|
|
e.total = Math.round((e.standardPrice * this.discount * e.amount / 100) * 100) / 100 |
|
|
|
|
|
sumChargeDetails += Math.round((e.standardPrice * this.discount * e.amount / 100) * 100) / 100 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
console.log('this.dataTransOpts.tableM.register_check_asbitem', this.dataTransOpts.tableM.register_check_asbitem) |
|
|
console.log('this.dataTransOpts.tableM.register_check_asbitem', this.dataTransOpts.tableM.register_check_asbitem) |
|
|
|
|
|
|
|
|
// console.log('this.total - sumChargeDetails', sumChargeDetails, this.total - sumChargeDetails) |
|
|
// console.log('this.total - sumChargeDetails', sumChargeDetails, this.total - sumChargeDetails) |
|
|
//平衡金额(按总价折扣后,再根据折扣合计 会出现金额差) |
|
|
//平衡金额(按总价折扣后,再根据折扣合计 会出现金额差) |
|
|
if (this.total != sumChargeDetails) { |
|
|
|
|
|
|
|
|
if (total != sumChargeDetails) { |
|
|
console.log('qtyIsOneLast', qtyIsOneLast) |
|
|
console.log('qtyIsOneLast', qtyIsOneLast) |
|
|
this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].total = |
|
|
this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].total = |
|
|
Math.round((Number(this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].total) + Number(this.total) - Number(sumChargeDetails)) * 100) / 100 |
|
|
|
|
|
|
|
|
Math.round((Number(this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].total) + Number(total) - Number(sumChargeDetails)) * 100) / 100 |
|
|
this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].chargePrice = |
|
|
this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].chargePrice = |
|
|
Math.round(this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].total * 100 / this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].amount) / 100 |
|
|
Math.round(this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].total * 100 / this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].amount) / 100 |
|
|
if (this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].standardPrice != 0) { |
|
|
if (this.dataTransOpts.tableM.register_check_asbitem[qtyIsOneLast].standardPrice != 0) { |
|
|
@ -1169,37 +1194,37 @@ export default { |
|
|
let content = "" |
|
|
let content = "" |
|
|
|
|
|
|
|
|
let length = asbItems.length |
|
|
let length = asbItems.length |
|
|
let modeBase = 1,count = 0,pWidth=390 |
|
|
|
|
|
|
|
|
let modeBase = 1, count = 0, pWidth = 390 |
|
|
|
|
|
|
|
|
if(length >= 30){ |
|
|
|
|
|
|
|
|
if (length >= 30) { |
|
|
modeBase = 3 |
|
|
modeBase = 3 |
|
|
pWidth=130 |
|
|
|
|
|
}else if(length >= 20){ |
|
|
|
|
|
|
|
|
pWidth = 130 |
|
|
|
|
|
} else if (length >= 20) { |
|
|
modeBase = 2 |
|
|
modeBase = 2 |
|
|
pWidth=195 |
|
|
|
|
|
|
|
|
pWidth = 195 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 数据项太多时,分列显示 |
|
|
// 数据项太多时,分列显示 |
|
|
asbItems.forEach((e,i) => { |
|
|
|
|
|
if(modeBase == 1){ |
|
|
|
|
|
|
|
|
asbItems.forEach((e, i) => { |
|
|
|
|
|
if (modeBase == 1) { |
|
|
content += '<p>' + e.itemName + '</p>' |
|
|
content += '<p>' + e.itemName + '</p>' |
|
|
}else{ |
|
|
|
|
|
if(i==0){ |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
if (i == 0) { |
|
|
count = 1 |
|
|
count = 1 |
|
|
content += `<div style="display: flex;"><p style="width: ${pWidth}px;">` + e.itemName + '</p>' |
|
|
content += `<div style="display: flex;"><p style="width: ${pWidth}px;">` + e.itemName + '</p>' |
|
|
}else if((i+1)%modeBase == 0){ |
|
|
|
|
|
|
|
|
} else if ((i + 1) % modeBase == 0) { |
|
|
content += `<p style="width: ${pWidth}px;">` + e.itemName + '</p></div><div style="display: flex;">' |
|
|
content += `<p style="width: ${pWidth}px;">` + e.itemName + '</p></div><div style="display: flex;">' |
|
|
count = 1 |
|
|
count = 1 |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
content += `<p style="width: ${pWidth}px;">` + e.itemName + '</p>' |
|
|
content += `<p style="width: ${pWidth}px;">` + e.itemName + '</p>' |
|
|
count++ |
|
|
count++ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if(modeBase > 1){ |
|
|
|
|
|
for (let index = 0; index < 3; index++) { |
|
|
|
|
|
if(modeBase == count) break |
|
|
|
|
|
|
|
|
if (modeBase > 1) { |
|
|
|
|
|
for (let index = 0; index < 3; index++) { |
|
|
|
|
|
if (modeBase == count) break |
|
|
content += '<p></p>' |
|
|
content += '<p></p>' |
|
|
count++ |
|
|
count++ |
|
|
} |
|
|
} |
|
|
@ -1327,4 +1352,3 @@ export default { |
|
|
margin-left: 10px; |
|
|
margin-left: 10px; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|
|
|
|