diff --git a/src/api/system/proPlan.js b/src/api/system/proPlan.js index 957a7f7..86f8dee 100644 --- a/src/api/system/proPlan.js +++ b/src/api/system/proPlan.js @@ -65,3 +65,11 @@ export function delProPlan(id) { method: 'delete' }) } + +// 设计人项目汇总(周/月/年) +export function getDesignerSummary() { + return request({ + url: '/system/proPlan/summary/designer', + method: 'get' + }) +} diff --git a/src/api/system/route.js b/src/api/system/route.js index aeeb355..1294fd9 100644 --- a/src/api/system/route.js +++ b/src/api/system/route.js @@ -148,6 +148,23 @@ export function generatePDFs(rooteProdet) { }); } +// 更新生产订单仓库字段(推送工序计划单入库) +export function updateProductionOrders(rooteProdet, cangKuNum) { + return request({ + url: '/system/route/updateProductionOrders', + method: 'post', + params: { rooteProdet, cangKuNum }, + }); +} + +export function updateCgOrders(rooteProdet, cangKuNum) { + return request({ + url: '/system/route/updateCgOrders', + method: 'post', + params: { rooteProdet, cangKuNum }, + }); +} + // 获取物料BOM信息,后端返回物料BOM信息集合 export function getBomInfo(materialCode, materialName, productionOrderNo) { diff --git a/src/api/system/safetyStock.js b/src/api/system/safetyStock.js index 09e36cb..89105d6 100644 --- a/src/api/system/safetyStock.js +++ b/src/api/system/safetyStock.js @@ -37,8 +37,16 @@ export function updateSafetyStock(data) { // 删除安全库存 export function delSafetyStock(id) { + const ids = Array.isArray(id) ? id.join(',') : id + // 优先尝试 REST 风格 DELETE,不支持则回退到 POST /remove return request({ - url: '/system/safetyStock/' + id, + url: '/system/safetyStock/' + ids, method: 'delete' + }).catch(() => { + return request({ + url: '/system/safetyStock/remove', + method: 'post', + data: { ids } + }) }) } diff --git a/src/views/index.vue b/src/views/index.vue index 93e0e77..5422468 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -65,12 +65,14 @@ - + @@ -111,20 +113,32 @@ @pagination="getList" /> - + - -
+
库存信息 + {{ inventoryData.materialCode }}
-
-

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

-

库存:{{ inventoryData.kucun }}

-

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

-

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

-

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

-

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

