|
@@ -419,6 +419,13 @@
|
|
|
v-hasPermi="['his:storeProduct:copyProduct']"
|
|
v-hasPermi="['his:storeProduct:copyProduct']"
|
|
|
>一键复制
|
|
>一键复制
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ icon="el-icon-document-copy"
|
|
|
|
|
+ @click="openVerify(scope.row)"
|
|
|
|
|
+ >溯源码管理
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -479,10 +486,11 @@
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="商品分类" prop="cateId">
|
|
<el-form-item label="商品分类" prop="cateId">
|
|
|
<treeselect v-model="form.cateId" :options="categoryOptions" :normalizer="normalizer"
|
|
<treeselect v-model="form.cateId" :options="categoryOptions" :normalizer="normalizer"
|
|
|
- placeholder="请选择上级分类"/>
|
|
|
|
|
|
|
+ placeholder="请选择上级分类" @input="onCategoryOrStoreChange"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="商品类型" prop="productType">
|
|
<el-form-item label="商品类型" prop="productType">
|
|
@@ -499,7 +507,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="所属店铺" prop="storeId" v-if="medicalMallConfig.isStores">
|
|
<el-form-item label="所属店铺" prop="storeId" v-if="medicalMallConfig.isStores">
|
|
|
- <el-select style="width: 240px" v-model="form.storeId" placeholder="请选择店铺" clearable size="small">
|
|
|
|
|
|
|
+ <el-select style="width: 240px" v-model="form.storeId" placeholder="请选择店铺" clearable size="small" @change="onCategoryOrStoreChange">
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in storeOptions"
|
|
v-for="item in storeOptions"
|
|
|
:key="item.storeId"
|
|
:key="item.storeId"
|
|
@@ -511,6 +519,15 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="器械编码" prop="medicalDeviceCode" v-if="showMedicalDeviceCode">
|
|
|
|
|
+ <el-input v-model="form.medicalDeviceCode" placeholder="请输入器械编码" @blur="onCategoryOrStoreChange" style="width: calc(100% - 120px);"/>
|
|
|
|
|
+ <el-button type="primary" @click="showExemptDeviceDialog" style="margin-left: 10px;" v-if="shouldShowExemptDeviceButton">显示器免</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="关键字" prop="keyword">
|
|
<el-form-item label="关键字" prop="keyword">
|
|
@@ -526,7 +543,7 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row :gutter="10">
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="是否药品" prop="isDrug">
|
|
|
|
|
|
|
+ <el-form-item label="是否药品" prop="isDrug" v-if="!isMedicalDeviceCategory">
|
|
|
<el-radio-group v-model="form.isDrug">
|
|
<el-radio-group v-model="form.isDrug">
|
|
|
<el-radio
|
|
<el-radio
|
|
|
v-for="item in isDrugOptions"
|
|
v-for="item in isDrugOptions"
|
|
@@ -539,18 +556,18 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<div v-if="form.isDrug === '1' ">
|
|
<div v-if="form.isDrug === '1' ">
|
|
|
- <el-form-item label="药品展示图" prop="drugImage">
|
|
|
|
|
|
|
+ <el-form-item label="头图展示" prop="drugImage">
|
|
|
<Material v-model="drugImageArr" type="image" :num="1" :width="150" :height="150"/>
|
|
<Material v-model="drugImageArr" type="image" :num="1" :width="150" :height="150"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<div v-if="medicalMallConfig.isMedicalMall">
|
|
<div v-if="medicalMallConfig.isMedicalMall">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="药品注册证书编号" prop="drugRegCertNo">
|
|
|
|
|
- <el-input v-model="form.drugRegCertNo" placeholder="请输入药品注册证书编号"/>
|
|
|
|
|
|
|
+ <el-form-item :label="isMedicalDeviceCategory ? '注册证号/备案凭证号' : '批准文号'" prop="drugRegCertNo">
|
|
|
|
|
+ <el-input v-model="form.drugRegCertNo" :placeholder="isMedicalDeviceCategory ?'请输入注册证号/备案凭证号' : '请输入批准文号'"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="通用名称" prop="commonName">
|
|
|
|
|
|
|
+ <el-form-item label="通用名称" prop="commonName" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input v-model="form.commonName" placeholder="请输入通用名称"/>
|
|
<el-input v-model="form.commonName" placeholder="请输入通用名称"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -558,7 +575,7 @@
|
|
|
|
|
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
- <el-form-item label="剂型" prop="dosageForm">
|
|
|
|
|
|
|
+ <el-form-item label="剂型" prop="dosageForm" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input v-model="form.dosageForm" placeholder="请输入剂型"/>
|
|
<el-input v-model="form.dosageForm" placeholder="请输入剂型"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -607,13 +624,14 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+
|
|
|
<el-collapse v-model="activeValue" accordion>
|
|
<el-collapse v-model="activeValue" accordion>
|
|
|
<el-collapse-item title="" name="1">
|
|
<el-collapse-item title="" name="1">
|
|
|
- <el-form-item label="功能主治" prop="indications">
|
|
|
|
|
|
|
+ <el-form-item label="功能主治" prop="indications" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input v-model="form.indications" type="textarea" placeholder="请输入功能主治"/>
|
|
<el-input v-model="form.indications" type="textarea" placeholder="请输入功能主治"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="成分" prop="ingredient" v-if="!displayDemo">
|
|
|
|
|
|
|
+ <el-form-item label="成分" prop="ingredient" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="form.ingredient"
|
|
v-model="form.ingredient"
|
|
|
type="textarea"
|
|
type="textarea"
|
|
@@ -624,19 +642,19 @@
|
|
|
<div v-if="ingredientError" class="el-form-item__error">{{ ingredientError }}</div>
|
|
<div v-if="ingredientError" class="el-form-item__error">{{ ingredientError }}</div>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="用法用量" prop="dosage">
|
|
|
|
|
|
|
+ <el-form-item label="用法用量" prop="dosage" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input v-model="form.dosage" type="textarea" placeholder="请输入用法用量"/>
|
|
<el-input v-model="form.dosage" type="textarea" placeholder="请输入用法用量"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="不良反应" prop="adverseReactions">
|
|
|
|
|
|
|
+ <el-form-item label="不良反应" prop="adverseReactions" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input v-model="form.adverseReactions" type="textarea" placeholder="请输入不良反应"/>
|
|
<el-input v-model="form.adverseReactions" type="textarea" placeholder="请输入不良反应"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="禁忌" prop="contraindications">
|
|
|
|
|
|
|
+ <el-form-item label="禁忌" prop="contraindications" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input v-model="form.contraindications" type="textarea" placeholder="请输入禁忌"/>
|
|
<el-input v-model="form.contraindications" type="textarea" placeholder="请输入禁忌"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item label="注意事项" prop="precautions">
|
|
|
|
|
|
|
+ <el-form-item label="注意事项" prop="precautions" v-if="!isMedicalDeviceCategory">
|
|
|
<el-input v-model="form.precautions" type="textarea" placeholder="请输入注意事项"/>
|
|
<el-input v-model="form.precautions" type="textarea" placeholder="请输入注意事项"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-collapse-item>
|
|
</el-collapse-item>
|
|
@@ -953,61 +971,63 @@
|
|
|
<Material v-model="businessArr" type="image" :num="1" :width="150" :height="150"/>
|
|
<Material v-model="businessArr" type="image" :num="1" :width="150" :height="150"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item v-if="form.isShow === '1' && businessArr.length > 0" label="营业执照有效期" prop="businessExpire">
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="form.businessExpire"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
- range-separator="至"
|
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
|
- @change="validateBusinessExpire">
|
|
|
|
|
- </el-date-picker>
|
|
|
|
|
- <div v-if="businessExpireError" style="color: #F56C6C; font-size: 12px; line-height: 1; padding-top: 4px;">
|
|
|
|
|
- <i class="el-icon-warning"></i> {{ businessExpireError }}
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-form-item v-if="form.isShow === '1' && businessArr.length > 0" label="生产企业营业执照是否长期有效" prop="isBusinessPermanent">
|
|
|
|
|
+ <el-switch @change="switchChange()" v-model="businessValue" active-color="#13ce66" inactive-color="#ff4949" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
+ <el-form-item v-if="form.isShow === '1' && businessArr.length > 0 && !businessValue" prop="businessExpire">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="form.businessExpire"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
<!--生产企业的生产许可证/备案凭证-->
|
|
<!--生产企业的生产许可证/备案凭证-->
|
|
|
<el-form-item v-if="form.isShow === '1'" label="生产企业的生产许可证/备案凭证" prop="license">
|
|
<el-form-item v-if="form.isShow === '1'" label="生产企业的生产许可证/备案凭证" prop="license">
|
|
|
<Material v-model="licenseArr" type="image" :num="1" :width="150" :height="150"/>
|
|
<Material v-model="licenseArr" type="image" :num="1" :width="150" :height="150"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0" label="生产许可证有效期" prop="licenseExpire">
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="form.licenseExpire"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
- range-separator="至"
|
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
|
- @change="validateLicenseExpire">
|
|
|
|
|
- </el-date-picker>
|
|
|
|
|
- <div v-if="licenseExpireError" style="color: #F56C6C; font-size: 12px; line-height: 1; padding-top: 4px;">
|
|
|
|
|
- <i class="el-icon-warning"></i> {{ licenseExpireError }}
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0" label="生产企业的生产许可证/备案凭证是否长期有效" prop="isLicensePermanent">
|
|
|
|
|
+ <el-switch @change="switchChange()" v-model="licenseValue" active-color="#13ce66" inactive-color="#ff4949" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
+ <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0 && !licenseValue" prop="licenseExpire">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="form.licenseExpire"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期">
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
<!--商品注册证/备案凭证-->
|
|
<!--商品注册证/备案凭证-->
|
|
|
<el-form-item v-if="form.isShow === '1'" label="商品注册证/备案凭证" prop="certificate">
|
|
<el-form-item v-if="form.isShow === '1'" label="商品注册证/备案凭证" prop="certificate">
|
|
|
<Material v-model="certificateArr" type="image" :num="1" :width="150" :height="150"/>
|
|
<Material v-model="certificateArr" type="image" :num="1" :width="150" :height="150"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
|
|
- <el-form-item v-if="form.isShow === '1' && certificateArr.length > 0" label="注册证有效期" prop="certificateExpire">
|
|
|
|
|
|
|
+ <el-form-item v-if="form.isShow === '1' && licenseArr.length > 0" label="商品注册证/备案凭证是否长期有效" prop="isCertificatePermanent">
|
|
|
|
|
+ <el-switch @change="switchChange()" v-model="certificateValue" active-color="#13ce66" inactive-color="#ff4949" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item v-if="form.isShow === '1' && certificateArr.length > 0 && !certificateValue" prop="certificateExpire">
|
|
|
<el-date-picker
|
|
<el-date-picker
|
|
|
- v-model="form.certificateExpire"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
|
- range-separator="至"
|
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
|
- @change="validateCertificateExpire">
|
|
|
|
|
|
|
+ v-model="form.certificateExpire"
|
|
|
|
|
+ type="daterange"
|
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
|
+ range-separator="至"
|
|
|
|
|
+ start-placeholder="开始日期"
|
|
|
|
|
+ end-placeholder="结束日期">
|
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
|
- <div v-if="certificateExpireError" style="color: #F56C6C; font-size: 12px; line-height: 1; padding-top: 4px;">
|
|
|
|
|
- <i class="el-icon-warning"></i> {{ certificateExpireError }}
|
|
|
|
|
- </div>
|
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<el-form-item label="国药准字" v-if="form.productType==2" prop="prescribeCode">
|
|
<el-form-item label="国药准字" v-if="form.productType==2" prop="prescribeCode">
|
|
|
<el-input v-model="form.prescribeCode" placeholder="请输入国药准字"/>
|
|
<el-input v-model="form.prescribeCode" placeholder="请输入国药准字"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -1096,8 +1116,53 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="authVisible = false">关 闭</el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
|
|
+ <el-button type="primary" @click="authVisible = false">关 闭</el-button>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+<!-- 免于经营备案的第二类医疗器械产品弹窗 -->
|
|
|
|
|
+<el-dialog title="免于经营备案的第二类医疗器械产品" :visible.sync="exemptDeviceDialogVisible" width="80%" append-to-body :modal-append-to-body="false" z-index="9999" top="5vh" custom-class="exempt-device-dialog">
|
|
|
|
|
+ <el-form :model="exemptDeviceQueryParams" ref="exemptDeviceQueryForm" :inline="true" label-width="80px">
|
|
|
|
|
+ <el-form-item label="产品名称">
|
|
|
|
|
+ <el-input v-model="exemptDeviceQueryParams.productName" placeholder="请输入产品名称" clearable size="small" @keyup.enter.native="handleExemptDeviceQuery" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item>
|
|
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleExemptDeviceQuery">搜索</el-button>
|
|
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetExemptDeviceQuery">重置</el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table v-loading="exemptDeviceLoading" :data="exemptDeviceList" border>
|
|
|
|
|
+ <el-table-column label="产品序号" align="center" prop="serialNumber" />
|
|
|
|
|
+ <el-table-column label="产品名称" align="center" prop="productName" />
|
|
|
|
|
+ <el-table-column label="目录名称" align="center" prop="directoryName" />
|
|
|
|
|
+ <el-table-column label="产品描述" align="center" prop="productDescription" />
|
|
|
|
|
+ <el-table-column label="产品用途" align="center" prop="usageStr" />
|
|
|
|
|
+<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="180" />-->
|
|
|
|
|
+<!-- <el-table-column label="更新时间" align="center" prop="updateTime" width="180" />-->
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="exemptDeviceDialogVisible = false">关 闭</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 溯源码管理弹窗 -->
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ :title="titleVisible"
|
|
|
|
|
+ :visible.sync="verifyDialogVisible"
|
|
|
|
|
+ width="90%"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ :before-close="handleVerifyDialogClose"
|
|
|
|
|
+ >
|
|
|
|
|
+ <VerifyCode
|
|
|
|
|
+ v-if="verifyDialogVisible"
|
|
|
|
|
+ :product-id="currentProductId"
|
|
|
|
|
+ ref="verifyCodeRef"
|
|
|
|
|
+ />
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -1113,7 +1178,7 @@ import {
|
|
|
importTemplate,
|
|
importTemplate,
|
|
|
batchModify,
|
|
batchModify,
|
|
|
sync580,
|
|
sync580,
|
|
|
- updateIsShow, exportDrugProduct,getAuthInfo,copyProduct,selectForbiddenKeywords,checkStoreLicense
|
|
|
|
|
|
|
+ updateIsShow, exportDrugProduct,getAuthInfo,copyProduct,selectForbiddenKeywords,checkStoreLicense,getExemptSecondMedicalDeviceList
|
|
|
} from "@/api/hisStore/storeProduct";
|
|
} from "@/api/hisStore/storeProduct";
|
|
|
import {getAllStoreProductCategory} from "@/api/hisStore/storeProductCategory";
|
|
import {getAllStoreProductCategory} from "@/api/hisStore/storeProductCategory";
|
|
|
import {getAllStoreProductRule} from "@/api/hisStore/storeProductRule";
|
|
import {getAllStoreProductRule} from "@/api/hisStore/storeProductRule";
|
|
@@ -1128,6 +1193,7 @@ import {getCompanyList} from "@/api/company/company";
|
|
|
import {listStore} from '@/api/hisStore/store'
|
|
import {listStore} from '@/api/hisStore/store'
|
|
|
import {getConfigByKey} from '@/api/system/config'
|
|
import {getConfigByKey} from '@/api/system/config'
|
|
|
import {qualifications} from "@/api/hisStore/storeProduct";
|
|
import {qualifications} from "@/api/hisStore/storeProduct";
|
|
|
|
|
+import VerifyCode from '@/views/hisStore/storeVerify/index.vue';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "HisStoreProduct",
|
|
name: "HisStoreProduct",
|
|
@@ -1135,7 +1201,8 @@ export default {
|
|
|
Treeselect,
|
|
Treeselect,
|
|
|
Editor,
|
|
Editor,
|
|
|
Material,
|
|
Material,
|
|
|
- singleImg,
|
|
|
|
|
|
|
+ VerifyCode,
|
|
|
|
|
+ singleImg
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -1185,6 +1252,21 @@ export default {
|
|
|
this.getTreeselect();
|
|
this.getTreeselect();
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ // 计算属性:是否显示显示器免按钮
|
|
|
|
|
+ shouldShowExemptDeviceButton() {
|
|
|
|
|
+ // 只有在显示器械编码输入框且不是III类器械时才显示按钮
|
|
|
|
|
+ return this.showMedicalDeviceCode &&
|
|
|
|
|
+ this.form.cateId &&
|
|
|
|
|
+ this.cateIdToNameMap[this.form.cateId] &&
|
|
|
|
|
+ !this.cateIdToNameMap[this.form.cateId].includes('III类器械');
|
|
|
|
|
+ },
|
|
|
|
|
+ // 判断当前分类是否为医疗器械分类
|
|
|
|
|
+ isMedicalDeviceCategory() {
|
|
|
|
|
+ const cateName = this.cateIdToNameMap[this.form.cateId];
|
|
|
|
|
+ return cateName !== undefined && cateName.includes('器械');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
watch: {
|
|
watch: {
|
|
|
licenseArr(val) {
|
|
licenseArr(val) {
|
|
|
this.form.license = val.join(',');
|
|
this.form.license = val.join(',');
|
|
@@ -1243,14 +1325,27 @@ export default {
|
|
|
handler(newVal, oldVal) {
|
|
handler(newVal, oldVal) {
|
|
|
// 分类变化时动态修改验证规则
|
|
// 分类变化时动态修改验证规则
|
|
|
const cateName = this.cateIdToNameMap[newVal];
|
|
const cateName = this.cateIdToNameMap[newVal];
|
|
|
-
|
|
|
|
|
// 判断是否包含"器械"
|
|
// 判断是否包含"器械"
|
|
|
if(cateName !== undefined && cateName.includes('器械')){
|
|
if(cateName !== undefined && cateName.includes('器械')){
|
|
|
this.displayDemo = true;
|
|
this.displayDemo = true;
|
|
|
|
|
+ // 当分类包含"器械"时,默认设置为药品
|
|
|
|
|
+ if (cateName.includes('器械')) {
|
|
|
|
|
+ this.form.isDrug = "1";
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
this.displayDemo = false;
|
|
this.displayDemo = false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 判断是否为II类器械或III类器械,如果是则显示器械编码输入框
|
|
|
|
|
+ if (cateName !== undefined && (cateName.includes('II类器械') || cateName.includes('III类器械'))) {
|
|
|
|
|
+ this.showMedicalDeviceCode = true;
|
|
|
|
|
+ // 只有当商品分类为II类器械时才显示显示器免按钮
|
|
|
|
|
+ this.showExemptDeviceButton = cateName.includes('II类器械');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.showMedicalDeviceCode = false;
|
|
|
|
|
+ this.showExemptDeviceButton = false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 判断是否包含"处方药"
|
|
// 判断是否包含"处方药"
|
|
|
const isPrescriptionDrug = cateName !== undefined && cateName.includes('处方药');
|
|
const isPrescriptionDrug = cateName !== undefined && cateName.includes('处方药');
|
|
|
|
|
|
|
@@ -1313,6 +1408,20 @@ export default {
|
|
|
if (newVal && this.form.storeId && this.isFormInitialized) {
|
|
if (newVal && this.form.storeId && this.isFormInitialized) {
|
|
|
this.debounceCheckStoreLicense();
|
|
this.debounceCheckStoreLicense();
|
|
|
}
|
|
}
|
|
|
|
|
+ // 动态调整批号的验证规则
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (this.isMedicalDeviceCategory) {
|
|
|
|
|
+ // 是器械时,批号为必填
|
|
|
|
|
+ if (!this.rules.batchNumber?.some(rule => rule.required)) {
|
|
|
|
|
+ this.rules.batchNumber = [{ required: true, message: "批号不能为空", trigger: "blur" }, ...(this.rules.batchNumber || [])];
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 非器械时,移除批号必填规则
|
|
|
|
|
+ if (this.rules.batchNumber) {
|
|
|
|
|
+ this.rules.batchNumber = this.rules.batchNumber.filter(rule => !rule.required);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
immediate: true
|
|
immediate: true
|
|
|
},
|
|
},
|
|
@@ -1340,6 +1449,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ certificateValue:false,
|
|
|
|
|
+ licenseValue:false,
|
|
|
|
|
+ businessValue:false,
|
|
|
|
|
+ // 溯源码弹窗相关
|
|
|
|
|
+ titleVisible:'溯源管理:',
|
|
|
|
|
+ verifyDialogVisible: false, // 溯源码弹窗显示状态
|
|
|
|
|
+ currentProductId: null, // 当前选中的商品ID
|
|
|
storeLicenseErrorMessage: '', // 店铺许可证错误信息
|
|
storeLicenseErrorMessage: '', // 店铺许可证错误信息
|
|
|
isFormInitialized: false, // 表单是否已初始化完成
|
|
isFormInitialized: false, // 表单是否已初始化完成
|
|
|
licenseCheckTimer: null, // 防抖定时器
|
|
licenseCheckTimer: null, // 防抖定时器
|
|
@@ -1349,6 +1465,8 @@ export default {
|
|
|
ingredientError: '', // 成分禁止提示
|
|
ingredientError: '', // 成分禁止提示
|
|
|
displayDemo: false,
|
|
displayDemo: false,
|
|
|
cateIdToNameMap: {},
|
|
cateIdToNameMap: {},
|
|
|
|
|
+ showMedicalDeviceCode: false, // 是否显示器械编码输入框
|
|
|
|
|
+ showExemptDeviceButton: false, // 是否显示显示器免按钮
|
|
|
businessArr: [],
|
|
businessArr: [],
|
|
|
licenseArr: [],
|
|
licenseArr: [],
|
|
|
certificateArr: [],
|
|
certificateArr: [],
|
|
@@ -1389,7 +1507,7 @@ export default {
|
|
|
{dictValue: "1", dictLabel: "是"}
|
|
{dictValue: "1", dictLabel: "是"}
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- // 药品展示图
|
|
|
|
|
|
|
+ // 头图展示
|
|
|
drugImageArr: [],
|
|
drugImageArr: [],
|
|
|
|
|
|
|
|
//首营资质上传图
|
|
//首营资质上传图
|
|
@@ -1444,6 +1562,17 @@ export default {
|
|
|
// 企业列表
|
|
// 企业列表
|
|
|
companyOptions: [],
|
|
companyOptions: [],
|
|
|
storeOptions: [],
|
|
storeOptions: [],
|
|
|
|
|
+ // 防抖定时器
|
|
|
|
|
+ categoryOrStoreChangeTimer: null,
|
|
|
|
|
+ // 免于经营备案的第二类医疗器械产品相关变量
|
|
|
|
|
+ exemptDeviceDialogVisible: false,
|
|
|
|
|
+ exemptDeviceList: [],
|
|
|
|
|
+ allExemptDeviceList: [], // 保存所有数据用于本地搜索
|
|
|
|
|
+ exemptDeviceLoading: false,
|
|
|
|
|
+ exemptDeviceTotal: 0,
|
|
|
|
|
+ exemptDeviceQueryParams: {
|
|
|
|
|
+ productName: null
|
|
|
|
|
+ },
|
|
|
// 遮罩层
|
|
// 遮罩层
|
|
|
loading: true,
|
|
loading: true,
|
|
|
// 选中数组
|
|
// 选中数组
|
|
@@ -1510,6 +1639,7 @@ export default {
|
|
|
isCertificatePermanent:null,
|
|
isCertificatePermanent:null,
|
|
|
isLicensePermanent:null,
|
|
isLicensePermanent:null,
|
|
|
isBusinessPermanent:null,
|
|
isBusinessPermanent:null,
|
|
|
|
|
+ medicalDeviceCode: null, // 器械编码
|
|
|
},
|
|
},
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {
|
|
rules: {
|
|
@@ -1547,6 +1677,9 @@ export default {
|
|
|
cateId: [
|
|
cateId: [
|
|
|
{required: true, message: "分类id不能为空", trigger: "blur"}
|
|
{required: true, message: "分类id不能为空", trigger: "blur"}
|
|
|
],
|
|
],
|
|
|
|
|
+ medicalDeviceCode: [
|
|
|
|
|
+ {required: true, message: "器械编码不能为空", trigger: "blur"}
|
|
|
|
|
+ ],
|
|
|
price: [
|
|
price: [
|
|
|
{required: true, message: "商品价格不能为空", trigger: "blur"}
|
|
{required: true, message: "商品价格不能为空", trigger: "blur"}
|
|
|
],
|
|
],
|
|
@@ -1665,12 +1798,34 @@ export default {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // 获取分类名称
|
|
|
|
|
+ const cateName = this.cateIdToNameMap[this.form.cateId];
|
|
|
|
|
+
|
|
|
|
|
+ // 判断是否为II类器械或III类器械
|
|
|
|
|
+ const isMedicalDevice = cateName !== undefined && (cateName.includes('II类器械') || cateName.includes('III类器械'));
|
|
|
|
|
+
|
|
|
|
|
+ // 如果是II类或III类器械,需要检查器械编码是否为空
|
|
|
|
|
+ if (isMedicalDevice && (!this.form.medicalDeviceCode || this.form.medicalDeviceCode.trim() === '')) {
|
|
|
|
|
+ this.$message.error('请选择II类器械或III类器械分类时,器械编码不能为空');
|
|
|
|
|
+ this.storeLicenseCheckFailed = true;
|
|
|
|
|
+ this.storeLicenseErrorMessage = '请选择II类器械或III类器械分类时,器械编码不能为空';
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
// 添加检查中标志,防止重复调用
|
|
// 添加检查中标志,防止重复调用
|
|
|
if (this.isCheckingLicense) {
|
|
if (this.isCheckingLicense) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this.isCheckingLicense = true;
|
|
this.isCheckingLicense = true;
|
|
|
- checkStoreLicense(this.form.storeId, this.form.cateId).then(response => {
|
|
|
|
|
|
|
+ // 准备请求参数
|
|
|
|
|
+ let cateId = this.form.cateId;
|
|
|
|
|
+ let medicalDeviceCode = null;
|
|
|
|
|
+ let productType = null;
|
|
|
|
|
+ // 如果是II类或III类器械,传递器械编码
|
|
|
|
|
+ if (isMedicalDevice) {
|
|
|
|
|
+ medicalDeviceCode = this.form.medicalDeviceCode;
|
|
|
|
|
+ productType = this.form.productType; // 添加商品类型参数
|
|
|
|
|
+ }
|
|
|
|
|
+ checkStoreLicense(this.form.storeId, cateId, medicalDeviceCode, productType).then(response => {
|
|
|
if (response.code === 200) {
|
|
if (response.code === 200) {
|
|
|
if (!response.data.flag) {
|
|
if (!response.data.flag) {
|
|
|
// 权限检查失败
|
|
// 权限检查失败
|
|
@@ -1747,22 +1902,90 @@ export default {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ // 当商品分类或所属店铺改变时触发
|
|
|
|
|
+ onCategoryOrStoreChange() {
|
|
|
|
|
+ // 使用防抖机制,避免频繁调用
|
|
|
|
|
+ clearTimeout(this.categoryOrStoreChangeTimer);
|
|
|
|
|
+ this.categoryOrStoreChangeTimer = setTimeout(() => {
|
|
|
|
|
+ this.checkStoreLicensePermission();
|
|
|
|
|
+ }, 500);
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ // 显示免于经营备案的第二类医疗器械产品弹窗
|
|
|
|
|
+ showExemptDeviceDialog() {
|
|
|
|
|
+ this.exemptDeviceDialogVisible = true;
|
|
|
|
|
+ // 重置搜索条件
|
|
|
|
|
+ this.exemptDeviceQueryParams = {
|
|
|
|
|
+ productName: null
|
|
|
|
|
+ };
|
|
|
|
|
+ // 只有在没有数据时才获取数据
|
|
|
|
|
+ if (this.allExemptDeviceList.length === 0) {
|
|
|
|
|
+ this.getExemptDeviceList();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 如果已有数据,直接显示
|
|
|
|
|
+ this.exemptDeviceList = this.allExemptDeviceList;
|
|
|
|
|
+ this.exemptDeviceTotal = this.exemptDeviceList.length;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取免于经营备案的第二类医疗器械产品列表
|
|
|
|
|
+ getExemptDeviceList() {
|
|
|
|
|
+ this.exemptDeviceLoading = true;
|
|
|
|
|
+ // 调用实际的API接口来获取数据
|
|
|
|
|
+ getExemptSecondMedicalDeviceList(this.exemptDeviceQueryParams).then(response => {
|
|
|
|
|
+ this.allExemptDeviceList = response.rows || response.data || [];
|
|
|
|
|
+ // 根据搜索条件过滤数据
|
|
|
|
|
+ if (this.exemptDeviceQueryParams.productName) {
|
|
|
|
|
+ const searchTerm = this.exemptDeviceQueryParams.productName.toLowerCase();
|
|
|
|
|
+ this.exemptDeviceList = this.allExemptDeviceList.filter(item =>
|
|
|
|
|
+ item.productName && item.productName.toLowerCase().includes(searchTerm)
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.exemptDeviceList = this.allExemptDeviceList;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.exemptDeviceTotal = this.exemptDeviceList.length;
|
|
|
|
|
+ this.exemptDeviceLoading = false;
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ console.error('获取免于经营备案的第二类医疗器械产品列表失败:', error);
|
|
|
|
|
+ this.$message.error('获取免于经营备案的第二类医疗器械产品列表失败');
|
|
|
|
|
+ this.exemptDeviceLoading = false;
|
|
|
|
|
+ this.exemptDeviceList = [];
|
|
|
|
|
+ this.allExemptDeviceList = [];
|
|
|
|
|
+ this.exemptDeviceTotal = 0;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ // 搜索免于经营备案的第二类医疗器械产品
|
|
|
|
|
+ handleExemptDeviceQuery() {
|
|
|
|
|
+ // 在本地数据中搜索
|
|
|
|
|
+ if (this.exemptDeviceQueryParams.productName) {
|
|
|
|
|
+ const searchTerm = this.exemptDeviceQueryParams.productName.toLowerCase();
|
|
|
|
|
+ this.exemptDeviceList = this.allExemptDeviceList.filter(item =>
|
|
|
|
|
+ item.productName && item.productName.toLowerCase().includes(searchTerm)
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.exemptDeviceList = this.allExemptDeviceList;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.exemptDeviceTotal = this.exemptDeviceList.length;
|
|
|
|
|
+ },
|
|
|
|
|
+ // 重置免于经营备案的第二类医疗器械产品搜索
|
|
|
|
|
+ resetExemptDeviceQuery() {
|
|
|
|
|
+ this.exemptDeviceQueryParams = {
|
|
|
|
|
+ productName: null
|
|
|
|
|
+ };
|
|
|
|
|
+ // 重置时显示所有数据
|
|
|
|
|
+ this.exemptDeviceList = this.allExemptDeviceList;
|
|
|
|
|
+ this.exemptDeviceTotal = this.exemptDeviceList.length;
|
|
|
|
|
+ },
|
|
|
handleNoticeInfo() {
|
|
handleNoticeInfo() {
|
|
|
qualifications()
|
|
qualifications()
|
|
|
.then(response => {
|
|
.then(response => {
|
|
|
- console.log("noticeInfo接口完整响应:", response);
|
|
|
|
|
if (response.code === 200) {
|
|
if (response.code === 200) {
|
|
|
this.promptList = response.data;
|
|
this.promptList = response.data;
|
|
|
if (this.promptList && this.promptList.length > 0) {
|
|
if (this.promptList && this.promptList.length > 0) {
|
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
|
}
|
|
}
|
|
|
- console.log("通知信息请求完成!", this.promptList);
|
|
|
|
|
- } else {
|
|
|
|
|
- console.warn("接口返回非成功状态:", response.code);
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
- console.error("获取通知信息失败:", err);
|
|
|
|
|
this.$message.error("加载通知信息失败,请稍后重试");
|
|
this.$message.error("加载通知信息失败,请稍后重试");
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -1827,7 +2050,7 @@ export default {
|
|
|
this.upload.open = false;
|
|
this.upload.open = false;
|
|
|
this.upload.isUploading = false;
|
|
this.upload.isUploading = false;
|
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
|
- this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
|
|
|
|
|
|
|
+ this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
handleImport() {
|
|
handleImport() {
|
|
@@ -1850,7 +2073,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
//生成SKU
|
|
//生成SKU
|
|
|
generate() {
|
|
generate() {
|
|
|
- genFormatAttr(this.form.productId, {attrs: this.attrs}).then(res => {
|
|
|
|
|
|
|
+ genFormatAttr(this.form.productId, { attrs: this.attrs }).then(res => {
|
|
|
if (this.form.specType === 0) {
|
|
if (this.form.specType === 0) {
|
|
|
this.oneFormValidate = res.value;
|
|
this.oneFormValidate = res.value;
|
|
|
this.form.header = res.header;
|
|
this.form.header = res.header;
|
|
@@ -1912,7 +2135,7 @@ export default {
|
|
|
};
|
|
};
|
|
|
this.attrs.push(data);
|
|
this.attrs.push(data);
|
|
|
var hash = {};
|
|
var hash = {};
|
|
|
- this.attrs = this.attrs.reduce(function (item, next) {
|
|
|
|
|
|
|
+ this.attrs = this.attrs.reduce(function(item, next) {
|
|
|
hash[next.value] ? '' : hash[next.value] = true && item.push(next);
|
|
hash[next.value] ? '' : hash[next.value] = true && item.push(next);
|
|
|
return item
|
|
return item
|
|
|
}, [])
|
|
}, [])
|
|
@@ -1928,7 +2151,7 @@ export default {
|
|
|
if (num) {
|
|
if (num) {
|
|
|
this.attrs[idx].detail.push(num);
|
|
this.attrs[idx].detail.push(num);
|
|
|
var hash = {};
|
|
var hash = {};
|
|
|
- this.attrs[idx].detail = this.attrs[idx].detail.reduce(function (item, next) {
|
|
|
|
|
|
|
+ this.attrs[idx].detail = this.attrs[idx].detail.reduce(function(item, next) {
|
|
|
hash[next] ? '' : hash[next] = true && item.push(next);
|
|
hash[next] ? '' : hash[next] = true && item.push(next);
|
|
|
return item
|
|
return item
|
|
|
}, [])
|
|
}, [])
|
|
@@ -1945,7 +2168,7 @@ export default {
|
|
|
type: 'error'
|
|
type: 'error'
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- that.ruleList.forEach(function (item, index) {
|
|
|
|
|
|
|
+ that.ruleList.forEach(function(item, index) {
|
|
|
if (item.ruleName === that.form.selectRule) {
|
|
if (item.ruleName === that.form.selectRule) {
|
|
|
that.attrs = JSON.parse(item.ruleValue);
|
|
that.attrs = JSON.parse(item.ruleValue);
|
|
|
|
|
|
|
@@ -2059,7 +2282,7 @@ export default {
|
|
|
qualificationExpire: null,
|
|
qualificationExpire: null,
|
|
|
// companyIds:[],
|
|
// companyIds:[],
|
|
|
isDrug: "1", // 是否药品
|
|
isDrug: "1", // 是否药品
|
|
|
- drugImage: null, // 药品展示图
|
|
|
|
|
|
|
+ drugImage: null, // 头图展示
|
|
|
drugRegCertNo: null, // 药品注册证书编号
|
|
drugRegCertNo: null, // 药品注册证书编号
|
|
|
commonName: null, // 通用名称
|
|
commonName: null, // 通用名称
|
|
|
dosageForm: null, // 剂型
|
|
dosageForm: null, // 剂型
|
|
@@ -2215,12 +2438,34 @@ export default {
|
|
|
this.qualificationArr = this.form.qualificationCertificate.split(",");
|
|
this.qualificationArr = this.form.qualificationCertificate.split(",");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (this.form.isBusinessPermanent == 1) {
|
|
|
|
|
+ this.businessValue = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.businessValue = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (this.form.isLicensePermanent == 1) {
|
|
|
|
|
+ this.licenseValue = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.licenseValue = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (this.form.isCertificatePermanent == 1) {
|
|
|
|
|
+ this.certificateValue = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.certificateValue = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const expireFieldMap = [
|
|
const expireFieldMap = [
|
|
|
{ expireKey: 'businessExpire', startKey: 'businessStart', endKey: 'businessEnd' },
|
|
{ expireKey: 'businessExpire', startKey: 'businessStart', endKey: 'businessEnd' },
|
|
|
{ expireKey: 'licenseExpire', startKey: 'licenseStart', endKey: 'licenseEnd' },
|
|
{ expireKey: 'licenseExpire', startKey: 'licenseStart', endKey: 'licenseEnd' },
|
|
|
{ expireKey: 'certificateExpire', startKey: 'certificateStart', endKey: 'certificateEnd' },
|
|
{ expireKey: 'certificateExpire', startKey: 'certificateStart', endKey: 'certificateEnd' },
|
|
|
{ expireKey: 'voucherExpire', startKey: 'voucherStart', endKey: 'voucherEnd' },
|
|
{ expireKey: 'voucherExpire', startKey: 'voucherStart', endKey: 'voucherEnd' },
|
|
|
- { expireKey: 'qualificationExpire', startKey: 'qualificationCertificateStart', endKey: 'qualificationCertificateEnd' }
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ expireKey: 'qualificationExpire',
|
|
|
|
|
+ startKey: 'qualificationCertificateStart',
|
|
|
|
|
+ endKey: 'qualificationCertificateEnd'
|
|
|
|
|
+ }
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
expireFieldMap.forEach(item => {
|
|
expireFieldMap.forEach(item => {
|
|
@@ -2234,8 +2479,8 @@ export default {
|
|
|
//组装attrs数据
|
|
//组装attrs数据
|
|
|
if (response.attrs != null) {
|
|
if (response.attrs != null) {
|
|
|
this.attrs = [];
|
|
this.attrs = [];
|
|
|
- response.attrs.forEach(function (item, index) {
|
|
|
|
|
- var data = {value: item.attrName, detail: item.attrValues.split(',')}
|
|
|
|
|
|
|
+ response.attrs.forEach(function(item, index) {
|
|
|
|
|
+ var data = { value: item.attrName, detail: item.attrValues.split(',') }
|
|
|
that.attrs.push(data);
|
|
that.attrs.push(data);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -2351,10 +2596,24 @@ export default {
|
|
|
this.form.qualificationCertificateEnd = this.form.qualificationExpire[1];
|
|
this.form.qualificationCertificateEnd = this.form.qualificationExpire[1];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 删除长期有效标识,所有证书都需要填写有效期
|
|
|
|
|
- this.form.isBusinessPermanent = 0;
|
|
|
|
|
- this.form.isLicensePermanent = 0;
|
|
|
|
|
- this.form.isCertificatePermanent = 0;
|
|
|
|
|
|
|
+ //无语,有的时候要删除,删除了又要加回来。
|
|
|
|
|
+ if (!!this.businessValue) {
|
|
|
|
|
+ this.form.isBusinessPermanent = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.isBusinessPermanent = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!!this.licenseValue) {
|
|
|
|
|
+ this.form.isLicensePermanent = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.isLicensePermanent = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!!this.certificateValue) {
|
|
|
|
|
+ this.form.isCertificatePermanent = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.isCertificatePermanent = 0;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// // 组装companyIds
|
|
// // 组装companyIds
|
|
|
// if (this.form.companyIds != null && this.form.companyIds != undefined) {
|
|
// if (this.form.companyIds != null && this.form.companyIds != undefined) {
|
|
@@ -2377,12 +2636,12 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
- }).then(function () {
|
|
|
|
|
|
|
+ }).then(function() {
|
|
|
return delStoreProduct(productIds);
|
|
return delStoreProduct(productIds);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
@@ -2392,14 +2651,14 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
- }).then(function () {
|
|
|
|
|
|
|
+ }).then(function() {
|
|
|
return exportStoreProduct(queryParams);
|
|
return exportStoreProduct(queryParams);
|
|
|
}).then(response => {
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|
|
this.download(response.msg);
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleDrugExport(row){
|
|
|
|
|
|
|
+ handleDrugExport(row) {
|
|
|
const productId = row.productId
|
|
const productId = row.productId
|
|
|
this.exportLoading = true;
|
|
this.exportLoading = true;
|
|
|
exportDrugProduct({ productId: productId }).then(response => {
|
|
exportDrugProduct({ productId: productId }).then(response => {
|
|
@@ -2416,12 +2675,12 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
- }).then(function () {
|
|
|
|
|
|
|
+ }).then(function() {
|
|
|
return sync580(productIds);
|
|
return sync580(productIds);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.msgSuccess("同步成功");
|
|
this.msgSuccess("同步成功");
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/** 批量下架按钮操作 */
|
|
/** 批量下架按钮操作 */
|
|
@@ -2436,19 +2695,19 @@ export default {
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.msgSuccess("下架成功");
|
|
this.msgSuccess("下架成功");
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleReviewAudit(){
|
|
|
|
|
- console.log("aaaaaaaaaaaaaaa->",this.form.reviewAudit);
|
|
|
|
|
|
|
+ handleReviewAudit() {
|
|
|
|
|
+ console.log("aaaaaaaaaaaaaaa->", this.form.reviewAudit);
|
|
|
},
|
|
},
|
|
|
- switchChange(){
|
|
|
|
|
|
|
+ switchChange() {
|
|
|
console.log(this.form.isBusinessLicensePermanent);
|
|
console.log(this.form.isBusinessLicensePermanent);
|
|
|
},
|
|
},
|
|
|
- showOperLog(row){
|
|
|
|
|
|
|
+ showOperLog(row) {
|
|
|
getAuthInfo(row.productId).then(response => {
|
|
getAuthInfo(row.productId).then(response => {
|
|
|
this.auditLogs = response.auditLog;
|
|
this.auditLogs = response.auditLog;
|
|
|
- this.titleValue ="商品:" +"《" +row.productName+"》"+ "审核记录";
|
|
|
|
|
|
|
+ this.titleValue = "商品:" + "《" + row.productName + "》" + "审核记录";
|
|
|
this.authVisible = true;
|
|
this.authVisible = true;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -2457,19 +2716,20 @@ export default {
|
|
|
.then(_ => {
|
|
.then(_ => {
|
|
|
done();
|
|
done();
|
|
|
})
|
|
})
|
|
|
- .catch(_ => {});
|
|
|
|
|
|
|
+ .catch(_ => {
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 复制商品
|
|
* 复制商品
|
|
|
* **/
|
|
* **/
|
|
|
- productCopy(row){
|
|
|
|
|
- this.$confirm('确认是否复制当前《'+row.productName+'》商品!', '复制商品', {
|
|
|
|
|
|
|
+ productCopy(row) {
|
|
|
|
|
+ this.$confirm('确认是否复制当前《' + row.productName + '》商品!', '复制商品', {
|
|
|
confirmButtonText: '确 认',
|
|
confirmButtonText: '确 认',
|
|
|
cancelButtonText: '取 消',
|
|
cancelButtonText: '取 消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
copyProduct(row).then(response => {
|
|
copyProduct(row).then(response => {
|
|
|
- if(response.code === 200){
|
|
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
this.$message.success("操作成功!")
|
|
this.$message.success("操作成功!")
|
|
|
this.getList();
|
|
this.getList();
|
|
|
}
|
|
}
|
|
@@ -2577,6 +2837,56 @@ export default {
|
|
|
{ required: true, message: "注意事项不能为空", trigger: "blur" }
|
|
{ required: true, message: "注意事项不能为空", trigger: "blur" }
|
|
|
]);
|
|
]);
|
|
|
},
|
|
},
|
|
|
|
|
+ // 组件销毁前清理定时器
|
|
|
|
|
+ beforeDestroy() {
|
|
|
|
|
+ if (this.categoryOrStoreChangeTimer) {
|
|
|
|
|
+ clearTimeout(this.categoryOrStoreChangeTimer);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ //打开溯源码页面
|
|
|
|
|
+ openVerify(row) {
|
|
|
|
|
+ if (row) {
|
|
|
|
|
+ this.currentProductId = row.productId;
|
|
|
|
|
+ } else if (this.ids.length > 0) {
|
|
|
|
|
+ this.currentProductId = this.ids[0];
|
|
|
|
|
+ if (this.ids.length > 1) {
|
|
|
|
|
+ this.$message.warning('溯源码管理仅支持单个商品操作,已默认选择第一个商品');
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message.error('请先选择需要管理溯源码的商品');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.titleVisible = this.titleVisible + '《' + row.productName + '》';
|
|
|
|
|
+ this.verifyDialogVisible = true;
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 关闭溯源码弹窗
|
|
|
|
|
+ */
|
|
|
|
|
+ handleVerifyDialogClose() {
|
|
|
|
|
+ if (this.$refs.verifyCodeRef) {
|
|
|
|
|
+ this.$refs.verifyCodeRef.fullReset();
|
|
|
|
|
+ }
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.currentProductId = null;
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ this.verifyDialogVisible = false;
|
|
|
|
|
+ this.titleVisible = "溯源管理";
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped>
|
|
|
|
|
+.exempt-device-dialog {
|
|
|
|
|
+ z-index: 9999 !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.exempt-device-dialog .el-dialog {
|
|
|
|
|
+ z-index: 9999 !important;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.exempt-device-dialog .el-dialog__wrapper {
|
|
|
|
|
+ z-index: 9999 !important;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|