diff --git a/src/api/costCalculation.js b/src/api/costCalculation.js index d9380e1..100a7a5 100644 --- a/src/api/costCalculation.js +++ b/src/api/costCalculation.js @@ -2,7 +2,7 @@ import request from "@/service/request"; /*新增版本号*/ export function costStandardVersionAdd(data) { - return request.post("/costStandardVersion/add", {}, data, { + return request.post("/costCount/addCostCountTask", {}, data, { message: { success: "生成成功", error: true @@ -11,7 +11,7 @@ export function costStandardVersionAdd(data) { } // 查询列表 export function costStandardList(params) { - return request.get(`/costStandard/list`, params); + return request.get(`/costCount/list`, params); } //删除 export function deleteCostStandard(data) { diff --git a/src/api/modelManagement.js b/src/api/modelManagement.js index 847c060..6e0533a 100644 --- a/src/api/modelManagement.js +++ b/src/api/modelManagement.js @@ -3,30 +3,42 @@ import request from "@/service/request"; export function modelList(params) { return request.get(`/cost-model/pageList`, params); } -// /*新增小时费率*/ -// export function addHourRate(data) { -// return request.post("/hourRate/add", {}, data, { -// message: { -// success: "新增成功", -// error: true -// } -// }); -// } -// /*编辑小时费率*/ -// export function editHourRate(data) { -// return request.post("/hourRate/edit", {}, data, { -// message: { -// success: "编辑成功", -// error: true -// } -// }); -// } +/*新增*/ +export function addModel(data) { + return request.post("/cost-model/add", {}, data, { + message: { + success: "新增成功", + error: true + } + }); +} +/*编辑*/ +export function editCostModel(data) { + return request.post("/cost-model/edit", {}, data, { + message: { + success: "编辑成功", + error: true + } + }); +} /*删除*/ export function deleteModel(data) { - return request.post("/cost-model/delete",{}, data,{ + return request.delete("/cost-model/delete", data,{ message: { success: "删除成功", error: true } }); } +/*获取流程管理员列表*/ +export function listAll() { + return request.get(`/sys/user/listAll`); +} +/*获取环境配置*/ +export function environmentList(params) { + return request.get(`/api/environment/list`, params); +} +/*获取操作系统租户*/ +export function tenantList(params) { + return request.get(`/api/tenant/list`, params); +} diff --git a/src/api/singleLineQuery.js b/src/api/singleLineQuery.js index 7f48de7..ca71142 100644 --- a/src/api/singleLineQuery.js +++ b/src/api/singleLineQuery.js @@ -5,8 +5,8 @@ export function costStandardDetailList(params) { return request.get(`/costStandardDetail/list`, params); } /*导出excel*/ -export function exportcostStandardDetail(data) { - return request.get("/costStandardDetail/exportXls", data, { +export function exportcostStandardDetail(params) { + return request.get("/costStandardDetail/exportXls", params,{ responseType:"blob"}, { message: { success: "导出成功", error: true diff --git a/src/platform.ts b/src/platform.ts index 8592fe4..4656ffc 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -60,6 +60,24 @@ export const qomoPlatformOptions = { label: "物流费", value: "LogisticsFee" } + ], + statusList:[ + { + label: "未执行", + value: "0" + }, + { + label: "计算中", + value: "1" + }, + { + label: "计算完成", + value: "2" + }, + { + label: "出错中止", + value: "3" + }, ] }, async provider(dictType) { diff --git a/src/router/index.js b/src/router/index.js index 3548605..a3efd8b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -165,6 +165,66 @@ export const constantRoutes = [ } ] }, + { + path: '', + component: Layout, + children: [ + { + path: "standardComparison/index", + component: () => import("@/views/standardComparison/index"), + name: "Standardcomparison", + meta: { title: "标准成本对比", icon: "tree", affix: true } + } + ] + }, + { + path: '', + component: Layout, + children: [ + { + path: "standardComparison/manHour", + component: () => import("@/views/standardComparison/component/manHour"), + name: "ManHour", + hidden: true, + } + ] + }, + { + path: '', + component: Layout, + children: [ + { + path: "standardComparison/artificial", + component: () => import("@/views/standardComparison/component/artificial"), + name: "Artificial", + hidden: true, + } + ] + }, + { + path: '', + component: Layout, + children: [ + { + path: "standardComparison/materials", + component: () => import("@/views/standardComparison/component/materials"), + name: "Materials", + hidden: true, + } + ] + }, + { + path: '', + component: Layout, + children: [ + { + path: "stageComparison/index", + component: () => import("@/views/stageComparison/index"), + name: "StageComparison", + meta: { title: "阶段成本对比", icon: "tree", affix: true } + } + ] + }, // Bom,工序,采购价格 ]; diff --git a/src/views/convolution/costCalculation/component/calculate.vue b/src/views/convolution/costCalculation/component/calculate.vue index 4641680..13a4bc9 100644 --- a/src/views/convolution/costCalculation/component/calculate.vue +++ b/src/views/convolution/costCalculation/component/calculate.vue @@ -1,120 +1,159 @@ diff --git a/src/views/convolution/costCalculation/index.vue b/src/views/convolution/costCalculation/index.vue index 5d2dff8..00d6533 100644 --- a/src/views/convolution/costCalculation/index.vue +++ b/src/views/convolution/costCalculation/index.vue @@ -13,27 +13,12 @@ export default defineComponent({ //列 const columns = ref([ { type: "selection" }, - { label: "版本号", prop: "versionNumber" }, - { label: "年份", prop: "versionYear", valueType: "year" }, - { label: "物料编号", prop: "materialNumber" }, - { prop: "bomCost", label: "bom材料费", hideInAddOrEditForm: true, hideInSearchForm: true }, - { label: "包装费", prop: "packingCost", hideInSearchForm: true }, - { label: "辅料费", prop: "auxiliaryCost", hideInSearchForm: true }, - { label: "人工费", prop: "laborCost", hideInSearchForm: true }, - { label: "机器折旧费", prop: "euipDepreciationCost", hideInSearchForm: true }, - { label: "机器料消耗费", prop: "equipConsumeCost", hideInSearchForm: true }, - { label: "水电费", prop: "hydroelectricityCost", hideInSearchForm: true }, - { label: "其他制造费", prop: "otherCost", hideInSearchForm: true }, - { label: "物流费用", prop: "trailCost", hideInSearchForm: true }, - { label: "制造成本", prop: "manufactureCost", hideInSearchForm: true }, - { label: "工装费", prop: "toolingCost", hideInSearchForm: true }, - { label: "检具费", prop: "inspectionCost", hideInSearchForm: true }, - { label: "模具费", prop: "moldCost", hideInSearchForm: true }, - { label: "测试费", prop: "testCost", hideInSearchForm: true }, + { label: "版本号", prop: "costVersion" }, + { label: "年份", prop: "year", valueType: "year" }, + { label: "物料编号", prop: "materialNo" }, { label: "创建日期", prop: "createTime", hideInSearchForm: true, valueType: "datetime" }, { label: "阶段", prop: "stage", valueType: 'dict-select', extraProps: { dictType: 'stageData' } }, - { label: "版本状态", prop: "versionStatus" }, - { label: "总成本", prop: "totalCost", hideInSearchForm: true }, + { label: "状态", prop: "status",valueType: 'dict-select',extraProps: { dictType: 'statusList' } }, { type: "operation", label: "操作", diff --git a/src/views/convolution/singleLineQuery/index.vue b/src/views/convolution/singleLineQuery/index.vue index fba8d30..a6bfff3 100644 --- a/src/views/convolution/singleLineQuery/index.vue +++ b/src/views/convolution/singleLineQuery/index.vue @@ -3,6 +3,7 @@ import { defineComponent, ref } from "vue"; import { costStandardDetailList,exportcostStandardDetail } from "@/api/singleLineQuery.js"; import { transformPageResponse } from "@/utils/qomo"; +import { download } from "@qomo-platform/utils"; import { ElMessage } from "element-plus"; export default defineComponent({ setup() { @@ -14,20 +15,24 @@ export default defineComponent({ { label: "版本号", prop: "versionNumber" }, { label: "层级", prop: "level", hideInSearchForm: true }, { label: "图号", prop: "figureNumber", hideInSearchForm: true }, - { label: "规格", prop: "specification", hideInSearchForm: true }, { label: "用量", prop: "dosage", hideInSearchForm: true }, - { label: "bom材料费", prop: "bomCost", hideInSearchForm: true }, - { label: "本阶人工费", prop: "laborCost", hideInSearchForm: true }, - { label: "机器折旧费", prop: "euipDepreciationCost", hideInSearchForm: true }, - { label: "水电费", prop: "hydroelectricityCost", hideInSearchForm: true }, - { label: "本阶辅料费", prop: "auxiliaryCost", hideInSearchForm: true }, - { label: "其他制造费", prop: "otherCost", hideInSearchForm: true }, - // { label: "累计bom材料费", prop: "date123", hideInSearchForm: true }, - { label: "累计人工费", prop: "totalLaborCost", hideInSearchForm: true }, - // { label: "累计设备费", prop: "date123", hideInSearchForm: true }, - { label: "累计水电费", prop: "totalHydroelectricityCost", hideInSearchForm: true }, - // { label: "累计辅料费", prop: "date123", hideInSearchForm: true }, + { label: "单位", prop: "unit", hideInSearchForm: true }, + { label: "本阶物料成本", prop: "materialCost", hideInSearchForm: true }, + { label: "本阶人工成本", prop: "laborCost", hideInSearchForm: true }, + { label: "本阶设备费", prop: "equipmentCost", hideInSearchForm: true }, + { label: "本阶燃动费", prop: "driveCost", hideInSearchForm: true }, + { label: "本阶辅料费", prop: "supplyMaterialCost", hideInSearchForm: true }, + { label: "本阶其他费", prop: "otherCost", hideInSearchForm: true }, + { label: "本阶物流费", prop: "logisticsCost", hideInSearchForm: true }, + { label: "本阶标准成本", prop: "currentStandardCost", hideInSearchForm: true }, + { label: "累计物料成本", prop: "totalMaterialCost", hideInSearchForm: true }, + { label: "累计人工成本", prop: "totalLaborCost", hideInSearchForm: true }, + { label: "累计设备费", prop: "totalEquipmentCost", hideInSearchForm: true }, + { label: "累计燃动费", prop: "totalDriveCost", hideInSearchForm: true }, + { label: "累计辅料费", prop: "totalSupplyMaterialCost", hideInSearchForm: true }, { label: "累计其他费", prop: "totalOtherCost", hideInSearchForm: true }, + { label: "累计物流成本", prop: "totalLogisticsCost", hideInSearchForm: true }, + { label: "累计标准成本", prop: "totalCurrentStandardCost", hideInSearchForm: true }, ]); const render = () => { @@ -62,7 +67,9 @@ export default defineComponent({ ); }; const handleExport = () => { - exportcostStandardDetail(tableRef.value.selectionRows ? {selections:tableRef.value.selectionRows.map(item => item.id).join(',')} : {} ) + exportcostStandardDetail(tableRef.value.selectionRows ? {selections:tableRef.value.selectionRows.map(item => item.id).join(',')} : {} ).then(res=>{ + download(res, '费用预测明细.xlsx'); + }) }; return render; }, diff --git a/src/views/convolution/treeQuery/index.vue b/src/views/convolution/treeQuery/index.vue index c44b0c0..c65ae1e 100644 --- a/src/views/convolution/treeQuery/index.vue +++ b/src/views/convolution/treeQuery/index.vue @@ -35,7 +35,6 @@ export default defineComponent({ await queryBomTree({ ...otherSearchParams }).then((res) => { - console.log(res, "PPPPPPPPPPPPPPPPPPP") treeData.value = addLabelRecursively(res); }); }} @@ -48,56 +47,98 @@ export default defineComponent({
- + - + - - - - - - - - - - - + - - - - - - + - - - + + + - {/* - - + + + - */} - {/* - - + + + + - */} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {/* TODO 分割 */} + diff --git a/src/views/modelManagement/index.vue b/src/views/modelManagement/index.vue index cedacdd..bd47c9d 100644 --- a/src/views/modelManagement/index.vue +++ b/src/views/modelManagement/index.vue @@ -1,41 +1,105 @@ + diff --git a/src/views/standardComparison/component/artificial.vue b/src/views/standardComparison/component/artificial.vue new file mode 100644 index 0000000..1252d1f --- /dev/null +++ b/src/views/standardComparison/component/artificial.vue @@ -0,0 +1,118 @@ + + diff --git a/src/views/standardComparison/component/manHour.vue b/src/views/standardComparison/component/manHour.vue new file mode 100644 index 0000000..77be785 --- /dev/null +++ b/src/views/standardComparison/component/manHour.vue @@ -0,0 +1,73 @@ + + diff --git a/src/views/standardComparison/component/materials.vue b/src/views/standardComparison/component/materials.vue new file mode 100644 index 0000000..e82230a --- /dev/null +++ b/src/views/standardComparison/component/materials.vue @@ -0,0 +1,75 @@ + + diff --git a/src/views/standardComparison/index.vue b/src/views/standardComparison/index.vue new file mode 100644 index 0000000..2aca776 --- /dev/null +++ b/src/views/standardComparison/index.vue @@ -0,0 +1,216 @@ + + diff --git a/src/views/test/index.vue b/src/views/test/index.vue index a681f95..d1a1515 100644 --- a/src/views/test/index.vue +++ b/src/views/test/index.vue @@ -18,9 +18,11 @@ import { transformPageResponse } from "@/utils/qomo"; import _ from "lodash"; import { download } from "@qomo-platform/utils"; import request from "@/service/request"; +import { useRoute } from 'vue-router'; export default defineComponent({ name: "flowableOptions", setup(props, { attrs, expose, slots = {} }) { + const route = useRoute(); const { dialogRef, ...exposeDialogArgs } = useExposeDialogArgs(); return () => ( @@ -33,7 +35,7 @@ export default defineComponent({ return data; }} saveRequest={async data => { - data.id = '19'; + data.id = route.query.id; data.topMaterialCode = 'mn001'; await saveFlowModel(data); //await saveMode(data); diff --git a/vite.config.js b/vite.config.js index 8180e50..16d222c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -55,7 +55,8 @@ export default defineConfig(({ mode, command }) => { // https://cn.vitejs.dev/config/#server-proxy "/qomo": { // target: "http://172.16.0.241:8095", //wq - target: "http://172.16.0.162:8082", //bgy + // target: "http://172.16.0.162:8082", //bgy + target: "http://172.16.2.127:8082", //bgy远程 // target: "http://192.168.50.9:2999",//中智平台 changeOrigin: true, pathRewrite: {