diff --git a/src/api/system/materials.js b/src/api/system/materials.js index 8f44371..0291f5e 100644 --- a/src/api/system/materials.js +++ b/src/api/system/materials.js @@ -42,3 +42,10 @@ export function delMaterials(id) { method: 'delete' }) } +// 推送金蝶 +export function addToK3() { + return request({ + url: '/system/materials/addToK3', + method: 'post' + }) +} \ No newline at end of file diff --git a/src/api/system/route.js b/src/api/system/route.js index 8f34a0a..3c3594e 100644 --- a/src/api/system/route.js +++ b/src/api/system/route.js @@ -172,3 +172,19 @@ export function listMaterial(query) { params: query }) } + +// 获取工艺路线列表 +export function getProcessRouteList(materialCode, materialName, productionOrderNo) { + return request({ + url: '/system/route/getProcessRouteList', + method: 'get', + params: { + materialCode, + materialName, + productionOrderNo + } + }) + + + +} diff --git a/src/api/system/stockData.js b/src/api/system/stockData.js index 04f431c..bba7e17 100644 --- a/src/api/system/stockData.js +++ b/src/api/system/stockData.js @@ -42,9 +42,20 @@ export function delStockData(id) { method: 'delete' }) } + export function generateDoc() { return request({ - url: '/system/stockData/generateDoc', // 这个路径应该和你的后端接口路径一致 - method: 'post' + url: '/system/stockData/generateDoc', + method: 'post', + timeout: 10 * 1000 * 60 }); } + +export function logs(lastIndex) { + return request({ + url: `/system/stockData/logs?lastIndex=${lastIndex}`, + method: 'get' + }); +} + + diff --git a/src/api/system/workCenterData.js b/src/api/system/workCenterData.js new file mode 100644 index 0000000..caf3712 --- /dev/null +++ b/src/api/system/workCenterData.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询金蝶工段数据列表 +export function listWorkCenterData(query) { + return request({ + url: '/system/workCenterData/list', + method: 'get', + params: query + }) +} + +// 查询金蝶工段数据详细 +export function getWorkCenterData(id) { + return request({ + url: '/system/workCenterData/' + id, + method: 'get' + }) +} + +// 新增金蝶工段数据 +export function addWorkCenterData(data) { + return request({ + url: '/system/workCenterData', + method: 'post', + data: data + }) +} + +// 修改金蝶工段数据 +export function updateWorkCenterData(data) { + return request({ + url: '/system/workCenterData', + method: 'put', + data: data + }) +} + +// 删除金蝶工段数据 +export function delWorkCenterData(id) { + return request({ + url: '/system/workCenterData/' + id, + method: 'delete' + }) +} diff --git a/src/router/index.js b/src/router/index.js index 4247ded..072d7e0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -30,6 +30,24 @@ import Layout from '@/layout' // 公共路由 export const constantRoutes = [ + { + path: '/', + component: Layout, + hidden: false, + redirect: '/home' + }, + { + path: '/home', + component: Layout, + hidden: true, + redirect: '/system/productionPlan', + children: [ + { + path: '/system/productionPlan', + component: () => import('@/views/system/productionPlan') + } + ] + }, { path: '/redirect', component: Layout, diff --git a/src/views/login.vue b/src/views/login.vue index f2328d6..31f36bb 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -141,7 +141,7 @@ export default { Cookies.remove('rememberMe'); } this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); + this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); }).catch(() => { this.loading = false; if (this.captchaEnabled) { diff --git a/src/views/system/details/index.vue b/src/views/system/details/index.vue index ba5ffbe..422d494 100644 --- a/src/views/system/details/index.vue +++ b/src/views/system/details/index.vue @@ -145,7 +145,7 @@ + :data="detailsList" border :header-cell-style ="{'text-align':'center'}" @selection-change="handleSelectionChange"> @@ -163,7 +163,7 @@ - + @@ -238,8 +238,8 @@ - - + + @@ -301,10 +301,14 @@ import {listDetails, getDetails, delDetails, addDetails, updateDetails, updateFB import upload from "svg-sprite-loader/examples/custom-runtime-generator/build/main"; import {getToken} from "@/utils/auth"; import axios from "axios"; +import {align} from "quill/ui/icons"; export default { name: "Details", computed: { + align() { + return align + }, upload() { return upload } @@ -343,6 +347,7 @@ export default { name: undefined, stats: undefined, quantity: undefined, + denominator:undefined, material: undefined, unitWeight: undefined, totalWeight: undefined, diff --git a/src/views/system/materials/index.vue b/src/views/system/materials/index.vue index 9510237..9d304db 100644 --- a/src/views/system/materials/index.vue +++ b/src/views/system/materials/index.vue @@ -2,60 +2,43 @@
- + - + - + - + - - + + + + + + + + + + + + + + + + + + - + - + 搜索 @@ -65,112 +48,132 @@ - 新增 + 新增 - 修改 + 修改 - 删除 + 删除 - 导出 + 导出 + + 推送金蝶 + + + + 导入 + + + + 导出数据 + + - + - - - - - + + + + + + + + - + - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + - + + + + + + +
将文件拖到此处,或点击上传
+
+ 仅允许导入xls、xlsx格式文件。 +
+
+ +
+ diff --git a/src/views/system/productionPlan/index.vue b/src/views/system/productionPlan/index.vue index 7852a4c..65cc439 100644 --- a/src/views/system/productionPlan/index.vue +++ b/src/views/system/productionPlan/index.vue @@ -10,6 +10,14 @@ +
+ 工作中心: + + + + +
+
在产主要项目进度分析
@@ -54,7 +62,20 @@ export default { value: '8', label: '外购 件' }], - value: '1' + value: '1', + searchParams: { + workCenter: '' + }, + workCenterOptions: [ + { + value: '车间1', + label: '车间1' + }, + { + value: '车间2', + label: '车间2' + } + ] } }, created() { @@ -233,6 +254,30 @@ export default { console.error('Error fetching tasks:', error); this.loading = false; }) + }, + + search() { + // 构建查询参数 + const params = { + ...this.searchParams, + text: this.options.find(option => option.value === this.value).label + }; + + // 调用后端API进行查询 + listProcedureGX(params).then(response => { + // 处理返回的数据 + if (response && Array.isArray(response)) { + // ... + // 这里的数据处理逻辑和selectChange方法中的类似 + // ... + gantt.clearAll(); + gantt.parse(this.tasks); + } else { + console.error('Invalid response data:', response); + } + }).catch(error => { + console.error('Error fetching tasks:', error); + }); } }, @@ -241,6 +286,7 @@ export default { this.initData() gantt.config.autofit = true; + gantt.config.autosize = true; //自适应甘特图的尺寸大小, 使得在不出现滚动条的情况下, 显示全部任务 gantt.config.autosize = true //只读模式 @@ -261,19 +307,11 @@ export default { node.setAttribute("class", "gantt_cell gantt_last_cell gantt_cell_tree " + task.status); } }, + {name: "materialCode", label: "物料编码", width: 120, resize: true, align: "left"}, + {name: "materialName", label: "物料名称", width: 150, resize: true, align: "left"}, {name: "start_date", label: "开始时间", width: 120, resize: true, align: "left"}, - {name: "day", label: "天数", width: 56, resize: true, align: "left"}, - {name: 'end_date', label: '完成时间', min_width: 120, resize: true, align: "left"}, - // { - // name: 'duration', - // label: '时长', - // align: 'center', - // template: function (obj) { - // return obj.duration + '天' - // }, - // hide: true - // }, - + {name: "duration", label: "天数", width: 80, resize: true, align: "center"}, + {name: 'end_date', label: '完成时间', width: 120, resize: true, align: "left"}, ] @@ -542,10 +580,10 @@ export default { html, body { + width: 100%; + height: 100%; margin: 0; padding: 0; - height: 100%; - overflow: auto; } .container { @@ -673,4 +711,24 @@ body { text-align: left; padding-left: 10px; } + +.search-item { + display: flex; + align-items: center; + margin-left: 20px; +} + +.search-item span { + margin-right: 10px; +} + +.gantt-container { + width: 100%; + height: 100%; +} + +#app { + width: 100%; + height: 100%; +} diff --git a/src/views/system/role/selectUser.vue b/src/views/system/role/selectUser.vue index b2b072f..3dfd8b8 100644 --- a/src/views/system/role/selectUser.vue +++ b/src/views/system/role/selectUser.vue @@ -32,7 +32,7 @@ @@ -58,8 +58,11 @@ diff --git a/src/views/system/workCenterData/index.vue b/src/views/system/workCenterData/index.vue new file mode 100644 index 0000000..3b5c781 --- /dev/null +++ b/src/views/system/workCenterData/index.vue @@ -0,0 +1,492 @@ + + +