| | |
| | | <el-table-column label="所在仓库" prop="warehouseName" align="center" /> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" >取用记录</el-button> |
| | | <el-button link type="primary" @click="viewFlow(scope.row)">取用记录</el-button> |
| | | <el-button link type="danger" v-if="scope.row.state === 0" @click="disCard(scope.row)">标签作废</el-button> |
| | | <el-button link type="primary" @click="viewQR(scope.row)">查看二维码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | @pagination="getList" |
| | | /> |
| | | <viewQRcode ref="dialogRef" @getList="getList"></viewQRcode> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | width="600px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <flow-deail ref="flowRef"></flow-deail> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {nextTick, onMounted, reactive, ref} from "vue"; |
| | | import {useRoute, useRouter} from "vue-router"; |
| | | import {getProDetail, getProductRecord} from "@/api/hazardousChemicals/productRecord"; |
| | | import flowDeail from '../../../components/flowDetail.vue' |
| | | import {disCardPro, doEntryPro, getProDetail, getProductRecord} from "@/api/hazardousChemicals/productRecord"; |
| | | import viewQRcode from './viewQR.vue' |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import Cookies from "js-cookie"; |
| | | const route = useRoute() |
| | | const router = useRouter(); |
| | | const dialogRef = ref(); |
| | | const flowRef = ref(); |
| | | |
| | | const dialogVisible = ref(false) |
| | | const data = reactive({ |
| | | queryParams: { |
| | | basicId: null, |
| | |
| | | const viewQR = (val) => { |
| | | dialogRef.value.openDialog('pro',val) |
| | | } |
| | | const disCard = async (val) => { |
| | | ElMessageBox.confirm( |
| | | '确定作废该标签?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await disCardPro(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('操作成功') |
| | | await getList() |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | }) |
| | | |
| | | |
| | | } |
| | | const handleClose = () => { |
| | | dialogVisible.value = false |
| | | } |
| | | const viewFlow = (val) => { |
| | | dialogVisible.value = true |
| | | nextTick(() => { |
| | | |
| | | flowRef.value.openDialog('pro',val) |
| | | }) |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |