1.1
parent
22c9ba4dd1
commit
ea5deddfd2
@ -0,0 +1,53 @@
|
||||
import axios from "@/utils/request";
|
||||
import request from "@/utils/request";
|
||||
// import {BUSINESS_PRE, SYS_PRE} from "@/config/app";
|
||||
|
||||
|
||||
export function listPage(query) {
|
||||
return axios({
|
||||
url: "/udiwms/sysWorkplace/page",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function addWorkplace(query) {
|
||||
return axios({
|
||||
url: "/udiwms/sysWorkplace/addWorkplace",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function updateWorkplace(query) {
|
||||
return axios({
|
||||
url: "/udiwms/sysWorkplace/updateWorkplace",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function deleteWorkplace(query) {
|
||||
return axios({
|
||||
url: "/udiwms/sysWorkplace/deleteWorkplace",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function createWorkplaceId(query) {
|
||||
return axios({
|
||||
url: "/udiwms/sysWorkplace/createWorkplaceId",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form :model="filterQuery" v-show="showSearch" label-width="auto">
|
||||
<!--<el-row :gutter="20">-->
|
||||
<!-- <el-col :span="24">-->
|
||||
<!-- <el-form-item label="UDI码:" class="query-form-item">-->
|
||||
<!-- <el-input v-model="query.udiCode"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- style="width: 97.5%"-->
|
||||
<!-- placeholder="请扫描医疗器械包装内的UDI条码"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="keyup_submit($event)"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!--</el-row>-->
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="药品编码:" class="query-form-item">
|
||||
<el-input v-model="filterQuery.nameCode"
|
||||
placeholder="请输入药品编码"
|
||||
clearable
|
||||
@keyup.enter.native="keyup_submit($event)"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="药品通用名:" class="query-form-item">
|
||||
<el-input
|
||||
clearable
|
||||
v-model="filterQuery.cpmctymc"
|
||||
placeholder="请输入药品通用名"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="医保编码:" class="query-form-item">
|
||||
<el-input
|
||||
clearable
|
||||
v-model="filterQuery.ybbm"
|
||||
placeholder="请输入医保编码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批准文号:" class="query-form-item">
|
||||
<el-input
|
||||
clearable
|
||||
v-model="filterQuery.zczbhhzbapzbh"
|
||||
placeholder="请输入批准文号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <el-form-item label="医疗器械注册人:" class="query-form-item">-->
|
||||
<!-- <el-input-->
|
||||
<!-- clearable-->
|
||||
<!-- v-model="filterQuery.ylqxzcrbarmc"-->
|
||||
<!-- placeholder="请输入医疗器械注册人"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="生产企业:" class="query-form-item">
|
||||
<el-input
|
||||
clearable
|
||||
v-model="filterQuery.manufactory"
|
||||
placeholder="请输入生产企业"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="药品描述:" class="query-form-item">
|
||||
<el-input
|
||||
clearable
|
||||
v-model="filterQuery.cpms"
|
||||
placeholder="请输入药品描述"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--<el-col :span="8">-->
|
||||
<!-- <el-form-item label="是否禁用:" class="query-form-item">-->
|
||||
<!-- <el-select v-model="filterQuery.isDisable" clearable>-->
|
||||
<!-- <el-option label="是" :value=true></el-option>-->
|
||||
<!-- <el-option label="否" :value=false></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
</el-row>
|
||||
<el-divider/>
|
||||
</el-form>
|
||||
<div class="top-right-btn">
|
||||
<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-plus" @click="addDrug">新增药品信息</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
|
||||
>
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="药品编码" prop="nameCode" width="90"></el-table-column>
|
||||
<el-table-column label="药品通用名称" prop="cpmctymc" width="100"></el-table-column>
|
||||
<el-table-column label="包装规格" prop="bzgg" width="90"></el-table-column>
|
||||
<!--<el-table-column label="规格型号" prop="ggxh" width="90"></el-table-column>-->
|
||||
<el-table-column label="包装单位" prop="prepnUnit" width="90"></el-table-column>
|
||||
<el-table-column label="制剂规格" prop="prepnSpec" width="90"></el-table-column>
|
||||
<el-table-column label="制剂单位" prop="prepnUnit" width="90"></el-table-column>
|
||||
<el-table-column label="批准文号" prop="zczbhhzbapzbh" width="90"></el-table-column>
|
||||
<el-table-column label="生产企业" prop="manufactory" width="90"></el-table-column>
|
||||
<el-table-column label="收费项目编码" prop="remake" width="100"></el-table-column>
|
||||
<el-table-column label="医保编码" prop="ybbm" width="90"></el-table-column>
|
||||
<el-table-column label="药品状态" prop="majorStatus" width="90">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="(scope.row.majorStatus) | statusFilterType">
|
||||
{{ statusMap[scope.row.majorStatus] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="edit(scope.row)"
|
||||
>对照
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="edit(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="editDrug(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDrug(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog
|
||||
title="新增-药品信息"
|
||||
:title="fromMap[fromName]"
|
||||
:visible.sync="addDrugVisible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="85%"
|
||||
v-if="addDrugVisible"
|
||||
>
|
||||
<drugAdd
|
||||
:rowData="rowData"
|
||||
>
|
||||
</drugAdd>
|
||||
</el-dialog>
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getUdiInfos,
|
||||
deletetUdiInfos,
|
||||
updatetUdiInfos,
|
||||
updatetSingleUdiInfo,
|
||||
updateErpProduct,
|
||||
uploadSmp,
|
||||
thirdSysDetail,
|
||||
removeRl,
|
||||
sysFilterOptimize,
|
||||
spcombie,
|
||||
lockStatus,
|
||||
removeDiRl,
|
||||
disableUdi
|
||||
} from '@/api/basic/product/udiRelevance'
|
||||
import drugAdd from '@/views/basic/product/drugAdd'
|
||||
|
||||
export default {
|
||||
components: {drugAdd},
|
||||
name: 'drugMaintain',
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
filterBadInv: true,
|
||||
query: {},
|
||||
list: [],
|
||||
filterQuery: {
|
||||
productsType: 2,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
addType: 1
|
||||
},
|
||||
addDrugVisible: false,
|
||||
statusMap: {
|
||||
0: "停用",
|
||||
1: "在用"
|
||||
},
|
||||
fromName: '',
|
||||
rowData: {},
|
||||
fromMap: {
|
||||
'add' : '新增-药品信息',
|
||||
'edit' : '编辑-药品信息',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
productsType: 2,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
addType: 1
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
onSubmit() {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList()
|
||||
},
|
||||
addDrug(){
|
||||
this.fromName = 'add'
|
||||
this.addDrugVisible = true
|
||||
},
|
||||
getList() {
|
||||
getUdiInfos(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
|
||||
})
|
||||
},
|
||||
deleteDrug(row){
|
||||
this.$confirm("此操作将永久删除该药品信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
let tquery = {
|
||||
id: row.id + "",
|
||||
};
|
||||
deletetUdiInfos(tquery).then(res => {
|
||||
if (res.code != 20000){
|
||||
this.$message.error("删除错误")
|
||||
this.getList()
|
||||
}else {
|
||||
this.$message.success("删除成功!")
|
||||
this.getList()
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error("删除错误")
|
||||
})
|
||||
})
|
||||
},
|
||||
editDrug(row){
|
||||
this.fromName = 'edit'
|
||||
this.rowData = row
|
||||
this.addDrugVisible = true;
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
0: "info",
|
||||
1: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
}
|
||||
,
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form :model="query" label-width="auto" v-show="showSearch" size="mini" class="order-el-form">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="当前仓库:" class="query-form-item">
|
||||
<invSelect :value.sync="query.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编码/名称:" class="query-form-item">
|
||||
<el-input v-model="query.key" placeholder="请输入编码/工位名称" clearable>
|
||||
</el-input>
|
||||
<!--<el-form-item label="所属仓库:">-->
|
||||
|
||||
<!-- :isDisable.sync="defaultInv"-->
|
||||
<!--</el-form-item>-->
|
||||
<!--<el-select-->
|
||||
<!-- v-model="query.key"-->
|
||||
<!-- placeholder="请选择仓库">-->
|
||||
<!-- <el-option v-for="item in unitStorageList"-->
|
||||
<!-- :key="item.name"-->
|
||||
<!-- :label="item.name"-->
|
||||
<!-- :value="item.code"></el-option>-->
|
||||
<!--</el-select>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div class="top-right-btn">
|
||||
<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-plus" @click="addWorkplace">新增工位</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
|
||||
>
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column label="工位编码" prop="workplaceId" width="90"></el-table-column>
|
||||
<el-table-column label="工位名称" prop="workplaceName" width="90"></el-table-column>
|
||||
<el-table-column label="所属仓库" prop="invName" width="90"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime" width="90"></el-table-column>
|
||||
<el-table-column label="备注" prop="remake" width="90"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="edit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteWorkplace(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<el-dialog
|
||||
:title="fromMap[fromName]"
|
||||
:visible.sync="addWorkplaceDialogVisible"
|
||||
width="40%"
|
||||
v-if="addWorkplaceDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<el-form :model="formData" style="width: 60%;" ref="dataForm"
|
||||
label-width="auto"
|
||||
>
|
||||
<el-row :gutter="20" class="el-row">
|
||||
<el-col :span="24" class="el-col">
|
||||
<el-form-item label="工位编码:" prop="title" class="query-form-item">
|
||||
<el-input
|
||||
disabled
|
||||
v-model="formData.workplaceId" style="width: 80%"
|
||||
auto-complete="off"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="el-col">
|
||||
<el-form-item label="工位名称:" prop="name" class="query-form-item">
|
||||
<el-input
|
||||
v-model="formData.workplaceName" style="width: 80%"
|
||||
auto-complete="off"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="el-col">
|
||||
<el-form-item label="所属仓库:" prop="name" class="query-form-item">
|
||||
<invSelect :value.sync="formData.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"
|
||||
style="width: 80%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" class="el-col">
|
||||
<el-form-item label="备注:" prop="name" class="query-form-item">
|
||||
<el-input
|
||||
v-model="formData.remake" style="width: 80%"
|
||||
auto-complete="off"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click.native="hideForm">取消</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click.native="formSubmit()"
|
||||
>提交
|
||||
</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listPage,
|
||||
addWorkplace,
|
||||
updateWorkplace,
|
||||
deleteWorkplace,
|
||||
createWorkplaceId
|
||||
} from '@/api/basic/sysWorkplaceManage'
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
list: [],
|
||||
addWorkplaceDialogVisible: false,
|
||||
fromName: 'add',
|
||||
fromMap: {
|
||||
'add': '新增工位',
|
||||
'edit': '编辑工位'
|
||||
},
|
||||
formData: {},
|
||||
workplaceCode: '6001',
|
||||
unitStorageList: [],
|
||||
filterBadInv: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch
|
||||
},
|
||||
onSubmit() {
|
||||
this.query.page = 1
|
||||
this.getList()
|
||||
},
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: ''
|
||||
})
|
||||
this.query = {
|
||||
page: 1,
|
||||
limit: 20
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
listPage(this.query).then(res => {
|
||||
if (res.code != 20000) {
|
||||
return this.$message.error('错误错误')
|
||||
}
|
||||
this.list = res.data.list || []
|
||||
})
|
||||
},
|
||||
addWorkplace() {
|
||||
this.fromName = 'add'
|
||||
createWorkplaceId().then(res => {
|
||||
if (res.code == 20000) {
|
||||
if (res.data == null) {
|
||||
this.formData.workplaceId = this.workplaceCode + 1001
|
||||
this.addWorkplaceDialogVisible = true
|
||||
} else {
|
||||
this.formData = {}
|
||||
this.formData.workplaceId = res.data
|
||||
this.addWorkplaceDialogVisible = true
|
||||
}
|
||||
} else {
|
||||
this.$message.error('获取错误')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取错误')
|
||||
})
|
||||
},
|
||||
hideForm() {
|
||||
this.addWorkplaceDialogVisible = false
|
||||
},
|
||||
invChange(invCode) {
|
||||
this.filterQuery.invCode = invCode
|
||||
this.getFromStorage()
|
||||
},
|
||||
getFromStorage() {
|
||||
let query = {}
|
||||
filterFromAllByUser(query)
|
||||
.then((response) => {
|
||||
this.unitStorageList = response.data || []
|
||||
console.log(this.filterQuery.invCode)
|
||||
if (this.filterQuery.invCode) {
|
||||
this.unitStorageList = this.unitStorageList.filter(item => item.code != this.filterQuery.invCode) || []
|
||||
}
|
||||
console.log(this.unitStorageList)
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
formSubmit() {
|
||||
if (this.fromName == 'add') {
|
||||
addWorkplace(this.formData).then(res => {
|
||||
if (res.code != 20000) {
|
||||
return this.$message.error('新增错误')
|
||||
}
|
||||
this.addWorkplaceDialogVisible = false
|
||||
this.$message.success(res.data)
|
||||
this.getList()
|
||||
}).cache(() => {
|
||||
this.addWorkplaceDialogVisible = false
|
||||
this.$message.error('新增错误')
|
||||
})
|
||||
} else {
|
||||
updateWorkplace(this.formData).then(res => {
|
||||
if (res.code != 20000) {
|
||||
return this.$message.error('更新错误')
|
||||
}
|
||||
this.addWorkplaceDialogVisible = false
|
||||
this.$message.success(res.data)
|
||||
this.getList()
|
||||
}).catch(() => {
|
||||
this.addWorkplaceDialogVisible = false
|
||||
this.$message.error('更新错误')
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
edit(row) {
|
||||
this.formData = row
|
||||
this.fromName = 'edit'
|
||||
this.addWorkplaceDialogVisible = true
|
||||
},
|
||||
deleteWorkplace(row) {
|
||||
this.$confirm('此操作将永久删除该工位, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteWorkplace(row).then(res => {
|
||||
if (res.code != 20000) {
|
||||
this.$message.error('删除错误')
|
||||
} else {
|
||||
this.$message.success(res.data)
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue