| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="规格型号:" prop="model"> |
| | | <el-select v-model="form.modelId" placeholder="请选择" clearable @change="getProductModel"> |
| | | <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> |
| | | </el-select> |
| | | <el-input v-model="form.model" placeholder="请输入" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {ref, computed} from "vue"; |
| | | import dayjs from "dayjs"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import {getOptions} from "@/api/procurementManagement/procurementLedger.js"; |
| | | import {modelList, productTreeList} from "@/api/basicData/product.js"; |
| | | import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | |
| | | import {qualityInspectParamInfo} from "@/api/qualityManagement/qualityInspectParam.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | const userStore = useUserStore() |
| | | const currentUserName = computed(() => userStore.nickName || userStore.name || "") |
| | | const getToday = () => dayjs().format("YYYY-MM-DD") |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref('') |
| | |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const userList = ref([ |
| | | {nickName: '候盛杰'}, |
| | | {nickName: '焦辉'}, |
| | | {nickName: '张培'}, |
| | | {nickName: '冯灵之'}, |
| | | ]); |
| | | const userList = ref([]); |
| | | const currentProductId = ref(0); |
| | | const modelOptions = ref([]); |
| | | |
| | |
| | | supplierList.value = res.data; |
| | | }); |
| | | let userLists = await userListNoPage(); |
| | | // userList.value = userLists.data; |
| | | userList.value = userLists.data; |
| | | form.value = {} |
| | | getProductOptions(); |
| | | if (operationType.value === 'edit') { |
| | |
| | | } |
| | | getQualityInspectParamList(row.id) |
| | | } |
| | | // 默认检验员为当前登录人,检测日期默认为当天(空时填充) |
| | | if (currentUserName.value && !form.value.checkName) { |
| | | form.value.checkName = currentUserName.value; |
| | | } |
| | | if (!form.value.checkTime) { |
| | | form.value.checkTime = getToday(); |
| | | } |
| | | } |
| | | const getProductOptions = () => { |
| | | productTreeList({productName: '质量'}).then((res) => { |