Browse Source

2024-12-31

master
fengyuan_yang 1 year ago
parent
commit
ca36ec6add
  1. 4
      src/views/modules/part/bomManagement.vue
  2. 14
      src/views/modules/part/partInformation.vue
  3. 475
      src/views/modules/part/recipeManagement.vue

4
src/views/modules/part/bomManagement.vue

@ -3647,7 +3647,8 @@ export default {
}).then(() => {
let tempData = {
informationList: this.checkedDetail,
productFlag: 'component'
productFlag: 'component',
updateBy: this.$store.state.user.name,
}
deleteBomComponent(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -3666,7 +3667,6 @@ export default {
})
}
})
}).catch(() => {
})
}
},

14
src/views/modules/part/partInformation.vue

@ -117,8 +117,8 @@
更多
</el-link >
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="toMenu('BOM',scope.row)">BOM</el-dropdown-item>
<el-dropdown-item @click.native="toMenu('Routing',scope.row)">Routing</el-dropdown-item>
<el-dropdown-item @click.native="toMenu('BOM', scope.row)">BOM</el-dropdown-item>
<el-dropdown-item @click.native="toMenu('Routing', scope.row)">Routing</el-dropdown-item>
<el-dropdown-item v-if="scope.row.status !== 'Y' && (scope.row.ifsPartNo == null || scope.row.ifsPartNo === '')" @click.native="toBecomeOfficialPartModal(scope.row)">转正式物料</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -161,7 +161,7 @@
<el-tab-pane label="General" name="General">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
<el-form-item label="零件类型 / Part Type" prop="partType" :rules="rules.partType">
<el-select v-model="modalData.partType" style="width: 461px">
<el-select v-model="modalData.partType" :disabled="modalData.flag==='3'" style="width: 461px">
<el-option label="Manufactured" value="Manufactured"></el-option>
<el-option label="Manufactured Recipe" value="Manufactured Recipe"></el-option>
<el-option label="Purchased (raw)" value="Purchased (raw)"></el-option>
@ -5573,12 +5573,14 @@
return s
},
toMenu (type,row) {
toMenu (type, row) {
let path = ''
if (type === 'Routing'){
if (type === 'Routing') {
path = 'routing'
}else if (type === 'BOM'){
} else if (type === 'BOM' && row.partType === 'Manufactured') {
path = 'bom'
} else if (type === 'BOM' && row.partType === 'Manufactured Recipe') {
path = 'recipe'
}
if (this.$router.resolve(`/part-${path}Management`).resolved.name === '404') {
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})

475
src/views/modules/part/recipeManagement.vue

@ -110,7 +110,7 @@
<el-input v-model="modalData.printUnit" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'制造类型'" prop="bomType" :rules="rules.bomType">
<el-select v-model="modalData.bomType" :disabled="modalDisableFlag" style="width: 140px"> <!-- @change="bomTypeChange" -->
<el-select v-model="modalData.bomType" :disabled="modalDisableFlag" style="width: 140px">
<el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option>
<el-option label="Purchase" value="Purchase"></el-option>
@ -186,7 +186,16 @@
<el-input v-model="detailData.alternativeDescription" readonly style="width: 350px"></el-input>
</el-form-item>
<el-form-item :label="'状态'">
<el-input v-model="detailData.status" readonly style="width: 140px"></el-input>
<el-input v-model="detailData.status" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'状态'">
<el-input v-model="detailData.regUnit" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'重量单位'">
<el-input v-model="detailData.displayWeightUom" readonly style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'体积单位'">
<el-input v-model="detailData.displayVolumeUom" readonly style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px">
@ -244,110 +253,110 @@
</el-table>
</el-tab-pane>
<!-- Recipe副产品信息页签 -->
<el-tab-pane label="By-Products" name="by_products">
<el-form label-position="top" style="margin-top: 5px">
<el-form-item>
<el-button type="primary" @click="saveByProductModal" style="margin-left: 7px">新增</el-button>
<el-button type="primary" @click="deleteByProduct">删除</el-button>
</el-form-item>
</el-form>
<el-table
:data="byProductList"
height="256px"
border
ref="byProductTable"
@row-click="byProductClickRow"
@selection-change="byProductSelection"
style="width:100%">
<el-table-column type="selection" align="center" width="50"></el-table-column>
<el-table-column
v-for="(item,index) in columnSubDetailList2" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed == ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateByProductModal(scope.row)">编辑</el-link>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- &lt;!&ndash; Recipe副产品信息页签 &ndash;&gt;-->
<!-- <el-tab-pane label="By-Products" name="by_products">-->
<!-- <el-form label-position="top" style="margin-top: 5px">-->
<!-- <el-form-item>-->
<!-- <el-button type="primary" @click="saveByProductModal" style="margin-left: 7px">新增</el-button>-->
<!-- <el-button type="primary" @click="deleteByProduct">删除</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-table-->
<!-- :data="byProductList"-->
<!-- height="256px"-->
<!-- border-->
<!-- ref="byProductTable"-->
<!-- @row-click="byProductClickRow"-->
<!-- @selection-change="byProductSelection"-->
<!-- style="width:100%">-->
<!-- <el-table-column type="selection" align="center" width="50"></el-table-column>-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnSubDetailList2" :key="index"-->
<!-- :sortable="item.columnSortable"-->
<!-- :prop="item.columnProp"-->
<!-- :header-align="item.headerAlign"-->
<!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
<!-- :align="item.align"-->
<!-- :fixed="item.fixed == ''?false:item.fixed"-->
<!-- :min-width="item.columnWidth"-->
<!-- :label="item.columnLabel">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="100"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-link style="cursor: pointer" @click="updateByProductModal(scope.row)">编辑</el-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-tab-pane>-->
<!-- Recipe副产品成本分配信息页签 -->
<el-tab-pane label="By-Product Cost Distribution" name="manuf_struct_cost_distribtion">
<el-table
:data="manufStructCostDistribList"
height="280px"
border
style="width:100%">
<el-table-column
v-for="(item,index) in columnManufStructCostDistribList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed == ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<el-link style="cursor: pointer" @click="updateManufStructCostDistribModal(scope.row)">编辑</el-link>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- &lt;!&ndash; Recipe副产品成本分配信息页签 &ndash;&gt;-->
<!-- <el-tab-pane label="By-Product Cost Distribution" name="manuf_struct_cost_distribtion">-->
<!-- <el-table-->
<!-- :data="manufStructCostDistribList"-->
<!-- height="280px"-->
<!-- border-->
<!-- style="width:100%">-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnManufStructCostDistribList" :key="index"-->
<!-- :sortable="item.columnSortable"-->
<!-- :prop="item.columnProp"-->
<!-- :header-align="item.headerAlign"-->
<!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
<!-- :align="item.align"-->
<!-- :fixed="item.fixed == ''?false:item.fixed"-->
<!-- :min-width="item.columnWidth"-->
<!-- :label="item.columnLabel">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- fixed="right"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="100"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-link style="cursor: pointer" @click="updateManufStructCostDistribModal(scope.row)">编辑</el-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-tab-pane>-->
<!-- Recipe副产品成本分配信息页签 -->
<el-tab-pane label="Multi Level Structure" name="multi_level_structure">
<el-table
:data="multiLevelStructureList"
height="280px"
border
style="width:100%">
<el-table-column
v-for="(item,index) in columnMultiLevelStructureList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed == ''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<!-- &lt;!&ndash; Recipe副产品成本分配信息页签 &ndash;&gt;-->
<!-- <el-tab-pane label="Multi Level Structure" name="multi_level_structure">-->
<!-- <el-table-->
<!-- :data="multiLevelStructureList"-->
<!-- height="280px"-->
<!-- border-->
<!-- style="width:100%">-->
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnMultiLevelStructureList" :key="index"-->
<!-- :sortable="item.columnSortable"-->
<!-- :prop="item.columnProp"-->
<!-- :header-align="item.headerAlign"-->
<!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
<!-- :align="item.align"-->
<!-- :fixed="item.fixed == ''?false:item.fixed"-->
<!-- :min-width="item.columnWidth"-->
<!-- :label="item.columnLabel">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-tab-pane>-->
</el-tabs>
<el-footer style="height:30px;margin-top:20px;text-align:center">
<el-button :loading="saveAllLoading" type="primary" @click="saveData()">保存</el-button>
@ -368,6 +377,19 @@
<el-input v-model="saveDetailData.status" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" style="margin-left: 5px">
<el-form-item :label="'输入方式'" prop="regUnit" :rules="detailRules.regUnit">
<el-input v-model="saveDetailData.regUnit" disabled style="width: 120px"></el-input>
</el-form-item>
<el-form-item prop="displayWeightUom" :rules="detailRules.displayWeightUom">
<span style="cursor: pointer" slot="label" @click="getBaseList(1008)"><a herf="#">重量单位</a></span>
<el-input v-model="saveDetailData.displayWeightUom" style="width: 105px"></el-input>
</el-form-item>
<el-form-item prop="displayVolumeUom" :rules="detailRules.displayVolumeUom">
<span style="cursor: pointer" slot="label" @click="getBaseList(1009)"><a herf="#">体积单位</a></span>
<el-input v-model="saveDetailData.displayVolumeUom" style="width: 105px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px">
<el-form-item label="备注">
<el-input type="textarea" v-model="saveDetailData.detailNoteText" :rows="3" resize='none' show-word-limit style="width: 500px;height: 20px"></el-input>
@ -514,22 +536,33 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item :label="'单位用量'" prop="qtyPerAssembly" :rules="componentRules.qtyPerAssembly">
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.qtyPerAssembly" style="width: 112px"></el-input-number>
<el-form-item :label="'重量分配'" prop="weightShare" :rules="componentRules.weightShare">
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.weightShare" @change="changeWeightShare" style="width: 115px"></el-input-number>
</el-form-item>
<el-form-item :label="'零件-按重量'">
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.partsByWeight" disabled style="width: 115px"></el-input-number>
</el-form-item>
<el-form-item :label="'数量计量单位'">
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.qtyUom" disabled style="width: 115px"></el-input-number>
</el-form-item>
<el-form-item :label="'单位用量'">
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.qtyPerAssembly" disabled style="width: 115px"></el-input-number>
</el-form-item>
<el-form-item :label="'调机量'" prop="componentScrap" :rules="componentRules.componentScrap">
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.componentScrap" style="width: 112px"></el-input-number>
<el-form-item :label="'调机量'">
<el-input-number :precision="10" :controls="false" :step="0" v-model="componentData.componentScrap" style="width: 115px"></el-input-number>
</el-form-item>
<el-form-item :label="'损耗率%'" prop="shrinkageFactor" :rules="componentRules.shrinkageFactor">
<el-input-number :controls="false" :step="0" min="0" max="100" v-model="componentData.shrinkageFactor" style="width: 80px"></el-input-number>
<el-form-item :label="'损耗率%'">
<el-input-number :controls="false" :step="0" min="0" max="100" v-model="componentData.shrinkageFactor" style="width: 114px"></el-input-number>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item>
<span slot="label" @click="queryOperationList"><a>工序</a></span>
<el-input v-model="componentData.operationNo" readonly style="width: 110px"></el-input>
<el-input v-model="componentData.operationNo" readonly style="width: 115px"></el-input>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(117)"><a herf="#">发料库位</a></span>
<el-input v-model="componentData.issueToLocName" readonly style="width: 110px"></el-input>
<el-input v-model="componentData.issueToLocName" readonly style="width: 115px"></el-input>
</el-form-item>
<el-form-item :label="'生产属性'" prop="issueType" :rules="componentRules.issueType">
<el-select v-model="componentData.issueType" style="width: 165px">
@ -1033,7 +1066,10 @@ export default {
createBy: '',
updateDate: '',
updateBy: '',
officialFlag: 'N'
officialFlag: 'N',
regUnit: '',
displayWeightUom: '',
displayVolumeUom: ''
},
componentData: {
flag: '',
@ -1062,7 +1098,25 @@ export default {
updateBy: '',
lineSequence: '',
consumptionItem: '',
productFlag: ''
productFlag: '',
weightShare: '',
partsByWeight: '',
qtyUom: '',
issuePlannedScrapDb: '',
issueOverreportedQtyDb: '',
fixedQtyFlag: '',
promisePlanned: '',
phantomConsume: '',
operCostDistribution: '',
genOhCostDistribution: '',
qtyKg: '',
byProdAsSupplyInMrpDb: '',
leadtimeOffset: '',
stdPlannedItem: '',
chargedItem: '',
excludeFromCalculationsDb: '',
excludeFromAsBuiltDb: '',
lotBatchOriginDb: ''
},
partData: {
site: this.$store.state.user.site,
@ -1103,7 +1157,10 @@ export default {
createBy: '',
updateDate: '',
updateBy: '',
officialFlag: ''
officialFlag: '',
displayWeightUom: '',
displayVolumeUom: '',
regUnit: ''
},
operationData: {
site: this.$store.state.user.site,
@ -1641,6 +1698,60 @@ export default {
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 104002003,
serialNumber: '104002003Table2WeightShare',
tableId: '104002003Table2',
tableName: 'Recipe子物料表',
columnProp: 'weightShare',
headerAlign: 'center',
align: 'right',
columnLabel: '重量分配',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 110
},
{
userId: this.$store.state.user.name,
functionId: 104002003,
serialNumber: '104002003Table2PartsByWeight',
tableId: '104002003Table2',
tableName: 'Recipe子物料表',
columnProp: 'partsByWeight',
headerAlign: 'center',
align: 'right',
columnLabel: '零件-按重量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 110
},
{
userId: this.$store.state.user.name,
functionId: 104002003,
serialNumber: '104002003Table2QtyUom',
tableId: '104002003Table2',
tableName: 'Recipe子物料表',
columnProp: 'qtyUom',
headerAlign: 'center',
align: 'right',
columnLabel: '数量计量单位',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 110
},
{
userId: this.$store.state.user.name,
functionId: 104002003,
@ -2499,38 +2610,38 @@ export default {
message: ' ',
trigger: ['blur','change']
}
]
},
componentRules: {
componentPart: [
],
regUnit: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
lineSequence: [
displayWeightUom: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
qtyPerAssembly: [
displayVolumeUom: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
componentScrap: [
]
},
componentRules: {
componentPart: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
shrinkageFactor: [
lineSequence: [
{
required: true,
message: ' ',
@ -2550,7 +2661,14 @@ export default {
message: ' ',
trigger: ['blur','change']
}
]
],
weightShare: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
},
// ======== ========
recipeSelections: [],
@ -2815,7 +2933,10 @@ export default {
createBy: this.$store.state.user.name,
updateDate: '',
updateBy: this.$store.state.user.name,
officialFlag: 'N'
officialFlag: 'N',
displayWeightUom: 'kg',
displayVolumeUom: 'ml',
regUnit: 'Weight Share'
}
this.detailDataList = []
this.subDetailList = []
@ -2893,7 +3014,10 @@ export default {
status: 'Tentative',
createDate: '',
createBy: this.$store.state.user.name,
officialFlag: 'N'
officialFlag: 'N',
displayWeightUom: 'kg',
displayVolumeUom: 'ml',
regUnit: 'Weight Share'
}
// recipe
queryRecipeHeader(this.modalData).then(({data}) => {
@ -2939,7 +3063,10 @@ export default {
detailNoteText: this.detailData.detailNoteText,
status: this.detailData.status,
updateBy: this.$store.state.user.name,
officialFlag: this.detailData.officialFlag
officialFlag: this.detailData.officialFlag,
displayWeightUom: this.detailData.displayWeightUom,
displayVolumeUom: this.detailData.displayVolumeUom,
regUnit: 'Weight Share'
}
// recipe
queryRecipeHeader(this.modalData).then(({data}) => {
@ -2975,7 +3102,7 @@ export default {
componentPartDesc: '',
printUnit: '',
printUnitName: '',
qtyPerAssembly: 0,
qtyPerAssembly: undefined,
componentScrap: 0,
issueType: 'Reserve And Backflush',
shrinkageFactor: 0,
@ -2988,7 +3115,25 @@ export default {
createBy: this.$store.state.user.name,
lineSequence: '',
consumptionItem: 'Consumed',
productFlag: 'component'
productFlag: 'component',
weightShare: undefined,
partsByWeight: undefined,
qtyUom: undefined,
issuePlannedScrapDb: 'true',
issueOverreportedQtyDb: 'false',
fixedQtyFlag: 'Not fixed',
promisePlanned: 'Promised',
phantomConsume: 'Not Phantom Consume',
operCostDistribution: '0',
genOhCostDistribution: '0',
qtyKg: undefined,
byProdAsSupplyInMrpDb: 'false',
leadtimeOffset: '0',
stdPlannedItem: '1',
chargedItem: 'Item not charged',
excludeFromCalculationsDb: 'false',
excludeFromAsBuiltDb: 'false',
lotBatchOriginDb: 'false'
}
//
@ -3077,7 +3222,25 @@ export default {
updateBy: this.$store.state.user.name,
lineSequence: row.lineSequence,
consumptionItem: row.consumptionItem,
productFlag: 'component'
productFlag: 'component',
weightShare: row.weightShare,
partsByWeight: row.partsByWeight,
qtyUom: row.qtyUom,
issuePlannedScrapDb: row.issuePlannedScrapDb,
issueOverreportedQtyDb: row.issueOverreportedQtyDb,
fixedQtyFlag: row.fixedQtyFlag,
promisePlanned: row.promisePlanned,
phantomConsume: row.phantomConsume,
operCostDistribution: row.operCostDistribution,
genOhCostDistribution: row.genOhCostDistribution,
qtyKg: row.qtyKg,
byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb,
leadtimeOffset: row.leadtimeOffset,
stdPlannedItem: row.stdPlannedItem,
chargedItem: row.chargedItem,
excludeFromCalculationsDb: row.excludeFromCalculationsDb,
excludeFromAsBuiltDb: row.excludeFromAsBuiltDb,
lotBatchOriginDb: row.lotBatchOriginDb
}
this.componentDisableFlag = true
this.componentSaveModal = true
@ -3518,7 +3681,8 @@ export default {
}).then(() => {
let tempData = {
informationList: this.checkedDetail,
productFlag: 'component'
productFlag: 'component',
updateBy: this.$store.state.user.name,
}
deleteRecipeComponent(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -3537,7 +3701,6 @@ export default {
})
}
})
}).catch(() => {
})
}
},
@ -3555,7 +3718,8 @@ export default {
}).then(() => {
let tempData = {
informationList: this.checkedByProduct,
productFlag: 'byProduct'
productFlag: 'byProduct',
updateBy: this.$store.state.user.name,
}
deleteRecipeComponent(tempData).then(({data}) => {
if (data && data.code === 0) {
@ -3574,7 +3738,6 @@ export default {
})
}
})
}).catch(() => {
})
}
},
@ -3588,6 +3751,13 @@ export default {
this.$refs.byProductTable.toggleRowSelection(row)
},
//
changeWeightShare () {
this.componentData.partsByWeight = this.componentData.weightShare
this.componentData.qtyUom = this.componentData.weightShare / 100
this.componentData.qtyPerAssembly = this.componentData.weightShare / 100
},
//
componentDataSave (isClose) {
if (this.componentData.lineSequence === '' || this.componentData.lineSequence == null) {
@ -3614,20 +3784,8 @@ export default {
this.$message.warning('请选择消耗项目!')
return
}
if (this.componentData.qtyPerAssembly === '' || this.componentData.qtyPerAssembly == null) {
this.$message.warning('请填写单位用量!')
return
}
if (this.componentData.qtyPerAssembly === 0) {
this.$message.warning('单位用量不能为0!')
return
}
if (this.componentData.componentScrap === '' || this.componentData.componentScrap == null) {
this.$message.warning('请填写调机量!')
return
}
if (this.componentData.shrinkageFactor === '' || this.componentData.shrinkageFactor == null) {
this.$message.warning('请填写损耗率!')
if (this.componentData.weightShare === '' || this.componentData.weightShare == null) {
this.$message.warning('请填写重量分配!')
return
}
if (this.componentData.issueType === '' || this.componentData.issueType == null) {
@ -3950,6 +4108,14 @@ export default {
this.$message.warning('请选择替代状态!')
return
}
if (this.saveDetailData.displayWeightUom === '' || this.saveDetailData.displayWeightUom == null) {
this.$message.warning('请选择重量单位!')
return
}
if (this.saveDetailData.displayVolumeUom === '' || this.saveDetailData.displayVolumeUom == null) {
this.$message.warning('请选择体积单位!')
return
}
this.saveDetailLoading = true
if (this.saveDetailData.flag === '1') {
recipeDetailSave(this.saveDetailData).then(({data}) => {
@ -4009,6 +4175,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.detailData.updateBy = this.$store.state.user.name
recipeDetailDelete(this.detailData).then(({data}) => {
if (data && data.code === 0) {
this.detailData = data.rows.detailData
@ -4026,7 +4193,6 @@ export default {
})
}
})
}).catch(() => {
})
},
@ -4101,6 +4267,7 @@ export default {
// RecipeRecipe
toBecomeOfficialRecipe () {
this.detailData.updateBy = this.$store.state.user.name
this.toBecomeOfficialLoading = true
toBecomeOfficialRecipe(this.detailData).then(({data}) => {
if (data && data.code === 0) {
@ -4156,6 +4323,10 @@ export default {
let strVal = ''
if (val === 117) {
strVal = this.componentData.issueToLoc
} else if (val === 1008) {
strVal = this.saveDetailData.displayWeightUom
} else if (val === 1009) {
strVal = this.saveDetailData.displayVolumeUom
}
this.$refs.baseList.init(val, strVal)
})
@ -4166,6 +4337,10 @@ export default {
if (this.tagNo === 117) {
this.componentData.issueToLoc = val.location_id
this.componentData.issueToLocName = val.location_name
} else if (this.tagNo === 1008) {
this.saveDetailData.displayWeightUom = val.um_id
} else if (this.tagNo === 1009) {
this.saveDetailData.displayVolumeUom = val.um_id
}
},

Loading…
Cancel
Save