src/api/basicData/product.js
@@ -17,7 +17,7 @@ data: query }) } // è§æ ¼åå·æ°å¢ä¿®æ¹ // 尺寸æ°å¢ä¿®æ¹ export function addOrEditProductModel(query) { return request({ url: '/basic/product/addOrEditProductModel', @@ -33,7 +33,7 @@ data: query }) } // è§æ ¼åå·å é¤ // 尺寸å é¤ export function delProductModel(query) { return request({ url: '/basic/product/delProductModel', @@ -41,7 +41,7 @@ data: query }) } // è§æ ¼åå·æ¥è¯¢ // 尺寸æ¥è¯¢ export function modelList(query) { return request({ url: '/basic/product/modelList', src/api/salesManagement/salesQuotationProduct.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,48 @@ import request from "@/utils/request"; export function quotationProductListPage(query) { return request({ url: "/sales/quotationProduct/listPage", method: "get", params: query, }); } export function quotationProductList(query) { return request({ url: "/sales/quotationProduct/list", method: "get", params: query, }); } export function getQuotationProductInfo(id) { return request({ url: `/sales/quotationProduct/${id}`, method: "get", }); } export function addOrUpdateQuotationProduct(data) { return request({ url: "/sales/quotationProduct/addOrUpdate", method: "post", data, }); } export function editQuotationProduct(data) { return request({ url: "/sales/quotationProduct/edit", method: "post", data, }); } export function deleteQuotationProduct(ids) { return request({ url: "/sales/quotationProduct/delete", method: "delete", data: ids, }); } src/utils/request.js
@@ -125,16 +125,25 @@ // éç¨ä¸è½½æ¹æ³ export function download(url, params, filename, config) { downloadLoadingInstance = ElLoading.service({ text: "æ£å¨ä¸è½½æ°æ®ï¼è¯·ç¨å", background: "rgba(0, 0, 0, 0.7)", }) return service.post(url, params, { transformRequest: [(params) => { return tansParams(params) }], headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob', ...config }).then(async (data) => { const downloadName = config?.filename || filename const requestMethod = (config?.method || 'post').toLowerCase() const requestPromise = requestMethod === 'get' ? service.get(url, { params, responseType: 'blob', ...config }) : service.post(url, params, { transformRequest: [(params) => { return tansParams(params) }], headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob', ...config }) return requestPromise.then(async (data) => { const isBlob = blobValidate(data) if (isBlob) { const blob = new Blob([data]) saveAs(blob, filename) saveAs(blob, downloadName) } else { const resText = await data.text() const rspObj = JSON.parse(resText) src/views/basicData/product/index.vue
@@ -77,7 +77,7 @@ <div class="right"> <div style="margin-bottom: 10px" v-if="isShowButton"> <el-button type="primary" @click="openModelDia('add')"> æ°å¢è§æ ¼åå· æ°å¢å°ºå¯¸ </el-button> <ImportExcel :product-id="currentId" @uploadSuccess="getModelList" /> <el-button @@ -132,7 +132,7 @@ </el-dialog> <el-dialog v-model="modelDia" title="è§æ ¼åå·" title="尺寸" width="400px" @close="closeModelDia" @keydown.enter.prevent @@ -146,10 +146,10 @@ > <el-row> <el-col :span="24"> <el-form-item label="è§æ ¼åå·ï¼" prop="model"> <el-form-item label="尺寸ï¼" prop="model"> <el-input v-model="modelForm.model" placeholder="请è¾å ¥è§æ ¼åå·" placeholder="请è¾å ¥å°ºå¯¸" clearable @keydown.enter.prevent /> @@ -294,7 +294,7 @@ const expandedKeys = ref([]); const tableColumn = ref([ { label: "è§æ ¼åå·", label: "尺寸", prop: "model", }, { @@ -397,7 +397,7 @@ form.value.productName = data.productName; } }; // æå¼è§æ ¼åå·å¼¹æ¡ // æå¼å°ºå¯¸å¼¹æ¡ const openModelDia = (type, data) => { modelOperationType.value = type; modelDia.value = true; @@ -474,7 +474,7 @@ getModelList(); }; // æäº¤è§æ ¼åå·ä¿®æ¹ // æäº¤å°ºå¯¸ä¿®æ¹ const submitModelForm = () => { proxy.$refs.modelFormRef.validate((valid) => { if (valid) { @@ -497,7 +497,7 @@ selectedRows.value = selection; }; // æ¥è¯¢è§æ ¼åå· // æ¥è¯¢å°ºå¯¸ const pagination = (obj) => { page.current = obj.page; page.size = obj.limit; @@ -516,7 +516,7 @@ tableLoading.value = false; }); }; // å é¤è§æ ¼åå· // å é¤å°ºå¯¸ const handleDelete = () => { let ids = []; if (selectedRows.value.length > 0) { src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -71,7 +71,7 @@ <h4>产åæç»</h4> <el-table :data="currentQuotation.products || []" border style="width: 100%"> <el-table-column prop="product" label="产ååç§°" /> <el-table-column prop="specification" label="è§æ ¼åå·" /> <el-table-column prop="specification" label="尺寸" /> <el-table-column prop="unit" label="åä½" /> <el-table-column prop="unitPrice" label="åä»·"> <template #default="scope">Â¥{{ Number(scope.row.unitPrice ?? 0).toFixed(2) }}</template> @@ -119,7 +119,7 @@ <h4>产åæç»</h4> <el-table :data="currentPurchase.productData || []" border style="width: 100%"> <el-table-column prop="productCategory" label="产ååç§°" /> <el-table-column prop="specificationModel" 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="å«ç¨åä»·"> src/views/collaborativeApproval/purchaseApproval/index.vue
@@ -66,7 +66,7 @@ width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="åä½" prop="unit" /> <el-table-column label="æ°é" prop="quantity" /> <el-table-column label="ç¨ç(%)" prop="taxRate" /> src/views/collaborativeApproval/shipmentReview/index.vue
@@ -125,7 +125,7 @@ width: 200 }, { label: "è§æ ¼åå·", label: "尺寸", prop: "specificationModel", width: 220 }, src/views/customerService/feedbackRegistration/components/formDia.vue
@@ -217,7 +217,7 @@ const tableColumn = ref([ { label: "产å大类", prop: "productCategory" }, { label: "è§æ ¼åå·", prop: "specificationModel" }, { label: "尺寸", prop: "specificationModel" }, { label: "åä½", prop: "unit" }, { label: "产åç¶æ", src/views/energyManagement/energyArea/index.vue
@@ -281,7 +281,7 @@ form.value.areaName = data.areaName; } }; // æå¼è§æ ¼åå·å¼¹æ¡ // æå¼å°ºå¯¸å¼¹æ¡ const openModelDia = (type, data,fatherId) => { modelOperationType.value = type; modelDia.value = true; @@ -356,7 +356,7 @@ getModelList(true); }; // æäº¤è§æ ¼åå·ä¿®æ¹ // æäº¤å°ºå¯¸ä¿®æ¹ const submitModelForm = () => { proxy.$refs.modelFormRef.validate((valid) => { if (valid) { @@ -380,7 +380,7 @@ selectedRows.value = selection; }; // æ¥è¯¢è§æ ¼åå· // æ¥è¯¢å°ºå¯¸ const pagination = (obj) => { page.current = obj.page; page.size = obj.limit; @@ -406,7 +406,7 @@ tableLoading.value = false; }); }; // å é¤è§æ ¼åå· // å é¤å°ºå¯¸ const handleDelete = () => { let ids = []; if (selectedRows.value.length > 0) { src/views/energyManagement/energyPower/index.vue
@@ -106,7 +106,7 @@ width: 200, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "code", width: 200, }, src/views/energyManagement/energyTrends/index.vue
@@ -55,7 +55,7 @@ width: 220, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "code", width: 220, }, src/views/energyManagement/gasManagement/index.vue
@@ -148,7 +148,7 @@ <el-table-column label="设å¤ç¼å·" prop="deviceCode" width="120" show-overflow-tooltip /> <el-table-column label="设å¤åç§°" prop="deviceName" width="150" show-overflow-tooltip /> <el-table-column label="设å¤ç±»å" prop="deviceType" width="120" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="specification" width="150" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specification" width="150" show-overflow-tooltip /> <el-table-column label="å½ååå(MPa)" prop="currentPressure" width="130" show-overflow-tooltip> <template #default="scope"> <span :class="getPressureClass(scope.row.currentPressure)"> @@ -217,8 +217,8 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·" prop="specification"> <el-input v-model="deviceForm.specification" placeholder="请è¾å ¥è§æ ¼åå·" /> <el-form-item label="尺寸" prop="specification"> <el-input v-model="deviceForm.specification" placeholder="请è¾å ¥å°ºå¯¸" /> </el-form-item> </el-col> </el-row> @@ -284,7 +284,7 @@ deviceCode: [{ required: true, message: '请è¾å ¥è®¾å¤ç¼å·', trigger: 'blur' }], deviceName: [{ required: true, message: '请è¾å ¥è®¾å¤åç§°', trigger: 'blur' }], deviceType: [{ required: true, message: 'è¯·éæ©è®¾å¤ç±»å', trigger: 'change' }], specification: [{ required: true, message: '请è¾å ¥è§æ ¼åå·', trigger: 'blur' }], specification: [{ required: true, message: '请è¾å ¥å°ºå¯¸', trigger: 'blur' }], designPressure: [{ required: true, message: '请è¾å ¥è®¾è®¡åå', trigger: 'blur' }], volume: [{ required: true, message: '请è¾å ¥å®¹ç§¯', trigger: 'blur' }] } src/views/energyManagement/waterManagement/index.vue
@@ -106,7 +106,7 @@ width: 200, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "deviceModel", width: 200, }, src/views/energyManagement/waterManagement/waterBill.vue
@@ -59,7 +59,7 @@ width: 200, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "code", width: 200, }, src/views/energyManagement/waterManagement/waterTrends.vue
@@ -51,7 +51,7 @@ width: 220, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "code", width: 220, }, src/views/equipmentManagement/calibration/index.vue
@@ -114,7 +114,7 @@ width: 200, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "model", width:200 }, src/views/equipmentManagement/deviceInfo/index.vue
@@ -15,7 +15,7 @@ <span class="value">{{ deviceInfo.deviceName }}</span> </div> <div class="info-row"> <span class="label">è§æ ¼åå·ï¼</span> <span class="label">尺寸ï¼</span> <span class="value">{{ deviceInfo.deviceModel }}</span> </div> <div class="info-row"> src/views/equipmentManagement/ledger/Form.vue
@@ -7,8 +7,8 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·" prop="deviceModel"> <el-input v-model="form.deviceModel" placeholder="请è¾å ¥è§æ ¼åå·" /> <el-form-item label="尺寸" prop="deviceModel"> <el-input v-model="form.deviceModel" placeholder="请è¾å ¥å°ºå¯¸" /> </el-form-item> </el-col> <el-col :span="12"> @@ -215,7 +215,7 @@ const { form, resetForm } = useFormData({ deviceName: undefined, // 设å¤åç§° deviceModel: undefined, // è§æ ¼åå· deviceModel: undefined, // 尺寸 deviceBrand: undefined, // 设å¤åç type: undefined, // 设å¤ç±»å supplierName: undefined, // ä¾åºå src/views/equipmentManagement/ledger/index.vue
@@ -10,11 +10,11 @@ @change="getTableData" /> </el-form-item> <el-form-item label="è§æ ¼åå·"> <el-form-item label="尺寸"> <el-input v-model="filters.deviceModel" style="width: 200px" placeholder="请è¾å ¥è§æ ¼åå·" placeholder="请è¾å ¥å°ºå¯¸" clearable @change="getTableData" /> @@ -174,7 +174,7 @@ prop: "deviceName", }, { label: "è§æ ¼åå·", label: "尺寸", prop: "deviceModel", }, { src/views/equipmentManagement/measurementEquipment/components/rowClickData.vue
@@ -62,7 +62,7 @@ width: 200, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "model", width:200 }, src/views/equipmentManagement/operationManagement/index.vue
@@ -34,7 +34,7 @@ show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="deviceModel" show-overflow-tooltip /> src/views/equipmentManagement/repair/Modal/RepairModal.vue
@@ -22,10 +22,10 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·"> <el-form-item label="尺寸"> <el-input v-model="form.deviceModel" placeholder="请è¾å ¥è§æ ¼åå·" placeholder="请è¾å ¥å°ºå¯¸" disabled /> </el-form-item> @@ -115,7 +115,7 @@ const { form, resetForm } = useFormData({ deviceLedgerId: undefined, // 设å¤Id deviceName: undefined, // 设å¤åç§° deviceModel: undefined, // è§æ ¼åå· deviceModel: undefined, // 尺寸 repairTime: dayjs().format("YYYY-MM-DD"), // æ¥ä¿®æ¥æï¼é»è®¤å½å¤© repairName: userStore.nickName, // æ¥ä¿®äºº remark: undefined, // æ éç°è±¡ src/views/equipmentManagement/repair/index.vue
@@ -11,11 +11,11 @@ @change="getTableData" /> </el-form-item> <el-form-item label="è§æ ¼åå·"> <el-form-item label="尺寸"> <el-input v-model="filters.deviceModel" style="width: 240px" placeholder="è¯·éæ©è§æ ¼åå·" placeholder="è¯·éæ©å°ºå¯¸" clearable :prefix-icon="Search" @change="getTableData" @@ -183,7 +183,7 @@ prop: "deviceName", }, { label: "è§æ ¼åå·", label: "尺寸", align: "center", prop: "deviceModel", }, src/views/equipmentManagement/upkeep/Form/PlanModal.vue
@@ -25,10 +25,10 @@ ></el-option> </el-select> </el-form-item> <el-form-item label="è§æ ¼åå·"> <el-form-item label="尺寸"> <el-input v-model="form.deviceModel" placeholder="请è¾å ¥è§æ ¼åå·" placeholder="请è¾å ¥å°ºå¯¸" disabled /> </el-form-item> @@ -110,7 +110,7 @@ const { form, resetForm } = useFormData({ deviceLedgerId: undefined, // 设å¤Id deviceName: undefined, // 设å¤åç§° deviceModel: undefined, // è§æ ¼åå· deviceModel: undefined, // 尺寸 maintenancePlanTime: undefined, // 计åä¿å »æ¥æ createUser: undefined, // å½å ¥äºº status: 0, //ä¿ä¿®ç¶æ src/views/equipmentManagement/upkeep/Form/formDia.vue
@@ -23,10 +23,10 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·"> <el-form-item label="尺寸"> <el-input v-model="form.deviceModel" placeholder="请è¾å ¥è§æ ¼åå·" placeholder="请è¾å ¥å°ºå¯¸" disabled /> </el-form-item> @@ -159,7 +159,7 @@ frequencyDetail: '', week: '', time: '', deviceModel: undefined, // è§æ ¼åå· deviceModel: undefined, // 尺寸 registrationDate: '' }, rules: { @@ -176,7 +176,7 @@ deviceOptions.value = data; }; // éæ©è®¾å¤æ¶ï¼å填设å¤åç§°(taskName)åè§æ ¼åå·(deviceModel) // éæ©è®¾å¤æ¶ï¼å填设å¤åç§°(taskName)å尺寸(deviceModel) const setDeviceModel = (id) => { const option = deviceOptions.value.find((item) => item.id === id); if (option) { src/views/equipmentManagement/upkeep/index.vue
@@ -301,7 +301,7 @@ const scheduledColumns = ref([ { prop: "taskName", label: "设å¤åç§°"}, { label: "è§æ ¼åå·", label: "尺寸", prop: "deviceModel", }, { @@ -357,7 +357,7 @@ prop: "deviceName", }, { label: "è§æ ¼åå·", label: "尺寸", align: "center", prop: "deviceModel", }, src/views/financialManagement/accounting/index.vue
@@ -157,7 +157,7 @@ > <el-table-column type="index" label="åºå·" width="60" :index="(index) => (pagination.currentPage - 1) * pagination.pageSize + index + 1" /> <el-table-column prop="deviceName" label="设å¤åç§°" width="250" /> <el-table-column prop="deviceModel" label="è§æ ¼åå·" min-width="150" /> <el-table-column prop="deviceModel" label="尺寸" min-width="150" /> <el-table-column prop="supplierName" label="ä¾åºå" min-width="120" /> <el-table-column prop="unit" label="åä½" width="120" /> <el-table-column prop="number" label="æ°é" width="120" /> src/views/financialManagement/inventoryAccounting/index.vue
@@ -103,7 +103,7 @@ <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip /> <el-table-column label="产å" prop="productCategory" min-width="100" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" min-width="200" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specificationModel" min-width="200" show-overflow-tooltip /> <el-table-column label="åä½" prop="unit" width="70" show-overflow-tooltip /> <el-table-column label="å ¥åºæ°é" prop="inboundNum" width="90" show-overflow-tooltip /> <el-table-column label="åºåæ°é" prop="inboundNum0" width="90" show-overflow-tooltip /> src/views/inventoryManagement/dispatchLog/Record.vue
@@ -62,7 +62,7 @@ show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="model" show-overflow-tooltip /> @@ -430,7 +430,7 @@ <thead> <tr> <th>产ååç§°</th> <th>è§æ ¼åå·</th> <th>尺寸</th> <th>åä½</th> <th>åä»·</th> <th>é¶å®æ°é</th> src/views/inventoryManagement/issueManagement/index.vue
@@ -33,7 +33,7 @@ <el-table-column label="å ¥åºæ¹æ¬¡" prop="inboundBatches" width="160" show-overflow-tooltip /> <el-table-column label="ä¾åºååç§°" prop="supplierName" width="240" show-overflow-tooltip /> <el-table-column label="产å大类" prop="productCategory" width="100" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" width="200" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specificationModel" width="200" show-overflow-tooltip /> <el-table-column label="åä½" prop="unit" width="70" show-overflow-tooltip /> <el-table-column label="å ¥åºæ°é" prop="inboundNum" width="90" show-overflow-tooltip /> <el-table-column label="åºåæ°é" prop="inboundNum0" width="90" show-overflow-tooltip /> src/views/inventoryManagement/receiptManagement/Record.vue
@@ -64,7 +64,7 @@ <el-table-column label="产å大类" prop="productName" show-overflow-tooltip/> <el-table-column label="è§æ ¼åå·" <el-table-column label="尺寸" prop="model" show-overflow-tooltip/> <el-table-column label="åä½" src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -24,7 +24,7 @@ <el-table-column align="center" type="selection" width="55" /> <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="产å大类" prop="productName" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="model" show-overflow-tooltip /> <el-table-column label="尺寸" prop="model" show-overflow-tooltip /> <el-table-column label="åä½" prop="unit" show-overflow-tooltip /> <el-table-column label="åºåæ°é" prop="qualitity" show-overflow-tooltip /> <el-table-column label="å»ç»æ°é" prop="lockedQuantity" show-overflow-tooltip /> src/views/inventoryManagement/stockManagement/Record.vue
@@ -24,7 +24,7 @@ <el-table-column align="center" type="selection" width="55" /> <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="产å大类" prop="productName" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="model" show-overflow-tooltip /> <el-table-column label="尺寸" prop="model" show-overflow-tooltip /> <el-table-column label="åä½" prop="unit" show-overflow-tooltip /> <el-table-column label="åæ ¼åºåæ°é" prop="qualifiedQuantity" show-overflow-tooltip /> <el-table-column label="ä¸åæ ¼åºåæ°é" prop="unQualifiedQuantity" show-overflow-tooltip /> src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -21,7 +21,7 @@ <el-table-column align="center" type="selection" width="55" /> <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="产å大类" prop="productName" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="model" show-overflow-tooltip /> <el-table-column label="尺寸" prop="model" show-overflow-tooltip /> <el-table-column label="åä½" prop="unit" show-overflow-tooltip /> <el-table-column label="åºåæ°é" prop="qualitity" show-overflow-tooltip /> <el-table-column label="å»ç»æ°é" prop="lockedQuantity" show-overflow-tooltip /> src/views/inventoryManagement/stockReport/index.vue
@@ -181,7 +181,7 @@ show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="model" show-overflow-tooltip /> src/views/inventoryManagement/stockWarning/index.vue
@@ -59,7 +59,7 @@ <el-table-column label="卿°ç½ç¼ç " prop="tankCode" width="120" show-overflow-tooltip /> <el-table-column label="卿°ç½åç§°" prop="tankName" width="200" show-overflow-tooltip /> <el-table-column label="卿°ç½ç±»å" prop="tankType" width="120" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" width="150" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specificationModel" width="150" show-overflow-tooltip /> <el-table-column label="容积(m³)" prop="volume" width="100" show-overflow-tooltip /> <!-- åºåç¸å ³å段 --> @@ -171,8 +171,8 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·ï¼" prop="specificationModel"> <el-input v-model="form.specificationModel" placeholder="请è¾å ¥è§æ ¼åå·" /> <el-form-item label="尺寸ï¼" prop="specificationModel"> <el-input v-model="form.specificationModel" placeholder="请è¾å ¥å°ºå¯¸" /> </el-form-item> </el-col> </el-row> src/views/procurementManagement/advancedPriceManagement/index.vue
@@ -157,8 +157,8 @@ </el-row> <el-row :gutter="20"> <el-col :span="12"> <el-form-item label="è§æ ¼åå·" prop="specification"> <el-input v-model="formData.specification" placeholder="请è¾å ¥è§æ ¼åå·" /> <el-form-item label="尺寸" prop="specification"> <el-input v-model="formData.specification" placeholder="请è¾å ¥å°ºå¯¸" /> </el-form-item> </el-col> <el-col :span="12"> src/views/procurementManagement/invoiceEntry/components/ExpandTable.vue
@@ -42,7 +42,7 @@ prop: "productCategory", }, { label: "è§æ ¼åå·", label: "尺寸", prop: "specificationModel", }, { src/views/procurementManagement/invoiceEntry/components/Modal.vue
@@ -112,7 +112,7 @@ </template> </el-table-column> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" width="150" /> <el-table-column label="尺寸" prop="specificationModel" width="150" /> <el-table-column label="åä½" prop="unit" width="70" /> <el-table-column label="æ°é" prop="quantity" width="70" /> <el-table-column label="ç¨ç(%)" prop="taxRate" width="80" /> @@ -264,7 +264,7 @@ width: 120, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "specificationModel", width: 120, }, src/views/procurementManagement/paymentEntry/index.vue
@@ -150,7 +150,7 @@ width="100" /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="specificationModel" show-overflow-tooltip width="150" @@ -280,7 +280,7 @@ showOverflowTooltip: true, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "specificationModel", showOverflowTooltip: true, width: 150 src/views/procurementManagement/priceManagement/index.vue
@@ -31,7 +31,7 @@ <el-table :data="tableData" border v-loading="loading" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="åååç§°" prop="productName" /> <el-table-column label="è§æ ¼åå·" prop="specification" /> <el-table-column label="尺寸" prop="specification" /> <el-table-column label="ä¾åºååç§°" prop="supplierName" /> <el-table-column label="åä»·æ ¼" prop="oldPrice" width="120"> <template #default="{ row }">Â¥{{ row.oldPrice.toFixed(2) }}</template> @@ -71,8 +71,8 @@ <el-option label="ååC" value="ååC" /> </el-select> </el-form-item> <el-form-item label="è§æ ¼åå·"> <el-input v-model="formData.specification" placeholder="请è¾å ¥è§æ ¼åå·" /> <el-form-item label="尺寸"> <el-input v-model="formData.specification" placeholder="请è¾å ¥å°ºå¯¸" /> </el-form-item> <el-form-item label="ä¾åºååç§°"> <el-select v-model="formData.supplierName" placeholder="è¯·éæ©ä¾åºå" style="width: 100%"> src/views/procurementManagement/procurementInvoiceLedger/index.vue
@@ -171,7 +171,7 @@ width: 150, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "specificationModel", width: 150, }, src/views/procurementManagement/procurementLedger/index.vue
@@ -84,7 +84,7 @@ width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="åä½" prop="unit" /> @@ -362,7 +362,7 @@ width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="åä½" prop="unit" @@ -513,7 +513,7 @@ </el-row> <el-row :gutter="30"> <el-col :span="24"> <el-form-item label="è§æ ¼åå·ï¼" <el-form-item label="尺寸ï¼" prop="productModelId"> <el-select v-model="productForm.productModelId" placeholder="è¯·éæ©" @@ -1422,7 +1422,7 @@ ); if (modelItem) { productForm.value.productModelId = modelItem.id; // è®¾ç½®è§æ ¼åå·ååä½ // 设置尺寸ååä½ getProductModel(modelItem.id); } } src/views/procurementManagement/procurementReport/index.vue
@@ -111,7 +111,7 @@ prop: 'productCategory', }, { label: 'è§æ ¼åå·', label: '尺寸', prop: 'specificationModel', }, { src/views/procurementManagement/purchaseReturnOrder/New.vue
@@ -242,7 +242,7 @@ width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="åä½" prop="unit" src/views/procurementManagement/purchaseReturnOrder/ProductList.vue
@@ -19,7 +19,7 @@ width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="åä½" prop="unit" src/views/procurementManagement/purchaseReturnOrder/index.vue
@@ -79,7 +79,7 @@ > <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="产å大类" prop="productCategory" min-width="120" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" min-width="140" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specificationModel" min-width="140" show-overflow-tooltip /> <el-table-column label="åä½" prop="unit" width="80" /> <el-table-column label="æ°é" prop="quantity" width="80" /> <el-table-column label="éè´§æ°é" prop="returnQuantity" width="100" /> src/views/procurementManagement/qualityInspection/index.vue
@@ -75,9 +75,9 @@ <el-input v-model="row.productName" placeholder="请è¾å ¥åååç§°" /> </template> </el-table-column> <el-table-column label="è§æ ¼åå·" width="150"> <el-table-column label="尺寸" width="150"> <template #default="{ row }"> <el-input v-model="row.specification" placeholder="请è¾å ¥è§æ ¼åå·" /> <el-input v-model="row.specification" placeholder="请è¾å ¥å°ºå¯¸" /> </template> </el-table-column> <el-table-column label="å°è´§æ°é" width="150"> src/views/procurementManagement/transferManagement/index.vue
@@ -90,7 +90,7 @@ width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="åä½" prop="unit" width="70" /> <el-table-column label="ä¾åºå" prop="supplierName" width="100" /> <el-table-column label="éè´æ°é" prop="quantity" width="100" /> src/views/productionManagement/operationScheduling/index.vue
@@ -133,7 +133,7 @@ width: 150, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "specificationModel", width: 150, }, src/views/productionManagement/productStructure/Detail/index.vue
@@ -143,7 +143,7 @@ prop="bomNo" /> <el-table-column label="产ååç§°" prop="productName" /> <el-table-column label="è§æ ¼åå·" <el-table-column label="尺寸" prop="model" /> </el-table> <product-select-dialog v-if="dataValue.showProductDialog" src/views/productionManagement/productStructure/StructureEdit.vue
@@ -156,7 +156,7 @@ </el-table-column> <el-table-column label="产åç¼ç " prop="productCode" /> <el-table-column label="产ååç§°" prop="productName" /> <el-table-column label="è§æ ¼åå·" prop="model" /> <el-table-column label="尺寸" prop="model" /> <el-table-column label="åä½" prop="unit" /> </el-table> src/views/productionManagement/productStructure/index.vue
@@ -80,7 +80,7 @@ minWidth: 160 }, { label: "è§æ ¼åå·", label: "尺寸", prop: "productModelName", minWidth: 140 }, src/views/productionManagement/productionCosting/index.vue
@@ -100,7 +100,7 @@ minWidth: 100, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "productModelName", minWidth: 100, }, src/views/productionManagement/productionDispatching/components/autoDispatchDia.vue
@@ -20,7 +20,7 @@ <el-table-column label="客æ·åç§°" prop="customerName" width="200" /> <!-- <el-table-column label="项ç®åç§°" prop="projectName" width="250" /> --> <el-table-column label="产å大类" prop="productCategory" width="150" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" width="200" /> <el-table-column label="尺寸" prop="specificationModel" width="200" /> <el-table-column label="ç»å®æºå¨" prop="speculativeTradingName" width="120" /> <el-table-column label="æ»æ°é" prop="quantity" width="100" align="right" /> <el-table-column label="å·²æäº§" prop="schedulingNum" width="100" align="right" fixed="right" /> src/views/productionManagement/productionDispatching/components/formDia.vue
@@ -21,7 +21,7 @@ </el-row> --> <el-row :gutter="30"> <el-col :span="12"> <el-form-item label="è§æ ¼åå·ï¼" prop="specificationModel"> <el-form-item label="尺寸ï¼" prop="specificationModel"> <el-input v-model="form.specificationModel" placeholder="请è¾å ¥" clearable disabled/> </el-form-item> </el-col> @@ -125,7 +125,7 @@ form: { projectName: "", productCategory: "", specificationModel: "", // è§æ ¼åå· specificationModel: "", // 尺寸 quantity: "", schedulingNum: "", schedulingUserId: "", src/views/productionManagement/productionDispatching/index.vue
@@ -128,7 +128,7 @@ width: 160, }, { label: "è§æ ¼åå·", label: "尺寸", prop: "specificationModel", width: 120, }, src/views/productionManagement/productionReporting/index.vue
@@ -183,7 +183,7 @@ width: 120, }, { label: "产åè§æ ¼åå·", label: "产å尺寸", prop: "productModelName", width: 120, }, src/views/projectManagement/Management/components/formDia.vue
@@ -192,7 +192,7 @@ <el-table-column v-if="!isView" align="center" type="selection" width="55" /> <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="åä½" prop="unit" /> <el-table-column label="æ°é" prop="quantity" /> <el-table-column label="ç¨ç(%)" prop="taxRate" /> @@ -555,7 +555,7 @@ </el-row> <el-row :gutter="30"> <el-col :span="24"> <el-form-item label="è§æ ¼åå·ï¼" prop="productModelId"> <el-form-item label="尺寸ï¼" prop="productModelId"> <el-select v-model="productForm.productModelId" placeholder="è¯·éæ©" clearable filterable @change="getProductModel"> <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> </el-select> src/views/projectManagement/Management/projectDetail.vue
@@ -64,7 +64,7 @@ <el-table :data="productRows" border show-summary :summary-method="summarizeProductTable"> <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="产å大类" prop="productCategory" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specificationModel" show-overflow-tooltip /> <el-table-column label="åä½" prop="unit" width="90" /> <el-table-column label="æ°é" prop="quantity" width="90" /> <el-table-column label="ç¨ç(%)" prop="taxRate" width="90" /> src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -24,7 +24,7 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·ï¼" prop="productModelId"> <el-form-item label="尺寸ï¼" prop="productModelId"> <el-select v-model="form.productModelId" placeholder="è¯·éæ©" clearable :disabled="operationType === 'edit'" filterable readonly @change="handleChangeModel"> <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> @@ -235,12 +235,12 @@ proxy.$refs.formRef?.clearValidate(); }); // ç¼è¾æ¨¡å¼ä¸ï¼å¹¶è¡å è½½è§æ ¼åå·åææ é项 // ç¼è¾æ¨¡å¼ä¸ï¼å¹¶è¡å è½½å°ºå¯¸åææ é项 if (currentProductId.value) { // 设置产ååç§° form.value.productName = findNodeById(productOptions.value, currentProductId.value); // å¹¶è¡å è½½è§æ ¼åå·åææ é项 // å¹¶è¡å è½½å°ºå¯¸åææ é项 const params = { productId: currentProductId.value, inspectType: 2 @@ -250,7 +250,7 @@ modelList({ id: currentProductId.value }), qualityInspectDetailByProductId(params) ]).then(([modelRes, testStandardRes]) => { // è®¾ç½®è§æ ¼åå·é项 // 设置尺寸é项 modelOptions.value = modelRes || []; // å¦æè¡¨åä¸å·²æ productModelIdï¼è®¾ç½®å¯¹åºç model å unit if (form.value.productModelId && modelOptions.value.length > 0) { src/views/qualityManagement/finalInspection/index.vue
@@ -115,7 +115,7 @@ prop: "productName", }, { label: "è§æ ¼åå·", label: "尺寸", prop: "model", }, { src/views/qualityManagement/metricMaintenance/index0.vue
@@ -350,7 +350,7 @@ }); }; // æäº¤è§æ ¼åå·ä¿®æ¹ // æäº¤å°ºå¯¸ä¿®æ¹ const submitModelForm = () => { proxy.$refs.modelFormRef.validate((valid) => { if (valid) { src/views/qualityManagement/nonconformingManagement/components/formDia.vue
@@ -34,7 +34,7 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·ï¼" prop="model"> <el-form-item label="尺寸ï¼" prop="model"> <el-select v-model="form.model" placeholder="è¯·éæ©" clearable :disabled="operationType === 'edit'" filterable readonly @change="handleChangeModel"> <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> src/views/qualityManagement/nonconformingManagement/components/inspectionFormDia.vue
@@ -35,7 +35,7 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·ï¼" prop="model"> <el-form-item label="尺寸ï¼" prop="model"> <el-input v-model="form.model" placeholder="请è¾å ¥" clearable disabled/> </el-form-item> </el-col> src/views/qualityManagement/nonconformingManagement/index.vue
@@ -140,7 +140,7 @@ prop: "productName", }, { label: "è§æ ¼åå·", label: "尺寸", prop: "model", }, { src/views/qualityManagement/processInspection/components/formDia.vue
@@ -33,7 +33,7 @@ </el-row> <el-row :gutter="30"> <el-col :span="12"> <el-form-item label="è§æ ¼åå·ï¼" prop="productModelId"> <el-form-item label="尺寸ï¼" prop="productModelId"> <el-select v-model="form.productModelId" placeholder="è¯·éæ©" clearable :disabled="operationType === 'edit'" filterable readonly @change="handleChangeModel"> <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> @@ -248,7 +248,7 @@ } testStandardOptions.value = []; tableData.value = []; // å ç¡®ä¿äº§åæ å·²å è½½ï¼å¦åç¼è¾æ¶äº§å/è§æ ¼åå·æ æ³åæ¾ // å ç¡®ä¿äº§åæ å·²å è½½ï¼å¦åç¼è¾æ¶äº§å/å°ºå¯¸æ æ³åæ¾ await getProductOptions(); if (operationType.value === 'edit') { // å ä¿å testStandardIdï¼é¿å è¢«æ¸ ç©º @@ -256,7 +256,7 @@ // å è®¾ç½®è¡¨åæ°æ®ï¼ä½ææ¶æ¸ 空 testStandardIdï¼çé项å è½½å®æåå设置 form.value = {...row, testStandardId: ''} currentProductId.value = row.productId || 0 // å ³é®ï¼ç¼è¾æ¶å è½½è§æ ¼åå·ä¸æéé¡¹ï¼æè½åæ¾ productModelId // å ³é®ï¼ç¼è¾æ¶å è½½å°ºå¯¸ä¸æéé¡¹ï¼æè½åæ¾ productModelId if (currentProductId.value) { try { const res = await modelList({ id: currentProductId.value }); @@ -266,7 +266,7 @@ handleChangeModel(form.value.productModelId); } } catch (e) { console.error("å è½½è§æ ¼åå·å¤±è´¥", e); console.error("å 载尺寸失败", e); modelOptions.value = []; } } src/views/qualityManagement/processInspection/index.vue
@@ -114,7 +114,7 @@ prop: "productName", }, { label: "è§æ ¼åå·", label: "尺寸", prop: "model", }, { src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -43,7 +43,7 @@ </el-row> <el-row :gutter="30"> <el-col :span="12"> <el-form-item label="è§æ ¼åå·ï¼" prop="productModelId"> <el-form-item label="尺寸ï¼" prop="productModelId"> <el-select v-model="form.productModelId" placeholder="è¯·éæ©" clearable :disabled="operationType === 'edit'" filterable readonly @change="handleChangeModel"> <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" /> @@ -258,14 +258,14 @@ } testStandardOptions.value = []; tableData.value = []; // å ç¡®ä¿äº§åæ å·²å è½½ï¼å¦åç¼è¾æ¶äº§å/è§æ ¼åå·æ æ³åæ¾ // å ç¡®ä¿äº§åæ å·²å è½½ï¼å¦åç¼è¾æ¶äº§å/å°ºå¯¸æ æ³åæ¾ await getProductOptions(); if (operationType.value === 'edit') { // å ä¿å testStandardIdï¼é¿å è¢«æ¸ ç©º const savedTestStandardId = row.testStandardId; form.value = {...row} currentProductId.value = row.productId || 0 // å ³é®ï¼ç¼è¾æ¶å è½½è§æ ¼åå·ä¸æéé¡¹ï¼æè½åæ¾ productModelId // å ³é®ï¼ç¼è¾æ¶å è½½å°ºå¯¸ä¸æéé¡¹ï¼æè½åæ¾ productModelId if (currentProductId.value) { try { const res = await modelList({ id: currentProductId.value }); @@ -275,7 +275,7 @@ handleChangeModel(form.value.productModelId); } } catch (e) { console.error("å è½½è§æ ¼åå·å¤±è´¥", e); console.error("å 载尺寸失败", e); modelOptions.value = []; } } src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -116,7 +116,7 @@ prop: "productName", }, { label: "è§æ ¼åå·", label: "尺寸", prop: "model", }, { src/views/safeProduction/safeWorkApproval/components/approvalDia.vue
@@ -116,7 +116,7 @@ <el-table-column prop="product" label="产ååç§°" /> <el-table-column prop="specification" label="è§æ ¼åå·" /> label="尺寸" /> <el-table-column prop="unit" label="åä½" /> <el-table-column prop="unitPrice" @@ -176,7 +176,7 @@ <el-table-column prop="productCategory" label="产ååç§°" /> <el-table-column prop="specificationModel" label="è§æ ¼åå·" /> label="尺寸" /> <el-table-column prop="unit" label="åä½" /> <el-table-column prop="quantity" src/views/salesManagement/deliveryLedger/index.vue
@@ -31,7 +31,7 @@ <el-table-column label="å货订åå·" prop="shippingNo" show-overflow-tooltip /> <el-table-column label="客æ·åç§°" prop="customerName" show-overflow-tooltip /> <el-table-column label="产ååç§°" prop="productCategory" show-overflow-tooltip /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specificationModel" show-overflow-tooltip /> <el-table-column label="åè´§è¿åº¦" align="center" width="150"> <template #default="scope"> <el-progress src/views/salesManagement/invoiceLedger/index.vue
@@ -33,7 +33,7 @@ <el-table-column label="éå®ååå·" prop="salesContractNo" show-overflow-tooltip width="180" /> <el-table-column label="客æ·åç§°" prop="customerName" show-overflow-tooltip width="240" /> <el-table-column label="产å大类" prop="productCategory" width="200" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" width="160" show-overflow-tooltip /> <el-table-column label="尺寸" prop="specificationModel" width="160" show-overflow-tooltip /> <el-table-column label="å票å·" prop="invoiceNo" width="200" show-overflow-tooltip /> <el-table-column label="å票éé¢(å )" prop="invoiceTotal" show-overflow-tooltip :formatter="formattedNumber" width="200" /> src/views/salesManagement/invoiceRegistration/index.vue
@@ -69,7 +69,7 @@ /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="specificationModel" width="150" /> @@ -274,7 +274,7 @@ </el-table-column> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="specificationModel" width="150" /> src/views/salesManagement/receiptPayment/index.vue
@@ -155,7 +155,7 @@ width="100" /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="specificationModel" show-overflow-tooltip width="200" @@ -215,7 +215,7 @@ width="100" /> <el-table-column label="è§æ ¼åå·" label="尺寸" prop="specificationModel" show-overflow-tooltip width="200" src/views/salesManagement/returnOrder/components/detailDia.vue
@@ -43,7 +43,7 @@ const tableColumn = [ {align: "center", label: "产å大类", prop: "productCategory"}, {align: "center", label: "è§æ ¼åå·", prop: "specificationModel"}, {align: "center", label: "尺寸", prop: "specificationModel"}, {align: "center", label: "åä½", prop: "unit", width: 80}, {align: "center", label: "æ»æ°é", prop: "quantity", width: 120}, {align: "center", label: "å·²éè´§æ°é", prop: "totalReturnNum", width: 120}, src/views/salesManagement/returnOrder/components/formDia.vue
@@ -146,7 +146,7 @@ > <el-table-column align="center" type="selection" width="55" /> <el-table-column align="center" prop="productCategory" label="产å大类" /> <el-table-column align="center" prop="specificationModel" label="è§æ ¼åå·" /> <el-table-column align="center" prop="specificationModel" label="尺寸" /> <el-table-column align="center" prop="unit" label="åä½" /> <el-table-column align="center" prop="quantity" label="æ»æ°é" /> <el-table-column align="center" prop="unQuantity" label="æªéè´§æ°é" /> @@ -216,7 +216,7 @@ const tableColumn = ref([ {align: "center", label: "产å大类", prop: "productCategory" }, {align: "center", label: "è§æ ¼åå·", prop: "specificationModel" }, {align: "center", label: "尺寸", prop: "specificationModel" }, {align: "center", label: "åä½", prop: "unit", width: 80 }, {align: "center", label: "æ»æ°é", prop: "quantity", width: 120 }, {align: "center", label: "å·²éè´§æ°é", prop: "totalReturnNum", width: 120 }, src/views/salesManagement/salesLedger/index.vue
@@ -30,6 +30,9 @@ <el-button type="primary" @click="openForm('add')"> æ°å¢å°è´¦ </el-button> <el-button type="primary" plain :disabled="selectedRows.length === 0" @click="handleBatchExportContract"> 导åºåå </el-button> <el-button type="primary" plain @click="handleImport">å¯¼å ¥</el-button> <el-button @click="handleOut">导åº</el-button> <el-button type="danger" plain @click="handleDelete">å é¤</el-button> @@ -45,18 +48,10 @@ <el-table :data="props.row.children" border show-summary :summary-method="(param) => summarizeChildrenTable(param, props.row)"> <el-table-column align="center" label="åºå·" type="index"/> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="çº¸å¼ " prop="paper" /> <el-table-column label="åä½" prop="unit" /> <el-table-column label="产åç¶æ" width="100px" align="center"> <template #default="scope"> <el-tag v-if="scope.row.approveStatus === 1" type="success">å è¶³</el-tag> <el-tag v-else type="danger">ä¸è¶³</el-tag> </template> </el-table-column> <el-table-column label="äº§åæ°é" width="100px" align="center" prop="productNum"></el-table-column> <el-table-column label="åè´§ç¶æ" width="140" align="center"> <template #default="scope"> <el-tag :type="getShippingStatusType(scope.row)" size="small"> @@ -121,13 +116,13 @@ :operation-type="operationType" @close="closeDia" @confirm="submitForm" @cancel="closeDia"> <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> <!-- æ¥ä»·åå¯¼å ¥å ¥å£ï¼æ¾å¨è¡¨åé¡¶é¨ï¼éæ©å忾客æ·/ä¸å¡åç --> <el-row v-if="operationType === 'add'" style="margin-bottom: 10px;"> <el-col :span="24" style="text-align: right;"> <el-button type="primary" plain @click="openQuotationDialog"> ä»é宿¥ä»·å¯¼å ¥ </el-button> </el-col> </el-row> <!-- <el-row v-if="operationType === 'add'" style="margin-bottom: 10px;">--> <!-- <el-col :span="24" style="text-align: right;">--> <!-- <el-button type="primary" plain @click="openQuotationDialog">--> <!-- ä»é宿¥ä»·å¯¼å ¥--> <!-- </el-button>--> <!-- </el-col>--> <!-- </el-row>--> <el-row :gutter="30"> <el-col :span="12"> <el-form-item label="éå®ååå·ï¼" prop="salesContractNo"> @@ -147,11 +142,7 @@ <el-col :span="12"> <el-form-item label="客æ·åç§°ï¼" prop="customerId"> <el-select v-model="form.customerId" placeholder="è¯·éæ©" clearable :disabled="operationType === 'view'" filterable> <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"> {{ item.customerName + "ââ" + item.taxpayerIdentificationNumber }} </el-option> <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"></el-option> </el-select> </el-form-item> </el-col> @@ -161,7 +152,7 @@ </el-form-item> </el-col> </el-row> <el-row :gutter="30"> <el-row :gutter="30"> <el-col :span="12"> <el-form-item label="ç¾è®¢æ¥æï¼" prop="executionDate"> <el-date-picker style="width: 100%" v-model="form.executionDate" value-format="YYYY-MM-DD" @@ -171,6 +162,36 @@ <el-col :span="12"> <el-form-item label="仿¬¾æ¹å¼"> <el-input v-model="form.paymentMethod" placeholder="请è¾å ¥" clearable :disabled="operationType === 'view'" /> </el-form-item> </el-col> </el-row> <el-row :gutter="30"> <el-col :span="12"> <el-form-item label="ä»·æ ¼ç±»åï¼"> <el-input v-model="form.priceType" placeholder="请è¾å ¥" clearable :disabled="operationType === 'view'" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="å®éæ¯ä¾(%)ï¼"> <el-input-number v-model="form.depositRatio" :min="0" :max="100" :precision="2" :step="0.1" style="width: 100%" :disabled="operationType === 'view'" /> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="å®ééé¢(å )ï¼"> <el-input-number v-model="form.depositAmount" :min="0" :precision="2" :step="0.01" 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="éè´§å°åï¼"> <el-input v-model="form.deliveryAddress" placeholder="请è¾å ¥" clearable :disabled="operationType === 'view'" /> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="åè´§å¨æï¼"> <el-input-number v-model="form.deliveryCycle" :min="0" :precision="0" style="width: calc(100% - 68px)" :disabled="operationType === 'view'" /> <span style="margin-left: 8px; color: #606266;">工使¥</span> </el-form-item> </el-col> </el-row> @@ -212,13 +233,15 @@ :selectable="(row) => !isProductShipped(row)" /> <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column label="产å大类" prop="productCategory" /> <el-table-column label="è§æ ¼åå·" prop="specificationModel" /> <el-table-column label="尺寸" prop="specificationModel" /> <el-table-column label="çº¸å¼ " prop="paper" /> <el-table-column label="åä½" prop="unit" /> <el-table-column label="æ°é" prop="quantity" /> <el-table-column label="ç¨ç(%)" prop="taxRate" /> <el-table-column label="å«ç¨åä»·(å )" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" /> <el-table-column label="å«ç¨æ»ä»·(å )" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" /> <el-table-column label="ä¸å«ç¨æ»ä»·(å )" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" /> <el-table-column label="夿³¨" prop="remark" show-overflow-tooltip /> <el-table-column fixed="right" label="æä½" min-width="60" align="center" v-if="operationType !== 'view'"> <template #default="scope"> <el-button link type="primary" size="small" @@ -263,13 +286,6 @@ > <div style="margin-bottom: 12px; display:flex; gap: 12px; align-items:center;"> <el-input v-model="quotationSearchForm.quotationNo" placeholder="请è¾å ¥æ¥ä»·åå·" clearable style="max-width: 260px;" @change="fetchQuotationList" /> <el-input v-model="quotationSearchForm.customer" placeholder="请è¾å ¥å®¢æ·åç§°" clearable @@ -288,10 +304,46 @@ height="420px" > <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column prop="quotationNo" label="æ¥ä»·åå·" width="180" show-overflow-tooltip /> <el-table-column prop="customer" label="客æ·åç§°" min-width="220" show-overflow-tooltip /> <el-table-column prop="salesperson" label="ä¸å¡å" width="120" show-overflow-tooltip /> <el-table-column prop="quotationDate" label="æ¥ä»·æ¥æ" width="140" /> <el-table-column label="产ååç§°" min-width="180" show-overflow-tooltip> <template #default="{ row }"> {{ getPrimaryQuotationProductField(row, "product") }} </template> </el-table-column> <el-table-column label="尺寸" min-width="140" show-overflow-tooltip> <template #default="{ row }"> {{ getPrimaryQuotationProductField(row, "specification") }} </template> </el-table-column> <el-table-column label="çº¸å¼ " min-width="120" show-overflow-tooltip> <template #default="{ row }"> {{ getPrimaryQuotationProductField(row, "paper") }} </template> </el-table-column> <el-table-column label="å®é" min-width="100" show-overflow-tooltip> <template #default="{ row }"> {{ getPrimaryQuotationProductField(row, "grammage") }} </template> </el-table-column> <el-table-column label="åä»·(å )" width="120" align="right"> <template #default="{ row }"> {{ formatQuotationMoney(getPrimaryQuotationProductValue(row, "unitPrice")) }} </template> </el-table-column> <el-table-column label="å°çè´¹(å )" width="120" align="right"> <template #default="{ row }"> {{ formatQuotationMoney(getPrimaryQuotationProductValue(row, "printingPlateFee")) }} </template> </el-table-column> <el-table-column label="åçè´¹(å )" width="120" align="right"> <template #default="{ row }"> {{ formatQuotationMoney(getPrimaryQuotationProductValue(row, "diePlateFee")) }} </template> </el-table-column> <el-table-column label="ç£¨å ·è´¹(å )" width="120" align="right"> <template #default="{ row }"> {{ formatQuotationMoney(getPrimaryQuotationProductValue(row, "moldFee")) }} </template> </el-table-column> <el-table-column prop="status" label="审æ¹ç¶æ" width="120" align="center" /> <el-table-column prop="totalAmount" label="æ¥ä»·éé¢(å )" width="160" align="right"> <template #default="scope"> @@ -337,10 +389,17 @@ </el-row> <el-row :gutter="30"> <el-col :span="24"> <el-form-item label="è§æ ¼åå·ï¼" prop="productModelId"> <el-form-item label="尺寸ï¼" prop="productModelId"> <el-select v-model="productForm.productModelId" placeholder="è¯·éæ©" clearable @change="getProductModel" filterable> <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 :gutter="30"> <el-col :span="24"> <el-form-item label="çº¸å¼ ï¼"> <el-input v-model="productForm.paper" placeholder="请è¾å ¥" clearable /> </el-form-item> </el-col> </el-row> @@ -351,7 +410,7 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="ç¨ç(%)ï¼" prop="taxRate"> <el-form-item label="ç¨ç(%)ï¼éå¡«ï¼ï¼" prop="taxRate"> <el-select v-model="productForm.taxRate" placeholder="è¯·éæ©" clearable @change="calculateFromTaxRate"> <el-option label="1" value="1" /> <el-option label="6" value="6" /> @@ -395,6 +454,13 @@ <el-option label="墿®ç¥¨" value="墿®ç¥¨" /> <el-option label="å¢ä¸ç¥¨" value="å¢ä¸ç¥¨" /> </el-select> </el-form-item> </el-col> </el-row> <el-row :gutter="30"> <el-col :span="24"> <el-form-item label="夿³¨ï¼"> <el-input v-model="productForm.remark" placeholder="请è¾å ¥" clearable type="textarea" :rows="2" /> </el-form-item> </el-col> </el-row> @@ -493,7 +559,7 @@ <thead> <tr> <th>产ååç§°</th> <th>è§æ ¼åå·</th> <th>尺寸</th> <th>åä½</th> <th>åä»·</th> <th>é¶å®æ°é</th> @@ -647,12 +713,19 @@ salesContractNo: "", salesman: "", customerId: "", projectName: "", priceType: "", depositRatio: null, depositAmount: null, deliveryAddress: "", deliveryCycle: null, entryPerson: "", entryDate: "", deliveryDate: "", maintenanceTime: "", productData: [], executionDate: "", remarks: "", hasProductionRecord: false, }, rules: { @@ -674,6 +747,7 @@ productForm: { productCategory: "", specificationModel: "", paper: "", unit: "", quantity: "", taxInclusiveUnitPrice: "", @@ -681,6 +755,7 @@ taxInclusiveTotalPrice: "", taxExclusiveTotalPrice: "", invoiceType: "", remark: "", }, productRules: { productCategory: [{ required: true, message: "è¯·éæ©", trigger: "change" }], @@ -693,7 +768,6 @@ taxInclusiveUnitPrice: [ { required: true, message: "请è¾å ¥", trigger: "blur" }, ], taxRate: [{ required: true, message: "è¯·éæ©", trigger: "change" }], taxInclusiveTotalPrice: [ { required: true, message: "请è¾å ¥", trigger: "blur" }, ], @@ -704,6 +778,27 @@ }, }); const { productForm, productRules } = toRefs(productFormData); const createDefaultProductForm = () => ({ productCategory: "", specificationModel: "", paper: "", unit: "", quantity: "", taxInclusiveUnitPrice: "", taxRate: "", taxInclusiveTotalPrice: "", taxExclusiveTotalPrice: "", invoiceType: "", remark: "", }); const normalizeProductItem = (target) => { if (!target) return target; const remark = target.remark ?? ""; return { ...target, remark: remark, }; }; // 鲿¢å¾ªç¯è®¡ç®çæ å¿ const isCalculating = ref(false); const upload = reactive({ @@ -1022,6 +1117,25 @@ "taxExclusiveTotalPrice", ]); }; const createDefaultForm = () => ({ salesContractNo: "", salesman: "", customerId: "", projectName: "", priceType: "", depositRatio: null, depositAmount: null, deliveryAddress: "", deliveryCycle: null, entryPerson: userStore.id, entryDate: getCurrentDate(), deliveryDate: "", maintenanceTime: "", productData: [], executionDate: getCurrentDate(), remarks: "", hasProductionRecord: false, }); // æå¼å¼¹æ¡ const openForm = async (type, row) => { if (type === "edit" && row && !canEditLedger(row)) { @@ -1029,7 +1143,7 @@ return; } operationType.value = type; form.value = {}; form.value = createDefaultForm(); productData.value = []; selectedQuotation.value = null; let userLists = await userListNoPage(); @@ -1037,18 +1151,16 @@ listCustomerPrivatePool({current: -1,size:-1}).then((res) => { customerOption.value = res.data.records; }); form.value.entryPerson = userStore.id; if (type === "add") { // æ°å¢æ¶è®¾ç½®å½å ¥æ¥æä¸ºå½å¤© form.value.entryDate = getCurrentDate(); // ç¾è®¢æ¥æé»è®¤ä¸ºå½å¤© form.value.executionDate = getCurrentDate(); // é»è®¤å¼å·²å¨ createDefaultForm ä¸è®¾ç½® } else { currentId.value = row.id; getSalesLedgerWithProducts({ id: row.id, type: 1 }).then((res) => { form.value = { ...res }; form.value = { ...createDefaultForm(), ...res }; form.value.entryPerson = Number(res.entryPerson); productData.value = form.value.productData; productData.value = (form.value.productData || []).map((item) => normalizeProductItem(item) ); fileList.value = form.value.salesLedgerFiles; }); } @@ -1058,7 +1170,6 @@ // form.value.entryPerson = userAll.user.userId // 设置é»è®¤ä¸å¡å为å½åç¨æ· // } // }); form.value.entryDate = getCurrentDate(); // 设置é»è®¤å½å ¥æ¥æä¸ºå½åæ¥æ dialogFormVisible.value = true; }; @@ -1113,6 +1224,28 @@ fetchQuotationList(); }; const getPrimaryQuotationProduct = (row) => { if (!Array.isArray(row?.products) || row.products.length === 0) return null; return row.products[0]; }; const getPrimaryQuotationProductField = (row, field) => { const primary = getPrimaryQuotationProduct(row); const value = primary?.[field]; if (value === undefined || value === null || value === "") return "--"; if ((field === "product" || field === "specification") && Array.isArray(row?.products) && row.products.length > 1) { return `${value} ç${row.products.length}项`; } return value; }; const getPrimaryQuotationProductValue = (row, field) => { const primary = getPrimaryQuotationProduct(row); return Number(primary?.[field] || 0); }; const formatQuotationMoney = (value) => Number(value || 0).toFixed(2); // é䏿¥ä»·åååå¡«å°å°è´¦è¡¨å const applyQuotation = (row) => { if (!row) return; @@ -1139,13 +1272,18 @@ productData.value = products.map((p) => { const quantity = Number(p.quantity ?? 0) || 0; const unitPrice = Number(p.unitPrice ?? 0) || 0; const taxRate = "13"; // é»è®¤ 13%ï¼ä¾¿äºç´æ¥æäº¤ï¼å¦éå¯å¨äº§åä¸èªè¡ä¿®æ¹ï¼ const taxRate = p.taxRate !== undefined && p.taxRate !== null && p.taxRate !== "" ? String(p.taxRate) : ""; const taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2); const taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(taxInclusiveTotalPrice, taxRate); const taxExclusiveTotalPrice = taxRate ? proxy.calculateTaxExclusiveTotalPrice(taxInclusiveTotalPrice, taxRate) : taxInclusiveTotalPrice; return { // å°è´¦å段 productCategory: p.product || p.productName || "", specificationModel: p.specification || "", paper: p.paper || "", unit: p.unit || "", quantity: quantity, taxRate: taxRate, @@ -1153,6 +1291,7 @@ taxInclusiveTotalPrice: taxInclusiveTotalPrice, taxExclusiveTotalPrice: taxExclusiveTotalPrice, invoiceType: "墿®ç¥¨", remark: p.remark || "", }; }); @@ -1203,7 +1342,10 @@ if (valid) { console.log('productData.value--', productData.value) if (productData.value !== null && productData.value.length > 0) { form.value.productData = proxy.HaveJson(productData.value); const normalizedProductData = productData.value.map((item) => normalizeProductItem(item) ); form.value.productData = proxy.HaveJson(normalizedProductData); } else { proxy.$modal.msgWarning("请添å 产åä¿¡æ¯"); return; @@ -1239,12 +1381,12 @@ } productOperationType.value = type; productForm.value = {}; productForm.value = createDefaultProductForm(); proxy.resetForm("productFormRef"); if (type === "edit") { productForm.value = { ...row }; productForm.value = { ...createDefaultProductForm(), ...normalizeProductItem(row) }; productIndex.value = index; // ç¼è¾æ¶æ ¹æ®äº§å大类åç§°åæ¥ tree èç¹ idï¼å¹¶å è½½è§æ ¼åå·å表 // ç¼è¾æ¶æ ¹æ®äº§å大类åç§°åæ¥ tree èç¹ idï¼å¹¶å 载尺寸å表 try { const options = productOptions.value && productOptions.value.length > 0 ? productOptions.value @@ -1253,7 +1395,7 @@ if (categoryId) { const models = await modelList({ id: categoryId }); modelOptions.value = models || []; // æ ¹æ®å½åè§æ ¼åå·åç§°åæ¥å¹¶è®¾ç½® productModelIdï¼ä¾¿äºä¸ææ¡æ¾ç¤ºå·²éå¼ // æ ¹æ®å½å尺寸åç§°åæ¥å¹¶è®¾ç½® productModelIdï¼ä¾¿äºä¸ææ¡æ¾ç¤ºå·²éå¼ const currentModel = (modelOptions.value || []).find( (m) => m.model === productForm.value.specificationModel ); @@ -1263,17 +1405,28 @@ } } catch (e) { // å 载失败æ¶ä¿æå¯ç¼è¾ï¼ä¸ä¸æå¼¹çª console.error("å 载产åè§æ ¼åå·å¤±è´¥", e); console.error("å 载产å尺寸失败", e); } } else { getProductOptions() } productFormVisible.value = true; }; const normalizeProductTaxFields = (target) => { if (!target) return; const inclusiveTotalPrice = Number(target.taxInclusiveTotalPrice || 0); const taxRate = target.taxRate; if (taxRate) { target.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice(inclusiveTotalPrice, taxRate); } else { target.taxExclusiveTotalPrice = inclusiveTotalPrice.toFixed(2); } }; // æäº¤äº§å表å const submitProduct = () => { proxy.$refs["productFormRef"].validate((valid) => { if (valid) { normalizeProductTaxFields(productForm.value); if (operationType.value === "edit") { submitProductEdit(); } else { @@ -1290,11 +1443,11 @@ const submitProductEdit = () => { productForm.value.salesLedgerId = currentId.value; productForm.value.type = 1 addOrUpdateSalesLedgerProduct(productForm.value).then((res) => { addOrUpdateSalesLedgerProduct(normalizeProductItem(productForm.value)).then((res) => { proxy.$modal.msgSuccess("æäº¤æå"); closeProductDia(); getSalesLedgerWithProducts({ id: currentId.value, type: 1 }).then((res) => { productData.value = res.productData; productData.value = (res.productData || []).map((item) => normalizeProductItem(item)); }); }); }; @@ -1337,7 +1490,7 @@ closeProductDia(); getSalesLedgerWithProducts({ id: currentId.value, type: 1 }).then( (res) => { productData.value = res.productData; productData.value = (res.productData || []).map((item) => normalizeProductItem(item)); } ); }); @@ -1678,7 +1831,7 @@ <thead> <tr> <th>产ååç§°</th> <th>è§æ ¼åå·</th> <th>尺寸</th> <th>åä½</th> <th>åä»·</th> <th>é¶å®æ°é</th> @@ -1837,6 +1990,8 @@ productForm.value.taxInclusiveTotalPrice, productForm.value.taxRate ); } else { productForm.value.taxExclusiveTotalPrice = Number(productForm.value.taxInclusiveTotalPrice || 0).toFixed(2); } }; @@ -1863,6 +2018,8 @@ totalPrice, productForm.value.taxRate ); } else { productForm.value.taxExclusiveTotalPrice = totalPrice.toFixed(2); } isCalculating.value = false; @@ -1870,25 +2027,24 @@ // æ ¹æ®ä¸å«ç¨æ»ä»·è®¡ç®å«ç¨åä»·åæ°é const calculateFromExclusiveTotalPrice = () => { if (!productForm.value.taxRate) { proxy.$modal.msgWarning("请å éæ©ç¨ç"); return; } if (isCalculating.value) return; const exclusiveTotalPrice = parseFloat(productForm.value.taxExclusiveTotalPrice); const quantity = parseFloat(productForm.value.quantity); const taxRate = parseFloat(productForm.value.taxRate); if (!exclusiveTotalPrice || !quantity || quantity <= 0 || !taxRate) { if (!exclusiveTotalPrice || !quantity || quantity <= 0) { return; } isCalculating.value = true; // å 计ç®å«ç¨æ»ä»· = ä¸å«ç¨æ»ä»· / (1 - ç¨ç/100) const taxRateDecimal = taxRate / 100; const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal); let inclusiveTotalPrice = exclusiveTotalPrice; if (taxRate) { // å 计ç®å«ç¨æ»ä»· = ä¸å«ç¨æ»ä»· / (1 - ç¨ç/100) const taxRateDecimal = taxRate / 100; inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal); } productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2); // 计ç®å«ç¨åä»· = å«ç¨æ»ä»· / æ°é @@ -1899,10 +2055,6 @@ // æ ¹æ®æ°éååè®¡ç®æ»ä»· const calculateFromQuantity = () => { if (!productForm.value.taxRate) { proxy.$modal.msgWarning("请å éæ©ç¨ç"); return; } if (isCalculating.value) return; const quantity = parseFloat(productForm.value.quantity); @@ -1924,6 +2076,8 @@ productForm.value.taxInclusiveTotalPrice, productForm.value.taxRate ); } else { productForm.value.taxExclusiveTotalPrice = Number(productForm.value.taxInclusiveTotalPrice || 0).toFixed(2); } isCalculating.value = false; @@ -1931,10 +2085,6 @@ // æ ¹æ®å«ç¨åä»·ååè®¡ç®æ»ä»· const calculateFromUnitPrice = () => { if (!productForm.value.taxRate) { proxy.$modal.msgWarning("请å éæ©ç¨ç"); return; } if (isCalculating.value) return; const quantity = parseFloat(productForm.value.quantity); @@ -1956,6 +2106,8 @@ productForm.value.taxInclusiveTotalPrice, productForm.value.taxRate ); } else { productForm.value.taxExclusiveTotalPrice = Number(productForm.value.taxInclusiveTotalPrice || 0).toFixed(2); } isCalculating.value = false; @@ -1963,27 +2115,27 @@ // æ ¹æ®ç¨çåå计ç®ä¸å«ç¨æ»ä»· const calculateFromTaxRate = () => { if (!productForm.value.taxRate) { proxy.$modal.msgWarning("请å éæ©ç¨ç"); return; } if (isCalculating.value) return; const inclusiveTotalPrice = parseFloat(productForm.value.taxInclusiveTotalPrice); const taxRate = parseFloat(productForm.value.taxRate); if (!inclusiveTotalPrice || !taxRate) { if (!inclusiveTotalPrice) { return; } isCalculating.value = true; // 计ç®ä¸å«ç¨æ»ä»· productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice( inclusiveTotalPrice, taxRate ); if (taxRate) { // 计ç®ä¸å«ç¨æ»ä»· productForm.value.taxExclusiveTotalPrice = proxy.calculateTaxExclusiveTotalPrice( inclusiveTotalPrice, taxRate ); } else { productForm.value.taxExclusiveTotalPrice = inclusiveTotalPrice.toFixed(2); } isCalculating.value = false; }; @@ -2063,6 +2215,11 @@ * @param row è¡æ°æ® */ const canShip = (row) => { const productNum = Number(row.productNum); const quantity = Number(row.quantity); if (!Number.isFinite(productNum) || !Number.isFinite(quantity) || productNum < quantity) { return false; } // 产åç¶æå¿ é¡»æ¯å è¶³ï¼approveStatus === 1ï¼ if (row.approveStatus !== 1) { return false; @@ -2138,11 +2295,46 @@ }); } const handleBatchExportContract = () => { if (selectedRows.value.length === 0) { proxy.$modal.msgWarning("è¯·éæ©è¦å¯¼åºçå°è´¦"); return; } const firstCustomerKey = selectedRows.value[0].customerId ?? selectedRows.value[0].customerName ?? ""; const hasDifferentCustomer = selectedRows.value.some((row) => { const customerKey = row.customerId ?? row.customerName ?? ""; return String(customerKey) !== String(firstCustomerKey); }); if (hasDifferentCustomer) { proxy.$modal.msgWarning("ä» æ¯æåä¸å®¢æ·åæ¶å¯¼åºåå"); return; } const ids = selectedRows.value .map((row) => row.id) .filter((id) => id !== null && id !== undefined); if (ids.length === 0) { proxy.$modal.msgWarning("æªè·åå°ååID"); return; } proxy.download( "/sales/ledger/exportContract", ids, `éå®åå_æ¹é_${dayjs().format("YYYYMMDDHHmmss")}.docx`, { method: "post", filename: `éå®åå_æ¹é_${dayjs().format("YYYYMMDDHHmmss")}.docx`, headers: { "Content-Type": "application/json;charset=utf-8" }, transformRequest: [(data) => JSON.stringify(data)], } ); } // æå¼åè´§å¼¹æ¡ const openDeliveryForm = (row) => { // æ£æ¥æ¯å¦å¯ä»¥åè´§ if (!canShip(row)) { proxy.$modal.msgWarning("åªæå¨äº§åç¶ææ¯å è¶³ï¼åè´§ç¶ææ¯å¾ åè´§æå®¡æ ¸æç»çæ¶åæå¯ä»¥åè´§"); proxy.$modal.msgWarning("äº§åæ°éå¿ é¡»å¤§äºçäºæ°éï¼ä¸ç¶ææ»¡è¶³åè´§æ¡ä»¶åæå¯ä»¥åè´§"); return; } src/views/salesManagement/salesQuotation/index.vue
@@ -5,35 +5,18 @@ <el-row :gutter="20" class="search-row"> <el-col :span="8"> <el-input v-model="searchForm.quotationNo" placeholder="请è¾å ¥æ¥ä»·åå·" v-model="searchForm.product" placeholder="请è¾å ¥äº§ååç§°" clearable @keyup.enter="handleSearch" @keyup.enter="handleSearch(true)" > <template #prefix> <el-icon><Search /></el-icon> </template> </el-input> </el-col> <el-col :span="8"> <el-select v-model="searchForm.customer" placeholder="è¯·éæ©å®¢æ·" clearable> <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.customerName"> {{ item.customerName + "ââ" + item.taxpayerIdentificationNumber }} </el-option> </el-select> </el-col> <!-- <el-col :span="6">--> <!-- <el-select v-model="searchForm.status" placeholder="è¯·éæ©æ¥ä»·ç¶æ" clearable>--> <!-- <el-option label="è稿" value="è稿"></el-option>--> <!-- <el-option label="å·²åé" value="å·²åé"></el-option>--> <!-- <el-option label="客æ·ç¡®è®¤" value="客æ·ç¡®è®¤"></el-option>--> <!-- <el-option label="å·²è¿æ" value="å·²è¿æ"></el-option>--> <!-- </el-select>--> <!-- </el-col>--> <el-col :span="8"> <el-button type="primary" @click="handleSearch">æç´¢</el-button> <el-col :span="4"> <el-button type="primary" @click="handleSearch(true)">æç´¢</el-button> <el-button @click="resetSearch">éç½®</el-button> <el-button style="float: right;" type="primary" @click="handleAdd"> æ°å¢æ¥ä»· @@ -50,27 +33,27 @@ stripe height="calc(100vh - 22em)" > <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column prop="quotationNo" label="æ¥ä»·åå·" /> <el-table-column prop="customer" label="客æ·åç§°" /> <el-table-column prop="salesperson" label="ä¸å¡å" width="100" /> <el-table-column prop="quotationDate" label="æ¥ä»·æ¥æ" width="120" /> <el-table-column prop="validDate" label="æææè³" width="120" /> <el-table-column prop="status" label="审æ¹ç¶æ" width="120" align="center"> <template #default="{ row }"> <el-tag :type="getStatusType(row.status)" disable-transitions> {{ row.status || '--' }} </el-tag> </template> <el-table-column align="center" label="åºå·" type="index" width="60" /> <el-table-column prop="product" label="产ååç§°" min-width="180" show-overflow-tooltip /> <el-table-column prop="specification" label="尺寸" min-width="140" show-overflow-tooltip /> <el-table-column prop="paper" label="çº¸å¼ " min-width="120" show-overflow-tooltip /> <el-table-column prop="paperWeight" label="å®é" min-width="100" show-overflow-tooltip /> <el-table-column prop="unitPrice" label="åä»·" width="120" align="right"> <template #default="{ row }">{{ formatMoney(row.unitPrice) }}</template> </el-table-column> <el-table-column prop="totalAmount" label="æ¥ä»·éé¢" width="120"> <template #default="scope"> Â¥{{ scope.row.totalAmount.toFixed(2) }} </template> <el-table-column prop="printingFee" label="å°çè´¹" width="120" align="right"> <template #default="{ row }">{{ formatMoney(row.printingFee) }}</template> </el-table-column> <el-table-column prop="dieCuttingFee" label="åçè´¹" width="120" align="right"> <template #default="{ row }">{{ formatMoney(row.dieCuttingFee) }}</template> </el-table-column> <el-table-column prop="grindingFee" label="ç£¨å ·è´¹" width="120" align="right"> <template #default="{ row }">{{ formatMoney(row.grindingFee) }}</template> </el-table-column> <el-table-column prop="quantity" label="æ°é" width="90" align="right" /> <el-table-column label="æä½" width="200" fixed="right" align="center"> <template #default="scope"> <el-button link type="primary" @click="handleEdit(scope.row)" :disabled="!['å¾ å®¡æ¹','æç»'].includes(scope.row.status)">ç¼è¾</el-button> <el-button link type="primary" @click="handleEdit(scope.row)">ç¼è¾</el-button> <el-button link type="primary" @click="handleView(scope.row)" style="color: #67C23A">æ¥ç</el-button> <el-button link type="danger" @click="handleDelete(scope.row)">å é¤</el-button> </template> @@ -91,77 +74,13 @@ <FormDialog v-model="dialogVisible" :title="dialogTitle" width="85%" :close-on-click-modal="false" @close="dialogVisible = false" @confirm="handleSubmit" @cancel="dialogVisible = false"> <div class="quotation-form-container"> <el-form :model="form" :rules="rules" ref="formRef" label-width="120px" class="quotation-form"> <!-- åºæ¬ä¿¡æ¯ --> <el-card class="form-card" shadow="hover"> <template #header> <div class="card-header-wrapper"> <el-icon class="card-icon"><Document /></el-icon> <span class="card-title">åºæ¬ä¿¡æ¯</span> </div> </template> <div class="form-content"> <el-row :gutter="24"> <el-col :span="12"> <el-form-item label="客æ·åç§°" prop="customer"> <el-select v-model="form.customer" placeholder="è¯·éæ©å®¢æ·" style="width: 100%" clearable filterable> <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"></el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="ä¸å¡å" prop="salesperson"> <el-select v-model="form.salesperson" placeholder="è¯·éæ©ä¸å¡å" style="width: 100%" clearable filterable> <el-option v-for="item in userList" :key="item.nickName" :label="item.nickName" :value="item.nickName" /> </el-select> </el-form-item> </el-col> </el-row> <el-row :gutter="24"> <el-col :span="12"> <el-form-item label="æ¥ä»·æ¥æ" prop="quotationDate"> <el-date-picker v-model="form.quotationDate" type="date" placeholder="éæ©æ¥ä»·æ¥æ" style="width: 100%" format="YYYY-MM-DD" value-format="YYYY-MM-DD" clearable /> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="æææè³" prop="validDate"> <el-date-picker v-model="form.validDate" type="date" placeholder="éæ©æææ" style="width: 100%" format="YYYY-MM-DD" value-format="YYYY-MM-DD" clearable /> </el-form-item> </el-col> </el-row> <el-row :gutter="24"> <el-col :span="12"> <el-form-item label="仿¬¾æ¹å¼" prop="paymentMethod"> <el-input v-model="form.paymentMethod" placeholder="请è¾å ¥ä»æ¬¾æ¹å¼" clearable /> </el-form-item> </el-col> </el-row> </div> </el-card> <!-- 产åä¿¡æ¯ --> <el-card class="form-card" shadow="hover"> <template #header> <div class="card-header-wrapper"> <el-icon class="card-icon"><Box /></el-icon> <span class="card-title">产åä¿¡æ¯</span> <el-button type="primary" size="small" @click="addProduct" class="header-btn"> <el-button type="primary" size="small" @click="addProduct" class="header-btn" :disabled="isEdit"> <el-icon><Plus /></el-icon> æ·»å 产å </el-button> @@ -185,7 +104,7 @@ </el-form-item> </template> </el-table-column> <el-table-column prop="specification" label="è§æ ¼åå·" width="200"> <el-table-column prop="specification" label="尺寸" width="200"> <template #default="scope"> <el-form-item :prop="`products.${scope.$index}.specificationId`" class="product-table-form-item"> <el-select @@ -212,10 +131,45 @@ </el-form-item> </template> </el-table-column> <el-table-column prop="paper" label="çº¸å¼ " width="180"> <template #default="scope"> <el-form-item :prop="`products.${scope.$index}.paper`" class="product-table-form-item"> <el-input v-model="scope.row.paper" placeholder="çº¸å¼ " clearable /> </el-form-item> </template> </el-table-column> <el-table-column prop="paperWeight" label="å®é" width="140"> <template #default="scope"> <el-form-item :prop="`products.${scope.$index}.paperWeight`" class="product-table-form-item"> <el-input v-model="scope.row.paperWeight" placeholder="å®é" clearable /> </el-form-item> </template> </el-table-column> <el-table-column prop="unitPrice" label="åä»·"> <template #default="scope"> <el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item"> <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" /> </el-form-item> </template> </el-table-column> <el-table-column prop="printingFee" label="å°çè´¹" width="140"> <template #default="scope"> <el-form-item :prop="`products.${scope.$index}.printingFee`" class="product-table-form-item"> <el-input-number v-model="scope.row.printingFee" :min="0" :precision="2" style="width: 100%" /> </el-form-item> </template> </el-table-column> <el-table-column prop="dieCuttingFee" label="åçè´¹" width="140"> <template #default="scope"> <el-form-item :prop="`products.${scope.$index}.dieCuttingFee`" class="product-table-form-item"> <el-input-number v-model="scope.row.dieCuttingFee" :min="0" :precision="2" style="width: 100%" /> </el-form-item> </template> </el-table-column> <el-table-column prop="grindingFee" label="ç£¨å ·è´¹" width="140"> <template #default="scope"> <el-form-item :prop="`products.${scope.$index}.grindingFee`" class="product-table-form-item"> <el-input-number v-model="scope.row.grindingFee" :min="0" :precision="2" style="width: 100%" /> </el-form-item> </template> </el-table-column> @@ -256,36 +210,37 @@ <!-- æ¥ç详æ å¯¹è¯æ¡ --> <el-dialog v-model="viewDialogVisible" title="æ¥ä»·è¯¦æ " width="800px"> <el-descriptions :column="2" border> <el-descriptions-item label="æ¥ä»·åå·">{{ currentQuotation.quotationNo }}</el-descriptions-item> <el-descriptions-item label="客æ·åç§°">{{ currentQuotation.customer }}</el-descriptions-item> <el-descriptions-item label="ä¸å¡å">{{ currentQuotation.salesperson }}</el-descriptions-item> <el-descriptions-item label="æ¥ä»·æ¥æ">{{ currentQuotation.quotationDate }}</el-descriptions-item> <el-descriptions-item label="æææè³">{{ currentQuotation.validDate }}</el-descriptions-item> <el-descriptions-item label="仿¬¾æ¹å¼">{{ currentQuotation.paymentMethod }}</el-descriptions-item> <!-- <el-descriptions-item label="æ¥ä»·ç¶æ">--> <!-- <el-tag :type="getStatusType(currentQuotation.status)">{{ currentQuotation.status }}</el-tag>--> <!-- </el-descriptions-item>--> <el-descriptions-item label="æ¥ä»·æ»é¢" :span="2"> <span style="font-size: 18px; color: #e6a23c; font-weight: bold;">Â¥{{ currentQuotation.totalAmount?.toFixed(2) }}</span> </el-descriptions-item> </el-descriptions> <div style="margin: 20px 0;"> <h4>产åæç»</h4> <el-table :data="currentQuotation.products" border style="width: 100%"> <el-table-column prop="product" label="产ååç§°" /> <el-table-column prop="specification" label="è§æ ¼åå·" /> <el-table-column prop="specification" label="尺寸" /> <el-table-column prop="unit" label="åä½" /> <el-table-column prop="paper" label="çº¸å¼ " /> <el-table-column prop="paperWeight" label="å®é" /> <el-table-column prop="unitPrice" label="åä»·"> <template #default="scope"> Â¥{{ scope.row.unitPrice.toFixed(2) }} </template> </el-table-column> <el-table-column prop="printingFee" label="å°çè´¹"> <template #default="scope"> Â¥{{ Number(scope.row.printingFee || 0).toFixed(2) }} </template> </el-table-column> <el-table-column prop="dieCuttingFee" label="åçè´¹"> <template #default="scope"> Â¥{{ Number(scope.row.dieCuttingFee || 0).toFixed(2) }} </template> </el-table-column> <el-table-column prop="grindingFee" label="ç£¨å ·è´¹"> <template #default="scope"> Â¥{{ Number(scope.row.grindingFee || 0).toFixed(2) }} </template> </el-table-column> </el-table> </div> <div v-if="currentQuotation.remark" style="margin-top: 20px;"> <div v-if="currentQuotation.remark" style="margin-top: 12px;"> <h4>夿³¨</h4> <p>{{ currentQuotation.remark }}</p> </div> @@ -296,11 +251,16 @@ <script setup> import { ref, reactive, computed, onMounted, markRaw, shallowRef } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' import { Search, Document, Box, EditPen, Plus } from '@element-plus/icons-vue' import { Search, Box, EditPen, Plus } from '@element-plus/icons-vue' import Pagination from '@/components/PIMTable/Pagination.vue' import FormDialog from '@/components/Dialog/FormDialog.vue' import {getQuotationList,addQuotation,updateQuotation,deleteQuotation} from '@/api/salesManagement/salesQuotation.js' import {customerList} from "@/api/salesManagement/salesLedger.js"; import { quotationProductListPage, getQuotationProductInfo, addOrUpdateQuotationProduct, editQuotationProduct, deleteQuotationProduct } from '@/api/salesManagement/salesQuotationProduct.js' import {modelList, productTreeList} from "@/api/basicData/product.js"; import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js"; import { userListNoPage } from "@/api/system/user.js"; @@ -308,9 +268,7 @@ // ååºå¼æ°æ® const loading = ref(false) const searchForm = reactive({ quotationNo: '', customer: '', status: '' product: '' }) const quotationList = ref([]) @@ -344,17 +302,11 @@ totalAmount: 0 }) const baseRules = { customer: [{ required: true, message: 'è¯·éæ©å®¢æ·', trigger: 'change' }], salesperson: [{ required: true, message: 'è¯·éæ©ä¸å¡å', trigger: 'change' }], quotationDate: [{ required: true, message: 'è¯·éæ©æ¥ä»·æ¥æ', trigger: 'change' }], validDate: [{ required: true, message: 'è¯·éæ©æææ', trigger: 'change' }], paymentMethod: [{ required: true, message: '请è¾å ¥ä»æ¬¾æ¹å¼', trigger: 'blur' }] } const baseRules = {} const productRowRules = { productId: [{ required: true, message: 'è¯·éæ©äº§ååç§°', trigger: 'change' }], specificationId: [{ required: true, message: 'è¯·éæ©è§æ ¼åå·', trigger: 'change' }], specificationId: [{ required: true, message: 'è¯·éæ©å°ºå¯¸', trigger: 'change' }], unit: [{ required: true, message: '请填ååä½', trigger: 'blur' }], unitPrice: [{ required: true, message: '请填ååä»·', trigger: 'change' }] } @@ -377,25 +329,19 @@ // 计ç®å±æ§ const filteredList = computed(() => { let list = quotationList.value return list const keyword = String(searchForm.product || '').trim() if (!keyword) return quotationList.value return quotationList.value.filter((row) => { const p = String(row?.product || '').toLowerCase() return p.includes(keyword.toLowerCase()) }) }) // æ¹æ³ const getStatusType = (status) => { const statusMap = { 'å¾ å®¡æ¹': 'info', 'å®¡æ ¸ä¸': 'primary', 'éè¿': 'success', 'æç»': 'danger' } return statusMap[status] || 'info' } const formatMoney = (value) => `Â¥${Number(value || 0).toFixed(2)}` const resetSearch = () => { searchForm.quotationNo = '' searchForm.customer = '' searchForm.status = '' searchForm.product = '' // éç½®å°ç¬¬ä¸é¡µå¹¶éæ°æ¥è¯¢ pagination.currentPage = 1 handleSearch() @@ -464,7 +410,7 @@ if (label) { row.product = label; } // è·åè§æ ¼åå·å表ï¼è®¾ç½®å°å½åè¡ç modelOptions // è·å尺寸å表ï¼è®¾ç½®å°å½åè¡ç modelOptions modelList({ id: value }).then((res) => { row.modelOptions = res || []; }); @@ -504,29 +450,105 @@ } return null; // æ²¡ææ¾å°èç¹ï¼è¿ånull }; const handleView = (row) => { // åªå¤å¶éè¦çåæ®µï¼é¿å å°ç»ä»¶å¼ç¨æ¾å ¥ååºå¼å¯¹è±¡ currentQuotation.value = { quotationNo: row.quotationNo || '', customer: row.customer || '', salesperson: row.salesperson || '', quotationDate: row.quotationDate || '', validDate: row.validDate || '', paymentMethod: row.paymentMethod || '', status: row.status || '', remark: row.remark || '', products: row.products ? row.products.map(product => ({ productId: product.productId || '', product: product.product || product.productName || '', specificationId: product.specificationId || '', specification: product.specification || '', quantity: product.quantity || 0, unit: product.unit || '', unitPrice: product.unitPrice || 0, amount: product.amount || 0 })) : [], totalAmount: row.totalAmount || 0 const mapProductItem = (product) => ({ id: product?.id || '', salesQuotationId: product?.salesQuotationId || '', productId: product?.productId || '', product: product?.product || product?.productName || '', specificationId: product?.specificationId || '', specification: product?.specification || '', quantity: product?.quantity || 0, unit: product?.unit || '', paper: product?.paper || '', paperWeight: product?.paperWeight || '', unitPrice: product?.unitPrice || 0, printingFee: Number(product?.printingFee || 0), dieCuttingFee: Number(product?.dieCuttingFee || 0), grindingFee: Number(product?.grindingFee || 0), amount: product?.amount || 0 }) const mapQuotationItem = (item) => ({ id: item?.id, salesQuotationId: item?.salesQuotationId || '', product: item?.product || '', specification: item?.specification || '', unit: item?.unit || '', paper: item?.paper || '', paperWeight: item?.paperWeight || '', unitPrice: Number(item?.unitPrice || 0), printingFee: Number(item?.printingFee || 0), dieCuttingFee: Number(item?.dieCuttingFee || 0), grindingFee: Number(item?.grindingFee || 0), quantity: Number(item?.quantity || 0), amount: Number(item?.amount || 0), createTime: item?.createTime || '', quotationNo: item?.quotationNo || '', customer: item?.customer || '', salesperson: item?.salesperson || '', quotationDate: item?.quotationDate || '', validDate: item?.validDate || '', paymentMethod: item?.paymentMethod || '', status: item?.status || 'è稿', approveUserIds: item?.approveUserIds || '', remark: item?.remark || '', products: Array.isArray(item?.products) && item.products.length > 0 ? item.products.map(mapProductItem) : [mapProductItem(item)], subtotal: item?.subtotal || 0, freight: item?.freight || 0, otherFee: item?.otherFee || 0, discountRate: item?.discountRate || 0, discountAmount: item?.discountAmount || 0, totalAmount: item?.totalAmount || 0 }) const calcTotalAmountFromProducts = (products) => { return (products || []).reduce((sum, product) => { const price = Number(product.unitPrice) || 0 const printingFee = Number(product.printingFee) || 0 const dieCuttingFee = Number(product.dieCuttingFee) || 0 const grindingFee = Number(product.grindingFee) || 0 return sum + price + printingFee + dieCuttingFee + grindingFee }, 0) } const buildProductPayload = (product) => { const quantity = Number(product?.quantity || 0) const unitPrice = Number(product?.unitPrice || 0) const printingFee = Number(product?.printingFee || 0) const dieCuttingFee = Number(product?.dieCuttingFee || 0) const grindingFee = Number(product?.grindingFee || 0) return { id: product?.id || undefined, salesQuotationId: product?.salesQuotationId || form.salesQuotationId || null, product: product?.product || '', specification: product?.specification || '', unit: product?.unit || '', paper: product?.paper || '', paperWeight: product?.paperWeight || '', unitPrice, printingFee, dieCuttingFee, grindingFee, quantity, amount: Number(product?.amount ?? quantity * unitPrice), remark: product?.remark ?? form.remark ?? '' } } const handleView = async (row) => { let source = row if (row?.id) { try { const res = await getQuotationProductInfo(row.id) source = res?.data || row } catch (error) { source = row } } source.totalAmount = source.totalAmount || calcTotalAmountFromProducts(source?.products || [source]) currentQuotation.value = mapQuotationItem(source) viewDialogVisible.value = true } @@ -537,24 +559,38 @@ form.id = row.id || form.id || null // å å è½½äº§åæ æ°æ®ï¼å¦å el-tree-select æ æ³åæ¾äº§ååç§° await getProductOptions() let source = row if (row?.id) { try { const res = await getQuotationProductInfo(row.id) source = res?.data || row } catch (error) { source = row } } source.totalAmount = source.totalAmount || calcTotalAmountFromProducts(source?.products || [source]) const sourceProducts = Array.isArray(source?.products) && source.products.length > 0 ? source.products : [source] // åªå¤å¶éè¦çåæ®µï¼é¿å å°ç»ä»¶å¼ç¨æ¾å ¥ååºå¼å¯¹è±¡ form.quotationNo = row.quotationNo || '' form.customer = row.customer || '' form.salesperson = row.salesperson || '' form.quotationDate = row.quotationDate || '' form.validDate = row.validDate || '' form.paymentMethod = row.paymentMethod || '' form.status = row.status || 'è稿' form.remark = row.remark || '' form.products = row.products ? await Promise.all(row.products.map(async (product) => { form.quotationNo = source.quotationNo || '' form.customer = source.customer || '' form.salesperson = source.salesperson || '' form.quotationDate = source.quotationDate || '' form.validDate = source.validDate || '' form.paymentMethod = source.paymentMethod || '' form.status = source.status || 'è稿' form.remark = source.remark || '' form.products = await Promise.all(sourceProducts.map(async (product) => { const productName = product.product || product.productName || '' // ä¼å ç¨ productIdï¼å¦æåªæåç§°ï¼å°è¯åæ¥ id 以便æ éæ©å¨åæ¾ const resolvedProductId = product.productId ? Number(product.productId) : findNodeIdByLabel(productOptions.value, productName) || '' // 妿æäº§åIDï¼å 载对åºçè§æ ¼åå·å表 // 妿æäº§åIDï¼å 载对åºç尺寸å表 let modelOptions = []; let resolvedSpecificationId = product.specificationId || ''; @@ -571,7 +607,7 @@ } } } catch (error) { console.error('å è½½è§æ ¼åå·å¤±è´¥:', error); console.error('å 载尺寸失败:', error); } } @@ -582,17 +618,22 @@ specification: product.specification || '', quantity: product.quantity || 0, unit: product.unit || '', paper: product.paper || '', paperWeight: product.paperWeight || '', unitPrice: product.unitPrice || 0, printingFee: Number(product.printingFee || 0), dieCuttingFee: Number(product.dieCuttingFee || 0), grindingFee: Number(product.grindingFee || 0), amount: product.amount || 0, modelOptions: modelOptions // 为æ¯è¡æ·»å ç¬ç«çè§æ ¼åå·å表 modelOptions: modelOptions // 为æ¯è¡æ·»å ç¬ç«ç尺寸å表 } })) : [] form.subtotal = row.subtotal || 0 form.freight = row.freight || 0 form.otherFee = row.otherFee || 0 form.discountRate = row.discountRate || 0 form.discountAmount = row.discountAmount || 0 form.totalAmount = row.totalAmount || 0 })) form.subtotal = source.subtotal || 0 form.freight = source.freight || 0 form.otherFee = source.otherFee || 0 form.discountRate = source.discountRate || 0 form.discountAmount = source.discountAmount || 0 form.totalAmount = source.totalAmount || 0 dialogVisible.value = true } @@ -604,23 +645,21 @@ cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { const index = quotationList.value.findIndex(item => item.id === row.id) if (index > -1) { deleteQuotation(row.id).then(res=>{ // console.log(res) if(res.code===200){ ElMessage.success('å 餿å') handleSearch() } }) // quotationList.value.splice(index, 1) // pagination.total-- // ElMessage.success('å 餿å') if (!row?.id) { ElMessage.warning('æªè·åå°å¯å é¤ç产åID') return } deleteQuotationProduct([row.id]).then(res=>{ if(res.code===200){ ElMessage.success('å 餿å') handleSearch() } }) }) } const resetForm = () => { form.id = null form.customer = '' form.salesperson = '' form.quotationDate = '' @@ -638,6 +677,10 @@ } const addProduct = () => { if (isEdit.value) { ElMessage.warning('ç¼è¾æ¶ä¸å 许æ°å¢äº§å') return } form.products.push({ productId: '', product: '', @@ -646,9 +689,14 @@ specification: '', quantity: 1, unit: '', paper: '', paperWeight: '', unitPrice: 0, printingFee: 0, dieCuttingFee: 0, grindingFee: 0, amount: 0, modelOptions: [] // 为æ¯è¡æ·»å ç¬ç«çè§æ ¼åå·å表 modelOptions: [] // 为æ¯è¡æ·»å ç¬ç«ç尺寸å表 }) } @@ -683,26 +731,28 @@ // è®¡ç®ææäº§åçåä»·æ»å form.totalAmount = form.products.reduce((sum, product) => { const price = Number(product.unitPrice) || 0 return sum + price const printingFee = Number(product.printingFee) || 0 const dieCuttingFee = Number(product.dieCuttingFee) || 0 const grindingFee = Number(product.grindingFee) || 0 return sum + price + printingFee + dieCuttingFee + grindingFee }, 0) if (isEdit.value) { // ç¼è¾ const index = quotationList.value.findIndex(item => item.id === editId.value) if (index > -1) { updateQuotation(form).then(res=>{ // console.log(res) if(res.code===200){ ElMessage.success('ç¼è¾æå') dialogVisible.value = false handleSearch() } }) } const editingItem = form.products[0] || {} const payload = buildProductPayload({ ...editingItem, id: editingItem.id || form.id }) editQuotationProduct(payload).then((res) => { if (res?.code === 200) { ElMessage.success('ç¼è¾æå') dialogVisible.value = false handleSearch() } }) } else { // æ°å¢ addQuotation(form).then(res=>{ if(res.code===200){ const payloadList = form.products.map((item) => buildProductPayload(item)) addOrUpdateQuotationProduct(payloadList).then((res) => { if (res?.code === 200) { ElMessage.success('æ°å¢æå') dialogVisible.value = false handleSearch() @@ -720,52 +770,27 @@ // å页ååæ¶éæ°æ¥è¯¢å表 handleSearch() } const handleSearch = ()=>{ const handleSearch = (resetPage = false)=>{ if (resetPage) { pagination.currentPage = 1 } const params = { // å端å页忰ï¼current / size current: pagination.currentPage, size: pagination.pageSize, ...searchForm } getQuotationList(params).then(res=>{ // console.log(res) quotationProductListPage(params).then(res=>{ if(res.code===200){ // åªå¤å¶éè¦çåæ®µï¼é¿å å°ç»ä»¶å¼ç¨æå ¶ä»å¯¹è±¡æ¾å ¥ååºå¼å¯¹è±¡ quotationList.value = (res.data.records || []).map(item => ({ id: item.id, quotationNo: item.quotationNo || '', customer: item.customer || '', salesperson: item.salesperson || '', quotationDate: item.quotationDate || '', validDate: item.validDate || '', paymentMethod: item.paymentMethod || '', status: item.status || 'è稿', // 审æ¹äººï¼ç¨äºç¼è¾æ¶åæ¾ï¼ approveUserIds: item.approveUserIds || '', remark: item.remark || '', products: item.products ? item.products.map(product => ({ productId: product.productId || '', product: product.product || product.productName || '', specificationId: product.specificationId || '', specification: product.specification || '', quantity: product.quantity || 0, unit: product.unit || '', unitPrice: product.unitPrice || 0, amount: product.amount || 0 })) : [], subtotal: item.subtotal || 0, freight: item.freight || 0, otherFee: item.otherFee || 0, discountRate: item.discountRate || 0, discountAmount: item.discountAmount || 0, totalAmount: item.totalAmount || 0 })) const records = res.data.records || [] quotationList.value = records.map((item) => { const mapped = mapQuotationItem(item) mapped.totalAmount = calcTotalAmountFromProducts(mapped.products) return mapped }) pagination.total = res.data.total } }) // customerList().then((res) => { // customerOption.value = res; // }); } const getUserList = async () => { src/views/salesManagement/strategyControl/index.vue
@@ -48,7 +48,7 @@ </el-table-column> <el-table-column prop="customerName" label="客æ·åç§°" width="180"/> <el-table-column prop="productName" label="产ååç§°" width="200"/> <el-table-column prop="specification" label="è§æ ¼åå·" width="120"/> <el-table-column prop="specification" label="尺寸" width="120"/> <el-table-column prop="basePrice" label="åºç¡ä»·æ ¼" width="100"> <template #default="scope"> Â¥{{ scope.row.basePrice }}/å¨ @@ -628,8 +628,8 @@ </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="è§æ ¼åå·" prop="specification"> <el-input v-model="priceStrategyForm.specification" placeholder="请è¾å ¥è§æ ¼åå·" :disabled="priceStrategyDialogMode === 'view'" /> <el-form-item label="尺寸" prop="specification"> <el-input v-model="priceStrategyForm.specification" placeholder="请è¾å ¥å°ºå¯¸" :disabled="priceStrategyDialogMode === 'view'" /> </el-form-item> </el-col> </el-row>