|
|
@ -247,8 +247,8 @@ |
|
|
<el-input class="inlineNumber numInput" v-model="modalData1.overheadCost" @input="validateInput" style="width: 221px"></el-input> |
|
|
<el-input class="inlineNumber numInput" v-model="modalData1.overheadCost" @input="validateInput" style="width: 221px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="单位人工成本:" prop="laborCost" :rules="rules.laborCost"> |
|
|
|
|
|
<el-input class="inlineNumber numInput" v-model="modalData1.laborCost" @input="validateInput" style="width: 221px"></el-input> |
|
|
|
|
|
|
|
|
<el-form-item label="单位人工成本:" prop="unitCost" :rules="rules.laborCost"> |
|
|
|
|
|
<el-input class="inlineNumber numInput" v-model="modalData1.unitCost" @input="validateInput" style="width: 221px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item :label="'启用日期:'" > |
|
|
<el-form-item :label="'启用日期:'" > |
|
|
@ -280,8 +280,6 @@ |
|
|
<el-button type="primary" @click="modalFlag1 = false">关闭</el-button> |
|
|
<el-button type="primary" @click="modalFlag1 = false">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -292,13 +290,12 @@ import { |
|
|
updateLabor,//修改人工等级 |
|
|
updateLabor,//修改人工等级 |
|
|
deleteLabor,//删除人工等级 |
|
|
deleteLabor,//删除人工等级 |
|
|
findByLabor,//查询(获取单个详情数据) |
|
|
findByLabor,//查询(获取单个详情数据) |
|
|
|
|
|
|
|
|
|
|
|
appendByLaborClass,//成本新增 |
|
|
|
|
|
queryByLaborClass, //成本查询 |
|
|
|
|
|
amendByLaborClass,//成本修改 |
|
|
|
|
|
deleteByLaborClass,//删除成本 |
|
|
} from "@/api/fanucGroup/labor.js" |
|
|
} from "@/api/fanucGroup/labor.js" |
|
|
import { |
|
|
|
|
|
appendByCost,//成本新增 |
|
|
|
|
|
queryCostByLabor, //成本查询 |
|
|
|
|
|
amendByCost,//成本修改 |
|
|
|
|
|
deleteByCost,//删除成本 |
|
|
|
|
|
} from "@/api/fanucGroup/fanuc.js" |
|
|
|
|
|
import {getSiteAndBuByUserName //获取bu |
|
|
import {getSiteAndBuByUserName //获取bu |
|
|
} from "@/api/eam/eam.js" |
|
|
} from "@/api/eam/eam.js" |
|
|
export default { |
|
|
export default { |
|
|
@ -364,11 +361,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
modalData1:{ |
|
|
modalData1:{ |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
workCenterNo: '', |
|
|
|
|
|
|
|
|
classNo: '', |
|
|
itemNo: '', |
|
|
itemNo: '', |
|
|
unitCost: '', |
|
|
unitCost: '', |
|
|
overheadCost: '', |
|
|
overheadCost: '', |
|
|
laborCost: '', |
|
|
|
|
|
umId: '', |
|
|
umId: '', |
|
|
beginDate: '', |
|
|
beginDate: '', |
|
|
endDate: '', |
|
|
endDate: '', |
|
|
@ -744,11 +740,11 @@ export default { |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 501003, |
|
|
functionId: 501003, |
|
|
serialNumber: '501003TableSerialNo', |
|
|
|
|
|
|
|
|
serialNumber: '501003TableItemNo', |
|
|
tableId: "501003Table", |
|
|
tableId: "501003Table", |
|
|
tableName: "序号", |
|
|
tableName: "序号", |
|
|
columnWidth: 130, |
|
|
columnWidth: 130, |
|
|
columnProp: 'serialNo', |
|
|
|
|
|
|
|
|
columnProp: 'itemNo', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: "right", |
|
|
align: "right", |
|
|
columnLabel: '序号', |
|
|
columnLabel: '序号', |
|
|
@ -759,35 +755,17 @@ export default { |
|
|
status: true, |
|
|
status: true, |
|
|
fixed: '', |
|
|
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, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 501003, |
|
|
functionId: 501003, |
|
|
serialNumber: '501003TableOverheadCost', |
|
|
|
|
|
|
|
|
serialNumber: '501003TableUnitCost', |
|
|
tableId: "501003Table", |
|
|
tableId: "501003Table", |
|
|
tableName: "单位制造费用成本", |
|
|
|
|
|
|
|
|
tableName: "单位人工成本", |
|
|
columnWidth: 130, |
|
|
columnWidth: 130, |
|
|
columnProp: 'overheadCost', |
|
|
|
|
|
|
|
|
columnProp: 'unitCost', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: "right", |
|
|
align: "right", |
|
|
columnLabel: '单位制造费用成本', |
|
|
|
|
|
|
|
|
columnLabel: '单位人工成本', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -798,14 +776,14 @@ export default { |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 501003, |
|
|
functionId: 501003, |
|
|
serialNumber: '501003TableLaborCost', |
|
|
|
|
|
|
|
|
serialNumber: '501003TableOverheadCost', |
|
|
tableId: "501003Table", |
|
|
tableId: "501003Table", |
|
|
tableName: "单位人工成本", |
|
|
|
|
|
|
|
|
tableName: "单位制造费用成本", |
|
|
columnWidth: 130, |
|
|
columnWidth: 130, |
|
|
columnProp: 'laborCost', |
|
|
|
|
|
|
|
|
columnProp: 'overheadCost', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: "right", |
|
|
align: "right", |
|
|
columnLabel: '单位人工成本', |
|
|
|
|
|
|
|
|
columnLabel: '单位制造费用成本', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -904,13 +882,6 @@ export default { |
|
|
trigger: ['blur', 'change'] |
|
|
trigger: ['blur', 'change'] |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
laborCost: [ |
|
|
|
|
|
{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: ['blur', 'change'] |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
|
|
|
}, |
|
|
}, |
|
|
options: [], |
|
|
options: [], |
|
|
userBuList: [], |
|
|
userBuList: [], |
|
|
@ -1033,7 +1004,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
refreshCurrentTabTable2(){ |
|
|
refreshCurrentTabTable2(){ |
|
|
queryCostByLabor(this.currentRow).then(({data}) => { |
|
|
|
|
|
|
|
|
queryByLaborClass(this.currentRow).then(({data}) => { |
|
|
//区分请求成功和失败的状况 |
|
|
//区分请求成功和失败的状况 |
|
|
if (data && data.code == 0) { |
|
|
if (data && data.code == 0) { |
|
|
this.dataList2 = data.rows |
|
|
this.dataList2 = data.rows |
|
|
@ -1160,12 +1131,10 @@ export default { |
|
|
this.modalData1 = { |
|
|
this.modalData1 = { |
|
|
flag1: '1', |
|
|
flag1: '1', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
// workCenterNo: this.currentRow.workCenterNo, |
|
|
|
|
|
laborClassId: this.currentRow.id, |
|
|
|
|
|
|
|
|
classNo: this.currentRow.classNo, |
|
|
itemNo: '', |
|
|
itemNo: '', |
|
|
unitCost: '', |
|
|
unitCost: '', |
|
|
overheadCost: '', |
|
|
overheadCost: '', |
|
|
laborCost: '', |
|
|
|
|
|
umId: '', |
|
|
umId: '', |
|
|
beginDate: this.formatDate(new Date()), |
|
|
beginDate: this.formatDate(new Date()), |
|
|
endDate: '', |
|
|
endDate: '', |
|
|
@ -1180,12 +1149,10 @@ export default { |
|
|
this.modalData1 = { |
|
|
this.modalData1 = { |
|
|
flag1: '2', |
|
|
flag1: '2', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
workCenterNo: this.currentRow.workCenterNo, |
|
|
|
|
|
id:row.id, |
|
|
|
|
|
|
|
|
classNo: this.currentRow.classNo, |
|
|
itemNo: row.itemNo, |
|
|
itemNo: row.itemNo, |
|
|
unitCost: row.unitCost, |
|
|
unitCost: row.unitCost, |
|
|
overheadCost: row.overheadCost, |
|
|
overheadCost: row.overheadCost, |
|
|
laborCost: row.laborCost, |
|
|
|
|
|
umId: row.umid, |
|
|
umId: row.umid, |
|
|
beginDate: row.beginDate, |
|
|
beginDate: row.beginDate, |
|
|
endDate: row.endDate, |
|
|
endDate: row.endDate, |
|
|
@ -1202,9 +1169,9 @@ export default { |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
deleteByCost(row).then(({data}) => { |
|
|
|
|
|
|
|
|
deleteByLaborClass(row).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
// this.changeData() |
|
|
|
|
|
|
|
|
this.changeData() |
|
|
this.refreshCurrentTabTable2() |
|
|
this.refreshCurrentTabTable2() |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '操作成功', |
|
|
message: '操作成功', |
|
|
@ -1226,11 +1193,11 @@ export default { |
|
|
// 新增/修改方法 |
|
|
// 新增/修改方法 |
|
|
saveData1 () { |
|
|
saveData1 () { |
|
|
if (this.modalData1.flag1 === '1') { // 新增 |
|
|
if (this.modalData1.flag1 === '1') { // 新增 |
|
|
if (this.modalData1.laborClassId ==null || this.modalData1.laborClassId === ''){ |
|
|
|
|
|
|
|
|
if (this.modalData1.classNo ==null || this.modalData1.classNo === ''){ |
|
|
this.$message.warning('请选择一条人工等级数据!') |
|
|
this.$message.warning('请选择一条人工等级数据!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
appendByCost(this.modalData1).then(({data}) => { |
|
|
|
|
|
|
|
|
appendByLaborClass(this.modalData1).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.refreshCurrentTabTable2() |
|
|
this.refreshCurrentTabTable2() |
|
|
@ -1249,7 +1216,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} else { // 修改 |
|
|
} else { // 修改 |
|
|
amendByCost(this.modalData1).then(({data}) => { |
|
|
|
|
|
|
|
|
amendByLaborClass(this.modalData1).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.refreshCurrentTabTable2() |
|
|
this.refreshCurrentTabTable2() |
|
|
|