1.海川开心-质量管理三个页面,去掉分配检验员功能,新增时规格型号和单位可以直接赋值
| | |
| | | :fixed="item.fixed" |
| | | :label="item.label" |
| | | :prop="item.prop" |
| | | show-overflow-tooltip |
| | | :show-overflow-tooltip="item.dataType !== 'action'" |
| | | :align="item.align" |
| | | :sortable="!!item.sortable" |
| | | :type="item.type" |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | title="åºåæ£éªè¯¦æ
" |
| | | width="70%" |
| | | @close="closeDialog" |
| | | > |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="æ£æµæ¥æ">{{ detailData.checkTime || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产ååç§°">{{ detailData.productName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="è§æ ¼åå·">{{ detailData.model || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="åä½">{{ detailData.unit || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ°é">{{ detailData.quantity ?? '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ£æµç»æ">{{ detailData.checkResult || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ£éªå">{{ detailData.checkName || '-' }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <div style="margin-top: 20px"> |
| | | <el-table :data="tableData" v-loading="tableLoading" border style="width: 100%" height="400"> |
| | | <el-table-column label="ææ " prop="parameterItem" /> |
| | | <el-table-column label="åä½" prop="unit" /> |
| | | <el-table-column label="æ åå¼" prop="standardValue" /> |
| | | <el-table-column label="å
æ§å¼" prop="controlValue" /> |
| | | <el-table-column label="æ£éªå¼" prop="testValue" /> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDialog">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {qualityInspectParamInfo} from "@/api/qualityManagement/qualityInspectParam.js"; |
| | | |
| | | const emit = defineEmits(["close"]); |
| | | const dialogVisible = ref(false); |
| | | const detailData = ref({}); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | |
| | | const openDialog = (row) => { |
| | | detailData.value = row || {}; |
| | | dialogVisible.value = true; |
| | | loadParams(row?.id); |
| | | }; |
| | | |
| | | const loadParams = (id) => { |
| | | if (!id) { |
| | | tableData.value = []; |
| | | return; |
| | | } |
| | | tableLoading.value = true; |
| | | qualityInspectParamInfo(id) |
| | | .then((res) => { |
| | | tableData.value = res.data || []; |
| | | }) |
| | | .finally(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | const closeDialog = () => { |
| | | dialogVisible.value = false; |
| | | tableData.value = []; |
| | | emit("close"); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·ï¼" prop="model"> |
| | | <el-input v-model="form.model" placeholder="请è¾å
¥" clearable/> |
| | | <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-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµåä½ï¼" prop="checkCompany"> |
| | | <el-input v-model="form.checkCompany" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" prop="checkResult"> |
| | | <el-select v-model="form.checkResult"> |
| | | <el-option label="åæ ¼" value="åæ ¼" /> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªåï¼" prop="checkName"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªåï¼" prop="checkName"> |
| | | <el-select v-model="form.checkName" filterable |
| | | default-first-option |
| | | :reserve-keyword="false" placeholder="è¯·éæ©" clearable> |
| | | default-first-option |
| | | :reserve-keyword="false" placeholder="è¯·éæ©" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | | :value="item.nickName"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµæ¥æï¼" prop="checkTime"> |
| | | <el-date-picker |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {getOptions} from "@/api/procurementManagement/procurementLedger.js"; |
| | | import {productTreeList} from "@/api/basicData/product.js"; |
| | | import {modelList, productTreeList} from "@/api/basicData/product.js"; |
| | | import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | | import {qualityInspectDetailByProductId} from "@/api/qualityManagement/metricMaintenance.js"; |
| | |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const userList = ref([]); |
| | | const userList = ref([ |
| | | {nickName: 'åçæ°'}, |
| | | {nickName: 'ç¦è¾'}, |
| | | {nickName: 'å¼ å¹'}, |
| | | {nickName: 'å¯çµä¹'}, |
| | | ]); |
| | | const currentProductId = ref(0); |
| | | const modelOptions = ref([]); |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = async (type, row) => { |
| | |
| | | supplierList.value = res.data; |
| | | }); |
| | | let userLists = await userListNoPage(); |
| | | userList.value = userLists.data; |
| | | // userList.value = userLists.data; |
| | | form.value = {} |
| | | getProductOptions(); |
| | | if (operationType.value === 'edit') { |
| | | form.value = {...row} |
| | | currentProductId.value = row.productId || 0 |
| | | // å è½½å½å产åä¸çè§æ ¼å表ï¼å¹¶æ ¹æ®å端è¿åç model åæ¥å¹¶è®¾ç½® modelIdï¼å®ç°è§æ ¼ä¸ææ¡åæ¾ |
| | | if (currentProductId.value) { |
| | | modelList({ id: currentProductId.value }).then((res) => { |
| | | modelOptions.value = res; |
| | | const target = res.find((item) => item.model === row.model); |
| | | if (target) { |
| | | form.value.modelId = target.id; |
| | | } |
| | | }); |
| | | } |
| | | getQualityInspectParamList(row.id) |
| | | } |
| | | } |
| | | const getProductOptions = () => { |
| | | productTreeList().then((res) => { |
| | | productTreeList({productName: 'è´¨é'}).then((res) => { |
| | | productOptions.value = convertIdToValue(res); |
| | | }); |
| | | }; |
| | | const getModels = (value) => { |
| | | currentProductId.value = value |
| | | form.value.productName = findNodeById(productOptions.value, value); |
| | | modelList({ id: value }).then((res) => { |
| | | modelOptions.value = res; |
| | | }); |
| | | if (currentProductId) { |
| | | getList(); |
| | | } |
| | | }; |
| | | const getProductModel = (value) => { |
| | | const index = modelOptions.value.findIndex((item) => item.id === value); |
| | | if (index !== -1) { |
| | | form.value.unit = modelOptions.value[index].unit; |
| | | form.value.model = modelOptions.value[index].model; |
| | | } else { |
| | | form.value.unit = null; |
| | | } |
| | | }; |
| | | const findNodeById = (nodes, productId) => { |
| | | for (let i = 0; i < nodes.length; i++) { |
| | | if (nodes[i].value === productId) { |
| | |
| | | </div> |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <DetailDia ref="detailDia"></DetailDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <el-dialog v-model="dialogFormVisible" title="ç¼è¾æ£éªå" width="30%" |
| | | @close="closeDia"> |
| | |
| | | import {onMounted, ref} from "vue"; |
| | | import InspectionFormDia from "@/views/qualityManagement/finalInspection/components/inspectionFormDia.vue"; |
| | | import FormDia from "@/views/qualityManagement/finalInspection/components/formDia.vue"; |
| | | import DetailDia from "@/views/qualityManagement/finalInspection/components/detailDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { |
| | | downloadQualityInspect, |
| | |
| | | width: 100 |
| | | }, |
| | | { |
| | | label: "æ£æµåä½", |
| | | prop: "checkCompany", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "æ£æµç»æ", |
| | | prop: "checkResult", |
| | | dataType: "tag", |
| | |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 300, |
| | | width: 260, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm("edit", row); |
| | | }, |
| | |
| | | return row.inspectState == 1; |
| | | } |
| | | }, |
| | | { |
| | | name: "éä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openFilesFormDia(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æäº¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | submit(row.id); |
| | | }, |
| | |
| | | return row.inspectState == 1; |
| | | } |
| | | }, |
| | | { |
| | | name: "åé
æ£éªå", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | if (!row.checkName) { |
| | | open(row) |
| | | } else { |
| | | proxy.$modal.msgError("æ£éªåå·²åå¨"); |
| | | } |
| | | }, |
| | | disabled: (row) => { |
| | | return row.inspectState == 1 || row.checkName; |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¥ç", |
| | | clickFun: (row) => { |
| | | openDetail(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | downLoadFile(row); |
| | | }, |
| | |
| | | const formDia = ref() |
| | | const filesDia = ref() |
| | | const inspectionFormDia = ref() |
| | | const detailDia = ref() |
| | | const { proxy } = getCurrentInstance() |
| | | const userList = ref([]); |
| | | const form = ref({ |
| | |
| | | formDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | const openDetail = (row) => { |
| | | nextTick(() => { |
| | | detailDia.value?.openDialog(row) |
| | | }) |
| | | }; |
| | | // æå¼æ°å¢æ£éªå¼¹æ¡ |
| | | const openInspectionForm = (type, row) => { |
| | | nextTick(() => { |
| | |
| | | quantity: "", |
| | | checkCompany: "", |
| | | checkResult: "", |
| | | inspectState: '', |
| | | inspectState: 1, |
| | | inspectType: '', |
| | | defectivePhenomena: '', |
| | | dealResult: '', |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | title="è¿ç¨æ£éªè¯¦æ
" |
| | | width="70%" |
| | | @close="closeDialog" |
| | | > |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="æ£æµæ¥æ">{{ detailData.checkTime || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="å·¥åº">{{ detailData.process || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产ååç§°">{{ detailData.productName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="è§æ ¼åå·">{{ detailData.model || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="åä½">{{ detailData.unit || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ°é">{{ detailData.quantity ?? '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ£æµç»æ">{{ detailData.checkResult || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ£éªå">{{ detailData.checkName || '-' }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <div style="margin-top: 20px"> |
| | | <el-table :data="tableData" v-loading="tableLoading" border style="width: 100%" height="400"> |
| | | <el-table-column label="ææ " prop="parameterItem" /> |
| | | <el-table-column label="åä½" prop="unit" /> |
| | | <el-table-column label="æ åå¼" prop="standardValue" /> |
| | | <el-table-column label="å
æ§å¼" prop="controlValue" /> |
| | | <el-table-column label="æ£éªå¼" prop="testValue" /> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDialog">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {qualityInspectParamInfo} from "@/api/qualityManagement/qualityInspectParam.js"; |
| | | |
| | | const emit = defineEmits(["close"]); |
| | | const dialogVisible = ref(false); |
| | | const detailData = ref({}); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | |
| | | const openDialog = (row) => { |
| | | detailData.value = row || {}; |
| | | dialogVisible.value = true; |
| | | loadParams(row?.id); |
| | | }; |
| | | |
| | | const loadParams = (id) => { |
| | | if (!id) { |
| | | tableData.value = []; |
| | | return; |
| | | } |
| | | tableLoading.value = true; |
| | | qualityInspectParamInfo(id) |
| | | .then((res) => { |
| | | tableData.value = res.data || []; |
| | | }) |
| | | .finally(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | const closeDialog = () => { |
| | | dialogVisible.value = false; |
| | | tableData.value = []; |
| | | emit("close"); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·ï¼" prop="model"> |
| | | <el-input v-model="form.model" placeholder="请è¾å
¥" clearable/> |
| | | <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-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åä½ï¼" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åä½ï¼" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ°éï¼" prop="quantity"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请è¾å
¥" clearable :precision="2"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµåä½ï¼" prop="checkCompany"> |
| | | <el-input v-model="form.checkCompany" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" prop="checkResult"> |
| | | <el-select v-model="form.checkResult"> |
| | | <el-option label="åæ ¼" value="åæ ¼" /> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" prop="checkResult"> |
| | | <el-select v-model="form.checkResult"> |
| | | <el-option label="åæ ¼" value="åæ ¼" /> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªåï¼" prop="checkName"> |
| | | <el-select v-model="form.checkName" filterable |
| | | <el-select v-model="form.checkName" |
| | | filterable |
| | | default-first-option |
| | | :reserve-keyword="false" placeholder="è¯·éæ©" clearable> |
| | | <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {getOptions} from "@/api/procurementManagement/procurementLedger.js"; |
| | | import {productTreeList} from "@/api/basicData/product.js"; |
| | | import {modelList, productTreeList} from "@/api/basicData/product.js"; |
| | | import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | | import {qualityInspectDetailByProductId} from "@/api/qualityManagement/metricMaintenance.js"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | |
| | | rules: { |
| | | checkTime: [{ required: true, message: "请è¾å
¥", trigger: "blur" },], |
| | | process: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | checkName: [{ required: false, message: "请è¾å
¥", trigger: "blur" }], |
| | | checkName: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | productId: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | model: [{ required: false, message: "请è¾å
¥", trigger: "blur" }], |
| | | unit: [{ required: false, message: "请è¾å
¥", trigger: "blur" }], |
| | |
| | | checkResult: [{ required: true, message: "请è¾å
¥", trigger: "change" }], |
| | | }, |
| | | }); |
| | | const userList = ref([]); |
| | | const userList = ref([ |
| | | {nickName: 'åçæ°'}, |
| | | {nickName: 'ç¦è¾'}, |
| | | {nickName: 'å¼ å¹'}, |
| | | {nickName: 'å¯çµä¹'}, |
| | | ]); |
| | | const { form, rules } = toRefs(data); |
| | | const supplierList = ref([]); |
| | | const productOptions = ref([]); |
| | |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const currentProductId = ref(0); |
| | | const modelOptions = ref([]); |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = async (type, row) => { |
| | |
| | | getOptions().then((res) => { |
| | | supplierList.value = res.data; |
| | | }); |
| | | let userLists = await userListNoPage(); |
| | | userList.value = userLists.data; |
| | | // let userLists = await userListNoPage(); |
| | | // userList.value = userLists.data; |
| | | form.value = {} |
| | | getProductOptions(); |
| | | if (operationType.value === 'edit') { |
| | | form.value = {...row} |
| | | currentProductId.value = row.productId || 0 |
| | | // å è½½å½å产åä¸çè§æ ¼å表ï¼å¹¶æ ¹æ®å端è¿åç model åæ¥å¹¶è®¾ç½® modelIdï¼å®ç°è§æ ¼ä¸ææ¡åæ¾ |
| | | if (currentProductId.value) { |
| | | modelList({ id: currentProductId.value }).then((res) => { |
| | | modelOptions.value = res; |
| | | const target = res.find((item) => item.model === row.model); |
| | | if (target) { |
| | | form.value.modelId = target.id; |
| | | } |
| | | }); |
| | | } |
| | | getQualityInspectParamList(row.id) |
| | | } |
| | | } |
| | | const getProductOptions = () => { |
| | | productTreeList().then((res) => { |
| | | productTreeList({productName: 'è´¨é'}).then((res) => { |
| | | productOptions.value = convertIdToValue(res); |
| | | }); |
| | | }; |
| | | const getModels = (value) => { |
| | | currentProductId.value = value |
| | | form.value.productName = findNodeById(productOptions.value, value); |
| | | modelList({ id: value }).then((res) => { |
| | | modelOptions.value = res; |
| | | }); |
| | | if (currentProductId) { |
| | | getList(); |
| | | } |
| | | }; |
| | | const getProductModel = (value) => { |
| | | const index = modelOptions.value.findIndex((item) => item.id === value); |
| | | if (index !== -1) { |
| | | form.value.unit = modelOptions.value[index].unit; |
| | | form.value.model = modelOptions.value[index].model; |
| | | } else { |
| | | form.value.unit = null; |
| | | } |
| | | }; |
| | | const findNodeById = (nodes, productId) => { |
| | | for (let i = 0; i < nodes.length; i++) { |
| | | if (nodes[i].value === productId) { |
| | |
| | | </div> |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <DetailDia ref="detailDia"></DetailDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <el-dialog v-model="dialogFormVisible" title="ç¼è¾æ£éªå" width="30%" |
| | | @close="closeDia"> |
| | |
| | | import {onMounted, ref} from "vue"; |
| | | import InspectionFormDia from "@/views/qualityManagement/processInspection/components/inspectionFormDia.vue"; |
| | | import FormDia from "@/views/qualityManagement/processInspection/components/formDia.vue"; |
| | | import DetailDia from "@/views/qualityManagement/processInspection/components/detailDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { |
| | | downloadQualityInspect, |
| | |
| | | width: 100 |
| | | }, |
| | | { |
| | | label: "æ£æµåä½", |
| | | prop: "checkCompany", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "æ£æµç»æ", |
| | | prop: "checkResult", |
| | | dataType: "tag", |
| | |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 300, |
| | | width: 260, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm("edit", row); |
| | | }, |
| | |
| | | return row.inspectState == 1; |
| | | } |
| | | }, |
| | | { |
| | | name: "éä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openFilesFormDia(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æäº¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | submit(row.id); |
| | | }, |
| | |
| | | return row.inspectState == 1; |
| | | } |
| | | }, |
| | | { |
| | | name: "åé
æ£éªå", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | if (!row.checkName) { |
| | | open(row) |
| | | } else { |
| | | proxy.$modal.msgError("æ£éªåå·²åå¨"); |
| | | } |
| | | }, |
| | | disabled: (row) => { |
| | | return row.inspectState == 1 || row.checkName; |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¥ç", |
| | | clickFun: (row) => { |
| | | openDetail(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | downLoadFile(row); |
| | | }, |
| | |
| | | const formDia = ref() |
| | | const filesDia = ref() |
| | | const inspectionFormDia = ref() |
| | | const detailDia = ref() |
| | | const { proxy } = getCurrentInstance() |
| | | const changeDaterange = (value) => { |
| | | searchForm.value.entryDateStart = undefined; |
| | |
| | | formDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | const openDetail = (row) => { |
| | | nextTick(() => { |
| | | detailDia.value?.openDialog(row) |
| | | }) |
| | | }; |
| | | // æå¼æ°å¢æ£éªå¼¹æ¡ |
| | | const openInspectionForm = (type, row) => { |
| | | nextTick(() => { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | title="åæææ£éªè¯¦æ
" |
| | | width="70%" |
| | | @close="closeDialog" |
| | | > |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="æ£æµæ¥æ">{{ detailData.checkTime || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä¾åºå">{{ detailData.supplier || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产ååç§°">{{ detailData.productName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="è§æ ¼åå·">{{ detailData.model || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="åä½">{{ detailData.unit || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ°é">{{ detailData.quantity ?? '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ£æµç»æ">{{ detailData.checkResult || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ£éªå">{{ detailData.checkName || '-' }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <div style="margin-top: 20px"> |
| | | <el-table :data="tableData" v-loading="tableLoading" border style="width: 100%" height="400"> |
| | | <el-table-column label="ææ " prop="parameterItem" /> |
| | | <el-table-column label="åä½" prop="unit" /> |
| | | <el-table-column label="æ åå¼" prop="standardValue" /> |
| | | <el-table-column label="å
æ§å¼" prop="controlValue" /> |
| | | <el-table-column label="æ£éªå¼" prop="testValue" /> |
| | | </el-table> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDialog">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {qualityInspectParamInfo} from "@/api/qualityManagement/qualityInspectParam.js"; |
| | | |
| | | const emit = defineEmits(["close"]); |
| | | const dialogVisible = ref(false); |
| | | const detailData = ref({}); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const openDialog = (row) => { |
| | | detailData.value = row || {}; |
| | | dialogVisible.value = true; |
| | | loadParams(row?.id); |
| | | }; |
| | | |
| | | const loadParams = (id) => { |
| | | if (!id) { |
| | | tableData.value = []; |
| | | return; |
| | | } |
| | | tableLoading.value = true; |
| | | qualityInspectParamInfo(id) |
| | | .then((res) => { |
| | | tableData.value = res.data || []; |
| | | }) |
| | | .finally(() => { |
| | | tableLoading.value = false; |
| | | }); |
| | | }; |
| | | |
| | | const closeDialog = () => { |
| | | dialogVisible.value = false; |
| | | tableData.value = []; |
| | | emit("close"); |
| | | }; |
| | | |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | |
| | |
| | | v-model="form.supplier" |
| | | placeholder="è¯·éæ©" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="item in supplierList" |
| | |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·ï¼" prop="model"> |
| | | <el-input v-model="form.model" placeholder="请è¾å
¥" clearable/> |
| | | <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-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åä½ï¼" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åä½ï¼" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ°éï¼" prop="quantity"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请è¾å
¥" |
| | | clearable :precision="2"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµåä½ï¼" prop="checkCompany"> |
| | | <el-input v-model="form.checkCompany" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" prop="checkResult"> |
| | | <el-select v-model="form.checkResult"> |
| | | <el-option label="åæ ¼" value="åæ ¼"/> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æµç»æï¼" prop="checkResult"> |
| | | <el-select v-model="form.checkResult"> |
| | | <el-option label="åæ ¼" value="åæ ¼"/> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªåï¼" prop="checkName"> |
| | | <el-input v-model="form.checkName" placeholder="请è¾å
¥" clearable/> |
| | | |
| | | <el-select |
| | | v-model="form.checkName" |
| | | placeholder="éæ©äººå" |
| | | style="width: 100%;" |
| | | filterable |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="user in userList" |
| | | :key="user.nickName" |
| | | :label="user.nickName" |
| | | :value="user.nickName" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <!-- <div style="margin-bottom: 10px;text-align: right">--> |
| | | <!-- <el-button type="danger" plain @click="handleDelete">å é¤</el-button>--> |
| | | <!-- </div>--> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {getOptions} from "@/api/procurementManagement/procurementLedger.js"; |
| | | import {productTreeList} from "@/api/basicData/product.js"; |
| | | import {modelList, productTreeList} from "@/api/basicData/product.js"; |
| | | import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {qualityInspectParamDel, qualityInspectParamInfo} from "@/api/qualityManagement/qualityInspectParam.js"; |
| | | import {qualityInspectDetailByProductId} from "@/api/qualityManagement/metricMaintenance.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | |
| | | const {proxy} = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | |
| | | const userList = ref([ |
| | | {nickName: 'åçæ°'}, |
| | | {nickName: 'ç¦è¾'}, |
| | | {nickName: 'å¼ å¹'}, |
| | | {nickName: 'å¯çµä¹'}, |
| | | ]) |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref('') |
| | | const data = reactive({ |
| | |
| | | productName: "", |
| | | productId: "", |
| | | model: "", |
| | | modelId: "", |
| | | unit: "", |
| | | quantity: "", |
| | | checkCompany: "", |
| | |
| | | rules: { |
| | | checkTime: [{required: true, message: "请è¾å
¥", trigger: "blur"},], |
| | | supplier: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | checkName: [{required: false, message: "请è¾å
¥", trigger: "blur"}], |
| | | checkName: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | productId: [{required: true, message: "请è¾å
¥", trigger: "blur"}], |
| | | model: [{required: false, message: "请è¾å
¥", trigger: "blur"}], |
| | | unit: [{required: false, message: "请è¾å
¥", trigger: "blur"}], |
| | |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const modelOptions = ref([]); |
| | | |
| | | const {form, rules} = toRefs(data); |
| | | const supplierList = ref([]); |
| | |
| | | getOptions().then((res) => { |
| | | supplierList.value = res.data; |
| | | }); |
| | | // userListNoPageByTenantId().then((res) => { |
| | | // userList.value = res.data; |
| | | // }); |
| | | form.value = {} |
| | | getProductOptions(); |
| | | if (operationType.value === 'edit') { |
| | | if (operationType.value === 'edit' && row) { |
| | | form.value = {...row} |
| | | currentProductId.value = row.productId || 0 |
| | | // å è½½å½å产åä¸çè§æ ¼å表ï¼å¹¶æ ¹æ®å端è¿åç model åæ¥å¹¶è®¾ç½® modelIdï¼å®ç°è§æ ¼ä¸ææ¡åæ¾ |
| | | if (currentProductId.value) { |
| | | modelList({ id: currentProductId.value }).then((res) => { |
| | | modelOptions.value = res; |
| | | const target = res.find((item) => item.model === row.model); |
| | | if (target) { |
| | | form.value.modelId = target.id; |
| | | } |
| | | }); |
| | | } |
| | | getQualityInspectParamList(row.id) |
| | | } |
| | | } |
| | | const getProductOptions = () => { |
| | | productTreeList().then((res) => { |
| | | productTreeList({productName: 'è´¨é'}).then((res) => { |
| | | productOptions.value = convertIdToValue(res); |
| | | }); |
| | | }; |
| | | const getModels = (value) => { |
| | | currentProductId.value = value |
| | | form.value.productName = findNodeById(productOptions.value, value); |
| | | modelList({ id: value }).then((res) => { |
| | | modelOptions.value = res; |
| | | }); |
| | | if (currentProductId) { |
| | | getList(); |
| | | } |
| | | }; |
| | | const getProductModel = (value) => { |
| | | const index = modelOptions.value.findIndex((item) => item.id === value); |
| | | if (index !== -1) { |
| | | form.value.unit = modelOptions.value[index].unit; |
| | | form.value.model = modelOptions.value[index].model; |
| | | } else { |
| | | form.value.unit = null; |
| | | } |
| | | }; |
| | | const findNodeById = (nodes, productId) => { |
| | | for (let i = 0; i < nodes.length; i++) { |
| | | if (nodes[i].value === productId) { |
| | |
| | | </div> |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <DetailDia ref="detailDia"></DetailDia> |
| | | <files-dia ref="filesDia" @close="handleQuery"></files-dia> |
| | | <el-dialog v-model="dialogFormVisible" title="ç¼è¾æ£éªå" width="30%" |
| | | @close="closeDia"> |
| | |
| | | import {onMounted, ref} from "vue"; |
| | | import InspectionFormDia from "@/views/qualityManagement/rawMaterialInspection/components/inspectionFormDia.vue"; |
| | | import FormDia from "@/views/qualityManagement/rawMaterialInspection/components/formDia.vue"; |
| | | import DetailDia from "@/views/qualityManagement/rawMaterialInspection/components/detailDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import { |
| | | downloadQualityInspect, |
| | |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "æ£æµåä½", |
| | | prop: "checkCompany", |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: "æ£æµç»æ", |
| | | prop: "checkResult", |
| | | dataType: "tag", |
| | |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 300, |
| | | width: 250, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openForm("edit", row); |
| | | }, |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "éä»¶", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openFilesFormDia(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "æäº¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | submit(row.id); |
| | | }, |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "åé
æ£éªå", |
| | | type: "text", |
| | | name: "æ¥ç", |
| | | clickFun: (row) => { |
| | | if (!row.checkName) { |
| | | open(row) |
| | | } else { |
| | | proxy.$modal.msgError("æ£éªåå·²åå¨"); |
| | | } |
| | | openDetail(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.inspectState == 1 || row.checkName; |
| | | } |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | downLoadFile(row); |
| | | }, |
| | |
| | | const formDia = ref() |
| | | const filesDia = ref() |
| | | const inspectionFormDia = ref() |
| | | const detailDia = ref() |
| | | const {proxy} = getCurrentInstance() |
| | | const changeDaterange = (value) => { |
| | | searchForm.value.entryDateStart = undefined; |
| | |
| | | formDia.value?.openDialog(type, row) |
| | | }) |
| | | }; |
| | | const openDetail = (row) => { |
| | | nextTick(() => { |
| | | detailDia.value?.openDialog(row) |
| | | }) |
| | | }; |
| | | // æå¼éä»¶å¼¹æ¡ |
| | | const openFilesFormDia = (type, row) => { |
| | | nextTick(() => { |
| | |
| | | }); |
| | | }; |
| | | const getProductModel = (value) => { |
| | | console.log("value", value); |
| | | const index = modelOptions.value.findIndex((item) => item.id === value); |
| | | if (index !== -1) { |
| | | productForm.value.specificationModel = modelOptions.value[index].model; |