| | |
| | | # 危化品全生命周期管理/开发环境 |
| | | |
| | | #孔哥 |
| | | VITE_APP_BASE_API = 'http://192.168.2.15:8083/api' |
| | | #VITE_APP_BASE_API = 'http://192.168.2.15:8083/api' |
| | | VITE_APP_RESOURCE_API = 'http://192.168.2.16:9000/trainexam/' |
| | | |
| | | #董 |
| | | VITE_APP_BASE_API = 'http://192.168.2.24:8083/api' |
| | | |
| | | #线上 |
| | | #VITE_APP_BASE_API = 'http://106.15.95.149:8088/api' |
| | | #VITE_APP_BASE_API = 'http://47.108.222.15:8001/api' |
对比新文件 |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function getCharacteristic(params) { |
| | | return request({ |
| | | url: '/peculiarity/list', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | export function getCharacteristicAll(params) { |
| | | return request({ |
| | | url: '/peculiarity/select', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function addCharacteristic(data) { |
| | | return request({ |
| | | url: '/peculiarity/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function editCharacteristic(data) { |
| | | return request({ |
| | | url: `/peculiarity/update`, |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function delCharacteristic(data) { |
| | | return request({ |
| | | url: `/peculiarity/deleted/` + data, |
| | | method: 'get' |
| | | }) |
| | | } |
对比新文件 |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function getClassifyInfo(params) { |
| | | return request({ |
| | | url: '/secientific/list', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | export function addClassifyInfo(data) { |
| | | return request({ |
| | | url: '/secientific/add', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function editClassifyInfo(data) { |
| | | return request({ |
| | | url: `/secientific/update`, |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function delClassifyInfo(data) { |
| | | return request({ |
| | | url: `/secientific/deleted/` + data, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | export function exportClassifyInfo(data) { |
| | | return request({ |
| | | url: '/secientific/importExcel', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export function addCupboard(data) { |
| | | return request({ |
| | | url: '/warehouse/insertCupboard', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function editCupboard(params) { |
| | | return request({ |
| | | url: `/warehouse/updateCupboard`, |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | export function delCupboard(data) { |
| | | return request({ |
| | | url: `/warehouse/deletedCupboard/` + data, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | export function getCupById(data) { |
| | | return request({ |
| | | url: `/warehouse/listByid/` + data, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | $--color-danger: #F56C6C; |
| | | $--color-info: #909399; |
| | | |
| | | $base-sidebar-width: 200px; |
| | | $base-sidebar-width: 220px; |
| | | |
| | | // the :export directive is the magic sauce for webpack |
| | | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass |
| | |
| | | meta: { title: '系统管理',icon: 'dict'}, |
| | | children: [ |
| | | { |
| | | path: 'characteristic', |
| | | name: 'characteristic', |
| | | meta: { title: '危化品特性管理',icon: 'druid'} |
| | | |
| | | }, |
| | | { |
| | | path: 'classifyInfoTable', |
| | | name: 'classifyInfoTable', |
| | | meta: { title: '危化品分类信息表',icon: 'table'} |
| | | |
| | | }, |
| | | { |
| | | path: 'company', |
| | | name: 'company', |
| | | meta: { title: '企业管理',icon: 'form'} |
| | |
| | | name: 'config', |
| | | meta: { title: '企业配置',icon: 'form'} |
| | | }, |
| | | { |
| | | path: 'characteristic', |
| | | component: () => import('@/views/hazardousChemicals/systemManage/characteristic/index.vue'), |
| | | name: 'characteristic', |
| | | meta: { title: '危化品特性管理',icon: 'form'} |
| | | }, |
| | | { |
| | | path: 'classifyInfoTable', |
| | | component: () => import('@/views/hazardousChemicals/systemManage/classifyInfoTable/index.vue'), |
| | | name: 'classifyInfoTable', |
| | | meta: { title: '危化品分类信息表',icon: 'form'} |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | |
| | | <el-table-column label="CAS" prop="cas" align="center"/> |
| | | <el-table-column label="试剂类型" prop="hazmatType" align="center"/> |
| | | <el-table-column label="危险性质" prop="hazmatCharacter" align="center" width="140"/> |
| | | <el-table-column label="危化品特性" prop="peculiarityType" align="center" width="140"/> |
| | | <el-table-column label="供应商" prop="supplier" align="center"/> |
| | | <el-table-column label="厂家" prop="manufacturer" align="center"/> |
| | | <el-table-column label="规格" prop="hazmatFormat" align="center"/> |
| | |
| | | <el-table-column label="CAS" prop="cas" align="center"/> |
| | | <el-table-column label="试剂类型" prop="productType" align="center"/> |
| | | <el-table-column label="危险性质" prop="productCharacter" align="center"/> |
| | | <el-table-column label="危化品特性" prop="peculiarityType" align="center" width="140"/> |
| | | <el-table-column label="供应商" prop="supplier" align="center"/> |
| | | <el-table-column label="厂家" prop="manufacturer" align="center"/> |
| | | <el-table-column label="规格" prop="productFormat" align="center"/> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="notice"> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="title" |
| | | width="500px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="busRef" :rules="state.formRules" label-width="150px" > |
| | | <el-form-item label="种类:" prop="peculiarityType" > |
| | | <el-input v-model.trim="state.form.peculiarityType" placeholder="请输入种类"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="编号:" prop="peculiarityNumber" > |
| | | <el-input v-model.trim="state.form.peculiarityNumber" oninput="value=value.replace(/^\.+|[^\d]/g,'')" placeholder="请输入编号"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="handleClose" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="onSubmit" size="default" v-preReClick>确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import {reactive, ref, toRefs} from 'vue' |
| | | import {ElMessage} from "element-plus"; |
| | | import {addWarehouse, checkName, editWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {verifyPhone} from "@/utils/validate"; |
| | | import {checkBasicName} from "@/api/hazardousChemicals/basicInfo"; |
| | | import {addCharacteristic, editCharacteristic} from "@/api/hazardousChemicals/characteristic"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | | const busRef = ref(); |
| | | const length = ref() |
| | | const emit = defineEmits(["getList"]); |
| | | const startUsername = ref(''); |
| | | const state = reactive({ |
| | | form: { |
| | | id: '', |
| | | peculiarityType: '', |
| | | peculiarityNumber: null |
| | | |
| | | }, |
| | | formRules:{ |
| | | peculiarityType: [{ required: true, trigger: "blur", message: '请输入种类', }], |
| | | peculiarityNumber: [{ required: true, message: '请输入编号', trigger: 'blur' }], |
| | | }, |
| | | }) |
| | | |
| | | |
| | | const openDialog = async (type, value) => { |
| | | |
| | | title.value = type === 'add' ? '新增种类' : type ==='edit' ? '编辑种类':'' ; |
| | | if(type === 'edit' ) { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | startUsername.value = value.username |
| | | } |
| | | dialogVisible.value = true; |
| | | } |
| | | |
| | | const onSubmit = async () => { |
| | | const valid = await busRef.value.validate(); |
| | | if(valid){ |
| | | if(title.value === '新增种类'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await addCharacteristic(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '新增成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | }else if(title.value === '编辑种类'){ |
| | | const {createBy,createTime,delFlag,...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await editCharacteristic(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '编辑成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | const handleClose = () => { |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | emit("getList") |
| | | } |
| | | const reset = () => { |
| | | state.form = { |
| | | id: '', |
| | | peculiarityType: '', |
| | | peculiarityNumber: null |
| | | } |
| | | } |
| | | defineExpose({ |
| | | openDialog |
| | | }); |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .notice{ |
| | | :deep(.el-form .el-form-item__label) { |
| | | font-size: 15px; |
| | | } |
| | | .file { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | } |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" > |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog('add',{})" |
| | | >新增</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="种类" prop="peculiarityType" align="center" /> |
| | | <el-table-column label="编号" prop="peculiarityNumber" align="center" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | v-model:page="queryParams.pageNum" |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <characteristic-dialog ref="dialogRef" @getList=getList></characteristic-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import characteristicDialog from "./components/characteristicDialog.vue"; |
| | | import {delWarehouse, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {delCharacteristic, getCharacteristic} from "@/api/hazardousChemicals/characteristic"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '' |
| | | }, |
| | | total: 0, |
| | | dataList: [] |
| | | }); |
| | | |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | const classHourRef = ref(); |
| | | onMounted(()=>{ |
| | | getList() |
| | | }) |
| | | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getCharacteristic(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list |
| | | data.total = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | | dialogRef.value.openDialog(type, value); |
| | | } |
| | | |
| | | /** 重置新增的表单以及其他数据 */ |
| | | function reset() { |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '' |
| | | } |
| | | getList() |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delCharacteristic(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | await getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | </script> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="notice"> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="title" |
| | | width="500px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="busRef" :rules="state.formRules" label-width="150px" > |
| | | <el-form-item label="品名:" prop="secientificName" > |
| | | <el-input v-model.trim="state.form.secientificName" placeholder="请输入品名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="别名:" prop="aliasName" > |
| | | <el-input v-model.trim="state.form.aliasName" placeholder="请输入别名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="CAS号:" prop="cas" > |
| | | <el-input v-model.trim="state.form.cas" placeholder="请输入CAS号"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="危险性类别:" prop="riskType" > |
| | | <el-input type="textarea" v-model.trim="state.form.riskType" placeholder="请输入危险性类别"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="危化品特性:" prop="peculiarityType" > |
| | | <el-select |
| | | v-model="state.form.peculiarityType" |
| | | placeholder="请选择危化品特性" |
| | | style="width: 100%" |
| | | @change="changeSelect" |
| | | > |
| | | <el-option |
| | | v-for="item in state.characteristicList" |
| | | :key="item.peculiarityNumber" |
| | | :label="item.peculiarityType" |
| | | :value="item.peculiarityNumber" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="备注:" prop="remark" > |
| | | <el-input type="textarea" v-model.trim="state.form.remark" placeholder="请输入描述"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="handleClose" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="onSubmit" size="default" v-preReClick>确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import {reactive, ref, toRefs} from 'vue' |
| | | import {ElMessage} from "element-plus"; |
| | | import {addWarehouse, checkName, editWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {verifyPhone} from "@/utils/validate"; |
| | | import {checkBasicName} from "@/api/hazardousChemicals/basicInfo"; |
| | | import {getCharacteristic, getCharacteristicAll} from "@/api/hazardousChemicals/characteristic"; |
| | | import {addClassifyInfo, editClassifyInfo} from "@/api/hazardousChemicals/classifyInfo"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | | const busRef = ref(); |
| | | const length = ref() |
| | | const emit = defineEmits(["getList"]); |
| | | |
| | | const state = reactive({ |
| | | form: { |
| | | id: '', |
| | | secientificName: '', |
| | | aliasName: '', |
| | | cas: '', |
| | | riskType: '', |
| | | peculiarityNumber: '' |
| | | |
| | | }, |
| | | formRules:{ |
| | | secientificName: [{ required: true, message: '请输入品名', trigger: 'blur' }], |
| | | aliasName: [{ required: true, message: '请输入别名', trigger: 'blur' }], |
| | | cas: [{ required: true, message: '请输入CAS编号', trigger: 'blur' }], |
| | | riskType: [{ required: true, message: '请输入危险性类别', trigger: 'blur' }], |
| | | peculiarityType: [{ required: true, message: '请选择危化品特性', trigger: 'blur' }], |
| | | }, |
| | | characteristicList: [] |
| | | }) |
| | | |
| | | |
| | | const openDialog = async (type, value) => { |
| | | await getCharacteristicList() |
| | | title.value = type === 'add' ? '新增危化品分类信息' : type ==='edit' ? '编辑危化品分类信息':'' ; |
| | | if(type === 'edit' ) { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | console.log('state.form',state.form) |
| | | } |
| | | dialogVisible.value = true; |
| | | } |
| | | |
| | | const getCharacteristicList = async () => { |
| | | const res = await getCharacteristicAll() |
| | | if(res.code == 200){ |
| | | state.characteristicList = res.data.list |
| | | console.log('state.characteristicList',state.characteristicList) |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const onSubmit = async () => { |
| | | const valid = await busRef.value.validate(); |
| | | if(valid){ |
| | | if(title.value === '新增危化品分类信息'){ |
| | | const {id,peculiarityType, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await addClassifyInfo(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '新增成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | }else if(title.value === '编辑危化品分类信息'){ |
| | | const {peculiarityType,...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await editClassifyInfo(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '编辑成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | const changeSelect = (val) => { |
| | | state.form.peculiarityNumber = val |
| | | } |
| | | |
| | | const handleClose = () => { |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | emit("getList") |
| | | } |
| | | const reset = () => { |
| | | state.form = { |
| | | id: '', |
| | | secientificName: '', |
| | | aliasName: '', |
| | | cas: '', |
| | | riskType: '', |
| | | peculiarityNumber: '' |
| | | } |
| | | } |
| | | defineExpose({ |
| | | openDialog |
| | | }); |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .notice{ |
| | | :deep(.el-form .el-form-item__label) { |
| | | font-size: 15px; |
| | | } |
| | | .file { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | } |
| | | </style> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" > |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="Plus" |
| | | @click="openDialog('add',{})" |
| | | >新增</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | style="width: 80px;margin-left: -20px" |
| | | @click="exportData" |
| | | >批量导入</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="品名:" > |
| | | <el-input v-model="data.queryParams.secientificName" placeholder="请输入品名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | <el-button |
| | | type="primary" |
| | | @click="getList" |
| | | >查询</el-button> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | @click="reset" |
| | | >重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="品名" prop="secientificName" align="center" /> |
| | | <el-table-column label="别名" prop="aliasName" align="center" /> |
| | | <el-table-column label="CAS号" prop="cas" align="center" /> |
| | | <el-table-column label="危险性类别" prop="riskType" > |
| | | <template #default="scope"> |
| | | <div v-html="scope.row.riskType.split('\n').join('<br/>')"></div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="危化品特性" prop="peculiarityType" align="center" /> |
| | | <el-table-column label="编号" prop="peculiarityNumber" align="center" /> |
| | | <el-table-column label="备注" prop="remark" align="center" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | v-model:page="queryParams.pageNum" |
| | | v-model:limit="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <classify-info-dialog ref="dialogRef" @getList=getList></classify-info-dialog> |
| | | <el-dialog |
| | | v-model="exportDialog" |
| | | title="批量导入危化品分类信息" |
| | | width="500px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form size="default" ref="busRef" label-width="180px" > |
| | | <el-form-item label="危化品分类信息模板:"> |
| | | <el-button type="primary" plain @click="downloadFile">下载模板</el-button> |
| | | </el-form-item> |
| | | <div style="color: #ed5565;margin-left: 30px;margin-top: -8px;margin-bottom: 18px"> |
| | | 导入危化品分类信息数据须依据此模板 |
| | | </div> |
| | | <el-form-item label="危化品分类信息表文件:"> |
| | | <el-upload |
| | | :auto-upload="false" |
| | | action="#" |
| | | :file-list="data.fileList" |
| | | :remove="handleRemove" |
| | | :on-change="handleChange" |
| | | accept=".xlsx,.xls" |
| | | :limit="data.limit" |
| | | style="width: 230px" |
| | | > |
| | | <el-button type="primary"> 点击上传 </el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="handleClose" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="onUpload" size="default" v-preReClick>确认</el-button> |
| | | </span> |
| | | </template> |
| | | |
| | | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import classifyInfoDialog from "./components/classifyInfoDialog.vue"; |
| | | import {delWarehouse, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {exportBasicInfo} from "@/api/hazardousChemicals/basicInfo"; |
| | | import {delClassifyInfo, exportClassifyInfo, getClassifyInfo} from "@/api/hazardousChemicals/classifyInfo"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | | const exportDialog = ref(false) |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | secientificName: '' |
| | | }, |
| | | total: 0, |
| | | dataList: [], |
| | | fileList: [] |
| | | }); |
| | | |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | const classHourRef = ref(); |
| | | onMounted(()=>{ |
| | | getList() |
| | | }) |
| | | |
| | | onUnmounted(()=>{ |
| | | |
| | | }) |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getClassifyInfo(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list |
| | | data.total = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | | dialogRef.value.openDialog(type, value); |
| | | } |
| | | |
| | | /** 重置新增的表单以及其他数据 */ |
| | | function reset() { |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | secientificName: '' |
| | | } |
| | | getList() |
| | | } |
| | | const handleDelete = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delClassifyInfo(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | await getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | const exportData = () => { |
| | | exportDialog.value = true |
| | | } |
| | | const handleClose = () => { |
| | | data.fileList = [] |
| | | exportDialog.value = false |
| | | } |
| | | const downloadFile = () => { |
| | | const link = document.createElement('a') |
| | | link.href = '../files/classify.xls' |
| | | link.target = '_blank' |
| | | link.download = '危化品分类信息模板.xls' |
| | | link.click() |
| | | } |
| | | const handleRemove = (file) => { |
| | | const index = data.fileList.indexOf(file) |
| | | const newFileList = data.fileList.slice() |
| | | newFileList.splice(index, 1) |
| | | data.fileList = newFileList; |
| | | } |
| | | const f = ref() |
| | | const handleChange = (file,fileList) => { |
| | | console.log('file',file) |
| | | let fileExtension = file.name.split('.').pop(); |
| | | if(fileExtension == 'xls' || fileExtension == 'xlsx'){ |
| | | f.value = file.raw |
| | | }else { |
| | | data.fileList = [] |
| | | ElMessage.warning('仅可上传Execl文件') |
| | | } |
| | | } |
| | | const onUpload = async () => { |
| | | |
| | | if(!f.value){ |
| | | ElMessage.warning('请先上传危化品分类信息表') |
| | | return; |
| | | }else{ |
| | | const formData = new FormData(); |
| | | formData.append('file', f.value) |
| | | |
| | | const res = await exportClassifyInfo(formData) |
| | | if(res.code == 200){ |
| | | ElMessage.success('上传成功') |
| | | data.fileList = [] |
| | | exportDialog.value = false |
| | | await getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
对比新文件 |
| | |
| | | <template> |
| | | <div class="notice"> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="title" |
| | | width="500px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="busRef" :rules="state.formRules" label-width="150px" > |
| | | <el-form-item label="存储柜名:" prop="cupboardName" > |
| | | <el-input v-model.trim="state.form.cupboardName" placeholder="请输入存储柜名"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="描述:" prop="mess" > |
| | | <el-input type="textarea" v-model.trim="state.form.mess" placeholder="请输入描述"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="handleClose" size="default">取 消</el-button> |
| | | <el-button type="primary" @click="onSubmit" size="default" v-preReClick>确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import {reactive, ref, toRefs} from 'vue' |
| | | import {ElMessage} from "element-plus"; |
| | | import {addCupboard, addWarehouse, checkName, editCupboard, editWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {verifyPhone} from "@/utils/validate"; |
| | | import {checkBasicName} from "@/api/hazardousChemicals/basicInfo"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | | const busRef = ref(); |
| | | const length = ref() |
| | | const emit = defineEmits(["getList"]); |
| | | |
| | | const state = reactive({ |
| | | form: { |
| | | id: '', |
| | | warehouseId: null, |
| | | cupboardName: '', |
| | | mess: '' |
| | | |
| | | }, |
| | | formRules:{ |
| | | cupboardName: [{ required: true, trigger: "blur", message: '请输入存储柜名' }], |
| | | }, |
| | | }) |
| | | |
| | | const warehouseId = ref(null) |
| | | const openDialog = async (type, value) => { |
| | | state.form.warehouseId = value.id |
| | | title.value = type === 'add' ? '新增存储柜' : type ==='edit' ? '编辑存储柜':'' ; |
| | | if(type === 'edit' ) { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | } |
| | | dialogVisible.value = true; |
| | | } |
| | | |
| | | const onSubmit = async () => { |
| | | const valid = await busRef.value.validate(); |
| | | if(valid){ |
| | | if(title.value === '新增存储柜'){ |
| | | const {id, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await addCupboard(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '新增成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | }else if(title.value === '编辑存储柜'){ |
| | | const {createBy,createTime,delFlag,...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await editCupboard(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '编辑成功' |
| | | }); |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | emit("getList") |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | const handleClose = () => { |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | emit("getList") |
| | | } |
| | | const reset = () => { |
| | | state.form = { |
| | | id: '', |
| | | warehouseId: null, |
| | | cupboardName: '', |
| | | mess: '' |
| | | } |
| | | } |
| | | defineExpose({ |
| | | openDialog |
| | | }); |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .notice{ |
| | | :deep(.el-form .el-form-item__label) { |
| | | font-size: 15px; |
| | | } |
| | | .file { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column type="expand"> |
| | | <template #default="props"> |
| | | <el-table :data="props.row.warehouseCupboards" style="width: 90%;margin-left: 5%" :row-key="getRowKeys" border> |
| | | <el-table-column label="存储柜名" prop="cupboardName" align="center" /> |
| | | <el-table-column label="描述" prop="mess" align="center" /> |
| | | <el-table-column label="操作" show-overflow-tooltip width="150" > |
| | | <template #default="scope"> |
| | | <el-button size="small" text type="primary" @click="addCupboard('edit',scope.row)">编辑</el-button> |
| | | <el-button size="small" text type="danger" @click="delCup(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="仓库名称" prop="name" align="center" /> |
| | | <el-table-column label="描述" prop="remark" align="center" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="addCupboard('add',scope.row)">新增存储柜</el-button> |
| | | <el-button link type="primary" @click="openDialog('edit',scope.row)">编辑</el-button> |
| | | <el-button link type="danger" @click="handleDelete(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | /> |
| | | |
| | | <warehouse-dialog ref="dialogRef" @getList=getList></warehouse-dialog> |
| | | <cupboard-dialog ref="cupDialogRef" @getList=getList></cupboard-dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {getCurrentInstance, onMounted, onUnmounted, reactive, ref, toRefs} from "vue"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import warehouseDialog from "./components/warehouseDialog.vue"; |
| | | import {delWarehouse, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import cupboardDialog from "./components/cupboard.vue" |
| | | import {delCupboard, delWarehouse, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | | const cupDialogRef = ref(); |
| | | const data = reactive({ |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | } |
| | | }) |
| | | } |
| | | const delCup = (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定删除此条数据?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delCupboard(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | await getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | const addCupboard = (type,value) => { |
| | | cupDialogRef.value.openDialog(type, value); |
| | | } |
| | | |
| | | |
| | | const getRowKeys = (row) => { |
| | | return row.name |
| | | } |
| | | </script> |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="存储柜:" prop="cupboardId" > |
| | | <el-select |
| | | v-model="state.form.cupboardId" |
| | | placeholder="请选择存储柜" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in state.cupList" |
| | | :key="item.id" |
| | | :label="item.cupboardName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="数量:" prop="num" > |
| | | <el-input v-model.trim="state.form.num" oninput="value=value.replace(/^\.+|[^\d]/g,'')" placeholder="请输入最小包装数量" @input="changeNum"></el-input> |
| | | </el-form-item> |
| | |
| | | <script setup> |
| | | import {reactive, ref, toRefs} from 'vue' |
| | | import {ElMessage} from "element-plus"; |
| | | import {getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {getCupById, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {addProductRecord, editProductRecord, getProductRecord} from "@/api/hazardousChemicals/productRecord"; |
| | | import {getFinishBasicList} from "@/api/hazardousChemicals/finishedBasicInfo"; |
| | | import moment from "moment"; |
| | |
| | | warehouseName: '', |
| | | warehouseId: null, |
| | | num: null, |
| | | batchNo: '' |
| | | batchNo: '', |
| | | cupboardName: '', |
| | | cupboardId: null, |
| | | |
| | | }, |
| | | formRules:{ |
| | | num: [{ required: true, trigger: "blur", validator: validateNum }], |
| | | warehouseName: [{ required: true, trigger: "blur", message: '请选择入库仓库' }], |
| | | basicName: [{ required: true, trigger: "blur", message: '请选择入库成品' }], |
| | | cupboardId: [{ required: true, trigger: "blur", message: '请选择存储柜' }] |
| | | // batchNo: [{ required: true, trigger: "blur", message: '请输入批号' }] |
| | | }, |
| | | proList: [], |
| | |
| | | state.form.batchNo = moment(new Date()).format("YYYYMMDD") |
| | | title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑':'' ; |
| | | if(type === 'edit' ) { |
| | | state.form = value; |
| | | await getCupList(value.warehouseId) |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | state.form.cupboardId = state.form.cupboard && state.form.cupboard.id ?state.form.cupboard.id : null |
| | | state.form.basicName = value.productBasic.name + '—' + value.productBasic.productSn + ' (' + value.productBasic.metering +value.productBasic.unit+') ' |
| | | state.form.warehouseName = value.warehouse.name; |
| | | choosePro.value = value.productBasic |
| | |
| | | state.message = `您将入库 { ${choosePro.value.name.substring(0,choosePro.value.name.lastIndexOf('—')) } },编号:{ ${choosePro.value.productSn} },最小包装${choosePro.value.metering}${choosePro.value.unit},类别:${minPackageType}。 \n 共计:${state.form.num}${minPackageType}` |
| | | } |
| | | const selectWareValue = (val) => { |
| | | state.form.cupboardId = null |
| | | state.wareHouseList.forEach(item => { |
| | | if(item.name === val){ |
| | | state.form.warehouseId = item.id |
| | | getCupList(item.id) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const getCupList = async (val) => { |
| | | const res = await getCupById(val) |
| | | if(res.code == 200) { |
| | | state.cupList = res.data |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const handleClose = () => { |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | |
| | | warehouseName: '', |
| | | warehouseId: null, |
| | | num: null, |
| | | batchNo: '' |
| | | batchNo: '', |
| | | cupboardName: '', |
| | | cupboardId: null, |
| | | } |
| | | state.proList = []; |
| | | state.wareHouseList = []; |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="存储柜:" prop="cupboardId" > |
| | | <el-select |
| | | v-model="state.form.cupboardId" |
| | | placeholder="请选择存储柜" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in state.cupList" |
| | | :key="item.id" |
| | | :label="item.cupboardName" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="数量:" prop="num" > |
| | | <el-input v-model.trim="state.form.num" oninput="value=value.replace(/^\.+|[^\d]/g,'')" placeholder="请输入最小包装数量" @input="changeNum"></el-input> |
| | | </el-form-item> |
| | |
| | | <script setup> |
| | | import {reactive, ref, toRefs} from 'vue' |
| | | import {ElMessage} from "element-plus"; |
| | | import {addWarehouse, checkName, editWarehouse, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {addWarehouse, checkName, editWarehouse, getCupById, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {verifyPhone} from "@/utils/validate"; |
| | | import {checkBasicName, getBasicList} from "@/api/hazardousChemicals/basicInfo"; |
| | | import {addProductRecord, editProductRecord, getProductRecord} from "@/api/hazardousChemicals/productRecord"; |
| | |
| | | basicName:'', |
| | | warehouseName: '', |
| | | warehouseId: null, |
| | | cupboardName: '', |
| | | cupboardId: null, |
| | | num: null, |
| | | batchNo: '' |
| | | |
| | |
| | | num: [{ required: true, trigger: "blur", validator: validateNum }], |
| | | warehouseName: [{ required: true, trigger: "blur", message: '请选择入库仓库' }], |
| | | basicName: [{ required: true, trigger: "blur", message: '请选择入库成品' }], |
| | | // batchNo: [{ required: true, trigger: "blur", message: '请输入批号' }] |
| | | cupboardId: [{ required: true, trigger: "blur", message: '请选择存储柜' }] |
| | | }, |
| | | rawList: [], |
| | | wareHouseList: [], |
| | | message: '' |
| | | message: '', |
| | | cupList: [] |
| | | }) |
| | | |
| | | |
| | |
| | | title.value = type === 'add' ? '新增' : type ==='edit' ? '编辑':'' ; |
| | | if(type === 'edit' ) { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | await getCupList(value.warehouseId) |
| | | state.form.basicName = value.hazmatBasic.name + '—' + value.hazmatBasic.productSn + ' (' + value.hazmatBasic.metering + value.hazmatBasic.unit+') ' |
| | | state.form.warehouseName = value.warehouse.name; |
| | | choosePro.value = value.hazmatBasic |
| | |
| | | } |
| | | const res = await getWarehouse(param) |
| | | if(res.code == 200){ |
| | | state.wareHouseList = res.data.list |
| | | state.wareHouseList = res.data.list.map(item => { |
| | | return { |
| | | ...item, |
| | | children: item.warehouseCupboards && item.warehouseCupboards.length>0 ? item.warehouseCupboards : null |
| | | } |
| | | }) |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | |
| | | state.message = `您将入库 { ${choosePro.value.name.substring(0,choosePro.value.name.lastIndexOf('—')) } },编号:{ ${choosePro.value.productSn} },最小包装${choosePro.value.metering}${choosePro.value.unit},类别:${minPackageType}。 \n 共计:${state.form.num}${minPackageType}` |
| | | } |
| | | const selectWareValue = (val) => { |
| | | state.form.cupboardId = null |
| | | state.wareHouseList.forEach(item => { |
| | | if(item.name === val){ |
| | | state.form.warehouseId = item.id |
| | | getCupList(item.id) |
| | | } |
| | | }) |
| | | } |
| | | const getCupList = async (val) => { |
| | | const res = await getCupById(val) |
| | | if(res.code == 200) { |
| | | state.cupList = res.data |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | |
| | | const handleClose = () => { |
| | |
| | | warehouseName: '', |
| | | warehouseId: null, |
| | | num: null, |
| | | batchNo: '' |
| | | batchNo: '', |
| | | cupboardName: '', |
| | | cupboardId: null, |
| | | } |
| | | state.rawList = []; |
| | | state.wareHouseList = []; |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="所在仓库" prop="warehouseName" align="center" /> |
| | | <el-table-column label="存储柜" prop="cupboardName" align="center" width="120" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="viewFlow(scope.row)">取用记录</el-button> |
| | |
| | | <span>{{scope.row.warehouse.name}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="存储柜" prop="cupboard.cupboardName" align="center" width="120" /> |
| | | <el-table-column label="批号" prop="batchNo" align="center" width="120" /> |
| | | <el-table-column label="状态" prop="state" align="center"> |
| | | <template #default="scope"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="所在仓库" prop="warehouseName" align="center" /> |
| | | <el-table-column label="存储柜" prop="cupboardName" align="center" width="120" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" v-if="scope.row.state ===0 || scope.row.state === 1" @click="editNum(scope.row)">零头修改</el-button> |
| | |
| | | <span>{{scope.row.warehouse.name}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="存储柜" prop="cupboard.cupboardName" align="center" width="120" /> |
| | | <el-table-column label="批号" prop="batchNo" align="center" width="120" /> |
| | | <el-table-column label="状态" prop="state" align="center"> |
| | | <template #default="scope"> |