| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="批号" |
| | | prop="batchNo" |
| | | > |
| | | <el-input v-model="formState.batchNo" placeholder="请输入批号" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | v-if="formState.type === 'qualified'" |
| | | label="库存预警数量" |
| | | prop="warnNum" |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, computed, getCurrentInstance} from "vue"; |
| | | import {ref, computed, watch, getCurrentInstance} from "vue"; |
| | | import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue"; |
| | | import {createStockInventory} from "@/api/inventoryManagement/stockInventory.js"; |
| | | import {createStockUnInventory} from "@/api/inventoryManagement/stockUninventory.js"; |
| | |
| | | unit: "", |
| | | type: undefined, |
| | | qualitity: 0, |
| | | batchNo: null, |
| | | warnNum: 0, |
| | | remark: '', |
| | | }); |
| | |
| | | |
| | | const showProductSelectDialog = ref(false); |
| | | |
| | | // 批号为空时转为 null |
| | | watch(() => formState.value.batchNo, (val) => { |
| | | if (val === '') { |
| | | formState.value.batchNo = null; |
| | | } |
| | | }); |
| | | |
| | | let { proxy } = getCurrentInstance() |
| | | |
| | | const closeModal = () => { |
| | |
| | | productModelId: undefined, |
| | | productName: "", |
| | | productModelName: "", |
| | | description: '', |
| | | unit: "", |
| | | type: undefined, |
| | | qualitity: 0, |
| | | batchNo: null, |
| | | warnNum: 0, |
| | | remark: '', |
| | | }; |
| | | isShow.value = false; |
| | | }; |