-
+ + + {{ inventoryData.kucun }} + + + {{ inventoryData.inventory }} + + + {{ inventoryData.stockName }} + + + {{ inventoryData.materialName }} + + + {{ inventoryData.salesOrder }} + + + {{ inventoryData.stockUnit }} + + @@ -186,6 +200,7 @@ export default { unitPrice: undefined, unit: undefined, flag: undefined, + salesOrder:undefined }, // 表单参数 form: {}, @@ -210,6 +225,7 @@ export default { this.inventoryData.stockName = response.data.stockName; this.inventoryData.stockUnit = response.data.stockUnit; this.inventoryData.kucun = response.data.kucun; + this.inventoryData.salesOrder = response.data.salesOrder; this.dialogVisible = true; }) .catch(error => { @@ -342,4 +358,52 @@ export default { text-align: center; margin-bottom: 10px; } +.header-bar { + display: flex; + align-items: center; + justify-content: space-between; +} +.material-title { + font-size: 16px; + font-weight: 600; + color: #409EFF; +} +.material-table .el-table__header .cell { + font-size: 16px; + font-weight: 700; + color: #303133; +} +.material-table .el-table__body .cell { + font-size: 14px; + font-weight: 600; +} +.material-code-link { + font-size: 16px; + font-weight: 700; +} +.inventory-desc { + --label-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); + --label-color: #409EFF; +} +.inventory-desc .el-descriptions__label { + background: var(--label-bg); + color: var(--label-color); + font-weight: 600; +} +.inventory-desc .el-descriptions__content { + color: #303133; + font-size: 13px; +} +.val { + font-weight: 600; +} +.val-pos { + color: #67C23A; +} +.val-neg { + color: #F56C6C; +} +.val-zero { + color: #909399; +} diff --git a/src/views/indexDaping.vue b/src/views/indexDaping.vue index 62ebf78..dade775 100644 --- a/src/views/indexDaping.vue +++ b/src/views/indexDaping.vue @@ -194,7 +194,7 @@ @@ -2475,7 +3071,8 @@ export default { line-height: 1.3; margin-top: 6px; width: 100%; - padding-left: 22px; /* 与上面的图标对齐 */ + padding-left: 22px; + /* 与上面的图标对齐 */ } .drawing-path i { @@ -2574,19 +3171,21 @@ export default { } .project-name-column { - color: #008B8B; /* 深青绿色 */ + color: #008b8b; + /* 深青绿色 */ font-weight: 500; } .project-name-column { - color: #008B8B; /* 深青绿色 */ + color: #008b8b; + /* 深青绿色 */ font-weight: 500; } /* MRP运算结果复查表格样式 */ .mrp-result-card .el-card__header { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); - border-bottom: 2px solid #409EFF; + border-bottom: 2px solid #409eff; } .mrp-result-card .el-table { @@ -2603,13 +3202,13 @@ export default { background-color: #fafafa; } -.mrp-result-card .el-table__body tr:hover > td { +.mrp-result-card .el-table__body tr:hover>td { background-color: #f0f9ff !important; } /* 数值列的颜色样式 */ .mrp-result-card .el-table .cell { - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace; font-size: 13px; } @@ -2626,9 +3225,9 @@ export default { } .mrp-result-card .el-pagination .el-pager li.active { - background: #409EFF; + background: #409eff; color: #fff; - border-color: #409EFF; + border-color: #409eff; } /* 负库存行样式 */ @@ -2636,7 +3235,7 @@ export default { background-color: #fef0f0 !important; } -.mrp-result-card .el-table .negative-stock-row:hover > td { +.mrp-result-card .el-table .negative-stock-row:hover>td { background-color: #fde2e2 !important; } @@ -2645,7 +3244,7 @@ export default { background-color: #fdf6ec !important; } -.mrp-result-card .el-table .zero-stock-row:hover > td { +.mrp-result-card .el-table .zero-stock-row:hover>td { background-color: #faecd8 !important; } @@ -2714,11 +3313,11 @@ export default { } .mrp-search-input:hover .el-input__inner { - border-color: #409EFF; + border-color: #409eff; } .mrp-search-input .el-input__inner:focus { - border-color: #409EFF; + border-color: #409eff; box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2); } diff --git a/src/views/system/proPlan/index.vue b/src/views/system/proPlan/index.vue index aea12e8..bfda7fd 100644 --- a/src/views/system/proPlan/index.vue +++ b/src/views/system/proPlan/index.vue @@ -39,6 +39,7 @@ + @@ -100,7 +101,14 @@ @@ -156,13 +164,13 @@ - + + /> @@ -188,6 +196,7 @@ + @@ -330,7 +339,8 @@ export default { const id = row.id || this.ids getProPlan(id).then(response => { this.loading = false; - this.form = response.data; + this.form = response.data || {}; + this.form.designer = this.parseDesignerArray(this.form.designer); this.open = true; this.title = "修改方案管理"; }); @@ -341,7 +351,13 @@ export default { if (valid) { this.buttonLoading = true; if (this.form.id != null) { - updateProPlan(this.form).then(response => { + const payload = { + ...this.form, + designer: Array.isArray(this.form.designer) + ? this.form.designer.join(",") + : this.form.designer + }; + updateProPlan(payload).then(response => { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); @@ -349,7 +365,13 @@ export default { this.buttonLoading = false; }); } else { - addProPlan(this.form).then(response => { + const payload = { + ...this.form, + designer: Array.isArray(this.form.designer) + ? this.form.designer.join(",") + : this.form.designer + }; + addProPlan(payload).then(response => { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -380,6 +402,25 @@ export default { this.download('system/proPlan/export', { ...this.queryParams }, `proPlan_${new Date().getTime()}.xlsx`) + }, + parseDesignerArray(v) { + if (!v) return []; + if (Array.isArray(v)) return v.filter(Boolean).map(x => String(x)); + if (typeof v === "string") { + return v.split(",").map(s => s.trim()).filter(s => s.length > 0); + } + return []; + }, + getDesignerLabels(value) { + const opts = (this.dict && this.dict.type && this.dict.type.plan_proer) || []; + const codes = this.parseDesignerArray(value); + return codes.map(c => { + const m = opts.find(o => + String(o.value) === String(c) || + String((o.dictValue || "")) === String(c) + ) || null; + return m ? (m.label || m.dictLabel || c) : c; + }); } } }; diff --git a/src/views/system/productionPlan/index.vue b/src/views/system/productionPlan/index.vue index ebe96fb..8063980 100644 --- a/src/views/system/productionPlan/index.vue +++ b/src/views/system/productionPlan/index.vue @@ -324,10 +324,10 @@ export default { ...this.searchParams, text: this.options.find(option => option.value === this.value).label }; - + // 调用后端API进行查询 listProcedureGX(params).then(response => { - // 处理返回的数据 + // 处理返回的数据 if (response && Array.isArray(response)) { // ... // 这里的数据处理逻辑和selectChange方法中的类似 diff --git a/src/views/system/route/fromed.vue b/src/views/system/route/fromed.vue index 9b1df30..b57385b 100644 --- a/src/views/system/route/fromed.vue +++ b/src/views/system/route/fromed.vue @@ -84,6 +84,7 @@ :model="n" ref="ruleForm" size="mini" + :key="i" :rules="rules" > diff --git a/src/views/system/route/index.vue b/src/views/system/route/index.vue index 6e63be4..24b4165 100644 --- a/src/views/system/route/index.vue +++ b/src/views/system/route/index.vue @@ -5,7 +5,7 @@ + placeholder="请输入令号" clearable :loading="loading"> @@ -13,81 +13,60 @@ 搜索 重置 + - 导出 + v-hasPermi="['system:route:export']">导出 导入工艺 + v-hasPermi="['system:route:importRoute']">导入工艺 导入时间 + v-hasPermi="['system:route:importDataTime']">导入时间 推送工艺 + v-hasPermi="['system:route:pushRouteBom']">推送工艺 - + 更新计划时间 + v-hasPermi="['system:route:updateProcessPlan']">更新计划时间 更新生产订单 + v-hasPermi="['system:route:updateProcesTime']">更新生产订单 生成PDF + v-hasPermi="['system:route:generatePDFs']">生成PDF 获取标准工艺 + v-hasPermi="['system:route:getKindeeExcel']">获取标准工艺 获取全部工艺 + v-hasPermi="['system:route:getAllRouteAndUse']">获取全部工艺 @@ -95,32 +74,31 @@ + :tree-props="{ children: 'children' }" :data="form.routeList" stripe :row-class-name="tableRowClassName" border + max-height="680px" @cell-click="cellhand" :default-expand-all="true" @selection-change="handleSelectionChange"> - + - - + + - - + +