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": { "moment": {
"version": "2.30.1", "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==" "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="
}, },
"move-concurrently": { "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 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-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()

Loading…
Cancel
Save