|
|
@ -4,107 +4,76 @@
|
|
|
|
<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-row :gutter="15">
|
|
|
|
|
|
|
|
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="110px">
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="试剂名称" prop="name">
|
|
|
|
|
|
|
|
<el-input v-model="formData.name" placeholder="请输入试剂名称" clearable :style="{width: '100%'}" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="CAS码" prop="cas_number">
|
|
|
|
|
|
|
|
<el-input v-model="formData.cas_number" placeholder="请输入CAS码" clearable :style="{width: '100%'}" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="试剂纯度" prop="purity">
|
|
|
|
|
|
|
|
<el-input v-model="formData.purity" placeholder="请输入试剂纯度" clearable :style="{width: '100%'}" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="采购数量" prop="export_count">
|
|
|
|
|
|
|
|
<el-input v-model="formData.export_count" placeholder="请输入采购数量" clearable :style="{width: '100%'}" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="规格" prop="speci">
|
|
|
|
|
|
|
|
<el-input v-model="formData.speci" placeholder="请输入规格" clearable :style="{width: '100%'}" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="单位" prop="net_weight_unit">
|
|
|
|
|
|
|
|
<el-input v-model="formData.net_weight_unit" placeholder="请输入单位" clearable :style="{width: '100%'}" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="预估质量" prop="net_weight">
|
|
|
|
|
|
|
|
<el-input v-model="formData.net_weight" placeholder="请输入预估质量" clearable :style="{width: '100%'}" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<div style="text-align: center">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="handelConfirm">保存</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <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-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="撤销采购单申请"
|
|
|
@ -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:[],
|
|
|
|
|
|
|
|
pt_form:{
|
|
|
|
|
|
|
|
user_id_pt: '',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
user_id_pt: [
|
|
|
|
name: [
|
|
|
|
{ required: true, message: '请选择陪同人', trigger: 'change' }
|
|
|
|
{ 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'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
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,122 +342,87 @@ 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)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//申请页翻页
|
|
|
|
|
|
|
|
pageChange(page) {
|
|
|
|
//获取申请列表
|
|
|
|
this.page = page
|
|
|
|
get_apply(){
|
|
|
|
this.get_drug_group()
|
|
|
|
const data = {
|
|
|
|
},
|
|
|
|
page:this.page,
|
|
|
|
addDataIndex(initData){
|
|
|
|
page_size: this.page_size
|
|
|
|
for (let i = 0; i < initData.length; i++) {
|
|
|
|
|
|
|
|
initData[i]["index"] = i
|
|
|
|
}
|
|
|
|
}
|
|
|
|
get_apply_list(stringify(data)).then(rsp => {
|
|
|
|
return initData
|
|
|
|
console.log("apply>>>", rsp)
|
|
|
|
|
|
|
|
this.tableData1 = rsp.data.data_list
|
|
|
|
|
|
|
|
this.total1 = rsp.data.total_count
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
//申请
|
|
|
|
//陪同用户
|
|
|
|
handleRefresh() {
|
|
|
|
get_pt_user() {
|
|
|
|
this.page =1
|
|
|
|
console.log("jjj")
|
|
|
|
this.get_drug_group()
|
|
|
|
const data = {
|
|
|
|
},
|
|
|
|
page: 1,
|
|
|
|
//打开申请列表
|
|
|
|
page_size: 10000,
|
|
|
|
openDialogTableVisible(){
|
|
|
|
user_id:this.$store.state.user.id,
|
|
|
|
this.title='新增采购试剂'
|
|
|
|
user_code: this.user_code,
|
|
|
|
this.adddialogVisible = true
|
|
|
|
real_name: this.real_name,
|
|
|
|
},
|
|
|
|
role_id: this.role_id,
|
|
|
|
//关闭申请列表
|
|
|
|
is_enabled: this.is_enabled
|
|
|
|
dialogTableClose() {
|
|
|
|
|
|
|
|
this.adddialogVisible = false
|
|
|
|
|
|
|
|
this.checkList=[]
|
|
|
|
|
|
|
|
this.formData = {
|
|
|
|
|
|
|
|
name: undefined,
|
|
|
|
|
|
|
|
cas_number: undefined,
|
|
|
|
|
|
|
|
purity: undefined,
|
|
|
|
|
|
|
|
export_count:undefined,
|
|
|
|
|
|
|
|
speci: undefined,
|
|
|
|
|
|
|
|
net_weight_unit: undefined,
|
|
|
|
|
|
|
|
net_weight: undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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){
|
|
|
|
create_apply(){
|
|
|
|
var that =this
|
|
|
|
var that =this
|
|
|
|
let datalist = that.checkList.map((item) => {
|
|
|
|
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})
|
|
|
|
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 (pt_from.user_id_pt === '') {
|
|
|
|
if(this.title=='编辑采购试剂'){
|
|
|
|
that.$message({
|
|
|
|
const data = {
|
|
|
|
type: 'info',
|
|
|
|
id: this.row_id,
|
|
|
|
message: '请选择陪同人'
|
|
|
|
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{
|
|
|
|
}else{
|
|
|
|
const data = {
|
|
|
|
const data = {
|
|
|
|
user_id: this.$store.state.user.id,
|
|
|
|
use_doc: '',
|
|
|
|
user_id_pt: pt_from.user_id_pt,
|
|
|
|
|
|
|
|
use_content: JSON.stringify(datalist),
|
|
|
|
use_content: JSON.stringify(datalist),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
add_apply(stringify(data)).then(rsp => {
|
|
|
|
add(stringify(data)).then(rsp => {
|
|
|
|
console.log("rsp>>", rsp)
|
|
|
|
console.log("rsp>>", rsp)
|
|
|
|
if (rsp.status==0){
|
|
|
|
if (rsp.status==0){
|
|
|
|
this.dialogTableClose()
|
|
|
|
this.dialogTableClose()
|
|
|
|
//清空表格多选框
|
|
|
|
//清空表格多选框
|
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
|
that.checkList=[]
|
|
|
|
that.checkList=[]
|
|
|
|
this.get_apply()
|
|
|
|
this.page =1
|
|
|
|
|
|
|
|
this.get_drug_group()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//申请页翻页
|
|
|
|
|
|
|
|
pageChange(page) {
|
|
|
|
|
|
|
|
this.page = page
|
|
|
|
|
|
|
|
this.get_apply()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
addDataIndex(initData){
|
|
|
|
|
|
|
|
for (let i = 0; i < initData.length; i++) {
|
|
|
|
|
|
|
|
initData[i]["index"] = i
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return initData
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//申请
|
|
|
|
|
|
|
|
handleRefresh() {
|
|
|
|
|
|
|
|
this.get_apply()
|
|
|
|
|
|
|
|
this.get_drug_group()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//打开申请列表
|
|
|
|
|
|
|
|
openDialogTableVisible(){
|
|
|
|
|
|
|
|
this.dialogTableVisible = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//关闭申请列表
|
|
|
|
|
|
|
|
dialogTableClose() {
|
|
|
|
|
|
|
|
this.user_id_pt = ''
|
|
|
|
|
|
|
|
this.dialogTableVisible = false
|
|
|
|
|
|
|
|
this.checkList=[]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|