duizhaopin_ui
cxw 2 years ago
parent d829337ad9
commit 5a4f3d4051

@ -2,5 +2,5 @@
ENV = 'development' ENV = 'development'
# base api # base api
VUE_APP_BASE_API = 'http://192.168.1.101:9001' VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API = 'http://192.168.1.101:5000' VUE_APP_FACE_API = 'http://127.0.0.1:5000'

@ -2,6 +2,6 @@
ENV = 'production' ENV = 'production'
# base api # base api
VUE_APP_BASE_API = 'http://192.168.1.101:9001' VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API ='http://192.168.1.101:5000' VUE_APP_FACE_API ='http://127.0.0.1:5000'

@ -4,6 +4,6 @@ NODE_ENV = production
ENV = 'staging' ENV = 'staging'
# base api # base api
VUE_APP_BASE_API = 'http://192.168.1.101:9001' VUE_APP_BASE_API = 'http://127.0.0.1:9001'
VUE_APP_FACE_API='http://192.168.1.101:5000' VUE_APP_FACE_API='http://127.0.0.1:5000'

@ -194,7 +194,7 @@ export function getALLRouter(data) {
{ {
name: 'reagent', name: 'reagent',
router: rasr[0], router: rasr[0],
title: '易制毒易制爆' title: '易制毒易制爆'
}, },
{ {
name: 'standard', name: 'standard',

@ -1,5 +1,5 @@
import Layout from '@/layout' import Layout from '@/layout'
// 易制毒易制爆管理路由 // 易制毒易制爆管理路由
const reagentRouter = [ const reagentRouter = [
{ {
path: '/reagent/mainoverview', path: '/reagent/mainoverview',
@ -109,7 +109,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'PurchaseApproval', name: 'PurchaseApproval',
component: () => import('@/views/reagent/purchaseapproval/index'), component: () => import('@/views/reagent/purchaseapproval/index'),
meta: { title: '采购审批', icon: '请购', classification: 'reagent'} meta: { title: '采购审批', icon: '表单', classification: 'reagent'}
} }
] ]
}, },
@ -123,7 +123,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'Warehousing', name: 'Warehousing',
component: () => import('@/views/reagent/warehousing/index'), component: () => import('@/views/reagent/warehousing/index'),
meta: { title: '易制毒易制爆入库', icon: '试剂入库', classification: 'reagent' } meta: { title: '易制毒易制爆入库', icon: '试剂入库', classification: 'reagent' }
} }
] ]
}, },
@ -137,7 +137,7 @@ const reagentRouter = [
// path: 'index', // path: 'index',
// name: 'Receiving', // name: 'Receiving',
// component: () => import('@/views/reagent/receivingandreturn/index'), // component: () => import('@/views/reagent/receivingandreturn/index'),
// meta: { title: '易制毒易制爆领用', icon: '试剂领用', classification: 'reagent' } // meta: { title: '易制毒易制爆领用', icon: '试剂领用', classification: 'reagent' }
// } // }
// ] // ]
// }, // },
@ -151,7 +151,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'SendBack', name: 'SendBack',
component: () => import('@/views/reagent/receivingandreturn/index'), component: () => import('@/views/reagent/receivingandreturn/index'),
meta: { title: '易制毒易制爆归还', icon: '试剂归还', classification: 'reagent' } meta: { title: '易制毒易制爆归还', icon: '试剂归还', classification: 'reagent' }
} }
] ]
}, },
@ -165,7 +165,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'createapply', name: 'createapply',
component: () => import('@/views/reagent/createapply/index'), component: () => import('@/views/reagent/createapply/index'),
meta: { title: '易制毒易制爆创建申请', icon: '创建申请', classification: 'reagent' } meta: { title: '易制毒易制爆创建申请', icon: '创建申请', classification: 'reagent' }
} }
] ]
}, },
@ -179,7 +179,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'applymanagement', name: 'applymanagement',
component: () => import('@/views/reagent/applymanagement/index'), component: () => import('@/views/reagent/applymanagement/index'),
meta: { title: '易制毒易制爆申请管理', icon: '申请管理', classification: 'reagent' } meta: { title: '易制毒易制爆申请管理', icon: '申请管理', classification: 'reagent' }
} }
] ]
}, },
@ -193,7 +193,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'weightregistration', name: 'weightregistration',
component: () => import('@/views/reagent/weightregistration/index'), component: () => import('@/views/reagent/weightregistration/index'),
meta: { title: '易制毒易制爆称重登记', icon: '称重登记', classification: 'reagent' } meta: { title: '易制毒易制爆称重登记', icon: '称重登记', classification: 'reagent' }
} }
] ]
}, },
@ -207,7 +207,7 @@ const reagentRouter = [
// path: 'index', // path: 'index',
// name: 'weighing', // name: 'weighing',
// component: () => import('@/views/reagent/weighing/index'), // component: () => import('@/views/reagent/weighing/index'),
// meta: { title: '易制毒易制爆称重', icon: '试剂称重', classification: 'reagent' } // meta: { title: '易制毒易制爆称重', icon: '试剂称重', classification: 'reagent' }
// } // }
// ] // ]
// }, // },
@ -221,7 +221,7 @@ const reagentRouter = [
path: 'index', path: 'index',
name: 'Inventory', name: 'Inventory',
component: () => import('@/views/reagent/inventory/index'), component: () => import('@/views/reagent/inventory/index'),
meta: { title: '易制毒易制爆盘点', icon: '库存盘点', classification: 'reagent' } meta: { title: '易制毒易制爆盘点', icon: '库存盘点', classification: 'reagent' }
} }
] ]
}, },
@ -249,13 +249,13 @@ const reagentRouter = [
path: '/reagent/management', path: '/reagent/management',
component: Layout, component: Layout,
redirect: '/reagent/management/index', redirect: '/reagent/management/index',
meta: { title: '易制毒易制爆管理', icon: '试剂管理', classification: 'reagent', module_code: 'DrugIndex' }, meta: { title: '易制毒易制爆管理', icon: '试剂管理', classification: 'reagent', module_code: 'DrugIndex' },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'Management', name: 'Management',
component: () => import('@/views/reagent/management/data/index'), component: () => import('@/views/reagent/management/data/index'),
meta: { title: '易制毒易制爆管理', icon: '试剂管理', classification: 'reagent' } meta: { title: '易制毒易制爆管理', icon: '试剂管理', classification: 'reagent' }
} }
] ]
}, },

