1 files added
8 files modified
| New file |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | export function getOrderList(params) { |
| | | return request({ |
| | | url: '/entry-record/orderlist', |
| | | method: 'get', |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | export function addOrder(data) { |
| | | return request({ |
| | | url: '/entry-record/orderadd', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function editOrder(params) { |
| | | return request({ |
| | | url: `/entry-record/orderedit`, |
| | | method: 'put', |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | export function delOrder(id) { |
| | | return request({ |
| | | url: `/entry-record/order/` + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function intoOrder(id) { |
| | | return request({ |
| | | url: '/entry-record/orderEntry/'+ id, |
| | | method: 'post', |
| | | }) |
| | | } |
| | | |
| | | |
| | | export function getOrderDetailById(data) { |
| | | return request({ |
| | | url: `/entry-record/order/hazmatlist`, |
| | | method: 'get', |
| | | params:data |
| | | }) |
| | | } |
| | |
| | | <div v-if="state.dataList.length>0"> |
| | | <div class="title"> |
| | | <span style="margin-right: 5px">{{state.form.name}}( {{state.form.productSn}} )</span> |
| | | <span>二维码识别号:{{state.form.code}} </span> |
| | | <span>试剂编码:{{state.form.code}} </span> |
| | | </div> |
| | | <div class="content" > |
| | | <el-timeline style="max-width: 600px"> |
| | |
| | | <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--> |
| | | <!-- icon="Plus"--> |
| | | <!-- @click="openDialog('add',{})"--> |
| | | <!-- >新增</el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="审批状态:" > |
| | | <el-select v-model="data.queryParams.status" placeholder="请选择" > |
| | | <el-option |
| | |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | |
| | | <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--> |
| | | <!-- icon="Plus"--> |
| | | <!-- @click="openDialog('add',{})"--> |
| | | <!-- >新增</el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="审批状态:" > |
| | | <el-select v-model="data.queryParams.status" placeholder="请选择" > |
| | | <el-option |
| | |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | |
| | | <div style="display: flex;width: 100%;margin-top: 5px"> |
| | | <el-table :data="state.form.subscribeHazmats" :border="true"> |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table-column label="危化品名称" align="center" > |
| | | <el-table-column label="危化品名称" align="center" width="200" > |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'subscribeHazmats.' + '[' + $index + ']' + '.hazmatName'" :rules="state.formRules.hazmatName"> |
| | | <el-input type="textarea" :rows="1" v-model="row.hazmatName" placeholder="请输入危化品名称"></el-input> |
| | | <el-select |
| | | clearable |
| | | v-model="row.hazmatName" |
| | | filterable |
| | | remote |
| | | @change="selectValueHazmat(row.hazmatName,$index)" |
| | | reserve-keyword |
| | | placeholder="请输入危化品名称" |
| | | remote-show-suffix |
| | | :remote-method="getHazmaList" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in state.hazmatList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | /> |
| | | </el-select> |
| | | <!-- <el-input type="textarea" :rows="1" v-model="row.hazmatName" placeholder="请输入危化品名称"></el-input>--> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import {getToken} from "@/utils/auth"; |
| | | import {renderAsync} from "docx-preview"; |
| | | import {addSubscribe, editSubscribe} from "@/api/hazardousChemicals/subscribeApply"; |
| | | import {getBasicList} from "@/api/hazardousChemicals/basicInfo"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | |
| | | }, |
| | | |
| | | peopleList:[], |
| | | hazmatList:[], |
| | | fileList:[], |
| | | uploadUrl: import.meta.env.VITE_APP_BASE_API + '/system/common/uploadFile', |
| | | header: { |
| | |
| | | |
| | | const openDialog = async (type, value) => { |
| | | await getPeopleList("") |
| | | await getHazmaList("") |
| | | title.value = type === 'add' ? '申购申请' : type ==='edit' ? '申购编辑' : '查看' ; |
| | | if(type === 'edit' || type === 'view') { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const getPeopleList = async (val)=>{ |
| | | let queryParams = {} |
| | | if(val != ""){ |
| | |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const selectValueHazmat = (val,index) => { |
| | | if(!val){ |
| | | state.form.subscribeHazmats.forEach((item, i) => i === index && (item.basicId = null)); |
| | | } |
| | | const match = state.hazmatList.find(item => item.name === val); |
| | | if (match) { |
| | | state.form.subscribeHazmats[index].basicId = match.id; |
| | | state.form.subscribeHazmats[index].hazmatName = match.name; |
| | | } |
| | | } |
| | | const getHazmaList = async (val)=>{ |
| | | let queryParams = {} |
| | | if(val != ""){ |
| | | queryParams = { |
| | | name: val |
| | | } |
| | | }else { |
| | | queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10 |
| | | } |
| | | } |
| | | const res = await getBasicList(queryParams) |
| | | if(res.code == 200){ |
| | | state.hazmatList = res.data.list |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const handleAvatarSuccess = (res, uploadFile) => { |
| | | if(res.code == 200){ |
| | | state.form.fileName = res.data.originName |
| | |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height:70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | |
| | | <el-table-column label="入库时间" prop="updateTime" align="center" /> |
| | | <el-table-column label="当前状态" prop="state" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.state ===0 || scope.row.state === 1 ? '在库' :scope.row.state === 2? '领用中': scope.row.state === 3 ? '已用完' : scope.row.state === 4 ? '标签作废' : ''}}</span> |
| | | <span>{{scope.row.state ===0 ? '初次入柜' :scope.row.state === 1? '回库': scope.row.state === 2 ? '出库' : scope.row.state === 4 ? '标签作废' : ''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="在库余量" prop="remaining" align="center" > |
| | |
| | | } from "@/api/hazardousChemicals/rawRecord"; |
| | | import viewQRcode from '@/views/hazardousChemicals/electronicWarehouseMenu/electronicWarehouse/components/viewQR.vue' |
| | | import Cookies from "js-cookie"; |
| | | import {getOrderDetailById} from "@/api/hazardousChemicals/orderWarehouse"; |
| | | const route = useRoute() |
| | | const router = useRouter(); |
| | | const dialogRef = ref(); |
| | |
| | | }, |
| | | { |
| | | id: 1, |
| | | name: '入库' |
| | | name: '回库' |
| | | }, |
| | | { |
| | | id: 2, |
| | | name: '出库' |
| | | }, |
| | | { |
| | | id: 3, |
| | | name: '作废' |
| | | }, |
| | | // { |
| | | // id: 3, |
| | | // name: '作废' |
| | | // }, |
| | | { |
| | | id: 4, |
| | | name: '待入库' |
| | | name: '标签作废' |
| | | }, |
| | | |
| | | ], |
| | |
| | | }) |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getWhRawDetail(data.queryParams) |
| | | const res = await getOrderDetailById(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list |
| | | data.total = res.data.total |
| | |
| | | } |
| | | const reset = () => { |
| | | data.queryParams = { |
| | | entryId: null, |
| | | entryId: data.queryParams.entryId, |
| | | state: null, |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-form :model="state.form" size="default" ref="busRef" :rules="state.formRules" label-width="150px" > |
| | | <el-form-item required label= "申购订单列表" > |
| | | <el-form-item label= "申购订单列表" prop="subscribeNum"> |
| | | <el-select |
| | | clearable |
| | | v-model="state.orderName" |
| | | v-model="state.form.subscribeNum" |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | |
| | | <el-table-column type="index" label="序号" width="80" align="center"></el-table-column> |
| | | <el-table-column label="危化品名称" align="center" > |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'subscribeHazmats.' + '[' + $index + ']' + '.hazmatName'" :rules="state.formRules.hazmatName"> |
| | | <el-input type="textarea" :rows="1" v-model="row.hazmatName" placeholder="请输入危化品名称"></el-input> |
| | | <el-form-item align="center" :prop="'subscribeHazmats.' + '[' + $index + ']' + '.hazmatName'" :rules="state.formRules.hazmatName"> |
| | | <span>{{row.hazmatName}}</span> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="数量" align="center" > |
| | | <template #default="{row,$index}"> |
| | | <el-form-item :prop="'subscribeHazmats.' + '[' + $index + ']' + '.hazmatCount'" :rules="state.formRules.hazmatCount"> |
| | | <el-input v-model="row.hazmatCount" @input="row.hazmatCount = row.hazmatCount.replace(/[^0-9]/g,'')" placeholder="请输入数量"></el-input> |
| | | <span>{{row.hazmatCount}}</span> |
| | | </el-form-item> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | import {addSubscribe, editSubscribe, getSubscribeList} from "@/api/hazardousChemicals/subscribeApply"; |
| | | import {getCupById, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import moment from "moment"; |
| | | import Cookies from "js-cookie"; |
| | | import {addOrder, editOrder} from "@/api/hazardousChemicals/orderWarehouse"; |
| | | |
| | | const dialogVisible = ref(false); |
| | | const title = ref(""); |
| | |
| | | const state = reactive({ |
| | | form: { |
| | | id: '', |
| | | checkId: null, |
| | | checkName:'', |
| | | subscribeHazmats:[], |
| | | companyId:null, |
| | | cupboardId: null, |
| | | warehouseId:null, |
| | | batchNo:'', |
| | | subscribeNum:'', |
| | | num:'', |
| | | warehouseName:'', |
| | | subscribeHazmats:[] |
| | | }, |
| | | orderName:'', |
| | | orderList:[], |
| | | wareHouseList: [], |
| | | cupList: [], |
| | | subscribePersonId:null, |
| | | formRules:{ |
| | | checkId: [{ required: true, message: '请选择审核人', trigger: 'blur' }], |
| | | filePath:[{ required: true, message: '请上传文件', trigger: 'blur' }], |
| | | hazmatName: [{ required: true, message: '', trigger: 'blur' }], |
| | | hazmatCount: [{ required: true, message: '', trigger: 'blur' }], |
| | | warehouseName: [{ required: true, message: '请选择主柜', trigger: 'blur' }], |
| | | cupboardId:[{ required: true, message: '请选择副柜', trigger: 'blur' }], |
| | | subscribeNum: [{ required: true, message: '请选择申购订单', trigger: 'blur' }], |
| | | }, |
| | | |
| | | }) |
| | | |
| | | |
| | | const openDialog = async (type, value) => { |
| | | await getOrderList("") |
| | | await getWareHouseList("") |
| | | title.value = type === 'add' ? '申购申请' : type ==='edit' ? '申购编辑' : '查看' ; |
| | | const userInfo= JSON.parse(Cookies.get('userInfo')) |
| | | state.subscribePersonId = userInfo.id |
| | | title.value = type === 'add' ? '订单入库' : type ==='edit' ? '编辑' : '查看' ; |
| | | if(type === 'edit' || type === 'view') { |
| | | state.form = JSON.parse(JSON.stringify(value)); |
| | | if(state.form.filePath) { |
| | | const obj = { |
| | | url: value.filePath, |
| | | name: value.fileName |
| | | } |
| | | state.fileList = [obj] |
| | | } |
| | | Object.keys(value).forEach(key => key in state.form && (state.form[key] = value[key])); |
| | | state.form.subscribeHazmats = value.subscribe.subscribeHazmats |
| | | state.form.warehouseName = value.warehouse.name |
| | | state.form.companyId = userInfo.companyId |
| | | await getCupList(state.form.warehouseId) |
| | | } |
| | | state.form.batchNo = moment(new Date()).format("YYYYMMDD") |
| | | 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 addSubscribe(data) |
| | | state.form.num = state.form.subscribeHazmats.reduce((sum, item) => sum + item.hazmatCount, 0) |
| | | if(title.value === '订单入库'){ |
| | | const {id,subscribeHazmats,warehouseName,companyId, ...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await addOrder(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | busRef.value.clearValidate(); |
| | | reset(); |
| | | dialogVisible.value = false; |
| | | }else if(title.value === '申购编辑'){ |
| | | const {...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await editSubscribe(data) |
| | | }else if(title.value === '编辑'){ |
| | | const {subscribeHazmats,warehouseName,...data} = JSON.parse(JSON.stringify(state.form)) |
| | | const res = await editOrder(data) |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | const reset = () => { |
| | | state.form = { |
| | | id: '', |
| | | checkId: null, |
| | | filePath: '', |
| | | fileName: '', |
| | | companyId:null, |
| | | cupboardId: null, |
| | | warehouseId:null, |
| | | batchNo:'', |
| | | subscribeNum:'', |
| | | num:'', |
| | | subscribeHazmats:[], |
| | | warehouseName:'' |
| | | } |
| | | state.subscribePersonId = null |
| | | state.orderName = '' |
| | | } |
| | | const selectValue = (val) => { |
| | | state.form.orderId = null |
| | | if(!val){ |
| | | state.form.subscribeHazmats = [] |
| | | return |
| | | } |
| | | state.orderList.forEach(item => { |
| | | if(item.subscribeNum === val){ |
| | | state.form.orderId = item.id |
| | | state.form.subscribeHazmats = item.subscribeHazmats |
| | | const match = state.orderList.find(i => i.subscribeNum == val) |
| | | if(match){ |
| | | state.form.subscribeHazmats = match.subscribeHazmats |
| | | } |
| | | }) |
| | | } |
| | | const getOrderList = async (val) => { |
| | | let param = {} |
| | | if(val != ""){ |
| | | param = { |
| | | name: val, |
| | | status: 1 |
| | | subscribeNum: val, |
| | | status: 1, |
| | | subscribePersonId:state.subscribePersonId |
| | | } |
| | | }else { |
| | | param = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | status: 1 |
| | | status: 1, |
| | | subscribePersonId:state.subscribePersonId |
| | | } |
| | | } |
| | | const res = await getSubscribeList(param) |
| | |
| | | >订单入库</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="申购单号:" > |
| | | <el-input v-model="data.queryParams.params.name" placeholder="请输入申购单号" clearable></el-input> |
| | | <el-input v-model="data.queryParams.subscribeNum" placeholder="请输入申购单号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="主柜:" prop="warehouseName" > |
| | | <el-select |
| | | clearable |
| | | v-model="data.queryParams.params.warehouseName" |
| | | v-model="data.warehouseName" |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | |
| | | <el-form-item label="副柜:" prop="cupboardId" > |
| | | <el-select |
| | | clearable |
| | | v-model="data.queryParams.params.cupboardId" |
| | | v-model="data.queryParams.cupboardId" |
| | | placeholder="请选择副柜" |
| | | style="width: 100%" |
| | | > |
| | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="申购单号" prop="hazmatBasicNo" align="center" /> |
| | | <el-table-column label="危化品名称" prop="hazmatBasic.productSn" align="center" class-name="subscribe-quantity-cell"> |
| | | <el-table-column label="申购单号" prop="subscribeNum" align="center" /> |
| | | <el-table-column label="危化品名称" align="center" class-name="subscribe-quantity-cell"> |
| | | <template #default="scope"> |
| | | <div style="width: 100%; height: 100%;display: flex; flex-direction: column;justify-content: center;align-items: center; "> |
| | | <div |
| | | v-for="(item, index) in scope.row.subscribeHazmats" |
| | | v-for="(item, index) in scope.row.subscribe.subscribeHazmats" |
| | | :key="item.id" |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | borderBottom: index === scope.row.subscribe.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | }" |
| | | > |
| | | <span>{{ item.hazmatName }}</span> |
| | |
| | | <template #default="scope"> |
| | | <div style="width: 100%; height: 100%;display: flex; flex-direction: column;justify-content: center;align-items: center; "> |
| | | <div |
| | | v-for="(item, index) in scope.row.subscribeHazmats" |
| | | v-for="(item, index) in scope.row.subscribe.subscribeHazmats" |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | borderBottom: index === scope.row.subscribe.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | }" |
| | | > |
| | | {{ item.hazmatCount }} |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主柜" prop="warehouseName" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.name}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主柜" prop="warehouse.name" align="center" /> |
| | | <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"> |
| | |
| | | import {delRawRecord, doEntryRaw, getRawRecord, getRawWarehouseRecord} from "@/api/hazardousChemicals/rawRecord"; |
| | | import {useRoute, useRouter} from "vue-router"; |
| | | import {getCupById, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {delOrder, getOrderList, intoOrder} from "@/api/hazardousChemicals/orderWarehouse"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | params :{ |
| | | name: '', |
| | | productSn: '', |
| | | subscribeNum: '', |
| | | cupboardId: null, |
| | | warehouseId: null |
| | | } |
| | | }, |
| | | warehouseName:'', |
| | | total: 0, |
| | | dataList: [], |
| | | wareHouseList: [], |
| | |
| | | }) |
| | | |
| | | const getList = async () => { |
| | | // loading.value = true |
| | | // const res = await getRawRecord(data.queryParams) |
| | | // if(res.code == 200){ |
| | | // data.dataList = res.data.list |
| | | // data.total = res.data.total |
| | | // }else{ |
| | | // ElMessage.warning(res.message) |
| | | // } |
| | | // loading.value = false |
| | | loading.value = true |
| | | const res = await getOrderList(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list.filter(i => i.subscribeNum ) |
| | | data.total = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | params :{ |
| | | name: '', |
| | | productSn: '', |
| | | subscribeNum: '', |
| | | cupboardId: null, |
| | | warehouseId: null |
| | | } |
| | | } |
| | | data.warehouseName = '' |
| | | data.cupList = [] |
| | | |
| | | getList() |
| | | getWareHouseList("") |
| | | |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delRawRecord(val.id) |
| | | const res = await delOrder(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | await getList() |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await doEntryRaw(val.id) |
| | | const res = await intoOrder(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('入库成功') |
| | | await getList() |
| | |
| | | } |
| | | } |
| | | const selectWareValue = (val) => { |
| | | data.queryParams.params.cupboardId = null |
| | | data.queryParams.cupboardId = null |
| | | data.wareHouseList.forEach(item => { |
| | | if(item.name === val){ |
| | | data.queryParams.params.warehouseId = item.id |
| | | data.queryParams.warehouseId = item.id |
| | | getCupList(item.id) |
| | | } |
| | | }) |