Browse Source

2024.9.18 一、物料成本信息维护(第二版)

二、加工中心功能改造
三、标准工序(第二版)
四、商品组 - 标准工序(第二版)
五、商品组 - Process Time Matrix(第一版)
java8
yuejiayang 1 year ago
parent
commit
c3d8c47b8b
  1. 19
      src/api/part/partProductGroupPtm.js
  2. 26
      src/views/modules/fanuc/fanuc.vue
  3. 86
      src/views/modules/part/partCostInformation.vue
  4. 862
      src/views/modules/part/partProductGroupInformation.vue
  5. 110
      src/views/modules/part/standardRoutingOperation.vue

19
src/api/part/partProductGroupPtm.js

@ -0,0 +1,19 @@
import { createAPI } from "@/utils/httpRequest.js";
//查询 searchProductGroupPtm
export const searchProductGroupPtmCondition = data => createAPI("/plm/partProductGroupInformation/searchProductGroupPtmCondition", "post", data);
// searchProductGroupPtmConditionItemProcess
export const searchProductGroupPtmConditionItemProcess = data => createAPI("/plm/partProductGroupInformation/searchProductGroupPtmConditionItemProcess", "post", data);
//新增 saveProductGroupPtm
export const saveProductGroupPtm = data => createAPI("/plm/partProductGroupInformation/saveProductGroupPtm", "post", data);
//删除 delProductGroupPtm
export const delProductGroupPtm = data => createAPI("/plm/partProductGroupInformation/delProductGroupPtm", "post", data);
// 编辑属性值接口 updatePtmConditionItemValue
export const updatePtmConditionItemValue = data => createAPI("/plm/partProductGroupInformation/updatePtmConditionItemValue", "post", data);
// 编辑工序值接口 updatePtmConditionProcessValue
export const updatePtmConditionProcessValue = data => createAPI("/plm/partProductGroupInformation/updatePtmConditionProcessValue", "post", data);

26
src/views/modules/fanuc/fanuc.vue

@ -101,52 +101,52 @@
<el-form :inline="true" label-position="top" :model="dataList1">
<el-row style="margin-top: 15px">
<el-form-item :label="'加工中心编码'">
<el-input v-model="dataList1.workshopId" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.workshopId" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'加工中心名称'">
<el-input v-model="dataList1.workCenterDesc" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.workCenterDesc" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'BU'">
<el-input v-model="dataList1.buNo" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.buNo" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'工厂编码'">
<el-input v-model="dataList1.site" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.site" readonly style="width: 300px"></el-input>
</el-form-item>
</el-row>
<el-row style="margin-top: 15px">
<el-form-item :label="'加工中心类型'">
<el-input v-model="dataList1.workCenterType" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.workCenterType" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'加工中心组编码'">
<el-input v-model="dataList1.prolineNo" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.prolineNo" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'平均产能'">
<el-input v-model="dataList1.averageCapacity" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.averageCapacity" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'产能类型'">
<el-input v-model="dataList1.capacityType" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.capacityType" readonly style="width: 300px"></el-input>
</el-form-item>
</el-row>
<el-row style="margin-top: 15px">
<el-form-item :label="'备注'">
<el-input v-model="dataList1.remark" clearable style="width: 1235px"></el-input>
<el-input v-model="dataList1.remark" readonly style="width: 1235px"></el-input>
</el-form-item>
</el-row>
<el-row style="margin-top: 15px">
<el-form-item :label="'录入人'">
<el-input v-model="dataList1.createdBy" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.createdBy" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'录入时间'">
<el-input v-model="dataList1.createdDate" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.createdDate" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'最近修改人'">
<el-input v-model="dataList1.updateBy" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.updateBy" readonly style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="'最近修改时间'">
<el-input v-model="dataList1.updateDate" clearable style="width: 300px"></el-input>
<el-input v-model="dataList1.updateDate" readonly style="width: 300px"></el-input>
</el-form-item>
</el-row>

86
src/views/modules/part/partCostInformation.vue

