|
|
@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<div class="main-container-text">
|
|
|
|
|
|
|
|
<div class="title">申请管理</div>
|
|
|
|
|
|
|
|
<div class="header">
|
|
|
|
|
|
|
|
<el-select v-model="client_id" placeholder="请选择柜体">
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in $store.getters.currentOptions"
|
|
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
|
|
:label="item.client_name"
|
|
|
|
|
|
|
|
:value="item.client_id"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
<el-button type="primary" plain @click="handleApply"><i class="el-icon-edit" />处理请求</el-button>
|
|
|
|
|
|
|
|
<!-- <div class="header-right">
|
|
|
|
|
|
|
|
<el-button type="primary" plain @click="handleHistory">历史记录</el-button>
|
|
|
|
|
|
|
|
<el-button icon="el-icon-refresh" circle @click="handleRefresh" />
|
|
|
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
<div class="header-right">
|
|
|
|
|
|
|
|
<el-button icon="el-icon-refresh" circle @click="handleRefresh" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
stripe
|
|
|
|
|
|
|
|
:data="tableData"
|
|
|
|
|
|
|
|
:header-cell-style="headerStyle"
|
|
|
|
|
|
|
|
height="69vh"
|
|
|
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
|
|
<el-table-column align="center" type="index" width="50" label="序号" />
|
|
|
|
|
|
|
|
<el-table-column prop="user_name" show-overflow-tooltip label="用户名称" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="user_name_pt" show-overflow-tooltip label="陪同用户名称" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="drug_name" show-overflow-tooltip label="试剂名称" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="drug_num" show-overflow-tooltip label="试剂数量" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="create_date" show-overflow-tooltip label="申请时间" align="center" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="is_solve" show-overflow-tooltip label="状态" align="center">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-tag :type="statusColorMap[scope.row.is_solve]">{{ statusMap[scope.row.is_solve] }}</el-tag>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="solve_user_name" show-overflow-tooltip label="受理人" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="solve_user_pt_name" show-overflow-tooltip label="陪同受理人" align="center" />
|
|
|
|
|
|
|
|
<el-table-column prop="solve_date" show-overflow-tooltip label="受理时间" align="center" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<div class="my-pagination" style="text-align: center">
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
|
|
|
background
|
|
|
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
|
|
|
:current-page.sync="page"
|
|
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
|
|
:page-size.sync="page_size"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@current-change="pageChange"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
|
|
:visible.sync="dialogVisible"
|
|
|
|
|
|
|
|
width="30%"
|
|
|
|
|
|
|
|
height="500px"
|
|
|
|
|
|
|
|
title="录入库存"
|
|
|
|
|
|
|
|
@close="onClose"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
|
|
|
<el-scrollbar style="height: 100%">
|
|
|
|
|
|
|
|
<el-form>
|
|
|
|
|
|
|
|
<div v-for="(item, index) in multipleSelection" :key="index">
|
|
|
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
|
|
|
<el-form-item :label="item.name" prop="input_num">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="item.input_num"
|
|
|
|
|
|
|
|
placeholder="请输入数量"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
:style="{width: '100%'}"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div slot="footer" style="text-align: center">
|
|
|
|
|
|
|
|
<el-button @click="close">取消</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" @click="handelConfirm">确定</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog :close-on-click-modal="false" :visible.sync="dialogHistoryVisible" width="60%" title="申请详情">
|
|
|
|
|
|
|
|
<div class="box">
|
|
|
|
|
|
|
|
<el-scrollbar style="height: 100%">
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
v-loading="loadingHistory"
|
|
|
|
|
|
|
|
element-loading-text="拼命加载中"
|
|
|
|
|
|
|
|
:header-cell-style="headerStyle"
|
|
|
|
|
|
|
|
:data="historyData"
|
|
|
|
|
|
|
|
height="420"
|
|
|
|
|
|
|
|
@close="dialogHistoryClose"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table-column align="center" type="index" width="50" label="序号" />
|
|
|
|
|
|
|
|
<el-table-column align="center" property="name" label="试剂名称" />
|
|
|
|
|
|
|
|
<el-table-column align="center" property="purity" label="纯度" />
|
|
|
|
|
|
|
|
<el-table-column align="center" property="speci" label="规格" />
|
|
|
|
|
|
|
|
<el-table-column align="center" property="purity" label="纯度" />
|
|
|
|
|
|
|
|
<el-table-column align="center" property="input_num" label="录入量" />
|
|
|
|
|
|
|
|
<el-table-column align="center" property="stock_num" label="库存量" />
|
|
|
|
|
|
|
|
<el-table-column align="center" property="difference_num" label="相差值" />
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
get_list,
|
|
|
|
|
|
|
|
get_drug_list,
|
|
|
|
|
|
|
|
set_stock,
|
|
|
|
|
|
|
|
del_stock,
|
|
|
|
|
|
|
|
get_stock_info
|
|
|
|
|
|
|
|
} from '@/api/reagent/drugStock'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
get_apply_list
|
|
|
|
|
|
|
|
} from '@/api/reagent/applymanage'
|
|
|
|
|
|
|
|
import stringify from '@/utils/stringify'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
name: 'ApplyManagementView',
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
// drugStockForm:[],
|
|
|
|
|
|
|
|
page: 1,
|
|
|
|
|
|
|
|
page_size: 15,
|
|
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
|
|
client_id: '',
|
|
|
|
|
|
|
|
dialogVisible: false,
|
|
|
|
|
|
|
|
tableData: [],
|
|
|
|
|
|
|
|
headerStyle: { 'background': '#E6E6E6' },
|
|
|
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
|
|
|
handleSelectionSelection: [],
|
|
|
|
|
|
|
|
dialogHistoryVisible: false,
|
|
|
|
|
|
|
|
loadingHistory: false,
|
|
|
|
|
|
|
|
historyData: [],
|
|
|
|
|
|
|
|
name: '',
|
|
|
|
|
|
|
|
history_client_id: '',
|
|
|
|
|
|
|
|
value1: '',
|
|
|
|
|
|
|
|
value2: ['', ''],
|
|
|
|
|
|
|
|
history_page: 1,
|
|
|
|
|
|
|
|
history_page_size: 15,
|
|
|
|
|
|
|
|
history_total: 100,
|
|
|
|
|
|
|
|
statusColorMap: ['warning','success'],
|
|
|
|
|
|
|
|
statusMap: ['未处理', '已处理'],
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
created () {
|
|
|
|
|
|
|
|
this.client_id = this.$store.getters.currentOptions[0].client_id
|
|
|
|
|
|
|
|
this.get_apply()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
get_apply: function() {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
client_id: this.client_id,
|
|
|
|
|
|
|
|
page:this.page,
|
|
|
|
|
|
|
|
page_size: this.page_size
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
get_apply_list(stringify(data)).then(rsp => {
|
|
|
|
|
|
|
|
console.log("apply>>>", rsp)
|
|
|
|
|
|
|
|
this.tableData = rsp.data.data_list
|
|
|
|
|
|
|
|
this.total = rsp.data.total_count
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
pageChange(page) {
|
|
|
|
|
|
|
|
this.page = page
|
|
|
|
|
|
|
|
this.get_stock_list()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
|
|
|
this.handleSelectionSelection = val
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// handleHistory() {
|
|
|
|
|
|
|
|
// this.dialogHistoryVisible = true
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
handleRefresh() {
|
|
|
|
|
|
|
|
this.get_apply()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleDel() {
|
|
|
|
|
|
|
|
if (this.handleSelectionSelection.length === 1) {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
id:this.handleSelectionSelection[0].id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
del_stock(stringify(data)).then(rsp => {
|
|
|
|
|
|
|
|
if (rsp.status === 0) {
|
|
|
|
|
|
|
|
this.$message.success("删除成功!")
|
|
|
|
|
|
|
|
this.get_stock_list()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(rsp.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning("选择一条记录操作")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 录入库存
|
|
|
|
|
|
|
|
handleAddReagent() {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
client_id: this.client_id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
get_drug_list(stringify(data)).then(rsp => {
|
|
|
|
|
|
|
|
this.multipleSelection = rsp.data
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
handleApply() {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
client_id: this.client_id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
get_drug_list(stringify(data)).then(rsp => {
|
|
|
|
|
|
|
|
this.multipleSelection = rsp.data
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.dialogVisible = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 查看 录入信息
|
|
|
|
|
|
|
|
handleCheck() {
|
|
|
|
|
|
|
|
if (this.handleSelectionSelection.length === 1) {
|
|
|
|
|
|
|
|
this.dialogHistoryVisible = true
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
id:this.handleSelectionSelection[0].id
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
get_stock_info(stringify(data)).then(rsp => {
|
|
|
|
|
|
|
|
if (rsp.status === 0) {
|
|
|
|
|
|
|
|
this.historyData = rsp.data
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(rsp.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.warning("选择一条记录操作!")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
dialogHistoryClose() {
|
|
|
|
|
|
|
|
this.dialogHistoryVisible = false
|
|
|
|
|
|
|
|
this.historyData = []
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
onClose() {
|
|
|
|
|
|
|
|
this.multipleSelection = []
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
close() {
|
|
|
|
|
|
|
|
this.dialogVisible = false
|
|
|
|
|
|
|
|
this.multipleSelection = []
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handelConfirm() {
|
|
|
|
|
|
|
|
const stock_info = {}
|
|
|
|
|
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
|
|
|
|
|
|
stock_info[this.multipleSelection[i].name] = this.multipleSelection[i].input_num == "" ? 0: parseInt(this.multipleSelection[i].input_num)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
stock_info: JSON.stringify(stock_info),
|
|
|
|
|
|
|
|
client_id: this.client_id,
|
|
|
|
|
|
|
|
client_code: this.client_code
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
set_stock(stringify(data)).then(rsp => {
|
|
|
|
|
|
|
|
console.log(rsp)
|
|
|
|
|
|
|
|
if (rsp.status == 0) {
|
|
|
|
|
|
|
|
this.$message.success(rsp.msg)
|
|
|
|
|
|
|
|
this.dialogVisible = false
|
|
|
|
|
|
|
|
this.get_stock_list()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(rsp.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
searchHistory() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
.main-container-text {
|
|
|
|
|
|
|
|
min-height: calc(100vh - 110px);
|
|
|
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
|
|
|
margin: 1rem;
|
|
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
|
|
color: #000000;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.header {
|
|
|
|
|
|
|
|
margin: 1rem 0 1rem 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-input {
|
|
|
|
|
|
|
|
width: 9.375rem;
|
|
|
|
|
|
|
|
margin-right: 1rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-select {
|
|
|
|
|
|
|
|
margin-right: 1rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.header-right {
|
|
|
|
|
|
|
|
float: right;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.add-item {
|
|
|
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
/* 1,必须去掉scoped,否则overflow-x: hidden失效 */
|
|
|
|
|
|
|
|
.box {
|
|
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
|
|
width: 95%;
|
|
|
|
|
|
|
|
height: 95%;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 2,外包一个div,来减少对其他页面会有冲突(此时缺少scoped) */
|
|
|
|
|
|
|
|
.box .el-scrollbar__wrap {
|
|
|
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-dialog__body {
|
|
|
|
|
|
|
|
height: 500px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|