pengjun 2 years ago
parent
commit
1498b38f95
  1. 51
      src/components/customerOrg/customerOrgEdit.vue
  2. 4
      src/components/customerOrg/customerOrgRegister.vue
  3. 2
      src/components/customerOrg/customerOrgTree.vue
  4. 7
      src/components/doctorCheck/PatientRegisterBase.vue
  5. 33
      src/components/patientRegister/PatientRegisterList.vue
  6. 5
      src/components/patientRegister/patientRegisterQuery.vue
  7. 44
      src/components/sumDoctorCheck/SumItems.vue

51
src/components/customerOrg/customerOrgEdit.vue

@ -124,6 +124,18 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="创建人员"> <el-form-item label="创建人员">
@ -147,13 +159,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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> </el-form>
</div> </div>
<!-- 按钮区域 --> <!-- 按钮区域 -->
@ -210,6 +215,7 @@ export default {
postalCode: "", postalCode: "",
address: "", address: "",
bank: "", bank: "",
countryOrgCode: "",
accounts: "", accounts: "",
orgTypeId: null, orgTypeId: null,
remark: "", remark: "",
@ -431,16 +437,20 @@ export default {
if (!this.form.id) { if (!this.form.id) {
//id //id
postapi(`/api/app/customerorg/create`, body).then((res) => {
postapi(`/api/app/customerorg/create`, body).then(async (res) => {
if (res.code == 1) { if (res.code == 1) {
console.log("创健 操作成功"); console.log("创健 操作成功");
//this.setData({ key: "customerOrg.customerOrgRd", value: res }); //this.setData({ key: "customerOrg.customerOrgRd", value: res });
this.form = res.data this.form = res.data
this.dataTransOpts.tableS.customer_org.id = res.data.id
this.dataTransOpts.tableS.customer_org = res.data
// this.customerOrg.customerOrgId = res.data.id; // this.customerOrg.customerOrgId = res.data.id;
this.customerOrg.customerOrgRd = res.data; this.customerOrg.customerOrgRd = res.data;
this.getCustomerOrgTree("insert", res.data); this.getCustomerOrgTree("insert", res.data);
this.customerOrg.oprStatus = 'edit' 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 { } else {
@ -449,9 +459,13 @@ export default {
(res) => { (res) => {
if (res.code == 1) { if (res.code == 1) {
console.log("更新 操作成功"); console.log("更新 操作成功");
let lbody = { id: this.form.id, ...body };
let lbody = { ...deepCopy(body), id: this.form.id };
this.getCustomerOrgTree("update", lbody); this.getCustomerOrgTree("update", lbody);
this.customerOrg.oprStatus = 'edit' this.customerOrg.oprStatus = 'edit'
this.dataTransOpts.refresh.customer_org.S++
this.dataTransOpts.refresh.customer_org_register.M++
this.dataTransOpts.refresh.contact_person.M++
} }
} }
); );
@ -459,6 +473,23 @@ export default {
}); });
}, },
// 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) { async btnAdd(formName, child) {
await this.$refs[formName].resetFields(); await this.$refs[formName].resetFields();

4
src/components/customerOrg/customerOrgRegister.vue

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

2
src/components/customerOrg/customerOrgTree.vue

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

7
src/components/doctorCheck/PatientRegisterBase.vue

@ -290,7 +290,6 @@ export default {
if (event.keyCode === 13) { if (event.keyCode === 13) {
// //
event.preventDefault(); event.preventDefault();
// //
console.log(input.getAttribute('placeholder'), input.value) console.log(input.getAttribute('placeholder'), input.value)
let placeholder = input.getAttribute('placeholder') let placeholder = input.getAttribute('placeholder')
@ -305,8 +304,14 @@ export default {
if (input.value) this.getlistinfilterByName(input.value) if (input.value) this.getlistinfilterByName(input.value)
break; break;
} }
input.select()
} }
}); });
input.addEventListener('click', (event) => {
input.select()
});
}); });
}); });
}, },

33
src/components/patientRegister/PatientRegisterList.vue

@ -6,7 +6,7 @@
<div> <div>
<el-table @body-scrolling="load" :data="tableData" border <el-table @body-scrolling="load" :data="tableData" border
:height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)" :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" @selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick" ref="info" id="info"
:row-class-name="handleRowClassName"> :row-class-name="handleRowClassName">
<!-- 取消勾选改为选中 <!-- 取消勾选改为选中
@ -323,9 +323,6 @@ export default {
maxResultCount: 100, maxResultCount: 100,
}, },
loadOptsInit: {}, loadOptsInit: {},
oneClick: 0, // 1
DbClick: 0, // 1
}; };
}, },
@ -564,28 +561,6 @@ export default {
// //
rowClick(row) { 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;
// shift // shift
if (this.window.shift) { if (this.window.shift) {
// //
@ -646,12 +621,6 @@ export default {
} }
}, },
//
rowDblclick(row) {
// this.rowClick(row)
this.btnEdit()
},
// //
btnAdd() { btnAdd() {
if (!this.peisid || this.peisid == 'null') { 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++; if(input.value) this.patientRegister.query.times++;
break; break;
} }
input.select()
} }
}); });
input.addEventListener('click', (event) => {
input.select()
});
}); });
}); });
}, },

44
src/components/sumDoctorCheck/SumItems.vue

@ -3,7 +3,7 @@
<div style="width:180;"> <div style="width:180;">
<!-- :row-class-name="tableRowClassName" --> <!-- :row-class-name="tableRowClassName" -->
<el-table :data="RegisterCheckList" width="180" :height="divHeight" border highlight-current-row <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"> <el-table-column prop="asbitemName" label="组合项目" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
@ -123,7 +123,10 @@ export default {
console.log("获取横向对比 SumItems", res.data); console.log("获取横向对比 SumItems", res.data);
if (res.code != -1) { if (res.code != -1) {
this.RegisterCheckList = res.data; 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) => { .catch((err) => {
@ -160,43 +163,6 @@ 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) { crossTable(tableData) {
// [ // [
// { // {

Loading…
Cancel
Save