@ -1,6 +1,16 @@
<template>
<div class="mod-config">
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-form-item :label="'BU'">
<el-select v-model="searchData.bu" placeholder="请选择" clearable style="width: 130px">
<el-option
v-for = "i in userBuList"
:key = "i.buNo"
:label = "i.buDesc"
:value = "i.buNo">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="'物料编码'">
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
@ -57,7 +67,7 @@
</el-pagination>
<!-- 编辑模态框 -->
<el-dialog title="物料成本信息 - 修改" @close="closeDialog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="566px">
<el-dialog title="物料成本信息 - 修改" @close="closeDialog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="596px">
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;">
<el-form :inline="true" label-position="top" :model="modalData">
<el-form-item label="物料编码" prop="partNo">
@ -66,8 +76,8 @@
<el-form-item label="物料描述" prop="partDesc">
<el-input v-model="modalData.partDesc" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="计量单位">
<el-input v-model="modalData.umId" disabled style="width: 50px"></el-input>
<el-form-item label="BU">
<el-input v-model="modalData.buDesc" disabled style="width: 80px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;">
@ -77,6 +87,9 @@
<el-form-item label="物料分类描述" prop="familyName">
<el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input>
</el-form-item>
<el-form-item label="计量单位">
<el-input v-model="modalData.umId" disabled style="width: 80px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: -5px;">
<el-form-item label="产品组编码" prop="otherGroup1">
@ -90,25 +103,25 @@
<el-form-item label="单位标准成本" prop="standardCost">
<el-input v-model="modalData.standardCost" class="inlineNumber numInput" style="width: 107px"></el-input>
</el-form-item>
<el-form-item label="标准成本币" prop="standardCostCurrency" :show-message="false">
<el-form-item label="标准成本币" prop="standardCostCurrency" :show-message="false">
<span slot="label">
<a @click="getBaseList(512)">实际成本币种</a>
<a @click="getBaseList(512)">标准成本货币</a>
</span>
<el-input v-model="modalData.standardCostCurrency" disabled style="width: 108px"></el-input>
<el-input v-model="modalData.standardCostCurrency" disabled style="width: 108px"></el-input>
</el-form-item>
<el-form-item label="单位实际成本" prop="actualCost">
<el-input v-model="modalData.actualCost" class="inlineNumber numInput" style="width: 107px"></el-input>
</el-form-item>
<el-form-item label="实际成本币" prop="actualCostCurrency" :show-message="false">
<el-form-item label="实际成本币" prop="actualCostCurrency" :show-message="false">
<span slot="label">
<a @click="getBaseList(513)">实际成本币</a>
<a @click="getBaseList(513)">实际成本</a>
</span>
<el-input v-model="modalData.actualCostCurrency" disabled style="width: 108px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-top: 0px;">
<el-form-item label="备注" style="height: 80px">
<el-input v-model="modalData.remark" style="width: 535px"></el-input>
<el-input v-model="modalData.remark" style="width: 565px"></el-input>
</el-form-item>
</el-form>
</el-form>
@ -127,6 +140,7 @@ import {partCostInformationSearch,partCostInformationEdit} from "@/api/part/part
import Chooselist from "../common/Chooselist.vue";
import {getSiteAndBuByUserName} from "../../../api/qc/qc";
import ChooseListEam from "../common/Chooselist_eam.vue";
import {verifyData} from "../../../api/part/partInformation";
export default {
components: {
@ -141,10 +155,13 @@ export default {
pageIndex: 1,
pageSize: 50,
totalPage: 0,
userBuList: [],
//
searchData: {
site: '',
userName: this.$store.state.user.name,
bu: '',
buNo: '',
partNo: '',
partDesc: '',
page: 1,
@ -154,8 +171,9 @@ export default {
id: null,
partId: null,
bu: '',
site: this.$store.state.user.site,
site: '',
buNo: '',
sourceBu: '',
partNo: '',
partDesc: '',
umId: '',
@ -179,6 +197,24 @@ export default {
dataList: [],
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 6010011,
serialNumber: '6010011Table2BuDesc',
tableId: '6010011Table2',
tableName: '物料成本表',
columnProp: 'buDesc',
headerAlign: 'center',
align: 'center',
columnLabel: 'BU',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6010011,
@ -350,7 +386,7 @@ export default {
columnProp: 'standardCostCurrency',
headerAlign: 'center',
align: 'center',
columnLabel: '标准成本币',
columnLabel: '标准成本币',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -386,7 +422,7 @@ export default {
columnProp: 'actualCostCurrency',
headerAlign: 'center',
align: 'center',
columnLabel: '实际成本币',
columnLabel: '实际成本币',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -522,14 +558,20 @@ export default {
this.tagNo = val
this.$nextTick(()=>{
let strVal = ''
let conSql = ''
if (val === 512) {
strVal = this.modalData.standardCostCurrency ? this.modalData.standardCostCurrency : ''
this.$refs.baseList.init(val, strVal)
}
if (val === 513) {
strVal = this.modalData.actualCostCurrency ? this.modalData.actualCostCurrency : ''
this.$refs.baseList.init(val, strVal)
}
if (this.modalData.bu === null || this.modalData.bu === '') {
this.$message.warning("请选择BU!")
return
} else {
conSql = " and site = '" + this.modalData.bu.split('-')[0].replace(/^0+/, '') + "'"
}
this.$refs.baseList.init(val, strVal, conSql)
})
},
getBaseData(val){
@ -586,6 +628,7 @@ export default {
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.searchData.buNo = this.searchData.bu.split('_')[1]
partCostInformationSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
@ -605,9 +648,10 @@ export default {
this.modalData = {
id: row.id,
partId: row.partId,
bu: row.bu,
bu: row.sourceBu,
site: row.site,
buNo: row.buNo,
buNo: row.sourceBu,
buDesc: row.buDesc,
partNo: row.partNo,
partDesc: row.partDesc,
umId: row.umId,
@ -633,6 +677,16 @@ export default {
this.closeDialog()
return
}
// 2500ms
let reg = /^[0-9]+.?[0-9]*/
if (!reg.test(this.modalData.standardCost) || !reg.test(this.modalData.actualCost)) {
this.$alert('单位标准成本和单位实际成本只能为正整数的数字!', '提示', {
confirmButtonText: '确定',
callback: action => {
}
})
return
}
let inData = {
id: this.modalData.id,
partId: this.modalData.partId,

862
src/views/modules/part/partProductGroupInformation.vue
File diff suppressed because it is too large
View File

110
src/views/modules/part/standardRoutingOperation.vue

@ -114,7 +114,7 @@
<span style="cursor: pointer" slot="label" @click="getBaseList(217, 1)"><a herf="#">人员等级编码</a></span>
<el-input v-model="modalData.laborClassNo" @blur="laborClassBlur(217)" style="width: 140px"></el-input>
</el-form-item>
<el-form-item :label="'人员等级'" prop="laborClassDesc" :rules="rules.laborClassDesc">
<el-form-item :label="'人员等级描述'" prop="laborClassDesc" :rules="rules.laborClassDesc">
<el-input v-model="modalData.laborClassDesc" disabled style="width: 302px"></el-input>
</el-form-item>
</el-form>
@ -123,7 +123,7 @@
<span style="cursor: pointer" slot="label" @click="getBaseList(217, 2)"><a herf="#">调机时人员等级编码</a></span>
<el-input v-model="modalData.setupLaborClassNo" @blur="setupLaborClassBlur(217)" style="width: 140px"></el-input>
</el-form-item>
<el-form-item :label="'调机时人员等级'" prop="setupLaborClassDesc" :rules="rules.setupLaborClassDesc">
<el-form-item :label="'调机时人员等级描述'" prop="setupLaborClassDesc" :rules="rules.setupLaborClassDesc">
<el-input v-model="modalData.setupLaborClassDesc" disabled style="width: 302px"></el-input>
</el-form-item>
</el-form>
@ -157,6 +157,17 @@ export default {
components: {
ChooseList
},
watch: {
'modalData.workCenterNo': function (val) {
this.modalData.workCenterNo = val.toUpperCase()
},
'modalData.setupLaborClassNo': function (val) {
this.modalData.setupLaborClassNo = val.toUpperCase()
},
'modalData.laborClassNo': function (val) {
this.modalData.laborClassNo = val.toUpperCase()
},
},
data () {
return {
//
@ -289,6 +300,24 @@ export default {
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 6010012,
serialNumber: '6010012Table1LaborClassNo',
tableId: "6010012Table1",
tableName: "标准工序表",
columnProp: 'laborClassNo',
headerAlign: "center",
align: "center",
columnLabel: '人员等级编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6010012,
@ -298,7 +327,25 @@ export default {
columnProp: 'laborClassDesc',
headerAlign: "center",
align: "center",
columnLabel: '人员等级',
columnLabel: '人员等级描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 6010012,
serialNumber: '6010012Table1SetupLaborClassNo',
tableId: "6010012Table1",
tableName: "标准工序表",
columnProp: 'setupLaborClassNo',
headerAlign: "center",
align: "center",
columnLabel: '调机时人员等级编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -316,14 +363,14 @@ export default {
columnProp: 'setupLaborClassDesc',
headerAlign: "center",
align: "center",
columnLabel: '调机时人员等级',
columnLabel: '调机时人员等级描述',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
columnWidth: 118
},
{
userId: this.$store.state.user.name,
@ -562,17 +609,24 @@ export default {
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
let conSql = ''
if (val === 217) {
if(type === 1) {
strVal = this.modalData.laborClassNo
strVal = this.modalData.laborClassNo?this.modalData.laborClassNo:''
} else if (type === 2) {
strVal = this.modalData.setupLaborClassNo
strVal = this.modalData.setupLaborClassNo?this.modalData.setupLaborClassNo:''
}
}
if (val === 216) {
strVal = this.modalData.workCenterNo
strVal = this.modalData.workCenterNo?this.modalData.workCenterNo:''
}
if (this.modalData.bu === null || this.modalData.bu === '') {
this.$message.warning("请选择BU!")
return
} else {
conSql = " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
}
this.$refs.baseList.init(val, strVal)
this.$refs.baseList.init(val, strVal, conSql)
})
},
/**
@ -628,6 +682,7 @@ export default {
}
this.modalDisableFlag = false
this.modalFlag = true
console.log(this.modalData)
},
/**
@ -641,9 +696,15 @@ export default {
site: row.site,
bu: row.site + '_' + row.buNo,
buNo: row.buNo,
id: row.id,
operationNo: row.operationNo,
operationName: row.operationName,
workCenterNo: row.workCenterNo,
workCenterDesc: row.workCenterDesc,
laborClassNo: row.laborClassNo,
laborClassDesc: row.laborClassDesc,
setupLaborClassNo: row.setupLaborClassNo,
setupLaborClassDesc: row.setupLaborClassDesc,
updateBy: this.$store.state.user.name,
}
this.modalDisableFlag = true
@ -762,67 +823,76 @@ export default {
if (this.modalData.workCenterNo != null && this.modalData.workCenterNo !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and work_center_no = '" + this.modalData.workCenterNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'"
conditionSql: " and work_center_no = '" + this.modalData.workCenterNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.workCenterNo = data.baseListData[0].work_center_no
this.modalData.workCenterDesc = data.baseListData[0].work_center_desc
} else {
this.$message.warning('该加工中心不存在!')
this.$alert('该加工中心不存在,请重新输入加工中心编码!', '提示', {
confirmButtonText: '确定'
})
this.modalData.workCenterNo = ''
this.modalData.workCenterDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.workCenterNo = ''
this.modalData.workCenterDesc = ''
}
})
}
},
//
//
setupLaborClassBlur (tagNo) {
if (this.modalData.setupLaborClassNo != null && this.modalData.setupLaborClassNo !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and class_no = '" + this.modalData.setupLaborClassNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'"
conditionSql: " and class_no = '" + this.modalData.setupLaborClassNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.setupLaborClassNo = data.baseListData[0].class_no
this.modalData.setupLaborClassDesc = data.baseListData[0].class_desc
} else {
this.$message.warning('该人员等级不存在!')
this.$alert('该调机时人员等级不存在,请重新输入调机时人员等级编码!', '提示', {
confirmButtonText: '确定'
})
this.modalData.setupLaborClassNo = ''
this.modalData.setupLaborClassDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.setupLaborClassNo = ''
this.modalData.setupLaborClassDesc = ''
}
})
}
},
//
//
laborClassBlur (tagNo) {
if (this.modalData.laborClassNo != null && this.modalData.laborClassNo !== '') {
let tempData = {
tagno: tagNo,
conditionSql: " and class_no = '" + this.modalData.laborClassNo + "'" + " and site = '" + this.modalData.site + "'" + " and bu_no = '" + this.modalData.buNo + "'"
conditionSql: " and class_no = '" + this.modalData.laborClassNo + "'" + " and site = '" + this.modalData.bu.split('_')[0] + "'" + " and bu_no = '" + this.modalData.bu.split('_')[1] + "'"
}
verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
if (data.baseListData.length > 0) {
this.modalData.laborClassNo = data.baseListData[0].class_no
this.modalData.laborClassDesc = data.baseListData[0].class_desc
} else {
this.$message.warning('该人员等级不存在!')
this.$alert('该人员等级不存在,请重新输入人员等级编码!', '提示', {
confirmButtonText: '确定'
})
this.modalData.laborClassNo = ''
this.modalData.laborClassDesc = ''
}
} else {
this.$message.warning(data.msg)
this.modalData.laborClassNo = ''
this.modalData.laborClassDesc = ''
}
})

Loading…
Cancel
Save