dev
This commit is contained in:
parent
72d1cf6a77
commit
3dbdeab4f9
|
|
@ -159,7 +159,12 @@ $lighter-color: rgba(#4D6DE4, 0.5);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.default-danger-btn{
|
||||||
|
background: #FF282E;
|
||||||
|
&:hover{
|
||||||
|
background: rgba(#FF282E, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
.small-btn{
|
.small-btn{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="default-btn" @click="close" type="primary">关闭</div>
|
<div class="default-btn default-close-btn" @click="close">关闭</div>
|
||||||
<div class="default-btn" @click="addIdCode" type="primary" style="margin-left: 24px">确定</div>
|
<div class="default-btn" @click="addIdCode">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
@ -85,7 +85,7 @@ const addIdCode = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let idCode = traceabilityCode.value.slice(0, 7);
|
let idCode = traceabilityCode.value.slice(0, 7);
|
||||||
post(API.Charge.Order.Save, {goodsId: selected.value, idCode: idCode}).then((res: any) => {
|
post(API.Goods.Base.AddIdCode, {goodsId: selected.value, idCode: idCode}).then((res: any) => {
|
||||||
for (let subItem of tableData.value) {
|
for (let subItem of tableData.value) {
|
||||||
if (subItem.id === selected.value) {
|
if (subItem.id === selected.value) {
|
||||||
if (subItem.idCode == null) {
|
if (subItem.idCode == null) {
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="default-btn" @click="show = false">关闭</div>
|
<div class="default-btn default-close-btn" @click="show = false">关闭</div>
|
||||||
<div class="default-btn" @click="saveRetail()" style="margin-left: 24px">确定</div>
|
<div class="default-btn" @click="saveRetail()">确定</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ const changePriceType = (type: any, index: any) => {
|
||||||
payType.value = type;
|
payType.value = type;
|
||||||
selectedIndex.value = index
|
selectedIndex.value = index
|
||||||
}
|
}
|
||||||
const emit = defineEmits(['orderCompleted', 'orderCanceled'])
|
const emit = defineEmits(['orderCompleted', 'orderCanceled','close'])
|
||||||
const completeSettlement = () => {
|
const completeSettlement = () => {
|
||||||
if (!retailOrder.value) {
|
if (!retailOrder.value) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -133,6 +133,7 @@ const completeSettlement = () => {
|
||||||
}, {catch_error: true}).then((res: any) => {
|
}, {catch_error: true}).then((res: any) => {
|
||||||
orderCompleted()
|
orderCompleted()
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
emit('close')
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
ElMessage.error(e)
|
ElMessage.error(e)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,436 @@
|
||||||
<template>
|
<template>
|
||||||
<Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true">
|
<Mask :is-show="isShow" :height="900" @close="exit" title="新增" :show-footer="true">
|
||||||
<template #default>
|
<template #default>
|
||||||
<el-scrollbar>
|
<el-scrollbar v-if="itemId!=0">
|
||||||
|
<el-tabs v-model="activeName" @tab-change="changeTab" style="padding: 0 24px">
|
||||||
|
<el-tab-pane label="商品信息" name="first">
|
||||||
|
<div class="common-layout" style="padding: 0 0 24px">
|
||||||
|
<el-container>
|
||||||
|
<el-aside width="800px">
|
||||||
|
<div class="body">
|
||||||
|
<el-form ref="formRef"
|
||||||
|
:model="edit_data"
|
||||||
|
:rules="rules" style="width: 100%">
|
||||||
|
<el-descriptions title="基础" border direction="vertical">
|
||||||
|
<el-descriptions-item label="名称">
|
||||||
|
<el-form-item label="" prop="name" class="form-item">
|
||||||
|
<el-input v-model="edit_data.name"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="通用名">
|
||||||
|
<el-form-item label="" prop="commonName" class="form-item">
|
||||||
|
<el-input v-model="edit_data.commonName"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="类型" style="display: flex">
|
||||||
|
<el-form-item label="" class="form-item">
|
||||||
|
<el-select v-model="edit_data.cateId" placeholder="请选择" style="width: 70%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in cate_list"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button @click="showCateEdit">
|
||||||
|
<el-icon>
|
||||||
|
<Setting/>
|
||||||
|
</el-icon>
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="进口|国产" v-if="_type==1306">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.maintainCate"
|
||||||
|
placeholder="进口|国产"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in imported"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="效期预警(天)">
|
||||||
|
<el-form-item lable="" prop="expiryWarnDays" class="form-item">
|
||||||
|
<el-input-number v-model="edit_data.expiryWarnDays" class="input" style="width: 100%;"
|
||||||
|
:min="0">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="库存预警">
|
||||||
|
<el-form-item lable="" prop="inventoryWarnNumber" class="form-item">
|
||||||
|
<el-input-number v-model="edit_data.inventoryWarnNumber" class="input" style="width: 100%;"
|
||||||
|
:min="0">
|
||||||
|
</el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="批准文号" v-if="_type==1301 || _type==1306 || _type == 0">
|
||||||
|
<el-form-item lable="" prop="approvalCode" class="form-item">
|
||||||
|
<el-input v-model="edit_data.approvalCode" class="input">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="生产企业" v-if="_type!=1302">
|
||||||
|
<el-form-item label="" prop="producer" class="form-item">
|
||||||
|
<el-input v-model="edit_data.producer"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-descriptions-item label="注册证名称" v-if="_type==1306">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="edit_data.extra.registrationCertificateName" class="input">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="条形码" v-if="_type == 1301 || _type == 1302 || _type==0">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="edit_data.barcode"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="规格" v-if="_type==1302||_type==1306||_type==0">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="edit_data.specification" class="input">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最小制剂数量|单位" v-if="_type==1301">
|
||||||
|
<el-form-item>
|
||||||
|
<div class="unit-item">
|
||||||
|
<el-input ref="medicineDosageRef" v-model="edit_data.medicineDosageNum" class="input"
|
||||||
|
style="width: 200px;">
|
||||||
|
</el-input>
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
title="Title"
|
||||||
|
:width="200"
|
||||||
|
trigger="click"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<div class="unit">{{ edit_data.medicineDosageUnit }}</div>
|
||||||
|
</template>
|
||||||
|
<UnitSelector :units="dosageUnitList"
|
||||||
|
v-model="edit_data.medicineDosageUnit"></UnitSelector>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最小包装数量|单位">
|
||||||
|
<el-form-item>
|
||||||
|
<div class="unit-item">
|
||||||
|
<el-input ref="minPackagingRef" v-model="edit_data.minPackagingNumber" type="number"
|
||||||
|
class="input"
|
||||||
|
style="width: 200px;">
|
||||||
|
</el-input>
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
title="Title"
|
||||||
|
:width="200"
|
||||||
|
trigger="click"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<div class="unit">{{ edit_data.minPackagingUnit }}</div>
|
||||||
|
</template>
|
||||||
|
<UnitSelector :units="packagingUnit"
|
||||||
|
v-model="edit_data.minPackagingUnit"></UnitSelector>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="包装单位">
|
||||||
|
<el-form-item>
|
||||||
|
<div class="unit-item">
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
title="Title"
|
||||||
|
:width="200"
|
||||||
|
trigger="click"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<div class="unit" style="width: 232px">{{ edit_data.packagingUnit }}</div>
|
||||||
|
</template>
|
||||||
|
<UnitSelector :units="packagingUnit" v-model="edit_data.packagingUnit"></UnitSelector>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-descriptions-item>
|
||||||
|
<!-- <el-descriptions-item :label="_type==1301?'国药准字':'国械注准'" v-if="_type==1301 || _type==1306">-->
|
||||||
|
<!-- <el-input v-model="edit_data.approvalCode"/>-->
|
||||||
|
<!-- </el-descriptions-item>-->
|
||||||
|
<el-descriptions-item label="注册剂型" v-if="_type==1301">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="edit_data.extra.regType" class="input">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="药品标识码" v-if="_type==1301">
|
||||||
|
<el-form-item>
|
||||||
|
<el-popover
|
||||||
|
:visible="showPopover"
|
||||||
|
placement="bottom"
|
||||||
|
:width="200"
|
||||||
|
id="code-pop"
|
||||||
|
class="code-popo"
|
||||||
|
>
|
||||||
|
<div style="color: #6c6b6b;font-size: 12px">已关联({{
|
||||||
|
idCodeList ? idCodeList.length : 0
|
||||||
|
}})
|
||||||
|
</div>
|
||||||
|
<Divider/>
|
||||||
|
<div class="item">
|
||||||
|
<div v-for="(item,index) in idCodeList" :key="index">
|
||||||
|
<div class="remove">
|
||||||
|
<el-icon @click="removeIdCode(item)" id="code-remove">
|
||||||
|
<Close/>
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
|
<div style="width: 70%" class="text">
|
||||||
|
{{ item }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #reference>
|
||||||
|
<el-input v-model="idCode" id="code-input" @keydown.enter="addIdCode"
|
||||||
|
@click="clickIdCodeInput"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="标签">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input-tag
|
||||||
|
draggable
|
||||||
|
v-model="edit_data.tags"
|
||||||
|
class="input"
|
||||||
|
>
|
||||||
|
</el-input-tag>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="edit_data.remark" class="input"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="扩展" border style="margin-top: 20px" direction="vertical">
|
||||||
|
<el-descriptions-item label="养护分类" v-if="_type != 0">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.maintainCate"
|
||||||
|
placeholder="选择养护分类"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in maintainOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="医疗器械分类" v-if="_type==1306">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.instrumentCategroy"
|
||||||
|
placeholder="选择医疗器械分类"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in instrumentCategroyOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="储存条件" v-if="_type != 0">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.storageConditions"
|
||||||
|
placeholder="选择储存条件"
|
||||||
|
clearable
|
||||||
|
style="width: 240px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in storageConditionsOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="保质期" v-if="_type != 0">
|
||||||
|
<el-input v-model="edit_data.expiryTime" type="number">
|
||||||
|
<template #append>月</template>
|
||||||
|
</el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="柜号">
|
||||||
|
<el-input v-model="edit_data.extra.cabinetNumber">
|
||||||
|
</el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<!-- <el-descriptions-item label="用法用量" v-if="_type==1301">-->
|
||||||
|
<!-- <el-input v-model="edit_data.extra.usage">-->
|
||||||
|
<!-- </el-input>-->
|
||||||
|
<!-- </el-descriptions-item>-->
|
||||||
|
<el-descriptions-item label="处方药/OTC" v-if="_type==1301">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.drugCategory"
|
||||||
|
placeholder="选择药品分类"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in drugCategoryOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="精麻毒放|麻黄碱" v-if="_type==1301">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.JMDF"
|
||||||
|
placeholder="选择精麻毒放|麻黄碱"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in JMDFList"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="抗菌药物|DDD值" v-if="_type==1301">
|
||||||
|
<div class="antibacterial-agents">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.isAntibacterialAgents"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in isAntibacterialAgentsOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-input v-model="edit_data.extra.DDD" style="width: 80px"/>
|
||||||
|
<div class="unit-item">
|
||||||
|
<el-popover
|
||||||
|
placement="bottom"
|
||||||
|
title="Title"
|
||||||
|
:width="200"
|
||||||
|
trigger="click"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<div class="unit" style="width: 232px">{{ edit_data.extra.DDDUnit }}</div>
|
||||||
|
</template>
|
||||||
|
<UnitSelector :units="DDDUnitList" v-model="edit_data.extra.DDDUnit"></UnitSelector>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="基药" v-if="_type==1301">
|
||||||
|
<el-select
|
||||||
|
v-model="edit_data.extra.baseMedicine"
|
||||||
|
placeholder="选择基药"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in baseMedicineOptions"
|
||||||
|
:key="item.label"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="上市许可持有人" v-if="_type != 0">
|
||||||
|
<el-input v-model="edit_data.extra.authorizationMaster"></el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-aside>
|
||||||
|
<el-aside width="350px" style="border-left: 1px #ddd solid">
|
||||||
|
<el-form style="width: 100%;" :rules="rules" ref="formRef" label-width="100px">
|
||||||
|
<el-descriptions title="定价" border direction="vertical" :column="2" style="margin-left: 5px">
|
||||||
|
<el-descriptions-item label="进价参考" width="180">
|
||||||
|
<el-input v-model.number="edit_data.purchaseUnitPrice" type="number" :min="1">
|
||||||
|
<template #prefix>¥</template>
|
||||||
|
</el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="定价模式">
|
||||||
|
<el-select v-model="edit_data.pricingModel" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in pricingModelOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="加成率" v-if="edit_data.pricingModel==1" width="180">
|
||||||
|
<el-input v-model="edit_data.makeUp" type="number">
|
||||||
|
<template #append>%</template>
|
||||||
|
</el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="零售价格" v-else>
|
||||||
|
<el-input v-model="edit_data.unitPrice" type="number"
|
||||||
|
>
|
||||||
|
<template #prefix>¥</template>
|
||||||
|
<template #append>/{{ edit_data.packagingUnit }}</template>
|
||||||
|
</el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<el-checkbox v-model="edit_data.trdnFlag" label="是否允许拆零" size="large"/>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="edit_data.disassemblyPrice" type="number" :disabled="!edit_data.trdnFlag">
|
||||||
|
<template #prefix>¥</template>
|
||||||
|
<template #append>/{{ edit_data.minPackagingUnit }}</template>
|
||||||
|
</el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<el-descriptions title="医保" border direction="vertical" :column="1" style="margin-left: 5px"
|
||||||
|
v-if="_type !=0">
|
||||||
|
<el-descriptions-item label="医保对码">
|
||||||
|
<SocialInfo v-model="edit_data.hilistCode"
|
||||||
|
@openSearch="openContrastCodeSearch"></SocialInfo>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-form>
|
||||||
|
</el-aside>
|
||||||
|
</el-container>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="批次信息" name="second">
|
||||||
|
<InventoryBatchDetail ref="inventoryBatchDetailRef"></InventoryBatchDetail>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="进销存统计" name="third">
|
||||||
|
<InventoryStatistics :id="itemId" ref="inventoryStatisticsRef"></InventoryStatistics>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-scrollbar>
|
||||||
|
<el-scrollbar v-else>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="default-btn" style="margin:10px auto" @click="openCreateSearch" v-if="_type!=0">一键建档 </span>
|
<span class="default-btn" style="margin:10px auto" @click="openCreateSearch" v-if="_type!=0">一键建档 </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -422,7 +851,6 @@
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<span class="small-btn" @click="returnInit"
|
<span class="small-btn" @click="returnInit"
|
||||||
|
|
@ -454,6 +882,8 @@ import Divider from "@/components/Divider.vue";
|
||||||
import UnitSelector from "@/components/inventory/goods/UnitSelector.vue";
|
import UnitSelector from "@/components/inventory/goods/UnitSelector.vue";
|
||||||
import SocialInfo from "@/components/inventory/goods/SocialInfo.vue";
|
import SocialInfo from "@/components/inventory/goods/SocialInfo.vue";
|
||||||
import {API} from "@/assets/config/API.ts";
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
import InventoryBatchDetail from "@/components/inventory/goods/InventoryBatchDetail.vue";
|
||||||
|
import InventoryStatistics from "@/components/inventory/goods/InventoryStatistics.vue"
|
||||||
|
|
||||||
|
|
||||||
let _type = ref(0);
|
let _type = ref(0);
|
||||||
|
|
@ -619,8 +1049,9 @@ const removeIdCode = (item: string) => {
|
||||||
}
|
}
|
||||||
showPopover.value = idCodeList.value.length > 0;
|
showPopover.value = idCodeList.value.length > 0;
|
||||||
}
|
}
|
||||||
|
const itemId = ref<any>(null)
|
||||||
const init = (type: number, id: number) => {
|
const init = (type: number, id: number) => {
|
||||||
|
itemId.value = id
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
_type.value = type;
|
_type.value = type;
|
||||||
if (id != null && id != 0) {
|
if (id != null && id != 0) {
|
||||||
|
|
@ -723,7 +1154,7 @@ let save = async (isClose: Boolean) => {
|
||||||
data.tags = data.tags ? data.tags.join(",") : null;
|
data.tags = data.tags ? data.tags.join(",") : null;
|
||||||
data.idCode = idCodeList.value.join(",");
|
data.idCode = idCodeList.value.join(",");
|
||||||
data.type = _type.value;
|
data.type = _type.value;
|
||||||
post(API.Goods.Base.Save, data).then((res: any) => {
|
post(API.Goods.Base.Save, {data}).then((res: any) => {
|
||||||
ElMessage.success('保存成功')
|
ElMessage.success('保存成功')
|
||||||
if (isClose) {
|
if (isClose) {
|
||||||
//关闭该页面
|
//关闭该页面
|
||||||
|
|
@ -845,6 +1276,16 @@ const enableSale = () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const activeName = ref('first');
|
||||||
|
const inventoryBatchDetailRef = ref<any>("")
|
||||||
|
const changeTab = (name: any) => {
|
||||||
|
activeName.value = name
|
||||||
|
if (activeName.value === 'first') {
|
||||||
|
init(_type.value, itemId.value)
|
||||||
|
} else if (activeName.value === 'second') {
|
||||||
|
inventoryBatchDetailRef.value?.init(itemId.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.header {
|
.header {
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ import {post} from "@/utils/request.ts";
|
||||||
import {onMounted, ref, defineProps} from "vue";
|
import {onMounted, ref, defineProps} from "vue";
|
||||||
import {Minus, Plus, Setting} from "@element-plus/icons-vue";
|
import {Minus, Plus, Setting} from "@element-plus/icons-vue";
|
||||||
import {API} from "@/assets/config/API.ts";
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
import {getToday} from "@/utils/dateUtils.ts";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
|
|
@ -115,15 +116,9 @@ const changeDate = (date: any) => {
|
||||||
dateList.value = date
|
dateList.value = date
|
||||||
init()
|
init()
|
||||||
}
|
}
|
||||||
const getDate = () => {
|
|
||||||
const now = new Date();
|
|
||||||
const endDate = formatDate(now); // 当前日期
|
|
||||||
const startDate = new Date(now);
|
|
||||||
startDate.setDate(now.getDate() - 30); // 前三十天
|
|
||||||
dateList.value = [formatDate(startDate), endDate];
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDate()
|
dateList.value = [getToday().start, get];
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
const init = () => {
|
const init = () => {
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
<el-input v-model="edit_data.name" placeholder="请输入姓名" clearable
|
<el-input v-model="edit_data.name" placeholder="请输入姓名" clearable
|
||||||
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"></el-input>
|
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="name" label="手机号">
|
<el-form-item prop="phone" label="手机号">
|
||||||
<el-input v-model="edit_data.name" placeholder="请输入姓名" clearable
|
<el-input v-model="edit_data.phone" placeholder="请输入手机号" clearable
|
||||||
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"></el-input>
|
:disabled="edit_data.status==1||edit_data.status==3||edit_data.status==0"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="certType" label="证件类型">
|
<el-form-item prop="certType" label="证件类型">
|
||||||
|
|
|
||||||
|
|
@ -120,9 +120,9 @@
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="small-btn" @click="save()">保存</span>
|
<span class="default-btn default-close-btn" @click="exit()">取消</span>
|
||||||
<span class="small-btn" @click="exit()">取消</span>
|
<span class="default-btn default-danger-btn" v-if="memberInfo.id" @click="deleteDetail">删除</span>
|
||||||
<span class="danger-btn" v-if="memberInfo.id" @click="deleteDetail">删除</span>
|
<span class="default-btn" @click="save()">保存</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
|
||||||
|
|
@ -118,9 +118,9 @@
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="small-btn" @click="exit">取消</span>
|
<span class="default-btn default-close-btn" @click="exit">取消</span>
|
||||||
<span class="small-btn" @click="save()">保存</span>
|
<span class="default-btn default-danger-btn" v-if="props.id" @click="deleteDetail">删除</span>
|
||||||
<span class="danger-btn" v-if="props.id" @click="deleteDetail">删除</span>
|
<span class="default-btn" @click="save()">保存</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<Mask :is-show="isShow" width="400" height="550" @close="close" :title="props.id?'项目编辑':'项目新增'"
|
<Mask :is-show="isShow" width="500" height="550" @close="close" :title="props.id?'项目编辑':'项目新增'"
|
||||||
:show-footer="true">
|
:show-footer="true">
|
||||||
<template #default>
|
<template #default>
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div style="padding: 0 24px">
|
<div style="padding: 0 24px">
|
||||||
<div class="header" style="width: 100%;display: flex;justify-content: center;margin-bottom: 10px">
|
<div class="header" style="width: 100%;display: flex;justify-content: center;margin-bottom: 10px">
|
||||||
<span style="margin-top:10px" class="btn small-btn" @click="openCreateSearch">一键建档</span>
|
<span style="margin-top:10px" class="default-btn" @click="openCreateSearch">一键建档</span>
|
||||||
</div>
|
</div>
|
||||||
<el-form :model="form" label-width="auto" :rules="formRules" ref="formRef">
|
<el-form :model="form" label-width="auto" :rules="formRules" ref="formRef">
|
||||||
<el-descriptions
|
<el-descriptions
|
||||||
|
|
@ -60,9 +60,10 @@
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="small-btn" @click="save()">保存</span>
|
<span class="default-btn default-close-btn" @click="close">取消</span>
|
||||||
<span class="small-btn" @click="close">取消</span>
|
<span class="default-btn default-danger-btn" v-if="props.id" @click="deleteDetail">删除</span>
|
||||||
<span class="danger-btn" v-if="props.id" @click="deleteDetail">删除</span>
|
<span class="default-btn" @click="save()">保存</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@
|
||||||
ref="settlementRef"
|
ref="settlementRef"
|
||||||
@orderCompleted="orderCompleted"
|
@orderCompleted="orderCompleted"
|
||||||
@orderCanceled="orderCanceled"
|
@orderCanceled="orderCanceled"
|
||||||
|
@close="initFormData"
|
||||||
></Settlement>
|
></Settlement>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -327,7 +328,7 @@ const cardTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => (
|
||||||
const doctorList = ref<any>([])
|
const doctorList = ref<any>([])
|
||||||
const sectionDoctorOption = ref<any>('')
|
const sectionDoctorOption = ref<any>('')
|
||||||
const list = () => {
|
const list = () => {
|
||||||
post(API.Charge.Order.List, {query: {role: 1}}).then((res: any) => {
|
post(API.Organization.Member.Search, {query: {role: 1}}).then((res: any) => {
|
||||||
doctorList.value = res
|
doctorList.value = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -191,19 +191,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Edit ref="editRef" @close="is_add = false;init()"/>
|
<Edit ref="editRef" @close="is_add = false;init()"/>
|
||||||
<Mask :isShow="open" :height="600" @close="open = false" title="编辑">
|
|
||||||
<el-tabs v-model="activeName" @tab-change="changeTab">
|
|
||||||
<el-tab-pane label="商品信息" name="first">
|
|
||||||
<Edit ref="editRef" @close="open = false;init()"/>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="批次信息" name="second">
|
|
||||||
<InventoryBatchDetail ref="inventoryBatchDetailRef"></InventoryBatchDetail>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="进销存统计" name="third">
|
|
||||||
<InventoryStatistics :id="id" ref="inventoryStatisticsRef"></InventoryStatistics>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</Mask>
|
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {nextTick, onMounted, ref} from "vue";
|
import {nextTick, onMounted, ref} from "vue";
|
||||||
|
|
@ -213,7 +200,6 @@ import Mask from "@/components/common/Mask.vue";
|
||||||
import Edit from "@/components/inventory/goods/Edit.vue";
|
import Edit from "@/components/inventory/goods/Edit.vue";
|
||||||
import InventoryBatchDetail from "@/components/inventory/goods/InventoryBatchDetail.vue";
|
import InventoryBatchDetail from "@/components/inventory/goods/InventoryBatchDetail.vue";
|
||||||
import InventoryStatistics from "@/components/inventory/goods/InventoryStatistics.vue";
|
import InventoryStatistics from "@/components/inventory/goods/InventoryStatistics.vue";
|
||||||
import CloseBtn from "@/components/CloseBtn.vue";
|
|
||||||
import {Search, SemiSelect, Refresh} from "@element-plus/icons-vue";
|
import {Search, SemiSelect, Refresh} from "@element-plus/icons-vue";
|
||||||
import {API} from "@/assets/config/API.ts";
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
|
||||||
|
|
@ -318,7 +304,9 @@ let init = () => {
|
||||||
getStatisticsData()
|
getStatisticsData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const typeNum = ref<any>()
|
||||||
let open_edit = (type: number, id: number) => {
|
let open_edit = (type: number, id: number) => {
|
||||||
|
typeNum.value = type
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
editRef.value?.init(type, id);
|
editRef.value?.init(type, id);
|
||||||
});
|
});
|
||||||
|
|
@ -341,7 +329,6 @@ interface CateOption {
|
||||||
const allCateList = ref<CateOption[]>([]);
|
const allCateList = ref<CateOption[]>([]);
|
||||||
const getAllCate = () => {
|
const getAllCate = () => {
|
||||||
post(API.Goods.Cate.GetAllList, null).then((res: any) => {
|
post(API.Goods.Cate.GetAllList, null).then((res: any) => {
|
||||||
|
|
||||||
const options = [];
|
const options = [];
|
||||||
for (const key in res) {
|
for (const key in res) {
|
||||||
if (typeList.hasOwnProperty(key)) { // 检查键是否存在
|
if (typeList.hasOwnProperty(key)) { // 检查键是否存在
|
||||||
|
|
@ -359,46 +346,14 @@ const getAllCate = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const inventoryBatchDetailRef = ref<any>(null)
|
|
||||||
const inventoryStatisticsRef = ref<any>(null)
|
|
||||||
//打开弹窗
|
|
||||||
const obj = ref<any>({})
|
|
||||||
const open = ref(false)
|
|
||||||
const openMack = (row: any) => {
|
const openMack = (row: any) => {
|
||||||
open.value = true
|
|
||||||
obj.value = row
|
|
||||||
if (activeName.value === 'first') {
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
editRef.value?.init(row.type, row.id);
|
nextTick(() => {
|
||||||
|
editRef.value?.init(typeNum.value, row.id);
|
||||||
});
|
});
|
||||||
} else if (activeName.value === 'second') {
|
|
||||||
nextTick(() => {
|
|
||||||
inventoryBatchDetailRef.value?.init(row.id)
|
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
id.value = obj.value.id
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
const closeMack = () => {
|
|
||||||
open.value = false
|
|
||||||
id.value = ""
|
|
||||||
}
|
|
||||||
const id = ref<any>("")
|
|
||||||
const changeTab = (name: string) => {
|
|
||||||
activeName.value = name
|
|
||||||
if (activeName.value === 'first') {
|
|
||||||
nextTick(() => {
|
|
||||||
editRef.value?.init(obj.value.type, obj.value.id);
|
|
||||||
});
|
|
||||||
} else if (activeName.value === 'second') {
|
|
||||||
nextTick(() => {
|
|
||||||
inventoryBatchDetailRef.value?.init(obj.value.id)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
id.value = obj.value.id
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const activeName = ref('first')
|
|
||||||
const resetSearch = () => {
|
const resetSearch = () => {
|
||||||
searchModel.value = {
|
searchModel.value = {
|
||||||
keyword: "",
|
keyword: "",
|
||||||
|
|
@ -436,6 +391,7 @@ const props = {multiple: true}
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 24px 24px 0;
|
padding: 24px 24px 0;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -495,6 +451,7 @@ const props = {multiple: true}
|
||||||
:deep(.el-input__wrapper) {
|
:deep(.el-input__wrapper) {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,9 +56,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-top-right">
|
<div class="detail-top-right">
|
||||||
<span class="default-btn" @click="openEdit(listItem.id)">编辑资料</span>
|
<span class="default-btn" @click="openEdit(listItem.id)">编辑资料</span>
|
||||||
<span class="default-btn" @click="openGrant()" style="margin: 0 24px">发放积分</span>
|
<span class="default-btn" @click="openGrant()">发放积分</span>
|
||||||
<span class="default-btn" @click="isExchange=true">兑换积分</span>
|
<span class="default-btn" @click="isExchange=true">兑换积分</span>
|
||||||
<span class="default-btn" @click="openFlowingWater" style="margin-left: 24px">查看流水</span>
|
<span class="default-btn" @click="openFlowingWater">查看流水</span>
|
||||||
<!-- <span class="btn" @click="openLevelEdit(listItem)">患者等级编辑</span>-->
|
<!-- <span class="btn" @click="openLevelEdit(listItem)">患者等级编辑</span>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue