君歌
1.对于新增订单需流转协同办公进行审批,审批完成流转生产管控-生产订单
2.客户分类修改为:核心、重要、普通、一般。
3.可对报价多次修改,修改后流转至协同办公-协同审批-报价审批,并对每次报价进行记录。
4.不合格管理字段按照单据进行修改。
5.谁登记的客户只能看见自己的,负责人(维护人)可以转移,操作加一个‘客户交接’按钮选择要交接给的负责人
| | |
| | | }) |
| | | } |
| | | |
| | | // 交æ¥å®¢æ· |
| | | export function handoverCustomer(data) { |
| | | return request({ |
| | | url: '/basic/customer/handover', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // æµå
¥å
¬æµ· |
| | | export function backCustomer(id) { |
| | | return request({ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢ä¸åæ ¼åå¤çå |
| | | export function listPage(query) { |
| | | return request({ |
| | | url: "/qualityUnqualifiedOrder/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥ç详æ
|
| | | export function getDetail(id) { |
| | | return request({ |
| | | url: `/qualityUnqualifiedOrder/${id}`, |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢å¤çå |
| | | export function save(data) { |
| | | return request({ |
| | | url: "/qualityUnqualifiedOrder/save", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹å¤çå |
| | | export function update(data) { |
| | | return request({ |
| | | url: "/qualityUnqualifiedOrder/update", |
| | | method: "put", |
| | | data, |
| | | }); |
| | | } |
| | | |
| | | // å é¤å¤çå |
| | | export function remove(ids) { |
| | | return request({ |
| | | url: "/qualityUnqualifiedOrder/delete", |
| | | method: "delete", |
| | | data: ids, |
| | | }); |
| | | } |
| | |
| | | <el-table-column align="center" |
| | | label="åºå·" |
| | | type="index" |
| | | fixed="left" |
| | | width="60" /> |
| | | <el-table-column v-for="(item, index) in column" |
| | | :key="index" |
| | |
| | | style="width: 240px" |
| | | clearable |
| | | @change="handleQuery"> |
| | | <el-option label="é¶å®å®¢æ·" |
| | | value="é¶å®å®¢æ·" /> |
| | | <el-option label="è¿éå客æ·" |
| | | value="è¿éå客æ·" /> |
| | | <el-option label="æ ¸å¿" |
| | | value="æ ¸å¿" /> |
| | | <el-option label="éè¦" |
| | | value="éè¦" /> |
| | | <el-option label="æ®é" |
| | | value="æ®é" /> |
| | | <el-option label="ä¸è¬" |
| | | value="ä¸è¬" /> |
| | | </el-select> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | |
| | | plain |
| | | @click="back">æµå
¥å
¬æµ·</el-button> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="primary" @click="handleOutFollowUpList">导åºè·è¿è®°å½</el-button> |
| | | <el-button type="info" |
| | | plain |
| | | icon="Upload" |
| | |
| | | <el-select v-model="form.customerType" |
| | | placeholder="è¯·éæ©" |
| | | clearable> |
| | | <el-option label="é¶å®å®¢æ·" |
| | | value="é¶å®å®¢æ·" /> |
| | | <el-option label="è¿éå客æ·" |
| | | value="è¿éå客æ·" /> |
| | | <el-option label="æ ¸å¿" |
| | | value="æ ¸å¿" /> |
| | | <el-option label="éè¦" |
| | | value="éè¦" /> |
| | | <el-option label="æ®é" |
| | | value="æ®é" /> |
| | | <el-option label="ä¸è¬" |
| | | value="ä¸è¬" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 交æ¥å¯¹è¯æ¡ --> |
| | | <el-dialog v-model="handoverDialogVisible" |
| | | title="客æ·äº¤æ¥" |
| | | width="400px" |
| | | @close="closeHandoverDialog"> |
| | | <el-form :model="handoverForm" |
| | | :rules="handoverRules" |
| | | ref="handoverFormRef" |
| | | label-width="100px"> |
| | | <el-form-item label="å½åç»´æ¤äºº"> |
| | | <span>{{ handoverForm.oldMaintainer }}</span> |
| | | </el-form-item> |
| | | <el-form-item label="æ°ç»´æ¤äºº" |
| | | prop="maintainer"> |
| | | <el-select v-model="handoverForm.maintainerId" |
| | | placeholder="è¯·éæ©æ°ç»´æ¤äºº" |
| | | style="width: 100%" |
| | | filterable |
| | | @change="handleHandoverUserChange"> |
| | | <el-option v-for="item in userList" |
| | | :key="item.userId || item.nickName" |
| | | :label="item.nickName" |
| | | :value="item.userId" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitHandoverForm">确认</el-button> |
| | | <el-button @click="closeHandoverDialog">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | addReturnVisit, |
| | | getReturnVisit, |
| | | } from "@/api/basicData/customerFile.js"; |
| | | import {listCustomer, getCustomer, addCustomer, updateCustomer, delCustomer, backCustomer} from "@/api/basicData/customer.js"; |
| | | import {listCustomer, getCustomer, addCustomer, updateCustomer, delCustomer, backCustomer, handoverCustomer} from "@/api/basicData/customer.js"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import { userListNoPage } from "@/api/system/user.js"; |
| | | import useUserStore from "@/store/modules/user"; |
| | |
| | | { |
| | | label: "客æ·åç±»", |
| | | prop: "customerType", |
| | | fixed: "left", |
| | | dataType: "tag", |
| | | width: 120, |
| | | formatType: value => { |
| | | switch (value) { |
| | | case "æ ¸å¿": return "danger"; |
| | | case "éè¦": return "warning"; |
| | | case "æ®é": return "primary"; |
| | | case "ä¸è¬": return "info"; |
| | | default: return "info"; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "customerName", |
| | | fixed: "left", |
| | | width: 220, |
| | | }, |
| | | { |
| | |
| | | label: "æä½", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 290, |
| | | width: 340, |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: row => { |
| | | openForm("edit", row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "交æ¥", |
| | | type: "text", |
| | | clickFun: row => { |
| | | openHandoverDialog(row); |
| | | }, |
| | | }, |
| | | { |
| | |
| | | // ç¨æ·ä¿¡æ¯è¡¨åå¼¹æ¡æ°æ® |
| | | const operationType = ref(""); |
| | | const dialogFormVisible = ref(false); |
| | | |
| | | // 交æ¥å¯¹è¯æ¡ |
| | | const handoverDialogVisible = ref(false); |
| | | const handoverFormRef = ref(); |
| | | const handoverForm = reactive({ |
| | | id: undefined, |
| | | oldMaintainer: "", |
| | | maintainer: "", |
| | | maintainerId: undefined, |
| | | }); |
| | | const handoverRules = { |
| | | maintainer: [{ required: true, message: "è¯·éæ©æ°ç»´æ¤äºº", trigger: "change" }], |
| | | }; |
| | | const formYYs = ref({ |
| | | // å
¶ä»å段... |
| | | contactList: [ |
| | |
| | | proxy.resetForm("formRef"); |
| | | dialogFormVisible.value = false; |
| | | }; |
| | | // äº¤æ¥ |
| | | const handleHandoverUserChange = userId => { |
| | | const user = userList.value.find(item => (item.userId || item.nickName) === userId); |
| | | handoverForm.maintainer = user ? user.nickName : ""; |
| | | }; |
| | | const openHandoverDialog = row => { |
| | | handoverForm.id = row.id; |
| | | handoverForm.oldMaintainer = row.maintainer; |
| | | handoverForm.maintainer = ""; |
| | | handoverForm.maintainerId = undefined; |
| | | userListNoPage().then(res => { |
| | | userList.value = res.data; |
| | | handoverDialogVisible.value = true; |
| | | }); |
| | | }; |
| | | const closeHandoverDialog = () => { |
| | | proxy.resetForm("handoverFormRef"); |
| | | handoverForm.id = undefined; |
| | | handoverForm.oldMaintainer = ""; |
| | | handoverForm.maintainer = ""; |
| | | handoverForm.maintainerId = undefined; |
| | | handoverDialogVisible.value = false; |
| | | }; |
| | | const submitHandoverForm = () => { |
| | | proxy.$refs.handoverFormRef.validate(valid => { |
| | | if (valid) { |
| | | handoverCustomer({ |
| | | id: handoverForm.id, |
| | | maintainer: handoverForm.maintainer, |
| | | maintainerId: handoverForm.maintainerId, |
| | | }).then(() => { |
| | | proxy.$modal.msgSuccess("äº¤æ¥æå"); |
| | | closeHandoverDialog(); |
| | | getList(); |
| | | }); |
| | | } |
| | | }); |
| | | }; |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | // 导åºè·è¿è®°å½ |
| | | const handleOutFollowUpList = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("basic/customer-follow/export", {}, "客æ·è·è¿è®°å½.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | |
| | | style="width: 240px" |
| | | clearable |
| | | @change="handleQuery"> |
| | | <el-option label="é¶å®å®¢æ·" |
| | | value="é¶å®å®¢æ·" /> |
| | | <el-option label="è¿éå客æ·" |
| | | value="è¿éå客æ·" /> |
| | | <el-option label="æ ¸å¿" |
| | | value="æ ¸å¿" /> |
| | | <el-option label="éè¦" |
| | | value="éè¦" /> |
| | | <el-option label="æ®é" |
| | | value="æ®é" /> |
| | | <el-option label="ä¸è¬" |
| | | value="ä¸è¬" /> |
| | | </el-select> |
| | | <el-button type="primary" |
| | | @click="handleQuery" |
| | |
| | | <el-select v-model="form.customerType" |
| | | placeholder="è¯·éæ©" |
| | | clearable> |
| | | <el-option label="é¶å®å®¢æ·" |
| | | value="é¶å®å®¢æ·" /> |
| | | <el-option label="è¿éå客æ·" |
| | | value="è¿éå客æ·" /> |
| | | <el-option label="æ ¸å¿" |
| | | value="æ ¸å¿" /> |
| | | <el-option label="éè¦" |
| | | value="éè¦" /> |
| | | <el-option label="æ®é" |
| | | value="æ®é" /> |
| | | <el-option label="ä¸è¬" |
| | | value="ä¸è¬" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | { |
| | | label: "客æ·åç±»", |
| | | prop: "customerType", |
| | | dataType: "tag", |
| | | width: 120, |
| | | formatType: value => { |
| | | switch (value) { |
| | | case "æ ¸å¿": return "danger"; |
| | | case "éè¦": return "warning"; |
| | | case "æ®é": return "primary"; |
| | | case "ä¸è¬": return "info"; |
| | | default: return "info"; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | |
| | | { value: "quotation", label: "æ¥ä»·å®¡æ¹", cellBg: "#f4ecfc", cellColor: "#9b59b6" }, |
| | | { value: "shipment", label: "å货审æ¹", cellBg: "#e8faf6", cellColor: "#1abc9c" }, |
| | | { value: "enterprise_news", label: "ä¼ä¸æ°é»", cellBg: "#ecf5ff", cellColor: "#409eff" }, |
| | | { value: "sales", label: "éå®å®¡æ¹", cellBg: "#e8faf0", cellColor: "#1a9c5d" }, |
| | | ]; |
| | | |
| | | /** å表æ¥è¯¢ï¼å®¡æ¹ç¶æï¼ä¸å端 status æä¸¾ä¸è´ï¼ */ |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <!-- éå®å®¡æ¹è¯¦æ
--> |
| | | <template v-else-if="row.businessType === 19"> |
| | | <div v-if="detailData" class="sales-detail"> |
| | | <el-divider content-position="left">éå®è¯¦æ
</el-divider> |
| | | <el-descriptions :column="2" border> |
| | | <el-descriptions-item label="éå®ååå·">{{ detailData.salesContractNo || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="客æ·åç§°">{{ detailData.customerName || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä¸å¡å">{{ detailData.salesman || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="项ç®åç§°">{{ detailData.projectName || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="ç¾è®¢æ¥æ">{{ detailData.executionDate || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="仿¬¾æ¹å¼">{{ detailData.paymentMethod || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="å½å
¥äºº">{{ detailData.entryPersonName || detailData.entryPerson || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="å½å
¥æ¥æ">{{ detailData.entryDate || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="ååéé¢" :span="2"> |
| | | <span style="font-size: 18px; color: #e6a23c; font-weight: bold;"> |
| | | ¥{{ salesTotalAmount }} |
| | | </span> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | <div v-if="detailData.productData && detailData.productData.length" style="margin-top: 20px;"> |
| | | <h4>产åæç»</h4> |
| | | <el-table :data="detailData.productData" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column prop="productCategory" label="产ååç§°" /> |
| | | <el-table-column prop="specificationModel" label="è§æ ¼åå·" /> |
| | | <el-table-column prop="unit" label="åä½" /> |
| | | <el-table-column prop="quantity" label="æ°é" /> |
| | | <el-table-column prop="taxInclusiveUnitPrice" label="å«ç¨åä»·"> |
| | | <template #default="scope">Â¥{{ Number(scope.row.taxInclusiveUnitPrice ?? 0).toFixed(2) }}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="taxInclusiveTotalPrice" label="å«ç¨æ»ä»·"> |
| | | <template #default="scope">Â¥{{ Number(scope.row.taxInclusiveTotalPrice ?? 0).toFixed(2) }}</template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | <div v-if="attachmentList.length" |
| | | class="detail-block"> |
| | |
| | | const formResolved = computed(() => resolveInstanceFormFields(props.row)); |
| | | |
| | | |
| | | // æ¯å¦ä¸ºç¹æ®å®¡æ¹ç±»åï¼éè´ãåè´§ãæ¥ä»·ï¼ |
| | | // æ¯å¦ä¸ºç¹æ®å®¡æ¹ç±»åï¼éè´ãåè´§ãæ¥ä»·ãéå®ï¼ |
| | | const isSpecialApprovalType = computed(() => { |
| | | return [5, 7, 6].includes(props.row.businessType); |
| | | return [5, 7, 6, 19].includes(props.row.businessType); |
| | | }); |
| | | |
| | | // 详æ
æ°æ®ï¼ç´æ¥ä½¿ç¨ä¼ å
¥ç detail-data åæ°ï¼ |
| | |
| | | return props.detailData || {}; |
| | | }); |
| | | |
| | | // éå®å®¡æ¹ï¼ååéé¢ = 产åæç»å«ç¨æ»ä»·ä¹å |
| | | const salesTotalAmount = computed(() => { |
| | | const products = detailData.value?.productData; |
| | | if (!Array.isArray(products) || !products.length) return "0.00"; |
| | | const total = products.reduce((sum, p) => sum + Number(p.taxInclusiveTotalPrice ?? 0), 0); |
| | | return total.toFixed(2); |
| | | }); |
| | | |
| | | const attachmentList = computed(() => { |
| | | const list = props.row.storageBlobVOList || props.row.storageBlobDTOs || []; |
| | | return Array.isArray(list) ? list : []; |
| | |
| | | import { getQuotationList } from "@/api/salesManagement/salesQuotation.js"; |
| | | import { getPurchaseByCode } from "@/api/procurementManagement/procurementLedger.js"; |
| | | import { getDeliveryDetailByShippingNo } from "@/api/salesManagement/deliveryLedger.js"; |
| | | import { ledgerListPage, getSalesLedgerWithProducts } from "@/api/salesManagement/salesLedger.js"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | |
| | | fetchBusinessTypeOptions(), |
| | | listApprovalTemplate(TEMPLATE_TYPE_CUSTOM), |
| | | ]); |
| | | submitBusinessTypeOptions.value = typeOptions.filter((x) => ![5, 6, 7].includes(x.value)); |
| | | submitBusinessTypeOptions.value = typeOptions.filter((x) => ![5, 6, 7, 19].includes(x.value)); |
| | | allSubmitTemplates.value = unwrapTemplateList(customRes) |
| | | .filter((row) => mapEnabledFromApi(row.enabled)) |
| | | .map(mapSubmitTemplateCard); |
| | |
| | | } |
| | | } |
| | | |
| | | // éå®å®¡æ¹ï¼ç¨ quotationNoï¼éå®ååå·ï¼å»æ¥éå®å°è´¦è¯¦æ
|
| | | else if (row.businessType === 19) { |
| | | const salesContractNo = row?.quotationNo; |
| | | if (salesContractNo) { |
| | | const listRes = await ledgerListPage({ salesContractNo }); |
| | | const records = listRes?.records || listRes?.data || []; |
| | | const ledger = Array.isArray(records) ? records[0] : null; |
| | | if (ledger?.id) { |
| | | const detail = await getSalesLedgerWithProducts({ id: ledger.id, type: 1 }); |
| | | detailData.value = detail || ledger; |
| | | } else { |
| | | detailData.value = ledger || {}; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // å
¶ä»å®¡æ¹ç±»å |
| | | else { |
| | | detailData.value = {}; |
| | |
| | | } |
| | | } |
| | | |
| | | // éå®å®¡æ¹ï¼ç¨ quotationNoï¼éå®ååå·ï¼å»æ¥éå®å°è´¦è¯¦æ
|
| | | else if (row.businessType === 19) { |
| | | const salesContractNo = row?.quotationNo; |
| | | if (salesContractNo) { |
| | | const listRes = await ledgerListPage({ salesContractNo }); |
| | | const records = listRes?.records || listRes?.data || []; |
| | | const ledger = Array.isArray(records) ? records[0] : null; |
| | | if (ledger?.id) { |
| | | const detail = await getSalesLedgerWithProducts({ id: ledger.id, type: 1 }); |
| | | detailData.value = detail || ledger; |
| | | } else { |
| | | detailData.value = ledger || {}; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // å
¶ä»å®¡æ¹ç±»å |
| | | else { |
| | | detailData.value = {}; |
| | |
| | | }, |
| | | }, |
| | | { |
| | | label: "审æ¹ç¶æ", |
| | | prop: "approvalStatus", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatType: params => { |
| | | const typeMap = { |
| | | 0: "info", |
| | | 1: "warning", |
| | | 2: "success", |
| | | 3: "danger", |
| | | }; |
| | | return typeMap[params] || "info"; |
| | | }, |
| | | formatData: cell => { |
| | | const statusMap = { |
| | | 0: "å¾
审æ¹", |
| | | 1: "审æ¹ä¸", |
| | | 2: "å·²éè¿", |
| | | 3: "已驳å", |
| | | }; |
| | | return statusMap[cell] || "-"; |
| | | }, |
| | | }, |
| | | { |
| | | label: "å·²ä¸åæ°é", |
| | | prop: "quantityIssued", |
| | | width: "120px", |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="éä»¶ï¼"> |
| | | <FileUpload v-model:file-list="form.storageBlobDTOs" :file-list="form.storageBlobVOs" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | qualityUnqualifiedUpdate |
| | | } from "@/api/qualityManagement/nonconformingManagement.js"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | | import FileUpload from "@/components/AttachmentUpload/file/index.vue"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | const { proxy } = getCurrentInstance() |
| | | const userStore = useUserStore() |
| | |
| | | dealName: '', |
| | | dealTime: '', |
| | | productModelId: undefined, |
| | | storageBlobDTOs: [], |
| | | storageBlobVOs: [], |
| | | }, |
| | | rules: { |
| | | checkTime: [{ required: false, message: "请è¾å
¥", trigger: "blur" },], |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="éä»¶ï¼"> |
| | | <FileUpload v-model:file-list="form.storageBlobDTOs" :file-list="form.storageBlobVOs" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | |
| | | qualityUnqualifiedDeal |
| | | } from "@/api/qualityManagement/nonconformingManagement.js"; |
| | | import {userListNoPage} from "@/api/system/user.js"; |
| | | import FileUpload from "@/components/AttachmentUpload/file/index.vue"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | |
| | |
| | | dealResult: '', |
| | | dealName: '', |
| | | dealTime: '', |
| | | method: undefined |
| | | method: undefined, |
| | | storageBlobDTOs: [], |
| | | storageBlobVOs: [], |
| | | }, |
| | | rules: { |
| | | checkTime: [{ required: false, message: "请è¾å
¥", trigger: "blur" },], |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogFormVisible" |
| | | :title="operationType === 'add' ? 'æ°å¢ä¸åæ ¼åå¤çå' : 'ç¼è¾ä¸åæ ¼åå¤çå'" |
| | | width="70%" |
| | | @close="closeDia" |
| | | > |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项ç®åç§°" prop="projectName"> |
| | | <el-input v-model="form.projectName" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项ç®ç¼å·" prop="projectNo"> |
| | | <el-input v-model="form.projectNo" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤åç§°" prop="equipmentName"> |
| | | <el-input v-model="form.equipmentName" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设å¤å¾å·" prop="equipmentDrawingNo"> |
| | | <el-input v-model="form.equipmentDrawingNo" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç©æ/é¨ä»¶åç§°" prop="materialName"> |
| | | <el-input v-model="form.materialName" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç©æå¾å·" prop="materialDrawingNo"> |
| | | <el-input v-model="form.materialDrawingNo" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·è§æ ¼" prop="specificationModel"> |
| | | <el-input v-model="form.specificationModel" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æè´¨" prop="materialQuality"> |
| | | <el-input v-model="form.materialQuality" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ»æ°é" prop="quantity"> |
| | | <el-input-number v-model="form.quantity" :min="0" style="width: 100%" :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸åæ ¼æ°é" prop="unqualifiedQuantity"> |
| | | <el-input-number v-model="form.unqualifiedQuantity" :min="0" style="width: 100%" :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸åæ ¼å·¥åº" prop="unqualifiedProcess"> |
| | | <el-select v-model="form.unqualifiedProcess" placeholder="è¯·éæ©" clearable :disabled="operationType === 'view'" style="width: 100%"> |
| | | <el-option label="æ¥æ" :value="1" /> |
| | | <el-option label="å¶ç¨" :value="2" /> |
| | | <el-option label="æå" :value="3" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¾åºååç§°" prop="supplierName"> |
| | | <el-input v-model="form.supplierName" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªå" prop="inspectorName"> |
| | | <el-input v-model="form.inspectorName" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£éªæ¥æ" prop="inspectDate"> |
| | | <el-date-picker v-model="form.inspectDate" type="date" value-format="YYYY-MM-DD" format="YYYY-MM-DD" placeholder="è¯·éæ©" clearable style="width: 100%" :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="责任人" prop="responsiblePerson"> |
| | | <el-input v-model="form.responsiblePerson" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="责任é¨é¨" prop="responsibleDept"> |
| | | <el-input v-model="form.responsibleDept" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="é®é¢æè¿°" prop="problemDescription"> |
| | | <el-input type="textarea" v-model="form.problemDescription" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" :rows="3" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åå åæå建议" prop="reasonAnalysis"> |
| | | <el-input type="textarea" v-model="form.reasonAnalysis" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" :rows="3" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çº æ£æªæ½" prop="correctionAction"> |
| | | <el-input type="textarea" v-model="form.correctionAction" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" :rows="3" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¤ç½®æ¹å¼" prop="disposalMethod"> |
| | | <el-select v-model="form.disposalMethod" placeholder="è¯·éæ©" clearable :disabled="operationType === 'view'" style="width: 100%"> |
| | | <el-option label="è®©æ¥æ¥æ¶" :value="1" /> |
| | | <el-option label="åå
ç»´ä¿®" :value="2" /> |
| | | <el-option label="è¿åç»´ä¿®" :value="3" /> |
| | | <el-option label="æ¢è´§" :value="4" /> |
| | | <el-option label="éè´§" :value="5" /> |
| | | <el-option label="æ¥åº" :value="6" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ç»´ä¿®è¯ä¼°" prop="repairEvaluation"> |
| | | <el-input type="textarea" v-model="form.repairEvaluation" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" :rows="3" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="é¢é²æªæ½" prop="preventiveAction"> |
| | | <el-input type="textarea" v-model="form.preventiveAction" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" :rows="3" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input type="textarea" v-model="form.remark" placeholder="请è¾å
¥" clearable :disabled="operationType === 'view'" :rows="2" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="éä»¶"> |
| | | <FileUpload v-model:file-list="form.storageBlobDTOs" :file-list="form.storageBlobVOs" :disabled="operationType === 'view'" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm" v-if="operationType !== 'view'">确认</el-button> |
| | | <el-button @click="closeDia">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, toRefs, getCurrentInstance } from "vue"; |
| | | import { save, update, getDetail } from "@/api/qualityManagement/qualityUnqualifiedOrder.js"; |
| | | import FileUpload from "@/components/AttachmentUpload/file/index.vue"; |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const emit = defineEmits(["close"]); |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref(""); |
| | | |
| | | const data = reactive({ |
| | | form: { |
| | | projectName: "", |
| | | projectNo: "", |
| | | equipmentName: "", |
| | | equipmentDrawingNo: "", |
| | | materialName: "", |
| | | materialDrawingNo: "", |
| | | specificationModel: "", |
| | | materialQuality: "", |
| | | quantity: undefined, |
| | | unqualifiedQuantity: undefined, |
| | | unqualifiedProcess: undefined, |
| | | supplierName: "", |
| | | inspectorName: "", |
| | | inspectDate: "", |
| | | responsiblePerson: "", |
| | | responsibleDept: "", |
| | | problemDescription: "", |
| | | reasonAnalysis: "", |
| | | correctionAction: "", |
| | | disposalMethod: undefined, |
| | | repairEvaluation: "", |
| | | preventiveAction: "", |
| | | remark: "", |
| | | storageBlobDTOs: [], |
| | | storageBlobVOs: [], |
| | | }, |
| | | rules: { |
| | | projectName: [{ required: false, message: "请è¾å
¥", trigger: "blur" }], |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | |
| | | const openDialog = async (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | if (type === "add") { |
| | | form.value = { |
| | | projectName: "", |
| | | projectNo: "", |
| | | equipmentName: "", |
| | | equipmentDrawingNo: "", |
| | | materialName: "", |
| | | materialDrawingNo: "", |
| | | specificationModel: "", |
| | | materialQuality: "", |
| | | quantity: undefined, |
| | | unqualifiedQuantity: undefined, |
| | | unqualifiedProcess: undefined, |
| | | supplierName: "", |
| | | inspectorName: "", |
| | | inspectDate: "", |
| | | responsiblePerson: "", |
| | | responsibleDept: "", |
| | | problemDescription: "", |
| | | reasonAnalysis: "", |
| | | correctionAction: "", |
| | | disposalMethod: undefined, |
| | | repairEvaluation: "", |
| | | preventiveAction: "", |
| | | remark: "", |
| | | storageBlobDTOs: [], |
| | | storageBlobVOs: [], |
| | | }; |
| | | } else { |
| | | form.value = {}; |
| | | if (row?.id) { |
| | | getDetail(row.id).then((res) => { |
| | | form.value = res.data || res || {}; |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate((valid) => { |
| | | if (valid) { |
| | | const { status, ...payload } = form.value || {}; |
| | | if (operationType.value === "add") { |
| | | save(payload).then(() => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }); |
| | | } else { |
| | | update(payload).then(() => { |
| | | proxy.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | closeDia(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | const closeDia = () => { |
| | | proxy.resetForm("formRef"); |
| | | dialogFormVisible.value = false; |
| | | emit("close"); |
| | | }; |
| | | |
| | | defineExpose({ openDialog }); |
| | | </script> |
| | | |
| | | <style scoped></style> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="mb20" style="text-align: right;"> |
| | | <el-button type="primary" @click="openForm('add')">æ°å¢</el-button> |
| | | <!-- <el-button type="primary" @click="openForm('add')">æ°å¢</el-button>--> |
| | | <el-button type="primary" @click="openOrderForm">å¤çå</el-button> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | <el-button type="danger" plain @click="handleDelete">å é¤</el-button> |
| | | </div> |
| | |
| | | </div> |
| | | <FormDia ref="formDia" @close="handleQuery"></FormDia> |
| | | <InspectionFormDia ref="inspectionFormDia" @close="handleQuery"></InspectionFormDia> |
| | | <OrderFormDia ref="orderFormDia" @close="handleQuery"></OrderFormDia> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import {ElMessageBox} from "element-plus"; |
| | | import {qualityUnqualifiedDel, qualityUnqualifiedListPage} from "@/api/qualityManagement/nonconformingManagement.js"; |
| | | import InspectionFormDia from "@/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue"; |
| | | import OrderFormDia from "@/views/qualityManagement/nonconformingManagement/components/orderFormDia.vue"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | const data = reactive({ |
| | |
| | | }); |
| | | const formDia = ref() |
| | | const inspectionFormDia = ref() |
| | | const orderFormDia = ref() |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | const changeDaterange = (value) => { |
| | |
| | | }) |
| | | }; |
| | | |
| | | // æå¼å¤çåå¼¹æ¡ |
| | | const openOrderForm = () => { |
| | | nextTick(() => { |
| | | orderFormDia.value?.openDialog("add", null); |
| | | }); |
| | | }; |
| | | |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | |
| | | width="120" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="审æ¹ç¶æ" prop="approvalStatus" width="100" align="center"> |
| | | <template #default="scope"> |
| | | <el-tag v-if="scope.row.approvalStatus === 0" type="info">å¾
审æ¹</el-tag> |
| | | <el-tag v-else-if="scope.row.approvalStatus === 1" type="warning">审æ¹ä¸</el-tag> |
| | | <el-tag v-else-if="scope.row.approvalStatus === 2" type="success">å·²éè¿</el-tag> |
| | | <el-tag v-else-if="scope.row.approvalStatus === 3" type="danger">已驳å</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="äº¤ä»æ¥æ" |
| | | prop="deliveryDate" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="审æ¹ç¶æï¼"> |
| | | <el-tag v-if="form.approvalStatus === 0" type="info">å¾
审æ¹</el-tag> |
| | | <el-tag v-else-if="form.approvalStatus === 1" type="warning">审æ¹ä¸</el-tag> |
| | | <el-tag v-else-if="form.approvalStatus === 2" type="success">å·²éè¿</el-tag> |
| | | <el-tag v-else-if="form.approvalStatus === 3" type="danger">已驳å</el-tag> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </FormDialog> |
| | | <!-- 仿¥ä»·å导å
¥ï¼ä»
审æ¹éè¿ï¼ --> |