|
|
@ -525,11 +525,12 @@ |
|
|
<el-button type="success" class="commonbutton" @click="chargeRequest(form)" |
|
|
<el-button type="success" class="commonbutton" @click="chargeRequest(form)" |
|
|
:disabled="!form.id">收费申请</el-button> |
|
|
:disabled="!form.id">收费申请</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<!-- |
|
|
|
|
|
<div class="btn"> |
|
|
|
|
|
<el-button type="success" class="commonbutton" @click="btnTest">test</el-button> |
|
|
|
|
|
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '复制分组')" class="btn"> |
|
|
|
|
|
<el-button class="commonbutton" @click="btnCopyGroup" :disabled="form.isLock == 'Y' || form.completeFlag == '3' ? true:false">复制分组</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '复制套餐')" class="btn"> |
|
|
|
|
|
<el-button class="commonbutton" @click="btnCopyMedicalPackage" :disabled="form.isLock == 'Y' || form.completeFlag == '3' ? true:false">复制套餐</el-button> |
|
|
</div> |
|
|
</div> |
|
|
--> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -672,6 +673,129 @@ |
|
|
:close-on-click-modal="false"> |
|
|
:close-on-click-modal="false"> |
|
|
<Queue :refParams="queueParams" /> |
|
|
<Queue :refParams="queueParams" /> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!--复制套餐--> |
|
|
|
|
|
<el-dialog title="复制体检套餐" :visible.sync="medicalPackageVisble" width="800px" height="500" :show-close="false" |
|
|
|
|
|
:close-on-click-modal="false" :append-to-body="true"> |
|
|
|
|
|
<el-table :data="dict.medicalPackage" border height="350" row-key="id" size="small" highlight-current-row |
|
|
|
|
|
@row-click="packageRowClick" @row-dblclick="rowDblclick" ref="patientList"> |
|
|
|
|
|
|
|
|
|
|
|
<!-- "displayName": "健康体检套餐", |
|
|
|
|
|
"price": 20.00, |
|
|
|
|
|
"forSexId": "0", |
|
|
|
|
|
"isActive": "Y", |
|
|
|
|
|
"remark": "2", |
|
|
|
|
|
"displayOrder": 1, |
|
|
|
|
|
"simpleCode": "JKTJTC", |
|
|
|
|
|
"creatorName": "admin", |
|
|
|
|
|
"lastModifierName": "users", |
|
|
|
|
|
"lastModificationTime": "2023-08-04T16:34:02.94408", |
|
|
|
|
|
"lastModifierId": "3a0ca83b-3116-da05-3916-dfd4c0c548cb", |
|
|
|
|
|
"creationTime": "2023-07-10T19:53:30.210553", |
|
|
|
|
|
"creatorId": "3a0c4180-107c-0c89-b25b-0bd34666dcec", |
|
|
|
|
|
"id": "3a0c51d3-2345-38df-ba0b-1862a3c3606f" --> |
|
|
|
|
|
<el-table-column type="index" width="50" /> |
|
|
|
|
|
<el-table-column prop="displayName" label="套餐名称" width="180" /> |
|
|
|
|
|
<el-table-column prop="price" label="价格" width="80" /> |
|
|
|
|
|
<el-table-column prop="forSexId" label="适用性别" width="80"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
{{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="remark" label="备注" width="100" /> |
|
|
|
|
|
<el-table-column prop="creatorName" label="创建人员" width="80" /> |
|
|
|
|
|
<el-table-column prop="creationTime" label="创建日期" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div v-if="scope.row.creationTime"> |
|
|
|
|
|
{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" width="80" /> |
|
|
|
|
|
<el-table-column prop="lastModificationTime" label="修改日期" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div v-if="scope.row.lastModificationTime"> |
|
|
|
|
|
{{ moment(scope.row.lastModificationTime).format("yyyy-MM-DD") }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button class="commonbutton" type="primary" @click="copyMedicalPackage" style="width:90px;">确定</el-button> |
|
|
|
|
|
<el-button class="commonbutton" @click="medicalPackageVisble = false" style="width:90px;">取消</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!--复制分组--> |
|
|
|
|
|
<el-dialog title="复制单位分组" :visible.sync="groupVisble" width="800px" height="500" :show-close="false" |
|
|
|
|
|
:close-on-click-modal="false" :append-to-body="true"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<div style="display: flex"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span>体检单位:</span> |
|
|
|
|
|
<el-select v-model="customerOrgId" placeholder="请选择体检单位" :filter-method="filterMethodOrg" |
|
|
|
|
|
default-first-option clearable filterable @clear="customerOrgDisp = deepCopy(customerOrgAll)" |
|
|
|
|
|
style="margin-left: 10px" @change="changeCustomerOrg" size="small"> |
|
|
|
|
|
<el-option v-for="item in customerOrgDisp" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
|
|
{{ item.displayName }} |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="margin-left: 20px"> |
|
|
|
|
|
<span>单位体检次数:</span> |
|
|
|
|
|
<el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px" |
|
|
|
|
|
size="small" @change="changeTimes" value-key="id"> |
|
|
|
|
|
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes" |
|
|
|
|
|
:value="item" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<el-table :data="customerOrgGroups" ref="customerOrgGroups" style="margin-top: 2px" row-key="id" border |
|
|
|
|
|
height="450px" size="small" highlight-current-row :row-class-name="handleRowClassName" |
|
|
|
|
|
@row-click="groupRowClick" @row-dblclick="groupRowDblclick"> |
|
|
|
|
|
> |
|
|
|
|
|
<el-table-column type="index" label="序号" min-width="50" align="center" /> |
|
|
|
|
|
<el-table-column prop="displayName" label="名称" min-width="150" /> |
|
|
|
|
|
<el-table-column prop="price" label="价格" min-width="60" align="center" /> |
|
|
|
|
|
<el-table-column prop="forSexId" label="适用性别" min-width="60" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="maritalStatusId" label="适用婚姻状况" min-width="80" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ |
|
|
|
|
|
dddw( |
|
|
|
|
|
dict.forMaritalStatus, |
|
|
|
|
|
"id", |
|
|
|
|
|
scope.row.maritalStatusId, |
|
|
|
|
|
"displayName" |
|
|
|
|
|
) |
|
|
|
|
|
}} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="creatorName" label="创建者" min-width="60" align="center" /> |
|
|
|
|
|
<el-table-column label="创建时间" min-width="150" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ |
|
|
|
|
|
scope.row.creationTime |
|
|
|
|
|
? moment(scope.row.creationTime).format("yyyy-MM-DD HH:mm:ss") |
|
|
|
|
|
: "" |
|
|
|
|
|
}} |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<div style="display: flex;justify-content: space-between;margin-top: 10px;"> |
|
|
|
|
|
<div></div> |
|
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button class="commonbutton" type="primary" @click="copyGroup" style="width:90px;">确定</el-button> |
|
|
|
|
|
<el-button class="commonbutton" @click="groupVisble = false" style="width:90px;">取消</el-button> |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -897,6 +1021,24 @@ export default { |
|
|
thirdInterfaceId: '', // 网上预约用到 |
|
|
thirdInterfaceId: '', // 网上预约用到 |
|
|
queueParams: {}, // 分诊排队参数 |
|
|
queueParams: {}, // 分诊排队参数 |
|
|
|
|
|
|
|
|
|
|
|
//**复制分组与套餐相关数据 |
|
|
|
|
|
//控制 复制套餐与分组页面 显示 |
|
|
|
|
|
medicalPackageVisble: false, |
|
|
|
|
|
groupVisble: false, |
|
|
|
|
|
|
|
|
|
|
|
customerOrgGroups: [], |
|
|
|
|
|
|
|
|
|
|
|
//选中套餐与分组所包含的组合项目 |
|
|
|
|
|
curPackageId: '', |
|
|
|
|
|
curGroupId: '', |
|
|
|
|
|
packageAsbitems: [], |
|
|
|
|
|
groupAsbitems: [], |
|
|
|
|
|
|
|
|
|
|
|
customerOrgId: '', |
|
|
|
|
|
customerOrgDisp: [], |
|
|
|
|
|
customerOrgAll: [], |
|
|
|
|
|
customerOrgRegisterList: [], //当前体检次数集合 |
|
|
|
|
|
customerOrgRegister: {}, // 当前选择体检次数 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1357,24 +1499,25 @@ export default { |
|
|
getParentCustomerOrgId(v) { |
|
|
getParentCustomerOrgId(v) { |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
let customerOrgParentId = null |
|
|
let customerOrgParentId = null |
|
|
if (Array.isArray(v) && v.length > 1) { |
|
|
|
|
|
|
|
|
if (Array.isArray(v) && v.length > 0) { |
|
|
customerOrgParentId = v[0] |
|
|
customerOrgParentId = v[0] |
|
|
return resolve(customerOrgParentId) |
|
|
return resolve(customerOrgParentId) |
|
|
} else { |
|
|
} else { |
|
|
let customerOrgId = v |
|
|
|
|
|
if (Array.isArray(v) && v.length == 1) customerOrgId = v[0] |
|
|
|
|
|
if (!customerOrgId) return resolve(customerOrgParentId) |
|
|
|
|
|
if (typeof customerOrgId == 'string') { |
|
|
|
|
|
getapi(`/api/app/customer-org/parent/${customerOrgId}`) |
|
|
|
|
|
|
|
|
if (!v) { |
|
|
|
|
|
return resolve(customerOrgParentId) |
|
|
|
|
|
} else { |
|
|
|
|
|
if (v == this.dict.personOrgId) { |
|
|
|
|
|
return resolve(v) // 等于个人体检时,则直接返回 |
|
|
|
|
|
} else { |
|
|
|
|
|
getapi(`/api/app/customer-org/parent/${v}`) |
|
|
.then(res => { |
|
|
.then(res => { |
|
|
if (res.code > -1) customerOrgParentId = res.data |
|
|
if (res.code > -1) customerOrgParentId = res.data |
|
|
}) |
|
|
}) |
|
|
.finally(() => { |
|
|
.finally(() => { |
|
|
return resolve(customerOrgParentId) |
|
|
return resolve(customerOrgParentId) |
|
|
}) |
|
|
}) |
|
|
} else if (customerOrgId.length > 0) { |
|
|
|
|
|
customerOrgParentId = customerOrgId[0] |
|
|
|
|
|
return resolve(customerOrgParentId) |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -3026,6 +3169,279 @@ export default { |
|
|
this.dialogWin.Label = true |
|
|
this.dialogWin.Label = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 复制分组时,设置当前顶级单位及体检次数 |
|
|
|
|
|
setCurParentOrgId() { |
|
|
|
|
|
// 获取顶级单位 |
|
|
|
|
|
console.log('setCurParentOrgId_this.form.customerOrgId',this.form.customerOrgId) |
|
|
|
|
|
this.getParentCustomerOrgId(this.form.customerOrgId) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
if (res != this.dict.personOrgId) { |
|
|
|
|
|
this.customerOrgId = res |
|
|
|
|
|
// 获取体检次数 |
|
|
|
|
|
getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res}`) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
if (res.code > -1) { |
|
|
|
|
|
this.customerOrgRegisterList = res.data |
|
|
|
|
|
if (res.data.length > 0) { |
|
|
|
|
|
this.customerOrgRegister = res.data[res.data.length - 1] |
|
|
|
|
|
this.getCustomerOrgGroupCopy(this.customerOrgRegister.id) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//复制分组 |
|
|
|
|
|
btnCopyGroup() { |
|
|
|
|
|
console.log('this.customerOrgGroup', this.customerOrgGroup) |
|
|
|
|
|
|
|
|
|
|
|
this.customerOrgRegisterList = []; |
|
|
|
|
|
this.customerOrgRegister = {}; |
|
|
|
|
|
this.customerOrgGroups = []; |
|
|
|
|
|
// 首次打开 复制分组 页面时,需获取顶级单位信息 |
|
|
|
|
|
if (this.customerOrgAll.length == 0) { |
|
|
|
|
|
getapi("/api/app/customer-org/parent-all") |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
if (res.code > -1) { |
|
|
|
|
|
this.customerOrgAll = res.data |
|
|
|
|
|
this.customerOrgDisp = res.data |
|
|
|
|
|
this.groupVisble = true |
|
|
|
|
|
// 复制分组时,设置当前顶级单位及体检次数 |
|
|
|
|
|
this.setCurParentOrgId() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
// 复制分组时,设置当前顶级单位及体检次数 |
|
|
|
|
|
this.setCurParentOrgId() |
|
|
|
|
|
this.groupVisble = true |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//选中分组 |
|
|
|
|
|
async groupRowClick(row) { |
|
|
|
|
|
this.curGroupId = row.id |
|
|
|
|
|
this.groupAsbitems = [] |
|
|
|
|
|
try { |
|
|
|
|
|
let res = await getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${row.id}`) |
|
|
|
|
|
if (res.code != -1) this.groupAsbitems = res.data |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.log(error) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//双击选分组,并确认复制 |
|
|
|
|
|
async groupRowDblclick(row) { |
|
|
|
|
|
await this.groupRowClick(row) |
|
|
|
|
|
this.copyGroup() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//复制分组(确认选中分组) |
|
|
|
|
|
copyGroup() { |
|
|
|
|
|
if (!this.curGroupId) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
console.log('this.packageAsbitems', this.groupAsbitems) |
|
|
|
|
|
this.addAbs(deepCopy(this.groupAsbitems)) |
|
|
|
|
|
this.groupVisble = false |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//复制套餐 |
|
|
|
|
|
btnCopyMedicalPackage() { |
|
|
|
|
|
this.medicalPackageVisble = true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//选中套餐 |
|
|
|
|
|
async packageRowClick(row) { |
|
|
|
|
|
this.curPackageId = row.id |
|
|
|
|
|
this.packageAsbitems = [] |
|
|
|
|
|
try { |
|
|
|
|
|
let res = await postapi('/api/app/medicalpackagedetail/getmedicalpackageinasbitem', { medicalPackageId: row.id }) |
|
|
|
|
|
this.packageAsbitems = res.data |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.log(error) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//双击选套餐,并确认复制 |
|
|
|
|
|
async rowDblclick(row) { |
|
|
|
|
|
await this.packageRowClick(row) |
|
|
|
|
|
this.copyMedicalPackage() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//复制套餐(确认选中套餐) |
|
|
|
|
|
copyMedicalPackage() { |
|
|
|
|
|
if (!this.curPackageId) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: "请先选择要复制的套餐!" }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
console.log('this.packageAsbitems', this.packageAsbitems) |
|
|
|
|
|
this.addAbs(deepCopy(this.packageAsbitems)) |
|
|
|
|
|
this.medicalPackageVisble = false |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 过滤体检单位 |
|
|
|
|
|
filterMethodOrg(keyWords) { |
|
|
|
|
|
if (keyWords) { |
|
|
|
|
|
this.customerOrgDisp = []; |
|
|
|
|
|
this.customerOrgAll.forEach((item) => { |
|
|
|
|
|
if ( |
|
|
|
|
|
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 || |
|
|
|
|
|
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 |
|
|
|
|
|
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 |
|
|
|
|
|
) { |
|
|
|
|
|
this.customerOrgDisp.push(item); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.customerOrgDisp = deepCopy(this.customerOrgAll); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//选择单位 |
|
|
|
|
|
changeCustomerOrg(v) { |
|
|
|
|
|
if (!v) { |
|
|
|
|
|
this.customerOrgRegisterList = []; |
|
|
|
|
|
this.customerOrgRegister = {}; |
|
|
|
|
|
this.customerOrgGroups = []; |
|
|
|
|
|
} else { |
|
|
|
|
|
getapi( |
|
|
|
|
|
`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}` |
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.customerOrgRegisterList = res.data; |
|
|
|
|
|
if (res.data.length > 0) { |
|
|
|
|
|
this.customerOrgRegister = res.data[res.data.length - 1]; |
|
|
|
|
|
this.getCustomerOrgGroupCopy(this.customerOrgRegister.id); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//选择体检次数 |
|
|
|
|
|
changeTimes(v) { |
|
|
|
|
|
this.getCustomerOrgGroup(v.id); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取体检次数下的分组 |
|
|
|
|
|
getCustomerOrgGroupCopy(customerOrgRegisterId) { |
|
|
|
|
|
// this.isDrag = false; |
|
|
|
|
|
// objCopy(this.formInit, this.form); |
|
|
|
|
|
// this.form.customerOrgRegisterId = customerOrgRegisterId; |
|
|
|
|
|
this.customerOrgGroups = []; |
|
|
|
|
|
getapi( |
|
|
|
|
|
`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}` |
|
|
|
|
|
).then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.customerOrgGroups = res.data; |
|
|
|
|
|
this.customerOrgGroups.forEach((e) => { |
|
|
|
|
|
e.customerOrgRegisterId = customerOrgRegisterId; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleRowClassName({ row, rowIndex }) { |
|
|
|
|
|
// highLightBg 为 'selected'的高亮 |
|
|
|
|
|
//console.log(rowIndex, row) |
|
|
|
|
|
//return row.highLightBg == 'selected' ? 'high-light-bg' : ''; |
|
|
|
|
|
if (row.choosed) { |
|
|
|
|
|
return 'current-row'; |
|
|
|
|
|
} else { |
|
|
|
|
|
return ''; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 添加组合项目 |
|
|
|
|
|
///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6' |
|
|
|
|
|
addAbs(asbItemChoosed) { |
|
|
|
|
|
|
|
|
|
|
|
if (asbItemChoosed.length < 1) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: "该套餐或分组下无可复制的组合项目" }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//性别、年龄判断 |
|
|
|
|
|
// "displayName": "身高体重", |
|
|
|
|
|
// "shortName": "哈f哈", |
|
|
|
|
|
// "forSexId": "F", |
|
|
|
|
|
// "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940", |
|
|
|
|
|
// "price": 0, |
|
|
|
|
|
console.log('asbItemChoosed.length', asbItemChoosed.length) |
|
|
|
|
|
let unChecks = [] //不适配项目名称 |
|
|
|
|
|
for (let i = 0; i < asbItemChoosed.length; i++) { |
|
|
|
|
|
if (this.form.sexId == 'U') break //未选性别时,无需判断组合项目性别限制 |
|
|
|
|
|
if (asbItemChoosed[i].forSexId == 'A') continue |
|
|
|
|
|
if (asbItemChoosed[i].forSexId != this.form.sexId) { |
|
|
|
|
|
unChecks.push(asbItemChoosed[i].displayName) |
|
|
|
|
|
asbItemChoosed[i].unCheck = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (unChecks.length > 0) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: `所选项目:${unChecks.toString()},不适合当前人员性别` }) |
|
|
|
|
|
if (asbItemChoosed.length == unChecks.length) return |
|
|
|
|
|
} |
|
|
|
|
|
let payTypeFlag = '0' // 0: 个人,1:单位,2:免费 |
|
|
|
|
|
if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' |
|
|
|
|
|
asbItemChoosed.forEach(e => { |
|
|
|
|
|
if (!e.unCheck) { |
|
|
|
|
|
// 未在已选列表中,才选择添加 |
|
|
|
|
|
let lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id) |
|
|
|
|
|
if (lfind < 0) { |
|
|
|
|
|
let pojo = { |
|
|
|
|
|
asbitemId: e.id, |
|
|
|
|
|
asbitemName: e.displayName, |
|
|
|
|
|
patientRegisterId: this.form.id, |
|
|
|
|
|
standardPrice: e.price, |
|
|
|
|
|
chargePrice: e.price, |
|
|
|
|
|
payTypeFlag, |
|
|
|
|
|
isCharge: "N", |
|
|
|
|
|
checkCompleteFlag: '0', |
|
|
|
|
|
discount: 100, |
|
|
|
|
|
amount: 1, |
|
|
|
|
|
total: e.price, |
|
|
|
|
|
} |
|
|
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.push(pojo) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 刷新左侧待选组合项目 |
|
|
|
|
|
this.changeItemType(deepCopy(this.dataTransOpts.copyGroup.itemTypeIds)) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//项目类别过滤 组合项目,未过滤已选择的组合项目 |
|
|
|
|
|
changeItemType(data) { |
|
|
|
|
|
//console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds) |
|
|
|
|
|
this.dataTransOpts.copyGroup.itemTypeIds = data |
|
|
|
|
|
let asbItemAll = deepCopy(this.dataTransOpts.copyGroup.asbItemAll) |
|
|
|
|
|
let lv = ""; |
|
|
|
|
|
if (typeof this.dataTransOpts.copyGroup.itemTypeIds == "object") { |
|
|
|
|
|
if (this.dataTransOpts.copyGroup.itemTypeIds.length > 0) lv = this.dataTransOpts.copyGroup.itemTypeIds[this.dataTransOpts.copyGroup.itemTypeIds.length - 1]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (lv) { |
|
|
|
|
|
this.dataTransOpts.copyGroup.asbItem = arrayFilter(asbItemAll, "itemTypeId", lv); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.dataTransOpts.copyGroup.asbItem = deepCopy(asbItemAll); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
arrayReduce(this.dataTransOpts.copyGroup.asbItem, this.dataTransOpts.tableM.register_check_asbitem, "id=asbitemId"); |
|
|
|
|
|
//console.log('this.dataTransOpts.copyGroup.asbItem',this.dataTransOpts.copyGroup.asbItem,this.dataTransOpts.tableM.register_check_asbitem) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
//回车替代tab键 |
|
|
//回车替代tab键 |
|
|
enterToTab() { |
|
|
enterToTab() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
|