@ -200,7 +200,7 @@ export function getALLRouter(data) {
{ {
name: 'reagent', name: 'reagent',
router: rasr[0], router: rasr[0],
title: '易制毒易制爆管理' title: '易制毒易制爆管理'
}, },
{ {
name: 'standard', name: 'standard',

@ -1,5 +1,5 @@
const mapTitle = { const mapTitle = {
'reagent': '易制毒易制爆', 'reagent': '易制毒易制爆',
'user': 'user', 'user': 'user',
'standard': '危化品', 'standard': '危化品',
'consumables': '对照品', 'consumables': '对照品',

@ -4,108 +4,77 @@
<div class="header"> <div class="header">
<el-button type="primary" plain @click="openDialogTableVisible"><i class="el-icon-edit" />新建采购申请单</el-button> <el-button type="primary" plain @click="openDialogTableVisible"><i class="el-icon-edit" />新建采购申请单</el-button>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="adddialogVisible">
<!-- <el-dialog :title="dialogTitile" :close-on-click-modal="false" :visible.sync="dialogVisible" @close="onClose">
<el-row :gutter="15"> <el-row :gutter="15">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="80px"> <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="110px">
<el-col :span="24">
<el-form-item label="柜体名称" prop="client_name">
<el-input
v-model="formData.client_name"
placeholder="请输入柜体名称"
clearable
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="柜体标题" prop="client_title">
<el-input
v-model="formData.client_title"
placeholder="请输入柜体标题"
clearable
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="柜体序号" prop="client_code">
<el-input v-model="formData.client_code" placeholder="请输入柜体序号" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="柜体类型" prop="client_type"> <el-form-item label="试剂名称" prop="name">
<el-input v-model="formData.client_type" placeholder="请输入柜体类型" clearable :style="{width: '100%'}" /> <el-input v-model="formData.name" placeholder="请输入试剂名称" clearable :style="{width: '100%'}" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="柜体位置" prop="place"> <el-form-item label="CAS码" prop="cas_number">
<el-autocomplete <el-input v-model="formData.cas_number" placeholder="请输入CAS码" clearable :style="{width: '100%'}" />
v-model="formData.place"
class="inline-input"
:style="{width: '100%'}"
:fetch-suggestions="querySearchAsync"
clearable
placeholder="请输入柜体位置"
@select="handleSelect"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="单元数量" prop="layer_num"> <el-form-item label="试剂纯度" prop="purity">
<el-input v-model="formData.layer_num" placeholder="请输入柜体单元数量" clearable :style="{width: '100%'}" :disabled="dialogTitile =='编辑柜体信息' ? true:false" /> <el-input v-model="formData.purity" placeholder="请输入试剂纯度" clearable :style="{width: '100%'}" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="柜体滤芯 生产日期" prop="filter_production_date"> <el-form-item label="采购数量" prop="export_count">
<el-date-picker <el-input v-model="formData.export_count" placeholder="请输入采购数量" clearable :style="{width: '100%'}" />
v-model="formData.filter_production_date"
style="width: 100%"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择柜体滤芯 生产日期"
clearable
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="提醒滤芯 到期提前" prop="filter_shelf_life_warning_value"> <el-form-item label="规格" prop="speci">
<el-input <el-input v-model="formData.speci" placeholder="请输入规格" clearable :style="{width: '100%'}" />
v-model="formData.filter_shelf_life_warning_value"
placeholder="请输入提醒滤芯 到期提前"
clearable
:style="{width: '100%'}"
>
<template slot="append"></template>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人" prop="contact_people_name"> <el-form-item label="单位" prop="net_weight_unit">
<el-input v-model="formData.contact_people_name" placeholder="请输入联系人" clearable :style="{width: '100%'}" /> <el-input v-model="formData.net_weight_unit" placeholder="请输入单位" clearable :style="{width: '100%'}" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="contact_phone"> <el-form-item label="预估质量" prop="net_weight">
<el-input v-model="formData.contact_phone" placeholder="请输入联系电话" clearable :style="{width: '100%'}" /> <el-input v-model="formData.net_weight" placeholder="请输入预估质量" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="说明" prop="description">
<el-input v-model="formData.description" placeholder="请输入说明" clearable :style="{width: '100%'}" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<div slot="footer" style="text-align: center"> <div style="text-align: center">
<el-button @click="onClose"></el-button> <el-button type="primary" @click="handelConfirm"></el-button>
<el-button type="primary" @click="handelConfirm"></el-button>
</div> </div>
</el-dialog> -->
<el-table :data="checkList" max-height="250" style="height:250px;padding-bottom: 50px;">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column prop="name" show-overflow-tooltip label="试剂名称" align="center" />
<el-table-column prop="cas_number" show-overflow-tooltip label="CAS码" align="center" />
<el-table-column prop="speci" show-overflow-tooltip label="规格" align="center" />
<el-table-column prop="purity" show-overflow-tooltip label="纯度" align="center" />
<el-table-column prop="net_weight_unit" show-overflow-tooltip label="单位" align="center" />
<el-table-column prop="export_count" show-overflow-tooltip label="数量" align="center" />
<el-table-column prop="net_weight" show-overflow-tooltip label="预估质量" align="center" />
<el-table-column
fixed="right"
label="操作"
width="100">
<template slot-scope="scope">
<el-button @click="cancelClick(scope.row)" type="text" size="small">取消申请</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" style="text-align: center">
<el-button @click="dialogTableClose"></el-button>
<el-button type="primary" @click="create_apply"></el-button>
</div>
</el-dialog>
<el-dialog <el-dialog
title="撤销采购单申请" title="撤销采购单申请"
:visible.sync="centerDialogVisible" :visible.sync="centerDialogVisible"
@ -171,6 +140,7 @@
</template> </template>
<script> <script>
import { throttle } from '@/utils'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import { import {
get_list, get_list,
@ -190,15 +160,24 @@ export default {
total: 0, total: 0,
tableData: [], tableData: [],
centerDialogVisible: false, centerDialogVisible: false,
adddialogVisible:false,
row_id:'', row_id:'',
formData: {
name: undefined,
cas_number: undefined,
purity: undefined,
export_count:undefined,
speci: undefined,
net_weight_unit: undefined,
net_weight: undefined
},
statusColorMap: ['warning','success','danger'], statusColorMap: ['warning','success','danger'],
statusMap: ['未处理', '已处理','已驳回'], statusMap: ['未处理', '已处理','已驳回'],
title:'',
seach_word:'', seach_word:'',
total1: 0,
client_id: '', client_id: '',
dialogVisible: false, dialogVisible: false,
tableData1: [],
headerStyle: { 'background': '#E6E6E6' }, headerStyle: { 'background': '#E6E6E6' },
multipleSelection: [], multipleSelection: [],
handleSelectionSelection: [], handleSelectionSelection: [],
@ -209,20 +188,68 @@ export default {
history_client_id: '', history_client_id: '',
value1: '', value1: '',
value2: ['', ''], value2: ['', ''],
history_page: 1,
history_page_size: 15,
history_total: 100,
dialogTableVisible: false, dialogTableVisible: false,
checkList: [], checkList: [],
ptUserArray:[], rules: {
pt_form:{ name: [
user_id_pt: '', { required: true, message: '请输入试剂名称', trigger: 'change' }
],
purity: [
{ required: true, message: '请输入试剂纯度', trigger: 'change' }
],
export_count:[
{ required: true, message: '请输入数量', trigger: 'blur' },
{
validator (rule, value, callback) {
if (/(^[1-9]\d*$)/.test(value)) {
callback()
} else {
callback(new Error('请输入正整数'))
}
}, },
trigger: 'blur'
}
],
speci: [
{ required: true, message: '请输入试剂规格', trigger: 'change' },
{
validator (rule, value, callback) {
if (/(^[1-9]\d*$)/.test(value)) {
callback()
} else {
callback(new Error('请输入正整数'))
}
},
trigger: 'blur'
}
],
net_weight_unit: [
{ required: true, message: '请输入单位', trigger: 'change' },
{
validator (rule, value, callback) {
if (/(^[1-9]\d*$)/.test(value)) {
callback()
} else {
callback(new Error('请输入正整数'))
}
},
trigger: 'blur'
}
rules: {
user_id_pt: [
{ required: true, message: '请选择陪同人', trigger: 'change' }
], ],
net_weight: [
{ required: true, message: '请输入预估质量', trigger: 'change' },
{
validator (rule, value, callback) {
if (/(^[1-9]\d*$)/.test(value)) {
callback()
} else {
callback(new Error('请输入正整数'))
}
},
trigger: 'blur'
}
]
} }
} }
}, },
@ -230,11 +257,22 @@ export default {
this.get_drug_group() this.get_drug_group()
}, },
methods: { methods: {
// //
handelConfirm:function() {
this.$refs['elForm'].validate(valid => {
if (valid) {
this.checkList.push(this.formData)
console.log(this.formData, '-----------------------')
}
if (!valid) return
})
},
//
get_drug_group: function() { get_drug_group: function() {
var that =this var that =this
const data = { const data = {
page:1, page:that.page,
page_size: 10 page_size: 10
} }
get_list(stringify(data)).then(rsp => { get_list(stringify(data)).then(rsp => {
@ -243,6 +281,7 @@ export default {
this.total = rsp.data.total_count this.total = rsp.data.total_count
}) })
}, },
//
handleExport(row){ handleExport(row){
const data = { const data = {
id: row.id, id: row.id,
@ -257,10 +296,12 @@ export default {
} }
).finally(() => { this.recordLoading = false }) ).finally(() => { this.recordLoading = false })
}, },
//
handback(row){ handback(row){
this.row_id =row.id this.row_id =row.id
this.centerDialogVisible =true this.centerDialogVisible =true
}, },
//
backcheck(){ backcheck(){
this.recordLoading = true this.recordLoading = true
const data = { const data = {
@ -279,14 +320,6 @@ export default {
} }
).finally(() => { this.recordLoading = false }) ).finally(() => { this.recordLoading = false })
}, },
// //
handleSelection(selection){ handleSelection(selection){
var that =this var that =this
@ -294,8 +327,14 @@ export default {
}, },
// //
handleCheck(row) { handleCheck(row) {
this.dialogHistoryVisible = true this.title='编辑采购试剂'
this.historyData = JSON.parse(row.use_content) this.row_id =row.id
if(row.is_solve==1){
this.$message.error('已处理无法修改')
}else{
this.adddialogVisible = true
this.checkList = JSON.parse(row.use_content)
}
// if (this.handleSelectionSelection.length === 1) { // if (this.handleSelectionSelection.length === 1) {
// this.dialogHistoryVisible = true // this.dialogHistoryVisible = true
// this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content) // this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content)
@ -303,100 +342,16 @@ export default {
// this.$message.warning("") // this.$message.warning("")
// } // }
}, },
//
dialogHistoryClose() {
this.dialogHistoryVisible = false
this.historyData = []
},
//
handleClick(row){
var that =this
var result = that.checkList.filter(item => item).map(item => item.bar_code);
if(result.indexOf(row.bar_code) !=-1){
that.$message({
type: 'info',
message: '不可重复添加'
});
}else{
that.checkList.push(row)
let getLocation = that.tableData.indexOf(row);
that.tableData.splice(getLocation, 1)
}
},
// //
cancelClick(row){ cancelClick(row){
var that =this var that =this
let getLocation = that.checkList.indexOf(row); let getLocation = that.checkList.indexOf(row);
that.checkList.splice(getLocation, 1) that.checkList.splice(getLocation, 1)
}, },
//
get_apply(){
const data = {
page:this.page,
page_size: this.page_size
}
get_apply_list(stringify(data)).then(rsp => {
console.log("apply>>>", rsp)
this.tableData1 = rsp.data.data_list
this.total1 = rsp.data.total_count
})
},
//
get_pt_user() {
console.log("jjj")
const data = {
page: 1,
page_size: 10000,
user_id:this.$store.state.user.id,
user_code: this.user_code,
real_name: this.real_name,
role_id: this.role_id,
is_enabled: this.is_enabled
}
console.log("hhhhh")
get_pt_user_list(stringify(data)).then(res => {
this.ptUserArray = res.data.data_list
console.log("res>>>", res)
})
console.log("giao")
},
//
create_apply(pt_from){
var that =this
let datalist = that.checkList.map((item) => {
return Object.assign({}, { name: item.name, num: item.num,client_id: item.client_id, purity: item.purity, speci: item.speci})
})
if (pt_from.user_id_pt === '') {
that.$message({
type: 'info',
message: '请选择陪同人'
});
}else{
const data = {
user_id: this.$store.state.user.id,
user_id_pt: pt_from.user_id_pt,
use_content: JSON.stringify(datalist),
}
add_apply(stringify(data)).then(rsp => {
console.log("rsp>>", rsp)
if (rsp.status==0){
this.dialogTableClose()
//
this.$refs.multipleTable.clearSelection();
that.checkList=[]
this.get_apply()
}
})
}
},
// //
pageChange(page) { pageChange(page) {
this.page = page this.page = page
this.get_apply() this.get_drug_group()
}, },
addDataIndex(initData){ addDataIndex(initData){
for (let i = 0; i < initData.length; i++) { for (let i = 0; i < initData.length; i++) {
@ -406,18 +361,67 @@ export default {
}, },
// //
handleRefresh() { handleRefresh() {
this.get_apply() this.page =1
this.get_drug_group() this.get_drug_group()
}, },
// //
openDialogTableVisible(){ openDialogTableVisible(){
this.dialogTableVisible = true this.title='新增采购试剂'
this.adddialogVisible = true
}, },
// //
dialogTableClose() { dialogTableClose() {
this.user_id_pt = '' this.adddialogVisible = false
this.dialogTableVisible = false
this.checkList=[] this.checkList=[]
this.formData = {
name: undefined,
cas_number: undefined,
purity: undefined,
export_count:undefined,
speci: undefined,
net_weight_unit: undefined,
net_weight: undefined
}
},
//
create_apply(){
var that =this
let datalist = that.checkList.map((item) => {
return Object.assign({}, {net_weight_unit: item.net_weight_unit, net_weight: item.net_weight, name: item.name, cas_number: item.cas_number,purity: item.purity, export_count: item.export_count, speci: item.speci})
})
if(this.title=='编辑采购试剂'){
const data = {
id: this.row_id,
use_content: JSON.stringify(datalist),
}
update(stringify(data)).then(rsp => {
console.log("rsp>>", rsp)
if (rsp.status==0){
this.dialogTableClose()
//
this.$refs.multipleTable.clearSelection();
that.checkList=[]
this.page =1
this.get_drug_group()
}
})
}else{
const data = {
use_doc: '',
use_content: JSON.stringify(datalist),
}
add(stringify(data)).then(rsp => {
console.log("rsp>>", rsp)
if (rsp.status==0){
this.dialogTableClose()
//
this.$refs.multipleTable.clearSelection();
that.checkList=[]
this.page =1
this.get_drug_group()
}
})
}
}, },
} }
} }

@ -1,137 +1,20 @@
<template> <template>
<div class="main-container-text"> <div class="main-container-text">
<div class="title">采购申请</div> <div class="title">采购审批</div>
<div class="header"> <div class="header">
<el-button type="primary" plain @click="openDialogTableVisible"><i class="el-icon-edit" />新建采购申请单</el-button> <!-- <el-button type="primary" plain @click="handleCheck"><i class="el-icon-edit" />详情查看</el-button> -->
<!-- <el-dialog :title="dialogTitile" :close-on-click-modal="false" :visible.sync="dialogVisible" @close="onClose">
<el-row :gutter="15">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="80px">
<el-col :span="24">
<el-form-item label="柜体名称" prop="client_name">
<el-input
v-model="formData.client_name"
placeholder="请输入柜体名称"
clearable
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="柜体标题" prop="client_title">
<el-input
v-model="formData.client_title"
placeholder="请输入柜体标题"
clearable
:style="{width: '100%'}"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="柜体序号" prop="client_code">
<el-input v-model="formData.client_code" placeholder="请输入柜体序号" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="柜体类型" prop="client_type">
<el-input v-model="formData.client_type" placeholder="请输入柜体类型" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="柜体位置" prop="place">
<el-autocomplete
v-model="formData.place"
class="inline-input"
:style="{width: '100%'}"
:fetch-suggestions="querySearchAsync"
clearable
placeholder="请输入柜体位置"
@select="handleSelect"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单元数量" prop="layer_num">
<el-input v-model="formData.layer_num" placeholder="请输入柜体单元数量" clearable :style="{width: '100%'}" :disabled="dialogTitile =='编辑柜体信息' ? true:false" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="柜体滤芯 生产日期" prop="filter_production_date">
<el-date-picker
v-model="formData.filter_production_date"
style="width: 100%"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择柜体滤芯 生产日期"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="提醒滤芯 到期提前" prop="filter_shelf_life_warning_value">
<el-input
v-model="formData.filter_shelf_life_warning_value"
placeholder="请输入提醒滤芯 到期提前"
clearable
:style="{width: '100%'}"
>
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人" prop="contact_people_name">
<el-input v-model="formData.contact_people_name" placeholder="请输入联系人" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="contact_phone">
<el-input v-model="formData.contact_phone" placeholder="请输入联系电话" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="说明" prop="description">
<el-input v-model="formData.description" placeholder="请输入说明" clearable :style="{width: '100%'}" />
</el-form-item>
</el-col>
</el-form>
</el-row>
<div slot="footer" style="text-align: center">
<el-button @click="onClose"></el-button>
<el-button type="primary" @click="handelConfirm"></el-button>
</div>
</el-dialog> -->
<el-dialog
title="撤销采购单申请"
:visible.sync="centerDialogVisible"
width="30%"
center>
<span>是否确认撤销</span>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="backcheck()"> </el-button>
</span>
</el-dialog>
<div class="header-right"> <div class="header-right">
<el-button icon="el-icon-refresh" circle @click="handleRefresh" /> <el-button icon="el-icon-refresh" circle @click="handleRefresh" />
</div> </div>
</div> </div>
<el-table <el-table
stripe stripe
ref="multipleTable"
:data="tableData" :data="tableData"
:header-cell-style="headerStyle" :header-cell-style="headerStyle"
@select="handleSelection"
row-key="medicament_id"
height="69vh" height="69vh"
class="table-style" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" type="index" width="50" label="序号" /> <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" show-overflow-tooltip label="采购申请人" align="center" />
@ -149,11 +32,10 @@
fixed="right" fixed="right"
label="操作" label="操作"
align="center" align="center"
width="250"> width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="handleCheck(scope.row)" type="text" size="small">修改申请单</el-button> <el-button @click="handleCheck(scope.row)" type="text" size="small">查看</el-button>
<el-button @click="handback(scope.row)" type="text" size="small">撤销申请单</el-button> <el-button @click="handleClick(scope.row)" type="text" size="small">审批</el-button>
<el-button @click="handleExport(scope.row)" type="text" size="small">导出申请单</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -167,11 +49,55 @@
@current-change="pageChange" @current-change="pageChange"
/> />
</div> </div>
<el-dialog
:visible.sync="dialogVisible"
width="30%"
height="500px"
title="采购单审批"
>
<div class="box">
<el-form ref="form" label-width="80px">
<el-form-item label="审批意见">
<el-radio-group v-model="radio2">
<el-radio label="1" border>同意</el-radio>
<el-radio label="0" border>驳回</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" v-model="information"></el-input>
</el-form-item>
</el-form>
</div>
<div slot="footer" style="text-align: center">
<el-button @click="dialogVisible=false"></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="export_count" label="数量" />
</el-table>
</el-scrollbar>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import stringify from '@/utils/stringify'
import { import {
get_list, get_list,
add, add,
@ -179,51 +105,30 @@ import {
solve, solve,
del del
} from '@/api/reagent/purchase' } from '@/api/reagent/purchase'
import { dowload,click_dowload } from '@/api/reagent/dowload_file' import stringify from '@/utils/stringify'
export default { export default {
name: 'Buy', name: 'PurchaseApproval',
data() { data() {
return { return {
radio2:'1',
information:'',
page: 1, page: 1,
page_size: 10, page_size: 10,
total: 0, total: 0,
tableData: [],
centerDialogVisible: false,
row_id:'',
statusColorMap: ['warning','success','danger'],
statusMap: ['未处理', '已处理','已驳回'],
seach_word:'',
total1: 0,
client_id: '',
dialogVisible: false, dialogVisible: false,
tableData1: [], tableData: [],
headerStyle: { 'background': '#E6E6E6' }, headerStyle: { 'background': '#E6E6E6' },
multipleSelection: [], multipleSelection: [],
handleSelectionSelection: [], handleSelectionSelection: [],
dialogHistoryVisible: false, dialogHistoryVisible: false,
loadingHistory: false, loadingHistory: false,
historyData: [], historyData: [],
name: '',
history_client_id: '',
value1: '',
value2: ['', ''],
history_page: 1, history_page: 1,
history_page_size: 15, history_page_size: 15,
history_total: 100, history_total: 100,
dialogTableVisible: false, statusColorMap: ['warning','success','danger'],
checkList: [], statusMap: ['未处理', '已处理','已驳回'],
ptUserArray:[], row:''
pt_form:{
user_id_pt: '',
},
rules: {
user_id_pt: [
{ required: true, message: '请选择陪同人', trigger: 'change' }
],
}
} }
}, },
created () { created () {
@ -234,8 +139,8 @@ export default {
get_drug_group: function() { get_drug_group: function() {
var that =this var that =this
const data = { const data = {
page:1, page:this.page,
page_size: 10 page_size: this.page_size
} }
get_list(stringify(data)).then(rsp => { get_list(stringify(data)).then(rsp => {
console.log("rsp.data.data_list>>", rsp.data.data_list) console.log("rsp.data.data_list>>", rsp.data.data_list)
@ -243,181 +148,54 @@ export default {
this.total = rsp.data.total_count this.total = rsp.data.total_count
}) })
}, },
handleExport(row){ addDataIndex(initData){
const data = { for (let i = 0; i < initData.length; i++) {
id: row.id, initData[i]["index"] = i
file_name: '请购单'
}
this.recordLoading = true
//
dowload(data).then(
res => {
this.$message.success(res.statusText)
click_dowload(data, res)
}
).finally(() => { this.recordLoading = false })
},
handback(row){
this.row_id =row.id
this.centerDialogVisible =true
},
backcheck(){
this.recordLoading = true
const data = {
id: this.row_id,
}
//
del(stringify(data)).then(
res => {
if (res.status ==0){
this.centerDialogVisible =false
this.$message.success(res.msg)
this.get_drug_group()
}else{
this.$message.error(res.msg)
}
} }
).finally(() => { this.recordLoading = false }) return initData
},
//
handleSelection(selection){
var that =this
that.handleSelectionSelection =selection
},
//
handleCheck(row) {
this.dialogHistoryVisible = true
this.historyData = JSON.parse(row.use_content)
// if (this.handleSelectionSelection.length === 1) {
// this.dialogHistoryVisible = true
// this.historyData = JSON.parse(this.handleSelectionSelection[0].use_content)
// } else {
// this.$message.warning("")
// }
},
//
dialogHistoryClose() {
this.dialogHistoryVisible = false
this.historyData = []
}, },
//
handleClick(row){ handleClick(row){
var that =this var that =this
var result = that.checkList.filter(item => item).map(item => item.bar_code); that.row=row
if(result.indexOf(row.bar_code) !=-1){ that.dialogVisible=true
that.$message({
type: 'info',
message: '不可重复添加'
});
}else{
that.checkList.push(row)
let getLocation = that.tableData.indexOf(row);
that.tableData.splice(getLocation, 1)
}
}, },
// handelConfirm(){
cancelClick(row){
var that=this var that=this
let getLocation = that.checkList.indexOf(row);
that.checkList.splice(getLocation, 1)
},
//
get_apply(){
const data={ const data={
page:this.page, id:that.row.id,
page_size: this.page_size result:that.radio2,
information:that.information
} }
get_apply_list(stringify(data)).then(rsp => { solve(stringify(data)).then(rsp => {
console.log("apply>>>", rsp) console.log(rsp)
this.tableData1 = rsp.data.data_list if (rsp.status === 0) {
this.total1 = rsp.data.total_count this.$message.success("审批成功!")
}) this.handleRefresh()
}, that.dialogVisible=false
//
get_pt_user() {
console.log("jjj")
const data = {
page: 1,
page_size: 10000,
user_id:this.$store.state.user.id,
user_code: this.user_code,
real_name: this.real_name,
role_id: this.role_id,
is_enabled: this.is_enabled
}
console.log("hhhhh")
get_pt_user_list(stringify(data)).then(res => {
this.ptUserArray = res.data.data_list
console.log("res>>>", res)
})
console.log("giao")
},
//
create_apply(pt_from){
var that =this
let datalist = that.checkList.map((item) => {
return Object.assign({}, { name: item.name, num: item.num,client_id: item.client_id, purity: item.purity, speci: item.speci})
})
if (pt_from.user_id_pt === '') {
that.$message({
type: 'info',
message: '请选择陪同人'
});
} else { } else {
const data = { this.$message.error(rsp.msg)
user_id: this.$store.state.user.id,
user_id_pt: pt_from.user_id_pt,
use_content: JSON.stringify(datalist),
}
add_apply(stringify(data)).then(rsp => {
console.log("rsp>>", rsp)
if (rsp.status==0){
this.dialogTableClose()
//
this.$refs.multipleTable.clearSelection();
that.checkList=[]
this.get_apply()
} }
}) })
}
}, },
//
pageChange(page) { pageChange(page) {
this.page = page this.page = page
this.get_apply() this.get_drug_group()
}, },
addDataIndex(initData){ handleSelectionChange(val) {
for (let i = 0; i < initData.length; i++) { this.handleSelectionSelection = val
initData[i]["index"] = i
}
return initData
}, },
//
handleRefresh() { handleRefresh() {
this.get_apply() this.page = 1
this.get_drug_group() this.get_drug_group()
}, },
// //
openDialogTableVisible(){ handleCheck(row) {
this.dialogTableVisible = true this.dialogHistoryVisible = true
this.historyData = JSON.parse(row.use_content)
}, },
// dialogHistoryClose() {
dialogTableClose() { this.dialogHistoryVisible = false
this.user_id_pt = '' this.historyData = []
this.dialogTableVisible = false
this.checkList=[]
}, },
} }
} }
@ -450,6 +228,7 @@ export default {
.header-right { .header-right {
float: right; float: right;
margin-bottom: 1rem;
} }
} }
} }
@ -472,6 +251,6 @@ export default {
overflow-x: hidden; overflow-x: hidden;
} }
/* .el-dialog__body { /* .el-dialog__body {
height: 600px !important; height: 500px;
} */ } */
</style> </style>

@ -14,6 +14,7 @@
</el-select> </el-select>
<el-button type="primary" @click="handleReagentToDatabase">{{ $store.state.app.title }}</el-button> <el-button type="primary" @click="handleReagentToDatabase">{{ $store.state.app.title }}</el-button>
<el-button type="primary" @click="handleBindToDB"></el-button> <el-button type="primary" @click="handleBindToDB"></el-button>
<el-button type="primary" @click="purchasePutIn"></el-button>
<el-button type="primary" plain @click="handleAddTmp('add')">+ {{ $store.state.app.title }}</el-button> <el-button type="primary" plain @click="handleAddTmp('add')">+ {{ $store.state.app.title }}</el-button>
<el-button @click="handleAddTmp('modify')"><i class="el-icon-edit" />编辑{{ $store.state.app.title }}模板</el-button> <el-button @click="handleAddTmp('modify')"><i class="el-icon-edit" />编辑{{ $store.state.app.title }}模板</el-button>
<el-button @click="handlePrintCode"><i class="el-icon-printer" /> 打印条码</el-button> <el-button @click="handlePrintCode"><i class="el-icon-printer" /> 打印条码</el-button>
@ -392,6 +393,80 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="PutInVisible" :close-on-click-modal="false" title="采购验收入库" width="70%">
<el-table
ref="multipleTable"
v-loading="loading"
element-loading-text="拼命加载中"
:header-cell-style="headerStyle"
:data="tableData1"
style="width: 100%"
height="420"
size="medium"
stripe
@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="template_name"
label="模板名称"
sortable
align="center"
/>
<el-table-column
prop="client_name"
label="所处位置"
sortable
align="center"
/>
<el-table-column
align="center"
prop="all_export_count"
label="入库数量"
/>
<el-table-column
align="center"
prop="create_date"
label="创建时间"
/>
<el-table-column
align="center"
prop="create_user_name"
label="创建人"
/>
<el-table-column
label="操作"
align="center"
width="300">
<template slot-scope="scope">
<el-button @click="handleAddTmp1(scope.row)" type="text" size="small">查看详情</el-button>
<el-button @click="handlePrintCode1(scope.row)" type="text" size="small">打印条码</el-button>
<el-button @click="handleBindToDB1(scope.row)" type="text" size="small">绑定入库</el-button>
</template>
</el-table-column>
</el-table>
<div class="page my-pagination">
<el-pagination
background
layout="prev, pager, next"
:current-page.sync="page1"
:total="total1"
:page-size.sync="page_size"
@current-change="tmpPageChange1"
/>
</div>
</el-dialog>
<Scanner @getcode="getCode" /> <Scanner @getcode="getCode" />
</div> </div>
</template> </template>
@ -498,7 +573,13 @@ export default {
importFile: undefined, importFile: undefined,
currentItem: {}, currentItem: {},
imgViewerVisible:false, imgViewerVisible:false,
UPLOAD_URL: process.env.VUE_APP_BASE_API + '/api/drug/save_drug_img' UPLOAD_URL: process.env.VUE_APP_BASE_API + '/api/drug/save_drug_img',
//
PutInVisible:false,
page1:1,
total1: 0,
tableData1: [],
} }
}, },
created() { created() {
@ -650,6 +731,17 @@ export default {
}) })
} }
}, },
handlePrintCode1(row) {
const template_id = row.template_id
console.log(template_id)
const data = {
template_id: template_id
}
pring_bar_code(stringify(data)).then(res => {
this.$message.success(res.msg)
})
},
handlePringClose() { handlePringClose() {
this.formData = { this.formData = {
start_code: undefined, start_code: undefined,
@ -708,6 +800,13 @@ export default {
} }
) )
}, },
//
purchasePutIn(){
this.getTmpList1()
this.PutInVisible =true
},
// //
handleSubFile() { handleSubFile() {
if (this.importFile) { if (this.importFile) {
@ -757,7 +856,8 @@ export default {
show_tmp(stringify({ show_tmp(stringify({
page: this.page, page: this.page,
page_size: this.page_size, page_size: this.page_size,
client_id: this.client_id client_id: this.client_id,
is_add:0
})).then(res => { })).then(res => {
this.tableData = res.data.data_list this.tableData = res.data.data_list
this.total = res.data.total_count this.total = res.data.total_count
@ -765,11 +865,29 @@ export default {
this.loading = false this.loading = false
}) })
}, },
getTmpList1() {
this.loading = true
show_tmp(stringify({
page: this.page1,
page_size: this.page_size,
client_id: this.client_id,
is_add:1
})).then(res => {
this.tableData1 = res.data.data_list
this.total1 = res.data.total_count
}).finally(() => {
this.loading = false
})
},
// //
tmpPageChange(page) { tmpPageChange(page) {
this.page = page this.page = page
this.getTmpList() this.getTmpList()
}, },
tmpPageChange1(page) {
this.page1 = page
this.getTmpList1()
},
// //
reagentPageChange(page) { reagentPageChange(page) {
this.reagent_page = page this.reagent_page = page
@ -855,6 +973,20 @@ export default {
} }
} }
}, },
handleAddTmp1(row) {
// /
this.opTitle = `编辑${this.$store.state.app.title}模板`
this.opType ='modify'
const data = row
this.reagentAddTmpName = data.template_name
this.reagentAddClient = data.client_id
this.reagentAddTmpData = JSON.parse(data.template_content).map((v, index) => {
v['index'] = index
return v
})
this.reagentAddVisible = true
},
// //
handleAddClose() { handleAddClose() {
this.reagentAddTmpName = '' this.reagentAddTmpName = ''
@ -959,6 +1091,36 @@ export default {
if (this.multipleSelection.length === 1) { if (this.multipleSelection.length === 1) {
this.client_id_input = this.multipleSelection[0].client_id this.client_id_input = this.multipleSelection[0].client_id
} }
//
this.$nextTick(() => {
this.$refs.singleTable.setCurrentRow(this.bindToDBData[0])
})
this.bindToDBVisible = true
this.click_num = true
},
handleBindToDB1(row) {
if (this.click_num) {
return
}
this.bindToDBData = []
const items = JSON.parse(row.template_content)
items.forEach(item => {
if (item.export_count) {
for (let i = 0; i < item.export_count; i++) {
this.bindToDBData.push({ ...item })
}
}
})
this.bindToDBData.map((item, index) => {
item.status = false
item.index = index
return item
})
this.client_id_input = row.client_id
// //
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.singleTable.setCurrentRow(this.bindToDBData[0]) this.$refs.singleTable.setCurrentRow(this.bindToDBData[0])

@ -149,7 +149,7 @@
v-loading="tabsLoading" v-loading="tabsLoading"
element-loading-text="拼命加载中" element-loading-text="拼命加载中"
> >
<el-tab-pane label="易制毒易制爆管理" name="first"> <el-tab-pane label="易制毒易制爆管理" name="first">
<el-checkbox <el-checkbox
v-model="checkAll_drug_module_id" v-model="checkAll_drug_module_id"
:indeterminate="isIndeterminate_drug_module_id" :indeterminate="isIndeterminate_drug_module_id"

@ -184,7 +184,7 @@ export default {
role_id: undefined, role_id: undefined,
role_code: undefined, role_code: undefined,
role_name: undefined, role_name: undefined,
// //
drug_module_id: [], drug_module_id: [],
// //
standard_module_id: [], standard_module_id: [],

Loading…
Cancel
Save