src/api/qualityManagement/nonconformingManagement.js
@@ -48,3 +48,12 @@ data: query, }); } // åæ¶é离 export function liftTheQuarantineQualityUnqualified(query) { return request({ url: "/quality/qualityUnqualified/liftTheQuarantine", method: "post", data: query, }); } src/views/productionManagement/productionProcess/index.vue
@@ -179,7 +179,7 @@ width: 280, operation: [ { name: "æ¥ç", name: "ç»å®ç产记å½", type: "text", clickFun: row => { showProcessParamModal(row); src/views/productionManagement/productionReporting/components/Detail.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,53 @@ <script setup lang="ts"> import {computed} from "vue"; defineOptions({ name: "ReportingDetail" }); const props = defineProps({ isShow: { type: Boolean, required: true }, row: { type: Object, default: () => ({}), } }); const emits = defineEmits(["update:isShow"]); const visible = computed({ get: () => props.isShow, set: (value: boolean) => emits("update:isShow", value), }); </script> <template> <el-dialog v-model="visible" :title="'详æ '" width="90%"> <el-descriptions title="æ¥å·¥è¯¦æ "> <el-descriptions-item label="æ¥å·¥åå·">{{ row.productNo || '-' }}</el-descriptions-item> <el-descriptions-item label="æ¥å·¥äººå">{{ row.nickName || '-' }}</el-descriptions-item> <el-descriptions-item label="å·¥åº">{{ row.process || '-' }}</el-descriptions-item> <el-descriptions-item label="å·¥åç¼å·">{{ row.workOrderNo || '-' }}</el-descriptions-item> <el-descriptions-item label="产ååç§°">{{ row.salesContractNo || '-' }}</el-descriptions-item> <el-descriptions-item label="产åè§æ ¼åå·">{{ row.productName || '-' }}</el-descriptions-item> <el-descriptions-item label="äº§åºæ°é">{{ row.productModelName || '-' }}</el-descriptions-item> <el-descriptions-item label="æ¥åºæ°é">{{ row.quantity || '-' }}</el-descriptions-item> <el-descriptions-item label="åä½">{{ row.scrapQty || '-' }}</el-descriptions-item> <el-descriptions-item label="å建æ¶é´">{{ row.createTime || '-' }}</el-descriptions-item> </el-descriptions> <template #footer> <span class="dialog-footer"> <el-button @click="visible = false">å ³é</el-button> </span> </template> </el-dialog> </template> <style scoped> </style> src/views/productionManagement/productionReporting/index.vue
@@ -9,7 +9,7 @@ clearable prefix-icon="Search" style="width: 200px;" @change="handleQuery" /> @change="handleQuery"/> </el-form-item> <el-form-item label="å·¥åå·:"> <el-input v-model="searchForm.workOrderNo" @@ -17,11 +17,12 @@ clearable prefix-icon="Search" style="width: 200px;" @change="handleQuery" /> @change="handleQuery"/> </el-form-item> <el-form-item> <el-button type="primary" @click="handleQuery">æç´¢</el-button> @click="handleQuery">æç´¢ </el-button> </el-form-item> </el-form> </div> @@ -43,6 +44,15 @@ :tableLoading="tableLoading" @pagination="pagination" :total="page.total"> <template #productNoSlot="{ row }"> <el-button type="primary" link @click="openDetail(row)" > {{ row.productNo }} </el-button> </template> <template #expand="{ row }"> <el-table :data="expandData" border @@ -52,7 +62,7 @@ <el-table-column align="center" label="åºå·" type="index" width="60" /> width="60"/> <el-table-column label="æ¬æ¬¡ç产æ°é" prop="finishedNum" align="center" @@ -66,7 +76,7 @@ :precision="2" placeholder="请è¾å ¥" clearable @change="changeNum(scope.row)" /> @change="changeNum(scope.row)"/> </template> </el-table-column> <!-- <el-table-column label="å¾ ç产æ°é" prop="pendingNum" width="240" align="center"></el-table-column>--> @@ -81,7 +91,7 @@ <el-option v-for="user in userList" :key="user.userId" :label="user.nickName" :value="user.userId" /> :value="user.userId"/> </el-select> </template> </el-table-column> @@ -96,23 +106,25 @@ value-format="YYYY-MM-DD" format="YYYY-MM-DD" clearable style="width: 100%" /> style="width: 100%"/> </template> </el-table-column> <el-table-column label="æä½" > > <template #default="scope"> <el-button link type="primary" size="small" @click="changeEditType(scope.row)" v-if="!scope.row.editType" :disabled="scope.row.parentStatus === 3">ç¼è¾</el-button> :disabled="scope.row.parentStatus === 3">ç¼è¾ </el-button> <el-button link type="primary" size="small" @click="saveReceiptPayment(scope.row)" v-if="scope.row.editType">ä¿å</el-button> v-if="scope.row.editType">ä¿å </el-button> </template> </el-table-column> </el-table> @@ -123,298 +135,335 @@ @close="handleQuery"></form-dia> <input-modal v-if="isShowInput" v-model:visible="isShowInput" :production-product-main-id="isShowingId" /> :production-product-main-id="isShowingId"/> <CopperPrintingForm v-if="copperPrintingFormVisible" v-model:isShow="copperPrintingFormVisible" :isEdit="false" :row="currentReportRowData" @refreshData="getList"/> <VoltageSortingForm v-if="voltageSortingFormVisible" v-model:isShow="voltageSortingFormVisible" :isEdit="false" :row="currentReportRowData" @refreshData="getList"/> <Detail v-if="showDetail" v-model:isShow="showDetail" :row="currentReportRowData"/> </div> </template> <script setup> import { onMounted, ref } from "vue"; import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue"; import { ElMessageBox } from "element-plus"; import { productionReportUpdate, workListPageById, productionReportDelete, } from "@/api/productionManagement/productionReporting.js"; import { productionProductMainListPage } from "@/api/productionManagement/productionProductMain.js"; import { userListNoPageByTenantId } from "@/api/system/user.js"; import InputModal from "@/views/productionManagement/productionReporting/Input.vue"; import {onMounted, ref} from "vue"; import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue"; import {ElMessageBox} from "element-plus"; import { productionReportUpdate, workListPageById, productionReportDelete, } from "@/api/productionManagement/productionReporting.js"; import {productionProductMainListPage} from "@/api/productionManagement/productionProductMain.js"; import {userListNoPageByTenantId} from "@/api/system/user.js"; import InputModal from "@/views/productionManagement/productionReporting/Input.vue"; import VoltageSortingForm from "@/views/productionManagement/workOrder/components/VoltageSortingForm.vue"; const data = reactive({ searchForm: { nickName: "", workOrderNo: "", workOrderStatus: "", }, }); const { searchForm } = toRefs(data); const expandedRowKeys = ref([]); const expandData = ref([]); const userList = ref([]); const tableColumn = ref([ { label: "æ¥å·¥åå·", prop: "productNo", width: 120, }, { label: "æ¥å·¥äººå", prop: "nickName", width: 120, }, { label: "å·¥åº", prop: "process", width: 120, }, { label: "å·¥åç¼å·", prop: "workOrderNo", width: 120, }, { label: "éå®ååå·", prop: "salesContractNo", width: 120, }, { label: "产ååç§°", prop: "productName", width: 120, }, { label: "产åè§æ ¼åå·", prop: "productModelName", width: 120, }, { label: "äº§åºæ°é", prop: "quantity", width: 120, }, { label: "æ¥åºæ°é", prop: "scrapQty", width: 120, }, { label: "åä½", prop: "unit", width: 120, }, { label: "å建æ¶é´", prop: "createTime", width: 120, }, { dataType: "action", label: "æä½", align: "center", fixed: "right", operation: [ { name: "æ¥çæå ¥", type: "text", clickFun: row => { showInput(row); }, }, { name: "å é¤", type: "danger", clickFun: row => { deleteReport(row); }, }, ], }, ]); const tableData = ref([]); const selectedRows = ref([]); const tableLoading = ref(false); const childrenLoading = ref(false); const page = reactive({ current: 1, size: 100, total: 0, }); const formDia = ref(); const { proxy } = getCurrentInstance(); const CopperPrintingForm = defineAsyncComponent(() => import("@/views/productionManagement/workOrder/components/CopperPrintingForm.vue")); const Detail = defineAsyncComponent(() => import("@/views/productionManagement/productionReporting/components/Detail.vue")); // æ¥è¯¢å表 /** æç´¢æé®æä½ */ const handleQuery = () => { page.current = 1; getList(); }; const changeDaterange = value => { if (value) { searchForm.value.entryDateStart = value[0]; searchForm.value.entryDateEnd = value[1]; } else { searchForm.value.entryDateStart = undefined; searchForm.value.entryDateEnd = undefined; } handleQuery(); }; const deleteReport = row => { ElMessageBox.confirm("ç¡®å®å é¤è¯¥æ¥å·¥åï¼", "æç¤º", { confirmButtonText: "ç¡®å®", cancelButtonText: "åæ¶", type: "warning", }).then(() => { productionReportDelete({ id: row.id }).then(res => { if (res.code === 200) { proxy.$modal.msgSuccess("å 餿å"); getList(); } else { ElMessageBox.alert(res.msg || "å é¤å¤±è´¥", "æç¤º", { confirmButtonText: "ç¡®å®", }); } }); const data = reactive({ searchForm: { nickName: "", workOrderNo: "", workOrderStatus: "", }, }); const {searchForm} = toRefs(data); const expandedRowKeys = ref([]); const expandData = ref([]); const userList = ref([]); const tableColumn = ref([ { label: "æ¥å·¥åå·", prop: "productNo", width: 120, dataType: 'slot', slot: 'productNoSlot', }, { label: "æ¥å·¥äººå", prop: "nickName", width: 120, }, { label: "å·¥åº", prop: "process", width: 120, }, { label: "å·¥åç¼å·", prop: "workOrderNo", width: 120, }, { label: "éå®ååå·", prop: "salesContractNo", width: 120, }, { label: "产ååç§°", prop: "productName", width: 120, }, { label: "产åè§æ ¼åå·", prop: "productModelName", width: 120, }, { label: "äº§åºæ°é", prop: "quantity", width: 120, }, { label: "æ¥åºæ°é", prop: "scrapQty", width: 120, }, { label: "åä½", prop: "unit", width: 120, }, { label: "å建æ¶é´", prop: "createTime", width: 120, }, { dataType: "action", label: "æä½", align: "center", fixed: "right", operation: [ { name: "æ¥çæå ¥", type: "text", clickFun: row => { showInput(row); }, }, { name: "å é¤", type: "danger", clickFun: row => { deleteReport(row); }, }, ], }, ]); const currentReportRowData = ref({}); const tableData = ref([]); const selectedRows = ref([]); const tableLoading = ref(false); const childrenLoading = ref(false); const page = reactive({ current: 1, size: 100, total: 0, }); const formDia = ref(); const {proxy} = getCurrentInstance(); // æ¥è¯¢å表 /** æç´¢æé®æä½ */ const handleQuery = () => { page.current = 1; getList(); }; const changeDaterange = value => { if (value) { searchForm.value.entryDateStart = value[0]; searchForm.value.entryDateEnd = value[1]; } else { searchForm.value.entryDateStart = undefined; searchForm.value.entryDateEnd = undefined; } handleQuery(); }; const deleteReport = row => { ElMessageBox.confirm("ç¡®å®å é¤è¯¥æ¥å·¥åï¼", "æç¤º", { confirmButtonText: "ç¡®å®", cancelButtonText: "åæ¶", type: "warning", }).then(() => { productionReportDelete({id: row.id}).then(res => { if (res.code === 200) { proxy.$modal.msgSuccess("å 餿å"); getList(); } else { ElMessageBox.alert(res.msg || "å é¤å¤±è´¥", "æç¤º", { confirmButtonText: "ç¡®å®", }); } }); }; const pagination = obj => { page.current = obj.page; page.size = obj.limit; getList(); }; const getList = () => { tableLoading.value = true; const params = { ...searchForm.value, ...page }; params.entryDate = undefined; expandedRowKeys.value = []; productionProductMainListPage(params) }); }; const pagination = obj => { page.current = obj.page; page.size = obj.limit; getList(); }; const getList = () => { tableLoading.value = true; const params = {...searchForm.value, ...page}; params.entryDate = undefined; expandedRowKeys.value = []; productionProductMainListPage(params) .then(res => { tableLoading.value = false; tableData.value = res.data.records.map(item => ({ ...item, pendingFinishNum: (Number(item.schedulingNum) || 0) - (Number(item.finishedNum) || 0), (Number(item.schedulingNum) || 0) - (Number(item.finishedNum) || 0), })); page.total = res.data.total; }) .catch(err => { tableLoading.value = false; }); }; // å±å¼è¡ const expandChange = (row, expandedRows) => { userListNoPageByTenantId().then(res => { userList.value = res.data; }); if (expandedRows.length > 0) { nextTick(() => { expandedRowKeys.value = []; try { childrenLoading.value = true; workListPageById({ id: row.id }).then(res => { childrenLoading.value = false; const index = tableData.value.findIndex(item => item.id === row.id); if (index > -1) { expandData.value = res.data.map(item => ({ ...item, pendingNum: }; // å±å¼è¡ const expandChange = (row, expandedRows) => { userListNoPageByTenantId().then(res => { userList.value = res.data; }); if (expandedRows.length > 0) { nextTick(() => { expandedRowKeys.value = []; try { childrenLoading.value = true; workListPageById({id: row.id}).then(res => { childrenLoading.value = false; const index = tableData.value.findIndex(item => item.id === row.id); if (index > -1) { expandData.value = res.data.map(item => ({ ...item, pendingNum: (Number(item.schedulingNum) || 0) - (Number(item.finishedNum) || 0), parentStatus: row.status, // æ°å¢ç¶è¡¨ç¶æ })); } expandedRowKeys.value.push(row.id); }); } catch (error) { childrenLoading.value = false; console.log(error); } }); } else { expandedRowKeys.value = []; } }; const changeNum = row => { // æ¾å°ç¶è¡¨æ ¼æ°æ® const parentRow = tableData.value.find( parentStatus: row.status, // æ°å¢ç¶è¡¨ç¶æ })); } expandedRowKeys.value.push(row.id); }); } catch (error) { childrenLoading.value = false; console.log(error); } }); } else { expandedRowKeys.value = []; } }; const changeNum = row => { // æ¾å°ç¶è¡¨æ ¼æ°æ® const parentRow = tableData.value.find( item => item.id === expandedRowKeys.value[0] ); // è®¡ç®ææåè¡¨æ ¼ finishedNum çæ»å const totalFinishedNum = expandData.value.reduce( ); // è®¡ç®ææåè¡¨æ ¼ finishedNum çæ»å const totalFinishedNum = expandData.value.reduce( (sum, item) => sum + (Number(item.finishedNum) || 0), 0 ); // ç¶è¡¨æ ¼çæäº§æ°é const schedulingNum = parentRow ? Number(parentRow.schedulingNum) : 0; ); // ç¶è¡¨æ ¼çæäº§æ°é const schedulingNum = parentRow ? Number(parentRow.schedulingNum) : 0; if (totalFinishedNum > schedulingNum) { // åéæ¬æ¬¡è¾å ¥ row.finishedNum = if (totalFinishedNum > schedulingNum) { // åéæ¬æ¬¡è¾å ¥ row.finishedNum = schedulingNum - (totalFinishedNum - Number(row.finishedNum)); proxy.$modal.msgWarning("æææ¬æ¬¡ç产æ°éä¹åä¸å¯å¤§äºæäº§æ°é"); } row.pendingNum = row.schedulingNum - row.finishedNum; }; // ç¼è¾ä¿®æ¹ç¶æ const changeEditType = row => { proxy.$modal.msgWarning("æææ¬æ¬¡ç产æ°éä¹åä¸å¯å¤§äºæäº§æ°é"); } row.pendingNum = row.schedulingNum - row.finishedNum; }; // ç¼è¾ä¿®æ¹ç¶æ const changeEditType = row => { row.editType = !row.editType; }; // ä¿åè®°å½ const saveReceiptPayment = row => { productionReportUpdate(row).then(res => { row.editType = !row.editType; }; // ä¿åè®°å½ const saveReceiptPayment = row => { productionReportUpdate(row).then(res => { row.editType = !row.editType; getList(); proxy.$modal.msgSuccess("æäº¤æå"); }); }; // è¡¨æ ¼éæ©æ°æ® const handleSelectionChange = selection => { selectedRows.value = selection; }; const summarizeMainTable = param => { return proxy.summarizeTable(param, ["finishedNum"]); }; // æå¼å¼¹æ¡ const openForm = (type, row) => { if (selectedRows.value.length !== 1) { proxy.$message.error("è¯·éæ©ä¸æ¡æ°æ®"); return; } if (selectedRows.value[0].pendingFinishNum == 0) { proxy.$message.warning("æ é忥工"); return; } nextTick(() => { const rowInfo = type === "add" ? selectedRows.value[0] : row; formDia.value?.openDialog(type, rowInfo); }); }; getList(); proxy.$modal.msgSuccess("æäº¤æå"); }); }; // è¡¨æ ¼éæ©æ°æ® const handleSelectionChange = selection => { selectedRows.value = selection; }; const summarizeMainTable = param => { return proxy.summarizeTable(param, ["finishedNum"]); }; // æå¼å¼¹æ¡ const openForm = (type, row) => { if (selectedRows.value.length !== 1) { proxy.$message.error("è¯·éæ©ä¸æ¡æ°æ®"); return; } if (selectedRows.value[0].pendingFinishNum == 0) { proxy.$message.warning("æ é忥工"); return; } nextTick(() => { const rowInfo = type === "add" ? selectedRows.value[0] : row; formDia.value?.openDialog(type, rowInfo); }); }; // æå¼æå ¥æ¨¡ææ¡ const isShowInput = ref(false); const isShowingId = ref(0); const showInput = row => { isShowInput.value = true; isShowingId.value = row.id; }; // æå¼æå ¥æ¨¡ææ¡ const isShowInput = ref(false); const copperPrintingFormVisible = ref(false); const voltageSortingFormVisible = ref(false); const showDetail = ref(false); const isShowingId = ref(0); const showInput = row => { isShowInput.value = true; isShowingId.value = row.id; }; // å¯¼åº const handleOut = () => { ElMessageBox.confirm("éä¸çå 容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { confirmButtonText: "确认", cancelButtonText: "åæ¶", type: "warning", }) // å¯¼åº const handleOut = () => { ElMessageBox.confirm("éä¸çå 容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { confirmButtonText: "确认", cancelButtonText: "åæ¶", type: "warning", }) .then(() => { proxy.download("/productionProductMain/export", {}, "ç产æ¥å·¥.xlsx"); }) .catch(() => { proxy.$modal.msg("已忶"); }); }; onMounted(() => { getList(); }); }; const openDetail = row => { currentReportRowData.value = row; if (row.process ==='å°é' || row.process ==='å°é¶') { copperPrintingFormVisible.value = true; } else if (row.process === 'çµååé') { voltageSortingFormVisible.value = true; } else { showDetail.value = true; } }; onMounted(() => { getList(); }); </script> <style scoped></style> src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
@@ -18,10 +18,6 @@ type: Boolean, default: false }, detailData: { type: Object, default: () => ({}), }, row: { type: Object, default: () => ({}), @@ -150,8 +146,8 @@ const initData = () => { if (!props.isEdit) { formData.otherData = JSON.parse(props.detailData.otherData || '{}'); formData.quantity = props.detailData.quantity; formData.otherData = JSON.parse(props.row.otherData || '{}'); formData.quantity = props.row.quantity; } else { const row = props.row; formData.planQuantity = row.planQuantity @@ -174,7 +170,7 @@ <template> <el-dialog v-model="visible" title="å°éæ¥å·¥" :title="isEdit? 'å°éæ¥å·¥' : '详æ '" width="90%"> <el-form :model="formData"> <table class="report-table"> src/views/productionManagement/workOrder/components/VoltageSortingForm.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,341 @@ <script setup lang="ts"> import {computed, onMounted, reactive, ref} from "vue"; import dayjs from "dayjs"; import {userListNoPageByTenantId} from "@/api/system/user.js"; import {ElMessage} from "element-plus"; import {addProductMain} from "@/api/productionManagement/workOrder.js"; defineOptions({ name: "VoltageSortingForm" }); const props = defineProps({ isShow: { type: Boolean, required: true }, isEdit: { type: Boolean, default: false }, row: { type: Object, default: () => ({}), } }); const emits = defineEmits(["update:isShow", "refreshData"]); const visible = computed({ get: () => props.isShow, set: (value: boolean) => emits("update:isShow", value), }); const formData = reactive({ productProcessRouteItemId: undefined, workOrderId: undefined, planQuantity: undefined, reportWork: undefined, productMainId: undefined, quantity: undefined, // äº§åºæ°é userId: undefined, // ä½ä¸å userName: undefined, // ä½ä¸å scrapQty: undefined, // ä¸è¯æ°é otherData: { engineException: undefined,// ææ å·¥ç¨å¼å¸¸ specificIssue: undefined,// å ·ä½ä¸è¯ dryingTemperature: '', // ç干温度 scrapingDate: dayjs().format('YYYY-MM-DD HH:mm:ss'), // å®éæ¥æ machineNumber: undefined, // æºå°å· receiveQuantity: undefined, // æ¥æ¶æ°é voltageSpecs: [], // çµåè§æ ¼, voltage: [], // çµå quantity: [], // æ°é comprehensiveHit: undefined, // 综åå½ä¸æ¬ userId: undefined, // ä½ä¸å userName: undefined, // ä½ä¸å exceptionDealResult: undefined, // å¼å¸¸å¤çç»æ } }) const userOptions = ref([]); const getUserList = () => { userListNoPageByTenantId() .then(res => { if (res.code === 200) { userOptions.value = res.data || []; } }) .catch(err => { console.error("è·åç¨æ·å表失败", err); }); }; // ç¨æ·éæ©ååæ¶æ´æ° userName const handleUserChange = (value) => { if (value) { formData.userName = userOptions.value.find(user => user.userId === value).userName; } }; const handleReport = () => { if (!formData.userId) { ElMessage.error('è¯·éæ©ä½ä¸å') return; } if (!formData.quantity || formData.quantity <= 0) { ElMessage.error('请è¾å ¥äº§åºæ°é') return; } const otherData = JSON.stringify(formData.otherData); const submitData = { ...formData, otherData: otherData }; addProductMain(submitData).then(res => { if (res.code === 200) { ElMessage({ message: 'æ¥å·¥æå', type: 'success', }) emits("refreshData") visible.value = false; } else { ElMessage.error('æ¥å·¥å¤±è´¥') } }); }; const initData = () => { if (!props.isEdit) { formData.otherData = JSON.parse(props.row.otherData || '{}'); formData.quantity = props.row.quantity; } else { const row = props.row; formData.planQuantity = row.planQuantity formData.productProcessRouteItemId = row.productProcessRouteItemId formData.workOrderId = row.id formData.reportWork = row.reportWork formData.productMainId = row.productMainId } } const displayValue = (value: any) => { return value === undefined || value === null || value === "" ? "-" : value; }; onMounted(() => { getUserList(); initData() }) </script> <template> <el-dialog v-model="visible" :title="isEdit? 'çµåå鿥工' : '详æ '" width="90%"> <el-form :model="formData"> <table class="report-table"> <tbody> <tr> <td class="tip" colspan="12">çµååéæ åµ</td> <td class="label" colspan="2">å®éæ¥æ</td> <td colspan="2"> <el-date-picker v-if="props.isEdit" v-model="formData.otherData.scrapingDate" type="datetime" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss" placeholder="è¯·éæ©" style="width: 100%" /> <span v-else class="view-value">{{ displayValue(formData.otherData.scrapingDate) }}</span> </td> <td class="label" colspan="2">æºå°å·</td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.machineNumber" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.machineNumber) }}</span> </td> <td class="label" colspan="3">ä½ä¸å</td> </tr> <tr> <td class="label" colspan="2">æ¡£ä½</td> <td class="label" colspan="2">䏿¡£</td> <td class="label" colspan="2">äºæ¡£</td> <td class="label" colspan="2">䏿¡£</td> <td class="label" colspan="2">åæ¡£</td> <td class="label" colspan="2">äºæ¡£</td> <td class="label" colspan="2">æ¥æ¶æ°é</td> <td colspan="6"> <el-input-number v-if="props.isEdit" v-model="formData.otherData.receiveQuantity" controls-position="right" style="width: 100%;" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.receiveQuantity) }}</span> </td> <td rowspan="6" colspan="3"> <el-select v-model="formData.userId" v-if="props.isEdit" style="width: 100%" placeholder="è¯·éæ©ä½ä¸å" clearable filterable @change="handleUserChange"> <el-option v-for="user in userOptions" :key="user.userId" :label="user.userName" :value="user.userId"/> </el-select> <span v-else class="view-value">{{ displayValue(formData.userName || formData.userId) }}</span> </td> </tr> <tr> <td class="label" colspan="2">çµåè§æ ¼</td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltageSpecs[0]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltageSpecs[0]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltageSpecs[1]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltageSpecs[1]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltageSpecs[2]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltageSpecs[2]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltageSpecs[3]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltageSpecs[3]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltageSpecs[4]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltageSpecs[4]) }}</span> </td> <td class="label" colspan="2">äº§åºæ°é</td> <td colspan="6"> <el-input-number v-if="props.isEdit" controls-position="right" v-model="formData.quantity" style="width: 100%;" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.quantity) }}</span> </td> </tr> <tr> <td class="label" colspan="2">çµå</td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltage[0]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltage[0]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltage[1]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltage[1]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltage[2]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltage[2]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltage[3]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltage[3]) }}</span> </td> <td colspan="2"> <el-input v-if="props.isEdit" v-model="formData.otherData.voltage[4]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.voltage[4]) }}</span> </td> <td class="label" colspan="2">ä¸è¯æ°é</td> <td colspan="6"> <el-input-number v-if="props.isEdit" controls-position="right" v-model="formData.scrapQty" style="width: 100%;" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.scrapQty) }}</span> </td> </tr> <tr> <td class="label" colspan="2">æ°é</td> <td colspan="2"> <el-input-number v-if="props.isEdit" controls-position="right" v-model="formData.otherData.quantity[0]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.quantity[0]) }}</span> </td> <td colspan="2"> <el-input-number v-if="props.isEdit" controls-position="right" v-model="formData.otherData.quantity[1]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.quantity[1]) }}</span> </td> <td colspan="2"> <el-input-number v-if="props.isEdit" controls-position="right" v-model="formData.otherData.quantity[2]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.quantity[2]) }}</span> </td> <td colspan="2"> <el-input-number v-if="props.isEdit" controls-position="right" v-model="formData.otherData.quantity[3]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.quantity[3]) }}</span> </td> <td colspan="2"> <el-input-number v-if="props.isEdit" controls-position="right" v-model="formData.otherData.quantity[4]" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.quantity[4]) }}</span> </td> <td class="label" colspan="2">综åå½ä¸æ¬</td> <td colspan="6"> <el-input v-if="props.isEdit" v-model="formData.otherData.comprehensiveHit" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.comprehensiveHit) }}</span> </td> </tr> <tr> <td class="label" colspan="2">ææ å·¥ç¨å¼å¸¸</td> <td colspan="10"> <div v-if="props.isEdit" style="display: flex; align-items: center; width: 100%;"> <el-radio-group v-model="formData.otherData.engineException" style="display: flex; margin-right: 20px;"> <el-radio value="æ ">æ </el-radio> <el-radio value="æ">æ</el-radio> </el-radio-group> <div v-if="formData.otherData.engineException === 'æ'" style="display: flex; align-items: center; flex: 1;"> <div style="width: 100px;">å ·ä½ä¸è¯ï¼</div> <el-input v-model="formData.otherData.specificIssue" placeholder="请è¾å ¥" style="width: 100%;"/> </div> </div> <span v-else class="view-value">{{ displayValue(formData.otherData.specificIssue) }}</span> </td> <td class="label" colspan="2">å¼å¸¸å¤çç»æ</td> <td colspan="6"> <el-input v-if="props.isEdit" v-model="formData.otherData.exceptionDealResult" placeholder="请è¾å ¥"/> <span v-else class="view-value">{{ displayValue(formData.otherData.exceptionDealResult) }}</span> </td> </tr> </tbody> </table> </el-form> <template #footer> <span class="dialog-footer"> <el-button v-if="props.isEdit" type="primary" @click="handleReport">ç¡®å®</el-button> <el-button @click="visible = false">{{ props.isEdit ? "åæ¶" : "å ³é" }}</el-button> </span> </template> </el-dialog> </template> <style scoped> .report-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; } .report-table td { border: 1px solid #dcdfe6; padding: 6px; vertical-align: middle; } .report-table .label { width: 90px; background: #f5f7fa; text-align: center; font-weight: 500; } .report-table .tip { text-align: center; font-weight: 500; line-height: 1.4; background: #fafafa; } .view-value { display: inline-block; min-height: 32px; line-height: 32px; } </style> src/views/productionManagement/workOrder/index.vue
@@ -227,6 +227,12 @@ :isEdit="true" :row="currentReportRowData" @refreshData="getList"/> <VoltageSortingForm v-if="voltageSortingFormVisible" v-model:isShow="voltageSortingFormVisible" :isEdit="true" :row="currentReportRowData" @refreshData="getList"/> </div> </template> @@ -249,6 +255,7 @@ const {priority_type} = proxy.useDict("priority_type"); const CopperPrintingForm = defineAsyncComponent(() => import("./components/CopperPrintingForm.vue")); const VoltageSortingForm = defineAsyncComponent(() => import("./components/VoltageSortingForm.vue")); const tableColumn = ref([ { label: "ä¼å 级", @@ -364,7 +371,7 @@ clickFun: row => { showReportDialog(row); }, disabled: row => row.planQuantity <= 0, disabled: row => !row.isCanReport || row.planQuantity <= 0, }, ], }, @@ -375,6 +382,7 @@ const qrRowData = ref(null); const editDialogVisible = ref(false); const copperPrintingFormVisible = ref(false); const voltageSortingFormVisible = ref(false); const transferCardVisible = ref(false); const transferCardData = ref([]); const transferCardQrUrl = ref(""); @@ -625,10 +633,14 @@ const showReportDialog = row => { currentReportRowData.value = row; if (row.processName === 'å°é') { if (row.processName === 'å°é' || row.processName === 'å°é¶') { copperPrintingFormVisible.value = true return } if (row.processName === 'çµååé') { voltageSortingFormVisible.value = true return; } reportForm.planQuantity = row.planQuantity; reportForm.quantity = row.quantity !== undefined && row.quantity !== null ? row.quantity : null; reportForm.productProcessRouteItemId = row.productProcessRouteItemId; src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -49,6 +49,11 @@ </el-select> </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" :disabled="quantityDisabled"/> </el-form-item> </el-col> </el-row> <el-row :gutter="30"> <el-col :span="12"> @@ -57,8 +62,10 @@ </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" :disabled="quantityDisabled"/> <el-form-item label="ä¸è¯åå ï¼" prop="defectiveReason"> <el-select v-model="form.defectiveReason" placeholder="è¯·éæ©" clearable style="width: 100%"> <el-option :label="item.label" :value="item.value" v-for="(item,index) in defective_reason" :key="index" /> </el-select> </el-form-item> </el-col> </el-row> @@ -145,6 +152,7 @@ productModelId: "", model: "", testStandardId: "", defectiveReason: undefined, unit: "", quantity: "", checkCompany: "", @@ -171,6 +179,7 @@ }); const supplierList = ref([]); const productOptions = ref([]); const { defective_reason } = proxy.useDict("defective_reason"); const tableColumn = ref([ { label: "ææ ", src/views/qualityManagement/finalInspection/index.vue
@@ -19,7 +19,7 @@ > </div> <div> <el-button type="primary" @click="openForm('add')">æ°å¢</el-button> <!-- <el-button type="primary" @click="openForm('add')">æ°å¢</el-button>--> <el-button @click="handleOut">导åº</el-button> <el-button type="danger" plain @click="handleDelete">å é¤</el-button> </div> @@ -122,6 +122,16 @@ width: 100 }, { label: "ä¸è¯æ°é", prop: "defectiveQuantity", width: 100 }, { label: "ä¸è¯åå ", prop: "defectiveReason", width: 100 }, { label: "æ£æµåä½", prop: "checkCompany", width: 120 src/views/qualityManagement/metricMaintenance/StandardFormDialog.vue
@@ -22,9 +22,9 @@ </el-form-item> <el-form-item label="ç±»å«" prop="inspectType"> <el-select v-model="form.inspectType" placeholder="è¯·éæ©ç±»å«" style="width: 100%"> <el-option label="åæææ£éª" value="0" /> <!-- <el-option label="åæææ£éª" value="0" />--> <el-option label="è¿ç¨æ£éª" value="1" /> <el-option label="åºåæ£éª" value="2" /> <el-option label="æåæ£éª" value="2" /> <el-option label="å·¡æ£" value="3" /> </el-select> </el-form-item> src/views/qualityManagement/metricMaintenance/index.vue
@@ -304,7 +304,7 @@ const map = { 0: 'åæææ£éª', 1: 'è¿ç¨æ£éª', 2: 'åºåæ£éª' 2: 'æåæ£éª' } return map[val] || val } src/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue
@@ -13,7 +13,7 @@ <el-select v-model="form.inspectType" disabled> <el-option label="åæææ£éª" :value="0" /> <el-option label="è¿ç¨æ£éª" :value="1" /> <el-option label="åºåæ£éª" :value="2" /> <el-option label="æåæ£éª" :value="2" /> </el-select> </el-form-item> </el-col> @@ -82,7 +82,7 @@ <el-col :span="12"> <el-form-item label="å¤çç»æï¼" prop="dealResult"> <el-select v-model="form.dealResult" placeholder="è¯·éæ©" clearable> <el-option :label="item.label" :value="item.value" v-for="item in filteredRejectionHandling" :key="item.value" /> <el-option :label="item.label" :value="item.value" v-for="item in filteredRejectionHandling" :key="item.value" :disabled="form.process === 'å°é' && item.value !== 'æ¥åº'" /> </el-select> </el-form-item> </el-col> @@ -109,6 +109,13 @@ </el-form-item> </el-col> </el-row> <el-row :gutter="30" v-if="form.dealResult === 'é离'"> <el-col :span="12"> <el-form-item label="夿³¨ï¼" prop="remark"> <el-input type="textarea" v-model="form.remark" :rows="3" placeholder="请è¾å ¥"></el-input> </el-form-item> </el-col> </el-row> </el-form> <template #footer> <div class="dialog-footer"> @@ -121,7 +128,7 @@ </template> <script setup> import {ref, reactive, toRefs, computed} from "vue"; import {ref, reactive, toRefs, computed, watch} from "vue"; import {productTreeList} from "@/api/basicData/product.js"; import { getQualityUnqualifiedInfo, @@ -151,7 +158,8 @@ dealResult: '', dealName: '', dealTime: '', method: undefined method: undefined, remark: undefined }, rules: { checkTime: [{ required: false, message: "请è¾å ¥", trigger: "blur" },], @@ -181,6 +189,11 @@ return data }) watch(() => form.value.dealResult, (newVal) => { if (newVal !== 'é离') { form.value.remark = undefined; } }); // æå¼å¼¹æ¡ const openDialog = async (type, row) => { src/views/qualityManagement/nonconformingManagement/index.vue
@@ -63,7 +63,7 @@ import {onMounted, ref, reactive, toRefs, nextTick, getCurrentInstance} from "vue"; import FormDia from "@/views/qualityManagement/nonconformingManagement/components/formDia.vue"; import {ElMessageBox} from "element-plus"; import {qualityUnqualifiedDel, qualityUnqualifiedListPage} from "@/api/qualityManagement/nonconformingManagement.js"; import {qualityUnqualifiedDel, qualityUnqualifiedListPage, liftTheQuarantineQualityUnqualified} from "@/api/qualityManagement/nonconformingManagement.js"; import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue"; import dayjs from "dayjs"; @@ -180,6 +180,14 @@ width: 100, operation: [ { name: "åæ¶é离", type: "text", clickFun: (row) => { liftTheQuarantine(row); }, showHide: (row) => row.dealResult === 'é离' && !row.quarantineLifted }, { name: "å¤ç", type: "text", clickFun: (row) => { @@ -260,6 +268,14 @@ }) }; const liftTheQuarantine = (row) => { proxy.$modal.confirm("æ¯å¦ç¡®è®¤åæ¶é离?").then(function () { return liftTheQuarantineQualityUnqualified(row) }).then(() => { proxy.$modal.msgSuccess("åæ¶é离æå"); getList(); }).catch(() => {}) } // å é¤ const handleDelete = () => { let ids = [];