diff --git a/package-lock.json b/package-lock.json index 44d5adf..dd8bca1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10107,7 +10107,7 @@ }, "moment": { "version": "2.30.1", - "resolved": "https://mirrors.cloud.tencent.com/npm/moment/-/moment-2.30.1.tgz", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" }, "move-concurrently": { diff --git a/src/api/fanucGroup/labor.js b/src/api/fanucGroup/labor.js index 0348890..3cdf5ec 100644 --- a/src/api/fanucGroup/labor.js +++ b/src/api/fanucGroup/labor.js @@ -15,6 +15,15 @@ export const deleteLabor= data => createAPI(`/labor/delete`,'post',data) //查询(获取单个数据) export const findByLabor= data => createAPI(`/labor/queryById`,'post',data) +//成本新增 +export const appendByLaborClass= data => createAPI(`/LaborClass/append`,'post',data) +//成本查询(绑定加工中心) +export const queryByLaborClass= data => createAPI(`/LaborClass/queryAll`,'post',data) +//成本修改 +export const amendByLaborClass= data => createAPI(`/LaborClass/amend`,'post',data) +//成本删除 +export const deleteByLaborClass= data => createAPI(`/LaborClass/delete`,'post',data) + diff --git a/src/views/modules/fanuc/labor.vue b/src/views/modules/fanuc/labor.vue index a32368e..c4fc4dd 100644 --- a/src/views/modules/fanuc/labor.vue +++ b/src/views/modules/fanuc/labor.vue @@ -247,8 +247,8 @@ - - + + @@ -280,8 +280,6 @@ 关闭 - - @@ -292,13 +290,12 @@ import { updateLabor,//修改人工等级 deleteLabor,//删除人工等级 findByLabor,//查询(获取单个详情数据) + + appendByLaborClass,//成本新增 + queryByLaborClass, //成本查询 + amendByLaborClass,//成本修改 + deleteByLaborClass,//删除成本 } from "@/api/fanucGroup/labor.js" -import { - appendByCost,//成本新增 - queryCostByLabor, //成本查询 - amendByCost,//成本修改 - deleteByCost,//删除成本 -} from "@/api/fanucGroup/fanuc.js" import {getSiteAndBuByUserName //获取bu } from "@/api/eam/eam.js" export default { @@ -364,11 +361,10 @@ export default { }, modalData1:{ site: this.$store.state.user.site, - workCenterNo: '', + classNo: '', itemNo: '', unitCost: '', overheadCost: '', - laborCost: '', umId: '', beginDate: '', endDate: '', @@ -744,11 +740,11 @@ export default { { userId: this.$store.state.user.name, functionId: 501003, - serialNumber: '501003TableSerialNo', + serialNumber: '501003TableItemNo', tableId: "501003Table", tableName: "序号", columnWidth: 130, - columnProp: 'serialNo', + columnProp: 'itemNo', headerAlign: 'center', align: "right", columnLabel: '序号', @@ -759,35 +755,17 @@ export default { status: true, fixed: '', }, - // { - // userId: this.$store.state.user.name, - // functionId: 501003, - // serialNumber: '501003TableUnitCost', - // tableId: "501003Table", - // tableName: "单位成本", - // columnWidth: 130, - // columnProp: 'unitCost', - // headerAlign: 'center', - // align: "right", - // columnLabel: '单位成本', - // columnHidden: false, - // columnImage: false, - // columnSortable: false, - // sortLv: 0, - // status: true, - // fixed: '', - // }, { userId: this.$store.state.user.name, functionId: 501003, - serialNumber: '501003TableOverheadCost', + serialNumber: '501003TableUnitCost', tableId: "501003Table", - tableName: "单位制造费用成本", + tableName: "单位人工成本", columnWidth: 130, - columnProp: 'overheadCost', + columnProp: 'unitCost', headerAlign: 'center', align: "right", - columnLabel: '单位制造费用成本', + columnLabel: '单位人工成本', columnHidden: false, columnImage: false, columnSortable: false, @@ -798,14 +776,14 @@ export default { { userId: this.$store.state.user.name, functionId: 501003, - serialNumber: '501003TableLaborCost', + serialNumber: '501003TableOverheadCost', tableId: "501003Table", - tableName: "单位人工成本", + tableName: "单位制造费用成本", columnWidth: 130, - columnProp: 'laborCost', + columnProp: 'overheadCost', headerAlign: 'center', align: "right", - columnLabel: '单位人工成本', + columnLabel: '单位制造费用成本', columnHidden: false, columnImage: false, columnSortable: false, @@ -904,13 +882,6 @@ export default { trigger: ['blur', 'change'] } ], - laborCost: [ - { - required: true, - message: ' ', - trigger: ['blur', 'change'] - } - ] }, options: [], userBuList: [], @@ -1033,7 +1004,7 @@ export default { }, refreshCurrentTabTable2(){ - queryCostByLabor(this.currentRow).then(({data}) => { + queryByLaborClass(this.currentRow).then(({data}) => { //区分请求成功和失败的状况 if (data && data.code == 0) { this.dataList2 = data.rows @@ -1160,12 +1131,10 @@ export default { this.modalData1 = { flag1: '1', site: this.$store.state.user.site, - // workCenterNo: this.currentRow.workCenterNo, - laborClassId: this.currentRow.id, + classNo: this.currentRow.classNo, itemNo: '', unitCost: '', overheadCost: '', - laborCost: '', umId: '', beginDate: this.formatDate(new Date()), endDate: '', @@ -1180,12 +1149,10 @@ export default { this.modalData1 = { flag1: '2', site: this.$store.state.user.site, - workCenterNo: this.currentRow.workCenterNo, - id:row.id, + classNo: this.currentRow.classNo, itemNo: row.itemNo, unitCost: row.unitCost, overheadCost: row.overheadCost, - laborCost: row.laborCost, umId: row.umid, beginDate: row.beginDate, endDate: row.endDate, @@ -1202,9 +1169,9 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - deleteByCost(row).then(({data}) => { + deleteByLaborClass(row).then(({data}) => { if (data && data.code === 0) { - // this.changeData() + this.changeData() this.refreshCurrentTabTable2() this.$message({ message: '操作成功', @@ -1226,11 +1193,11 @@ export default { // 新增/修改方法 saveData1 () { if (this.modalData1.flag1 === '1') { // 新增 - if (this.modalData1.laborClassId ==null || this.modalData1.laborClassId === ''){ + if (this.modalData1.classNo ==null || this.modalData1.classNo === ''){ this.$message.warning('请选择一条人工等级数据!') return } - appendByCost(this.modalData1).then(({data}) => { + appendByLaborClass(this.modalData1).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.refreshCurrentTabTable2() @@ -1249,7 +1216,7 @@ export default { } }) } else { // 修改 - amendByCost(this.modalData1).then(({data}) => { + amendByLaborClass(this.modalData1).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.refreshCurrentTabTable2()