|
|
|
@ -0,0 +1,470 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card>
|
|
|
|
|
|
|
|
|
|
<el-form :inline="true" :model="query" class="query-form" size="mini">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7" class="el-col">
|
|
|
|
|
|
|
|
|
|
<el-form-item label="机构编码:" >
|
|
|
|
|
<el-input class="query-form-item" v-model="filterQuery.organizationCode" clearable placeholder="机构编码"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="7" class="el-col">
|
|
|
|
|
<el-form-item label="国家医保目录编码:" >
|
|
|
|
|
<el-input class="query-form-item" v-model="filterQuery.ybbm" clearable placeholder="国家医保目录编码"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col :span="7" class="el-col">
|
|
|
|
|
|
|
|
|
|
<el-form-item label="无码类型:" prop="type">
|
|
|
|
|
<el-select class="query-form-item" v-model="filterQuery.notCodeType" placeholder="无码类型" >
|
|
|
|
|
<el-option label="全部" :value="-1"></el-option>
|
|
|
|
|
|
|
|
|
|
<el-option label="部分早期未赋予追溯码" :value="1"></el-option>
|
|
|
|
|
<el-option label="最小包装无追溯码" :value="5"></el-option>
|
|
|
|
|
<el-option label="无追溯码" :value="6"></el-option>
|
|
|
|
|
<el-option label="其他原因" :value="7"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<div class="top-right-btn" style="display: flex; align-items: center;">
|
|
|
|
|
<el-button-group>
|
|
|
|
|
<!-- <el-button icon="el-icon-view" type="primary" @click="hideSearch">高级查询</el-button>-->
|
|
|
|
|
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="addYbNotCode">新增</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-download" @click="downloadExcelAll">导出全部</el-button>
|
|
|
|
|
<el-button type="primary" icon="el-icon-download" @click="downloadExcelSelect">导出查询结果</el-button>
|
|
|
|
|
|
|
|
|
|
<!--<el-button type="primary" icon="el-icon-plus" @click="chooseDrug">选入药品信息</el-button>-->
|
|
|
|
|
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column label="机构编码" prop="organizationCode" width="400"></el-table-column>
|
|
|
|
|
<el-table-column label="国家医保目录编码" prop="ybbm" width="400"></el-table-column>
|
|
|
|
|
<!--<el-table-column label="收费项目编码" prop="payFeeCode" width="100"></el-table-column>-->
|
|
|
|
|
<el-table-column label="无码类型" prop="notCodeTypeName" width="300"></el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" fixed="right" width="400">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="editYbNotCode(scope.row)"
|
|
|
|
|
>编辑
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="deleteYbNotCode(scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
:total="total"
|
|
|
|
|
:limit.sync="filterQuery.limit"
|
|
|
|
|
:page.sync="filterQuery.page"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
>
|
|
|
|
|
</pagination>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
:title="fromMap[fromName]"
|
|
|
|
|
:visible.sync="addYbNotCodeVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="85%"
|
|
|
|
|
v-if="addYbNotCodeVisible"
|
|
|
|
|
@close="closeDialog"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="formData" ref="dataForm" :rules="formRules" >
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="机构编码:" prop="organizationCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.organizationCode"
|
|
|
|
|
style="width: 80%"
|
|
|
|
|
clearable
|
|
|
|
|
size="small"
|
|
|
|
|
:disabled="this.type==2"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" class="el-col">
|
|
|
|
|
<el-form-item label="国家医保目录编码:" prop="ybbm">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.ybbm"
|
|
|
|
|
style="width: 80%"
|
|
|
|
|
clearable
|
|
|
|
|
size="small"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24" class="el-col">
|
|
|
|
|
<el-form-item label="无码类型:" prop="notCodeType">
|
|
|
|
|
<el-select v-model="formData.notCodeType" style="width: 80%" placeholder="选择无码类型"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option label="部分早期未赋予追溯码" :value="1"></el-option>
|
|
|
|
|
<el-option label="最小包装无追溯码" :value="5"></el-option>
|
|
|
|
|
<el-option label="无追溯码" :value="6"></el-option>
|
|
|
|
|
<el-option label="其他原因" :value="7"></el-option>
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" size="small" @click.native="saveNewYbNotCode()"
|
|
|
|
|
>提交
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button @click.native="closeDialog" size="small">取消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="选入-药品信息"
|
|
|
|
|
:visible.sync="chooseYbNotCodeVisible"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="70%"
|
|
|
|
|
v-if="chooseYbNotCodeVisible"
|
|
|
|
|
>
|
|
|
|
|
<chooseDrug
|
|
|
|
|
>
|
|
|
|
|
</chooseDrug>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
ybNotCodePage,
|
|
|
|
|
ybNotCodeAdd,
|
|
|
|
|
ybNotCodeDelete,
|
|
|
|
|
ybNotCodeUpdate,
|
|
|
|
|
ybNotCodeExport,
|
|
|
|
|
getOrganizationCode
|
|
|
|
|
|
|
|
|
|
} from '@/api/basic/ybNotCode'
|
|
|
|
|
|
|
|
|
|
import { getAdminId, getToken } from '@/utils/auth'
|
|
|
|
|
import { executeFuc, getHead } from '@/utils/customConfig'
|
|
|
|
|
import Treeselect from '@riophae/vue-treeselect'
|
|
|
|
|
import { addDrug, updatetDrug } from '@/api/basic/product/drugUdiinfos'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: { Treeselect },
|
|
|
|
|
name: 'drugMaintain',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
//界面配置
|
|
|
|
|
tableHeader: [],
|
|
|
|
|
queryList: [],
|
|
|
|
|
fromList: [],
|
|
|
|
|
|
|
|
|
|
showSearch: false,
|
|
|
|
|
filterBadInv: true,
|
|
|
|
|
query: {},
|
|
|
|
|
list: [],
|
|
|
|
|
mainIds: [],
|
|
|
|
|
filterQuery: {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
formData:{
|
|
|
|
|
ybbm:null,
|
|
|
|
|
organizationCode:null,
|
|
|
|
|
|
|
|
|
|
notCodeType:1,
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
formRules: {
|
|
|
|
|
ybbm: [
|
|
|
|
|
{ required: true, message: '请输入国家医保目录编码', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
organizationCode: [
|
|
|
|
|
{ required: true, message: '请输入机构编码', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
notCodeType: [
|
|
|
|
|
{ required: true, message: '请输入无码类型', trigger: 'blur' }
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
addYbNotCodeVisible: false,
|
|
|
|
|
chooseYbNotCodeVisible: false,
|
|
|
|
|
statusMap: {
|
|
|
|
|
0: '停用',
|
|
|
|
|
1: '在用'
|
|
|
|
|
},
|
|
|
|
|
fromName: '',
|
|
|
|
|
rowData: {},
|
|
|
|
|
//1:新增;2:编辑
|
|
|
|
|
type: null,
|
|
|
|
|
fromMap: {
|
|
|
|
|
'add': '新增-医保无码信息',
|
|
|
|
|
'edit': '编辑-医保无码信息'
|
|
|
|
|
},
|
|
|
|
|
loading: false,
|
|
|
|
|
chooseHouseDrugVisible: false,
|
|
|
|
|
uuid: '111',
|
|
|
|
|
relId: '',
|
|
|
|
|
isImport: false,
|
|
|
|
|
pId: 0,
|
|
|
|
|
thisData: {
|
|
|
|
|
nameCode: null,
|
|
|
|
|
cpmctymc: null,
|
|
|
|
|
ggxh: null
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
headers: {
|
|
|
|
|
ADMINID: getAdminId(),
|
|
|
|
|
ADMINTOKEN: getToken()
|
|
|
|
|
},
|
|
|
|
|
extraData: { 'uuid': 'upload-txt' },
|
|
|
|
|
uploadLoading: false,
|
|
|
|
|
action: process.env.VUE_APP_BASE_API + '/udiwms/aliDrug/txtUpload',
|
|
|
|
|
fileList: [],
|
|
|
|
|
thrYbData:{}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
executeFuc(row, type, clickFuc, value) {
|
|
|
|
|
return executeFuc(this, row, type, clickFuc, value)
|
|
|
|
|
},
|
|
|
|
|
executeEval(row, expression, defaultRet) {
|
|
|
|
|
if (expression) {
|
|
|
|
|
return eval(expression)
|
|
|
|
|
}
|
|
|
|
|
return defaultRet
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: ''
|
|
|
|
|
})
|
|
|
|
|
this.filterQuery = {
|
|
|
|
|
productsType: 2,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20,
|
|
|
|
|
addType: 1,
|
|
|
|
|
keyWords: ''
|
|
|
|
|
}
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onSubmit() {
|
|
|
|
|
this.filterQuery.page = 1
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
addYbNotCode() {
|
|
|
|
|
this.fromName = 'add'
|
|
|
|
|
this.type = 1
|
|
|
|
|
this.formData = {
|
|
|
|
|
organizationCode:this.thrYbData
|
|
|
|
|
}
|
|
|
|
|
this.addYbNotCodeVisible = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getList() {
|
|
|
|
|
ybNotCodePage(this.filterQuery)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.list = response.data.list || []
|
|
|
|
|
this.total = response.data.total || 0
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.list = []
|
|
|
|
|
this.total = 0
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
deleteYbNotCode(row) {
|
|
|
|
|
this.$confirm('此操作将永久删除该无码信息, 是否继续?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
let tquery = {
|
|
|
|
|
id: row.id + ''
|
|
|
|
|
}
|
|
|
|
|
ybNotCodeDelete(row).then(res => {
|
|
|
|
|
if (res.code != 20000) {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
this.getList()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.success('删除成功!')
|
|
|
|
|
this.getList()
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message.error('删除错误')
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
editYbNotCode(row) {
|
|
|
|
|
this.fromName = 'edit'
|
|
|
|
|
this.type = '2'
|
|
|
|
|
|
|
|
|
|
this.formData = {
|
|
|
|
|
ybbm: row.ybbm,
|
|
|
|
|
organizationCode: row.organizationCode,
|
|
|
|
|
notCodeType: row.notCodeType,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.addYbNotCodeVisible = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
saveNewYbNotCode() {
|
|
|
|
|
|
|
|
|
|
//新增
|
|
|
|
|
if (this.type == 1) {
|
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
|
|
ybNotCodeAdd(this.formData).then((res) => {
|
|
|
|
|
this.chooseYbNotCodeVisible = false
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success('添加成功')
|
|
|
|
|
//清空弹窗数据
|
|
|
|
|
this.closeDialog()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('医保编码不能重复')
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.chooseYbNotCodeVisible = false
|
|
|
|
|
|
|
|
|
|
this.$message.error(error.message)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
|
ybNotCodeUpdate(this.formData).then((res) => {
|
|
|
|
|
this.chooseYbNotCodeVisible = false
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success('编辑成功')
|
|
|
|
|
//清空弹窗数据
|
|
|
|
|
this.closeDialog()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.chooseYbNotCodeVisible = false
|
|
|
|
|
this.$message.error(error.message)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
closeDialog() {
|
|
|
|
|
this.addYbNotCodeVisible = false
|
|
|
|
|
this.chooseHouseDrugVisible = false
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
downloadExcelAll(){
|
|
|
|
|
this.filterQuery.excelType =2
|
|
|
|
|
this.downloadExcel();
|
|
|
|
|
},
|
|
|
|
|
downloadExcelSelect(){
|
|
|
|
|
this.filterQuery.excelType =1
|
|
|
|
|
|
|
|
|
|
this.downloadExcel();
|
|
|
|
|
},
|
|
|
|
|
downloadExcel( ) {
|
|
|
|
|
ybNotCodeExport(this.filterQuery).then((res) => {
|
|
|
|
|
const currentDate = new Date().toISOString().slice(0, 10).replace(/-/g, ''); // 获取当前日期并格式化为YYYYMMDD
|
|
|
|
|
const filename = `医保无码信息库_${currentDate}.xlsx`;
|
|
|
|
|
|
|
|
|
|
let blob = new Blob([res], {type: "application/vnd.ms-excel"});
|
|
|
|
|
let url = window.URL.createObjectURL(blob); // 创建一个临时的url指向blob对象
|
|
|
|
|
let a = document.createElement("a");
|
|
|
|
|
a.download = filename;
|
|
|
|
|
a.href = url;
|
|
|
|
|
a.click();
|
|
|
|
|
this.$message.success("导出文件成功!")
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.$message.error(error.message)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
|
statusFilterType(status) {
|
|
|
|
|
const statusMap = {
|
|
|
|
|
0: 'info',
|
|
|
|
|
1: 'success'
|
|
|
|
|
}
|
|
|
|
|
return statusMap[status]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
|
|
this.getList()
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
|
|
getOrganizationCode().then((res) => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.thrYbData = res.data
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.top-right-btn {
|
|
|
|
|
display: flex; /* 使用Flexbox布局 */
|
|
|
|
|
align-items: center; /* 垂直居中 */
|
|
|
|
|
flex-wrap: nowrap; /* 防止换行 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-button-group {
|
|
|
|
|
display: flex; /* 确保按钮组内的元素也使用Flexbox布局 */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-upload {
|
|
|
|
|
display: inline-flex; /* 确保上传组件与其他按钮在同一行 */
|
|
|
|
|
}
|
|
|
|
|
.query-form-item {
|
|
|
|
|
width: 300px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|