From 9172b9c8815f4030ed8768842749b90bf648e672 Mon Sep 17 00:00:00 2001 From: tzy Date: Fri, 18 Jul 2025 11:57:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(system):=E4=B8=8B=E5=8F=91=E5=9B=BE?= =?UTF-8?q?=E7=BA=B8=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/.gitignore | 8 + .idea/git_toolbox_blame.xml | 12 + .idea/inspectionProfiles/Project_Default.xml | 6 + package.json | 10 +- src/api/system/configIni.js | 44 + src/api/system/orderPro.js | 59 +- src/api/system/pcRigidChain.js | 44 + src/api/system/rigidChain.js | 14 +- src/api/system/route.js | 34 +- src/main.js | 17 +- src/router/index.js | 7 +- src/views/demo/addgongxu/bomfrom.vue | 378 +++++--- src/views/demo/addgongxu/index.vue | 875 +++++------------ src/views/index.vue | 81 +- src/views/system/configIni/index.vue | 394 ++++++++ src/views/system/materials/index.vue | 16 +- src/views/system/orderPro/index.vue | 953 +++++++++++++++++-- src/views/system/pcRigidChain/index.vue | 621 ++++++++++++ src/views/system/plan/index.vue | 107 ++- src/views/system/productionPlan/gantt.css | 67 ++ src/views/system/route/index.vue | 381 +++++--- src/views/system/safetyStock/index.vue | 2 + src/views/system/stockData/index.vue | 73 +- src/views/system/total/index.vue | 72 +- vue.config.js | 14 +- 25 files changed, 3215 insertions(+), 1074 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/git_toolbox_blame.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 src/api/system/configIni.js create mode 100644 src/api/system/pcRigidChain.js create mode 100644 src/views/system/configIni/index.vue create mode 100644 src/views/system/pcRigidChain/index.vue diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml new file mode 100644 index 0000000..fcee57a --- /dev/null +++ b/.idea/git_toolbox_blame.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..03d9549 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/package.json b/package.json index 8089f9f..840ba70 100644 --- a/package.json +++ b/package.json @@ -37,13 +37,14 @@ "dependencies": { "@element-plus/icons-vue": "^2.3.1", "@riophae/vue-treeselect": "0.4.0", + "@vue/composition-api": "^1.7.2", "axios": "^0.24.0", "clipboard": "2.0.8", "core-js": "3.25.3", "dayjs": "^1.11.11", - "dhtmlx-gantt": "^8.0.9", - "echarts": "5.4.0", - "element-ui": "2.15.12", + "dhtmlx-gantt": "^8.0.11", + "echarts-gl": "^2.0.9", + "element-ui": "^2.15.12", "file-saver": "2.0.5", "font-awesome": "^4.7.0", "fuse.js": "6.4.3", @@ -62,6 +63,8 @@ "vue": "2.6.12", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", + "vue-echart": "^1.0.5", + "vue-echarts": "^5.0.0-beta.0", "vue-gantt-schedule-timeline-calendar": "^3.0.44", "vue-meta": "2.4.0", "vue-router": "3.4.9", @@ -77,6 +80,7 @@ "chalk": "4.1.0", "compression-webpack-plugin": "5.0.2", "connect": "3.6.6", + "echarts": "^5.6.0", "eslint": "^6.0.1", "eslint-plugin-vue": "7.2.0", "less": "^4.2.0", diff --git a/src/api/system/configIni.js b/src/api/system/configIni.js new file mode 100644 index 0000000..6c0d00b --- /dev/null +++ b/src/api/system/configIni.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询图纸配置列表 +export function listConfigIni(query) { + return request({ + url: '/system/configIni/list', + method: 'get', + params: query + }) +} + +// 查询图纸配置详细 +export function getConfigIni(id) { + return request({ + url: '/system/configIni/' + id, + method: 'get' + }) +} + +// 新增图纸配置 +export function addConfigIni(data) { + return request({ + url: '/system/configIni', + method: 'post', + data: data + }) +} + +// 修改图纸配置 +export function updateConfigIni(data) { + return request({ + url: '/system/configIni', + method: 'put', + data: data + }) +} + +// 删除图纸配置 +export function delConfigIni(id) { + return request({ + url: '/system/configIni/' + id, + method: 'delete' + }) +} diff --git a/src/api/system/orderPro.js b/src/api/system/orderPro.js index 063f1ab..a918881 100644 --- a/src/api/system/orderPro.js +++ b/src/api/system/orderPro.js @@ -18,9 +18,9 @@ export function getOrderPro(id) { } export function processList(params) { return request({ - url: '/system/orderPro/processlist', // 这里应该是 processlist,而不是 processList + url: '/system/orderPro/processlist', method: 'get', - params: params // 使用 params 来传递查询参数 + params: params }); } @@ -49,3 +49,58 @@ export function delOrderPro(id) { method: 'delete' }) } + +// 获取图纸类型数据 +export function getDrawingTypeDict() { + return request({ + url: '/system/configIni/list', + method: 'get', + params: { + pageNum: 1, + pageSize: 1000 // 获取足够多的数据 + } + }) +} + +export function addProduct(data) { + return request({ + url: '/system/orderPro/addProduct', + method: 'post', + data + }); +} +// 查询此项目用到的产品列表 +export function listSave(query) { + return request({ + url: '/system/save/list', + method: 'get', + params: query + }) +} +// 执行出图 +export function executDrawing(data) { + return request({ + url: '/system/orderPro/executDrawing', + method: 'post', + data + }) +} + +// 删除销齿链型号 +export function delSave(ids) { + return request({ + url: '/system/save/' + ids, + method: 'delete' + }) +} + +// 下载PDF +export function uploadPDF(id) { + return request({ + url: '/system/orderPro/uploadPDF', + method: 'get', + params: { id }, + responseType: 'blob', // 设置响应类型为blob,用于文件下载 + headers: { 'Content-Type': 'application/json; application/octet-stream' } + }) +} \ No newline at end of file diff --git a/src/api/system/pcRigidChain.js b/src/api/system/pcRigidChain.js new file mode 100644 index 0000000..f707251 --- /dev/null +++ b/src/api/system/pcRigidChain.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询销齿链型号管理列表 +export function listRigidChain(query) { + return request({ + url: '/system/pcRigidChain/list', + method: 'get', + params: query + }) +} + +// 查询销齿链型号管理详细 +export function getRigidChain(id) { + return request({ + url: '/system/pcRigidChain/' + id, + method: 'get' + }) +} + +// 新增销齿链型号管理 +export function addRigidChain(data) { + return request({ + url: '/system/pcRigidChain', + method: 'post', + data: data + }) +} + +// 修改销齿链型号管理 +export function updateRigidChain(data) { + return request({ + url: '/system/pcRigidChain', + method: 'put', + data: data + }) +} + +// 删除销齿链型号管理 +export function delRigidChain(id) { + return request({ + url: '/system/rigidChain/' + id, + method: 'delete' + }) +} diff --git a/src/api/system/rigidChain.js b/src/api/system/rigidChain.js index f6d16b8..acd6ea2 100644 --- a/src/api/system/rigidChain.js +++ b/src/api/system/rigidChain.js @@ -19,7 +19,7 @@ export function getRigidChain(id) { // 新增刚性链报价 export function addRigidChain(data) { - return request({ + return request({ url: '/system/rigidChain', method: 'post', data: data @@ -42,3 +42,15 @@ export function delRigidChain(id) { method: 'delete' }) } + + + + + + + + + + + + \ No newline at end of file diff --git a/src/api/system/route.js b/src/api/system/route.js index 3c3594e..a2c343a 100644 --- a/src/api/system/route.js +++ b/src/api/system/route.js @@ -104,8 +104,40 @@ export function updateProcessPlan(rooteProdet) { method: 'post', params: { rooteProdet }, }); -} +}export function updateProcesTime(rooteProdet) { + return request({ + url: '/system/route/updateProcesTime', + method: 'post', + params: { rooteProdet }, + }); +} +export function getKindeeExcel(rooteProdet) { + return request({ + url: '/system/route/getKindeeExcel', + method: 'get', + params: { rooteProdet }, + }) + .then(response => { + return response.data; // 返回数据 + }) + .catch(error => { + throw new Error('获取标准工艺失败,请重试!'); + }); +} +export function getAllRouteAndUse(rooteProdet) { + return request({ + url: '/system/route/getAllRouteAndUse', + method: 'post', + params: { rooteProdet }, + }) + .then(response => { + return response.data; // 返回数据 + }) + .catch(error => { + throw new Error('获取全部工艺失败,请重试!'); + }); +} export function generatePDFs(rooteProdet) { return request({ url: '/system/route/generatePDFs', diff --git a/src/main.js b/src/main.js index df3e14a..cb3f128 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,5 @@ import Vue from 'vue' - +import VueComposition from '@vue/composition-api' import Cookies from 'js-cookie' import Element from 'element-ui' @@ -34,12 +34,25 @@ import ImagePreview from "@/components/ImagePreview" // 字典标签组件 import DictTag from '@/components/DictTag' // 头部标签组件 + import VueMeta from 'vue-meta' // 字典数据组件 import DictData from '@/components/DictData' // 表格拖拽 import VDrag from "./assets/js/drag"; +import ECharts from 'vue-echarts' +// 手动引入 ECharts 各模块来减小打包体积 +import 'echarts/lib/chart/bar' +import 'echarts/lib/component/tooltip' +import 'echarts/lib/chart/line' +import 'echarts/lib/component/polar' + +// 如果需要配合 ECharts 扩展使用,只需要直接引入扩展包即可 +// 以 ECharts-GL 为例: +// 需要安装依赖:npm install --save echarts-gl,并添加如下引用 +import 'echarts-gl' + // 全局方法挂载 Vue.prototype.$axios = axios Vue.prototype.getDicts = getDicts @@ -61,7 +74,9 @@ Vue.component('Editor', Editor) Vue.component('FileUpload', FileUpload) Vue.component('ImageUpload', ImageUpload) Vue.component('ImagePreview', ImagePreview) +Vue.component('v-chart', ECharts) +Vue.use(VueComposition) Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) diff --git a/src/router/index.js b/src/router/index.js index 072d7e0..baabc13 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -70,6 +70,11 @@ export const constantRoutes = [ component: () => import('@/views/login'), hidden: true }, + { + path: '/login', + component: () => import('@/views/'), + hidden: true + }, { path: '/register', component: () => import('@/views/register'), @@ -114,7 +119,7 @@ export const constantRoutes = [ { path: '/index', component: () => import('@/views/index'), - hidden: true + hidden: true } // { // path: '/', diff --git a/src/views/demo/addgongxu/bomfrom.vue b/src/views/demo/addgongxu/bomfrom.vue index d8b2225..289ba47 100644 --- a/src/views/demo/addgongxu/bomfrom.vue +++ b/src/views/demo/addgongxu/bomfrom.vue @@ -1,143 +1,257 @@ + + diff --git a/src/views/demo/addgongxu/index.vue b/src/views/demo/addgongxu/index.vue index 7ac2d2f..58508d0 100644 --- a/src/views/demo/addgongxu/index.vue +++ b/src/views/demo/addgongxu/index.vue @@ -1,664 +1,251 @@ + + diff --git a/src/views/index.vue b/src/views/index.vue index d6ea7f3..a07b02a 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -103,16 +103,25 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - - 库存信息 -
-

物料编号: {{ inventoryData.materialCode }}

-

库存数量: {{ inventoryData.inventory }}

-

物料仓库: {{ inventoryData.stockName }}

-

物料名称: {{ inventoryData.materialName }}

-

物料单位: {{ inventoryData.stockUnit }}

-
-
+ + + + +
+ 库存信息 +
+
+

物料编号:{{ inventoryData.materialCode }}

+

库存:{{ inventoryData.kucun }}

+

子项未领料量:{{ inventoryData.inventory }}

+

生产订单未入库:{{ inventoryData.stockName }}

+

采购订单未入库:{{ inventoryData.materialName }}

+

预计可用库存:{{ inventoryData.stockUnit }}

+
+
+
+
+ @@ -134,6 +143,7 @@ export default { return { // 按钮loading buttonLoading: false, + dialogLoading: false, // 遮罩层 loading: true, // 选中数组 @@ -183,17 +193,21 @@ export default { this.showInventory(row.materialCode); // 打开弹框 }, showInventory(materialCode) { - // 向后端发送请求获取库存数 + this.dialogLoading = true; // 显示加载动画 material_inventory(materialCode).then(response => { - this.inventoryData.materialCode = materialCode; // 设置物料编号 - this.inventoryData.inventory = response.data.quantity; // 设置库存数 - this.inventoryData.materialName = response.data.materialName; // 设置库存数 - this.inventoryData.stockName = response.data.stockName; // 设置库存数 - this.inventoryData.stockUnit = response.data.stockUnit; // 设置库存数 - this.dialogVisible = true; // 打开弹框显示数据 + this.inventoryData.materialCode = materialCode; + this.inventoryData.inventory = response.data.quantity; + this.inventoryData.materialName = response.data.materialName; + this.inventoryData.stockName = response.data.stockName; + this.inventoryData.stockUnit = response.data.stockUnit; + this.inventoryData.kucun = response.data.kucun; + this.dialogVisible = true; }) .catch(error => { console.error('获取库存数失败:', error); + }) + .finally(() => { + this.dialogLoading = false; // 隐藏加载动画 }); }, @@ -275,6 +289,39 @@ export default { align-items: flex-start; /* 左对齐字段数据 */ margin-left: 5px; /* 调整字段数据与边框的距禿 */ } +.fade-enter-active, .fade-leave-active { + transition: opacity 0.4s ease; +} +.fade-enter, .fade-leave-to { + opacity: 0; +} +.box-card { + border-radius: 8px; + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); +} + +.dialog-title { + font-size: 18px; + font-weight: bold; + color: #409EFF; +} + +.dialog-body { + font-family: '微软雅黑', sans-serif; + line-height: 1.6; +} + +.dialog-item { + margin-bottom: 10px; + font-size: 14px; + color: #333; +} + +.clearfix::after { + content: ""; + display: block; + clear: both; +} .dialog-text { margin: 8px 0; diff --git a/src/views/system/configIni/index.vue b/src/views/system/configIni/index.vue new file mode 100644 index 0000000..5992e29 --- /dev/null +++ b/src/views/system/configIni/index.vue @@ -0,0 +1,394 @@ + + + diff --git a/src/views/system/materials/index.vue b/src/views/system/materials/index.vue index 9d304db..2d4fb69 100644 --- a/src/views/system/materials/index.vue +++ b/src/views/system/materials/index.vue @@ -414,6 +414,11 @@ export default { }, generateMaterialCode() { + // 如果是修改操作,不生成新的编码 + if (this.form.id) { + return; + } + const materialType = this.form.materialType; // 获取选中的类别 if (!materialType) { this.$message.warning('请先选择类别。'); @@ -427,8 +432,6 @@ export default { }, getNextMaterialCode(baseCode) { - // 这里可以调用后端接口检查数据库中已有的编码 - // 假设返回的编码列表是 ["DC0000000001", "DC0000000002"] const existingCodes = ["DC0000000001", "DC0000000002"]; // 示例数据 let nextCode = baseCode; @@ -445,15 +448,20 @@ export default { // 处理型号选择 handleModelSelect(item) { if (item) { - // 自动填充表单字段 + // 保存当前的物料编码 + const currentMaterialCode = this.form.materialCode; + + // 更新其他字段 this.form = { ...this.form, // 保留其他字段 - materialCode: item.materialCode, materialType: item.materialType, materialName: item.materialName, model: item.model, brand: item.brand }; + + // 恢复物料编码 + this.form.materialCode = currentMaterialCode; } }, diff --git a/src/views/system/orderPro/index.vue b/src/views/system/orderPro/index.vue index 3c8a115..5bc6ed1 100644 --- a/src/views/system/orderPro/index.vue +++ b/src/views/system/orderPro/index.vue @@ -33,7 +33,7 @@ @keyup.enter.native="handleQuery" /> - + + + + + + + + 搜索 @@ -64,7 +80,8 @@ size="mini" @click="handleAdd" v-hasPermi="['system:orderPro:add']" - >新增 + >新增 + 修改 + >修改 + 删除 + >删除 + 导出 + >导出 + - - - - + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + - @@ -156,27 +221,223 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> + + + + + 选择产品 + + +
+ + 新增 + + + + + + + + + + + + + + + + 执行出图 + + + +
+ + 执行出图 + + + 下载PDF + + + +
+ + +
+
+
+ + + + 其他功能 + + + +
+ + + +
+ + 操作说明:可以先搜索选择已有型号自动填充,或直接手动填写所有必填字段(带*号) +
+ +
+ 可选择已有型号或手动填写所有信息 +
+ + +
+
{{ item.figureNumber }}
+
+ 编码: {{ item.typeName }} + 产品名: {{ item.productName }} + 类型: {{ item.type }} + 行程: {{ item.journey }} +
+
+
+
+
+ + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + + +
+ +
+
+
- + - + - - + + + - - + + + + - - + + - - + + + + + + + + +