pengjun 2 years ago
parent
commit
1498b38f95
  1. 67
      src/components/customerOrg/customerOrgEdit.vue
  2. 4
      src/components/customerOrg/customerOrgRegister.vue
  3. 10
      src/components/customerOrg/customerOrgTree.vue
  4. 9
      src/components/doctorCheck/PatientRegisterBase.vue
  5. 37
      src/components/patientRegister/PatientRegisterList.vue
  6. 5
      src/components/patientRegister/patientRegisterQuery.vue
  7. 46
      src/components/sumDoctorCheck/SumItems.vue

67
src/components/customerOrg/customerOrgEdit.vue

@ -10,7 +10,7 @@
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
:show-all-levels="false" clearable filterable disabled
:style="'width:' + Math.floor((window.pageWidth - 585) / 3) + 'px;'">
</el-cascader>
</el-cascader>
</el-form-item>
</el-col>
<el-col :span="8">
@ -124,6 +124,18 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="编号" prop="id">
<el-input v-model="form.id" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="税号" prop="countryOrgCode">
<el-input v-model="form.countryOrgCode" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<el-form-item label="创建人员">
@ -147,13 +159,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="编号" prop="id">
<el-input v-model="form.id" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 按钮区域 -->
@ -210,6 +215,7 @@ export default {
postalCode: "",
address: "",
bank: "",
countryOrgCode: "",
accounts: "",
orgTypeId: null,
remark: "",
@ -403,7 +409,7 @@ export default {
console.log("vuex data", this.customerOrg.customerOrgRd);
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message});
this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
return false;
}
@ -431,16 +437,20 @@ export default {
if (!this.form.id) {
//id
postapi(`/api/app/customerorg/create`, body).then((res) => {
postapi(`/api/app/customerorg/create`, body).then(async (res) => {
if (res.code == 1) {
console.log("创健 操作成功");
//this.setData({ key: "customerOrg.customerOrgRd", value: res });
this.form = res.data
this.dataTransOpts.tableS.customer_org.id = res.data.id
// this.customerOrg.customerOrgId = res.data.id;
this.dataTransOpts.tableS.customer_org = res.data
// this.customerOrg.customerOrgId = res.data.id;
this.customerOrg.customerOrgRd = res.data;
this.getCustomerOrgTree("insert", res.data);
this.customerOrg.oprStatus = 'edit'
this.dataTransOpts.tableS.customer_org.parent_id = await this.getParentCustomerOrgId(res.data.id)
this.dataTransOpts.refresh.customer_org.S++
this.dataTransOpts.refresh.customer_org_register.M++
this.dataTransOpts.refresh.contact_person.M++
}
});
} else {
@ -449,29 +459,50 @@ export default {
(res) => {
if (res.code == 1) {
console.log("更新 操作成功");
let lbody = { id: this.form.id, ...body };
let lbody = { ...deepCopy(body), id: this.form.id };
this.getCustomerOrgTree("update", lbody);
this.customerOrg.oprStatus = 'edit'
this.dataTransOpts.refresh.customer_org.S++
this.dataTransOpts.refresh.customer_org_register.M++
this.dataTransOpts.refresh.contact_person.M++
}
}
);
}
});
},
// ID
async getParentCustomerOrgId(customerOrgId) {
let customerOrgParentId = null
if (!customerOrgId) return customerOrgParentId
if (typeof customerOrgId == 'string') {
try {
let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`)
if (res.code != -1) customerOrgParentId = res.data
} catch (error) {
console.log('获取顶级单位ID出错:', error)
}
} else if (customerOrgId.length > 0) {
customerOrgParentId = customerOrgId[0]
}
return customerOrgParentId
},
//
async btnAdd(formName, child) {
await this.$refs[formName].resetFields();
//console.log('this.peisid',this.peisid)
if (!this.peisid || this.peisid == 'null') {
this.$message.warning({ showClose: true, message: "该用户未选归属体检中心,不能执行此操作!"});
this.$message.warning({ showClose: true, message: "该用户未选归属体检中心,不能执行此操作!" });
return
}
this.form = deepCopy(this.formInit)
if (child) {
if (!this.dataTransOpts.tableS.customer_org.id) {
this.$message.warning({ showClose: true, message: "请先选择上级单位"});
this.$message.warning({ showClose: true, message: "请先选择上级单位" });
this.customerOrg.oprStatus = ''
return;
}
@ -494,7 +525,7 @@ export default {
//
btnDel(formName) {
if (!this.dataTransOpts.tableS.customer_org.id) {
this.$message.warning({ showClose: true, message: "请先选中要删除的节点"})
this.$message.warning({ showClose: true, message: "请先选中要删除的节点" })
return
}
//
@ -522,9 +553,9 @@ export default {
}
}).catch((err) => {
if (err == "cancel") {
this.$message.info({ showClose: true, message: "已取消删除"});
this.$message.info({ showClose: true, message: "已取消删除" });
} else {
this.$message.error({ showClose: true, message: "操作失败,原因:" + err});
this.$message.error({ showClose: true, message: "操作失败,原因:" + err });
}
});
},

4
src/components/customerOrg/customerOrgRegister.vue

@ -8,12 +8,12 @@
<el-table-column prop="medicalTimes" label="体检次数" width="70" align="center" />
<el-table-column prop="beginTime" label="开始日期" min-width="80" align="center">
<template slot-scope="scope">
{{ moment(scope.row.beginTime).format('yyyy-MM-DD') }}
{{ scope.row.beginTime.substring(0,10) }}
</template>
</el-table-column>
<el-table-column prop="endTime" label="结束日期" min-width="80" align="center">
<template slot-scope="scope">
{{ moment(scope.row.endTime).format('yyyy-MM-DD') }}
{{ scope.row.endTime.substring(0,10) }}
</template>
</el-table-column>
<el-table-column prop="isComplete" label="完成标志" width="70" align="center">

10
src/components/customerOrg/customerOrgTree.vue

@ -104,12 +104,10 @@ export default {
if(data.parentId){
let pids = getTreePids(this.customerOrg.customerOrgTree,"treeChildren", 'parentId', 'id', data.id)
this.dataTransOpts.tableS.customer_org.parent_id = pids[pids.length - 2]
}
setTimeout(() => {
this.dataTransOpts.refresh.customer_org.S++
this.dataTransOpts.refresh.customer_org_register.M++
this.dataTransOpts.refresh.contact_person.M++
}, 10);
}
this.dataTransOpts.refresh.customer_org.S++
this.dataTransOpts.refresh.customer_org_register.M++
this.dataTransOpts.refresh.contact_person.M++
},

9
src/components/doctorCheck/PatientRegisterBase.vue

@ -286,11 +286,10 @@ export default {
//
inputs.forEach((input, i) => {
// console.log('input',input);
input.addEventListener('keydown', (event) => {
input.addEventListener('keydown', (event) => {
if (event.keyCode === 13) {
//
event.preventDefault();
//
console.log(input.getAttribute('placeholder'), input.value)
let placeholder = input.getAttribute('placeholder')
@ -305,8 +304,14 @@ export default {
if (input.value) this.getlistinfilterByName(input.value)
break;
}
input.select()
}
});
input.addEventListener('click', (event) => {
input.select()
});
});
});
},

37
src/components/patientRegister/PatientRegisterList.vue

@ -6,7 +6,7 @@
<div>
<el-table @body-scrolling="load" :data="tableData" border
:height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)"
highlight-current-row @row-click="rowClick" @row-dblclick="rowDblclick" size="small" row-key="id"
highlight-current-row @row-click="rowClick" size="small" row-key="id"
@selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick" ref="info" id="info"
:row-class-name="handleRowClassName">
<!-- 取消勾选改为选中
@ -323,9 +323,6 @@ export default {
maxResultCount: 100,
},
loadOptsInit: {},
oneClick: 0, // 1
DbClick: 0, // 1
};
},
@ -563,29 +560,7 @@ export default {
},
//
rowClick(row) {
if (this.oneClick == 0) {
this.oneClick = 1;
} else {
this.DbClick = 1;
}
//
if (this.DbClick == 1) { //id
this.rowClickRetrieve(row)
return;
}
setTimeout(() => { //300ms
if (this.oneClick == 1 && this.DbClick == 0) this.rowClickRetrieve(row)
}, 300)
},
rowClickRetrieve(row) {
this.oneClick = 0;
this.DbClick = 0;
rowClick(row) {
// shift
if (this.window.shift) {
//
@ -645,13 +620,7 @@ export default {
this.dataTransOpts.refresh.register_check_asbitem.M++ //
}
},
//
rowDblclick(row) {
// this.rowClick(row)
this.btnEdit()
},
//
btnAdd() {
if (!this.peisid || this.peisid == 'null') {

5
src/components/patientRegister/patientRegisterQuery.vue

@ -225,8 +225,13 @@ export default {
if(input.value) this.patientRegister.query.times++;
break;
}
input.select()
}
});
input.addEventListener('click', (event) => {
input.select()
});
});
});
},

46
src/components/sumDoctorCheck/SumItems.vue

@ -3,7 +3,7 @@
<div style="width:180;">
<!-- :row-class-name="tableRowClassName" -->
<el-table :data="RegisterCheckList" width="180" :height="divHeight" border highlight-current-row
@row-click="rowClick">
@row-click="rowClick" ref="registerCheckList">
<el-table-column prop="asbitemName" label="组合项目" width="180">
<template slot-scope="scope">
<div>
@ -123,7 +123,10 @@ export default {
console.log("获取横向对比 SumItems", res.data);
if (res.code != -1) {
this.RegisterCheckList = res.data;
if (res.data.length > 0) this.rowClick(res.data[0])
if (this.RegisterCheckList && this.RegisterCheckList.length > 0){
this.rowClick(this.RegisterCheckList[0])
this.$refs['registerCheckList'].setCurrentRow(this.RegisterCheckList[0])
}
}
})
.catch((err) => {
@ -159,44 +162,7 @@ export default {
});
},
//
crossTableOld(tableData) {
this.tableData = [] //
this.tableRows = [] //
this.tableCols = [] //
// console.log('tableData', tableData)
tableData.forEach(e => {
if (this.tableRows.indexOf(e.itemName) == - 1) this.tableRows.push(e.itemName)
let checkDate = e.checkDate.substring(0, 10)
if (this.tableCols.indexOf(checkDate) == - 1) this.tableCols.push(checkDate)
});
this.tableCols.sort();
this.tableRows.forEach(r => {
let item = {}
let resultValue = ''
item['itemName'] = r
this.tableCols.forEach(c => {
for (let i = 0; i < tableData.length; i++) {
if (tableData[i].itemName == r) {
item['unitName'] = tableData[i].unitName
item['referenceRangeValue'] = tableData[i].referenceRangeValue
}
if (tableData[i].itemName == r && tableData[i].checkDate == c) {
resultValue = tableData[i].resultValue
break;
}
}
item[c] = resultValue
});
this.tableData.push(item)
});
// console.log('this.tableRows', this.tableRows)
// console.log('this.tableCols', this.tableCols)
// console.log('this.tableData', this.tableData)
},
//
crossTable(tableData) {
// [
// {

Loading…
Cancel
Save