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

bug修改67915

parent 0b72d849
...@@ -523,7 +523,11 @@ export default { ...@@ -523,7 +523,11 @@ export default {
if (column.prop === 'hospitalName' || if (column.prop === 'hospitalName' ||
column.prop === 'hospitalAllAddress' || column.prop === 'hospitalAllAddress' ||
column.prop === 'contactPerson') { 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 { } else {
this.queryParams.orderByColumn = column.prop this.queryParams.orderByColumn = column.prop
} }
......
...@@ -1266,6 +1266,18 @@ color: #333333;" ...@@ -1266,6 +1266,18 @@ color: #333333;"
<svg-icon icon-class="baocun" /> <svg-icon icon-class="baocun" />
保存 保存
</el-button> </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 <el-button
v-if="isEdit && !petInHospitalStatus && !petInHospitalUpdateShow" v-if="isEdit && !petInHospitalStatus && !petInHospitalUpdateShow"
id="remove-hospitalized" id="remove-hospitalized"
...@@ -1763,6 +1775,7 @@ export default { ...@@ -1763,6 +1775,7 @@ export default {
inHospitalBo: {}, inHospitalBo: {},
petInHospitalStatus: false, petInHospitalStatus: false,
petInHospitalUpdateShow: false, petInHospitalUpdateShow: false,
clearSaveShow: false,
recordDetail: {}, recordDetail: {},
// 费用明细 // 费用明细
paymentList: [], paymentList: [],
...@@ -2292,6 +2305,7 @@ export default { ...@@ -2292,6 +2305,7 @@ export default {
} }
}, },
handleInHospitalAdd() { handleInHospitalAdd() {
if (this.petInHospitalUpdateShow === false) {
if (this.editCunt.inHospitalBos === 0) { if (this.editCunt.inHospitalBos === 0) {
console.log('行数为零,可添加') console.log('行数为零,可添加')
const obj = { const obj = {
...@@ -2312,8 +2326,15 @@ export default { ...@@ -2312,8 +2326,15 @@ export default {
diseaseLevel: undefined, diseaseLevel: undefined,
bathe: undefined bathe: undefined
} }
this.clearSaveShow = true
console.log('lb', this.petInHospitalList) console.log('lb', this.petInHospitalList)
} }
} else {
this.$message({
message: '请先保存待编辑行',
info: 'info'
})
}
}, },
/** 保存行*/ /** 保存行*/
handleSave(formName, listName, index) { handleSave(formName, listName, index) {
...@@ -2517,11 +2538,13 @@ export default { ...@@ -2517,11 +2538,13 @@ export default {
} else { } else {
addHospital(updateForm).then(res => { addHospital(updateForm).then(res => {
this.petInHospitalUpdateShow = false this.petInHospitalUpdateShow = false
this.clearSaveShow = false
this.$message.success('保存成功') this.$message.success('保存成功')
this.getInHospitalList(this.$route.params.id) this.getInHospitalList(this.$route.params.id)
this.getPaymentList() this.getPaymentList()
}).catch(error => { }).catch(error => {
console.log('报错住院', error) console.log('报错住院', error)
this.clearSaveShow = false
this.$message.success('保存成功') this.$message.success('保存成功')
this.petInHospitalUpdateShow = false this.petInHospitalUpdateShow = false
this.getInHospitalList(this.$route.params.id) this.getInHospitalList(this.$route.params.id)
...@@ -2531,6 +2554,31 @@ export default { ...@@ -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) { delPetInHospital(row, removeButtonId) {
this.$confirm('是否确认删除此条数据,删除后不可恢复', '删除', { 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