Browse Source

成本改动

java8
wenkuan.shi 1 year ago
parent
commit
ab5c99c393
  1. 2
      package-lock.json
  2. 9
      src/api/fanucGroup/labor.js
  3. 85
      src/views/modules/fanuc/labor.vue

2
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": {

9
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)

85
src/views/modules/fanuc/labor.vue

@ -247,8 +247,8 @@
<el-input class="inlineNumber numInput" v-model="modalData1.overheadCost" @input="validateInput" style="width: 221px"></el-input>
</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 :label="'启用日期:'" >
@ -280,8 +280,6 @@
<el-button type="primary" @click="modalFlag1 = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
@ -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()

Loading…
Cancel
Save