Commit 5f55a42c authored by 陈明豪's avatar 陈明豪

bug修改67915

parent 0b72d849
......@@ -523,7 +523,11 @@ export default {
if (column.prop === 'hospitalName' ||
column.prop === 'hospitalAllAddress' ||
column.prop === 'contactPerson') {
this.queryParams.orderByColumn = column.prop + 'Sort'
if (column.order === 'descending') {
this.queryParams.orderByColumn = column.prop + 'Sort desc, createTime'
} else {
this.queryParams.orderByColumn = column.prop + 'Sort, createTime'
}
} else {
this.queryParams.orderByColumn = column.prop
}
......
......@@ -1266,6 +1266,18 @@ color: #333333;"
<svg-icon icon-class="baocun" />
保存
</el-button>
<el-button
v-if="isEdit && !petInHospitalStatus && petInHospitalUpdateShow && clearSaveShow"
id="clearSave"
plain
size="mini"
class="el-button--error--solid"
type="danger"
@click="clearSave(scope.row, 'clearSave')"
>
<svg-icon icon-class="qingkong" />
清空
</el-button>
<el-button
v-if="isEdit && !petInHospitalStatus && !petInHospitalUpdateShow"
id="remove-hospitalized"
......@@ -1763,6 +1775,7 @@ export default {
inHospitalBo: {},
petInHospitalStatus: false,
petInHospitalUpdateShow: false,
clearSaveShow: false,
recordDetail: {},
// 费用明细
paymentList: [],
......@@ -2292,27 +2305,35 @@ export default {
}
},
handleInHospitalAdd() {
if (this.editCunt.inHospitalBos === 0) {
console.log('行数为零,可添加')
const obj = {
registId: this.recordDetail.registId,
medicalRecordId: this.recordDetail.id,
diseaseLevel: '',
wardType: '',
bathe: '',
wardRuleId: '',
admissionDate: '',
actualDays: '',
status: ''
}
this.petInHospitalList = []
this.petInHospitalList.push(obj)
this.petInHospitalUpdateShow = true
this.inHosForm = {
diseaseLevel: undefined,
bathe: undefined
if (this.petInHospitalUpdateShow === false) {
if (this.editCunt.inHospitalBos === 0) {
console.log('行数为零,可添加')
const obj = {
registId: this.recordDetail.registId,
medicalRecordId: this.recordDetail.id,
diseaseLevel: '',
wardType: '',
bathe: '',
wardRuleId: '',
admissionDate: '',
actualDays: '',
status: ''
}
this.petInHospitalList = []
this.petInHospitalList.push(obj)
this.petInHospitalUpdateShow = true
this.inHosForm = {
diseaseLevel: undefined,
bathe: undefined
}
this.clearSaveShow = true
console.log('lb', this.petInHospitalList)
}
console.log('lb', this.petInHospitalList)
} else {
this.$message({
message: '请先保存待编辑行',
info: 'info'
})
}
},
/** 保存行*/
......@@ -2517,11 +2538,13 @@ export default {
} else {
addHospital(updateForm).then(res => {
this.petInHospitalUpdateShow = false
this.clearSaveShow = false
this.$message.success('保存成功')
this.getInHospitalList(this.$route.params.id)
this.getPaymentList()
}).catch(error => {
console.log('报错住院', error)
this.clearSaveShow = false
this.$message.success('保存成功')
this.petInHospitalUpdateShow = false
this.getInHospitalList(this.$route.params.id)
......@@ -2531,6 +2554,31 @@ export default {
}
})
},
/** 清空住院信息 */
clearSave(row, id) {
// 删除信息行
this.$confirm('是否确认清空此条数据,清空后不可恢复', '清空', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
customClass: 'box-logout',
cancelButtonClass: 'resetBtn',
confirmButtonClass: 'queryBtn'
}).then(() => {
/* 清空当前行 */
this.inHosForm = {
diseaseLevel: undefined,
wardType: undefined,
bathe: undefined
}
this.petInHospitalUpdateShow = false
this.petInHospitalList = []
}).catch(() => {
/* 最后给特定的id进行设置 */
document.getElementById(id).blur()
})
},
/** 删除病历住院信息 */
delPetInHospital(row, removeButtonId) {
this.$confirm('是否确认删除此条数据,删除后不可恢复', '删除', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment