Browse Source

2023-12-05

master
fengyuan_yang 2 years ago
parent
commit
af93469a2b
  1. 136
      src/views/modules/part/bomManagement.vue
  2. 201
      src/views/modules/part/routingManagement.vue

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

@ -85,7 +85,7 @@
</el-pagination>
<!-- bom新增/编辑模态框 -->
<el-dialog :close-on-click-modal="false" :before-close="closeModalX" v-drag :visible.sync="modalFlag" width="1000px">
<el-dialog :close-on-click-modal="false" :before-close="closeModalX" v-drag :visible.sync="modalFlag" width="1110px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 5px">
<el-form-item prop="partNo" :rules="rules.partNo">
<span v-if="!modalDisableFlag" slot="label" @click="queryPartList()"><a herf="#">物料编码</a></span>
@ -96,59 +96,57 @@
<el-input v-model="modalData.partDesc" disabled style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'制造类型'" prop="bomType" :rules="rules.bomType">
<el-select v-model="modalData.bomType" :disabled="modalDisableFlag" style="width: 142px">
<el-select v-model="modalData.bomType" :disabled="modalDisableFlag" style="width: 221px">
<el-option label="制造" value="manufacturing"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'类型'" prop="typeFlag" :rules="rules.typeFlag">
<el-select v-model="modalData.typeFlag" style="width: 142px">
<el-option label="BOM" value="B"></el-option>
<el-option label="配方" value="F"></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="'类型'" prop="typeFlag" :rules="rules.typeFlag">-->
<!-- <el-select v-model="modalData.typeFlag" disabled style="width: 142px">-->
<!-- <el-option label="BOM" value="B"></el-option>-->
<!-- <el-option label="配方" value="F"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item :label="'净重'">
<el-input v-model="modalData.netWeight" type="number" style="width: 141px"></el-input>
<el-input class="numInput" v-model="modalData.netWeight" type="number" @input="handleInput(modalData.netWeight,1)" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="开始时间" prop="effPhaseInDate" :rules="rules.effPhaseInDate">
<el-form-item label="开始日期" prop="effPhaseInDate" :rules="rules.effPhaseInDate">
<el-date-picker
style="width: 221px"
v-model="modalData.effPhaseInDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间"
type="date"
format="yyyy-MM-dd"
placeholder="请选择日期"
:editable=false>
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="effPhaseOutDate" :rules="rules.effPhaseOutDate">
<el-form-item label="结束日期" prop="effPhaseOutDate" :rules="rules.effPhaseOutDate">
<el-date-picker
style="width: 221px"
v-model="modalData.effPhaseOutDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间"
type="date"
format="yyyy-MM-dd"
placeholder="请选择日期"
:editable=false>
</el-date-picker>
</el-form-item>
<el-form-item :label="'BOM版本号'" prop="engChgLevel" :rules="rules.engChgLevel">
<el-input v-model="modalData.engChgLevel" :disabled="modalDisableFlag" style="width: 142px"></el-input>
<el-input v-model="modalData.engChgLevel" :disabled="modalDisableFlag" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'工程版本号'">
<el-input v-model="modalData.engRevision" style="width: 142px"></el-input>
<el-input v-model="modalData.engRevision" style="width: 221px"></el-input>
</el-form-item>
<el-form-item v-if="!modalDisableFlag">
<el-button :loading="saveHeaderLoading" type="primary" @click="saveBomHeader()" style="margin-top: 23px;width: 141px">保存</el-button>
<el-button :loading="saveHeaderLoading" type="primary" @click="saveBomHeader()" style="margin-top: 23px;width: 120px">保存</el-button>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注">
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' maxlength="300" show-word-limit style="width: 925px;height: 20px"></el-input>
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit style="width: 1082px;height: 20px"></el-input>
</el-form-item>
</el-form>
<el-tabs v-model="detailTable" style="margin-top: 65px; width: 100%; min-height: 120px" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
<el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%; min-height: 120px" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
<!-- BOM明细信息页签 -->
<el-tab-pane label="Product Structure" name="bom_detail">
<el-form label-position="top" style="margin-top: -10px">
@ -169,15 +167,15 @@
</el-select>
</el-form-item>
<el-form-item :label="'替代名称'">
<el-input v-model="detailData.alternativeDescription" disabled style="width: 221px"></el-input>
<el-input v-model="detailData.alternativeDescription" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'最小订单数'">
<el-input v-model="detailData.minLotQty" type="number" style="width: 221px"></el-input>
<el-input class="numInput" v-model="detailData.minLotQty" @input="handleInput(detailData.minLotQty,2)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px">
<el-form-item label="备注">
<el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' maxlength="300" show-word-limit style="width: 925px;height: 20px"></el-input>
<el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' show-word-limit style="width: 1073px;height: 20px"></el-input>
</el-form-item>
</el-form>
</el-tab-pane>
@ -236,7 +234,7 @@
</el-dialog>
<!-- 明细新增模态框 -->
<el-dialog title="新增替代" :close-on-click-modal="false" v-drag :visible.sync="saveDetailModalFlag" width="650px">
<el-dialog title="新增替代" :close-on-click-modal="false" v-drag :visible.sync="saveDetailModalFlag" width="630px">
<el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" style="margin-left: 5px">
<el-form-item :label="'替代编码'" prop="alternativeNo" :rules="detailRules.alternativeNo">
<el-input v-model="saveDetailData.alternativeNo" style="width: 221px"></el-input>
@ -245,7 +243,7 @@
<el-input v-model="saveDetailData.alternativeDescription" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'最小订单数'" prop="minLotQty" :rules="detailRules.minLotQty">
<el-input v-model="saveDetailData.minLotQty" type="number" style="width: 120px"></el-input>
<el-input class="numInput" v-model="saveDetailData.minLotQty" @input="handleInput(saveDetailData.minLotQty,3)" type="number" style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px">
@ -350,6 +348,17 @@
<el-input v-model="componentData.componentPartDesc" disabled style="width: 221px"></el-input>
</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 class="numInput" v-model="componentData.qtyPerAssembly" @input="handleInput(componentData.qtyPerAssembly,4)" type="number" style="width: 142px"></el-input>
</el-form-item>
<el-form-item :label="'调机量'" prop="componentScrap" :rules="componentRules.componentScrap">
<el-input class="numInput" v-model="componentData.componentScrap" @input="handleInput(componentData.componentScrap,5)" type="number" style="width: 142px"></el-input>
</el-form-item>
<el-form-item :label="'损耗率%'" prop="shrinkageFactor" :rules="componentRules.shrinkageFactor">
<el-input class="numInput" v-model="componentData.shrinkageFactor" @input="handleInputB(componentData.shrinkageFactor)" type="number" style="width: 142px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item :label="'单位'">
<el-input v-model="componentData.printUnitName" disabled style="width: 221px"></el-input>
@ -376,17 +385,6 @@
<el-input v-model="componentData.issueToLocName" style="width: 221px"></el-input>
</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 v-model="componentData.qtyPerAssembly" type="number" style="width: 142px"></el-input>
</el-form-item>
<el-form-item :label="'调机量'" prop="componentScrap" :rules="componentRules.componentScrap">
<el-input v-model="componentData.componentScrap" type="number" style="width: 142px"></el-input>
</el-form-item>
<el-form-item :label="'损耗率'" prop="shrinkageFactor" :rules="componentRules.shrinkageFactor">
<el-input v-model="componentData.shrinkageFactor" type="number" style="width: 142px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item label="备注">
<el-input type="textarea" v-model="componentData.noteText" :rows="3" resize='none' maxlength="300" show-word-limit style="width: 455px;height: 20px"></el-input>
@ -1074,13 +1072,6 @@ export default {
message: ' ',
trigger: 'change'
}
],
typeFlag: [
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
detailRules: {
@ -1274,9 +1265,9 @@ export default {
partNo: '',
partDesc: '',
engChgLevel: '',
bomType: '',
bomType: 'manufacturing',
noteText: '',
effPhaseInDate: '',
effPhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
effPhaseOutDate: '',
engRevision: '',
typeFlag: 'B',
@ -1355,10 +1346,10 @@ export default {
componentPartDesc: '',
printUnit: '',
printUnitName: '',
qtyPerAssembly: '',
componentScrap: '',
qtyPerAssembly: 0,
componentScrap: 0,
issueType: '',
shrinkageFactor: '',
shrinkageFactor: 0,
lineItemNo: '',
operationNo: '',
operationName: '',
@ -1632,6 +1623,8 @@ export default {
getComponentRowData (row) {
this.componentData.componentPart = row.partNo
this.componentData.componentPartDesc = row.partDesc
this.componentData.printUnit = row.printUnit
this.componentData.printUnitName = row.printUnitName
this.componentPartModelFlag = false
},
/**
@ -1895,7 +1888,7 @@ export default {
bomType: this.modalData.bomType,
alternativeNo: '',
alternativeDescription: '',
minLotQty: '',
minLotQty: 0,
defaultFlag: '',
detailNoteText: '',
createDate: '',
@ -2018,6 +2011,38 @@ export default {
})
},
// ======= =======
handleInput (value, type) {
// 04
let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
if (val == null || val == undefined || val == '') {
val = 0
}
if (type === 1) {
this.modalData.netWeight = val
} else if (type === 2) {
this.detailData.minLotQty = val
} else if (type === 3) {
this.saveDetailData.minLotQty = val
} else if (type === 4) {
this.componentData.qtyPerAssembly = val
} else if (type === 5) {
this.componentData.componentScrap = val
}
},
handleInputB (value) {
const reg = /^(([1-9]?\d{0,1}(\.\d{1,2})?)|100|100\.(0){1,2})$/
if (reg.test(value) === true) {
this.componentData.shrinkageFactor = value
} else if (value > 100) {
this.componentData.shrinkageFactor = 100
} else {
this.componentData.shrinkageFactor = 0
}
},
// ======== chooseList ========
/**
* 获取基础数据列表S
@ -2080,7 +2105,7 @@ export default {
<style scoped lang="scss">
/deep/ .detail-tab .el-tabs__content {
height: 180px;
height: 165px;
padding: 15px 0px 0px 0px;
}
/deep/ .sub_detail-tab .el-tabs__content {
@ -2088,6 +2113,9 @@ export default {
padding: 0px;
}
.numInput /deep/ .el-input__inner{
text-align: right;
}
</style>

201
src/views/modules/part/routingManagement.vue

@ -85,7 +85,7 @@
</el-pagination>
<!-- routing新增/编辑模态框 -->
<el-dialog :close-on-click-modal="false" v-drag :before-close="closeModalX" :visible.sync="modalFlag" width="1000px">
<el-dialog :close-on-click-modal="false" v-drag :before-close="closeModalX" :visible.sync="modalFlag" width="1110px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 5px">
<el-form-item prop="partNo" :rules="rules.partNo">
<span v-if="!modalDisableFlag" slot="label" @click="queryPartList()"><a herf="#">物料编码</a></span>
@ -96,36 +96,34 @@
<el-input v-model="modalData.partDesc" disabled style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'工艺类型'" prop="routingType" :rules="rules.routingType">
<el-select v-model="modalData.routingType" :disabled="modalDisableFlag" style="width: 142px">
<el-select v-model="modalData.routingType" :disabled="modalDisableFlag" style="width: 221px">
<el-option label="制造" value="manufacturing"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="开始时间" prop="phaseInDate" :rules="rules.phaseInDate">
<el-form-item label="开始日期" prop="phaseInDate" :rules="rules.phaseInDate">
<el-date-picker
style="width: 221px"
v-model="modalData.phaseInDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间"
type="date"
format="yyyy-MM-dd"
placeholder="请选择日期"
:editable=false>
</el-date-picker>
</el-form-item>
<el-form-item label="结束时间" prop="phaseOutDate" :rules="rules.phaseOutDate">
<el-form-item label="结束日期" prop="phaseOutDate" :rules="rules.phaseOutDate">
<el-date-picker
style="width: 221px"
v-model="modalData.phaseOutDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择时间"
type="date"
format="yyyy-MM-dd"
placeholder="请选择日期"
:editable=false>
</el-date-picker>
</el-form-item>
<el-form-item :label="'Routing版本号'" prop="routingRevision" :rules="rules.routingRevision">
<el-input v-model="modalData.routingRevision" :disabled="modalDisableFlag" style="width: 142px"></el-input>
<el-input v-model="modalData.routingRevision" :disabled="modalDisableFlag" style="width: 221px"></el-input>
</el-form-item>
<el-form-item v-if="!modalDisableFlag">
<el-button :loading="saveHeaderLoading" type="primary" @click="saveRoutingHeader()" style="margin-top: 23px;width: 142px">保存</el-button>
@ -133,10 +131,10 @@
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注">
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' maxlength="300" show-word-limit style="width: 925px;height: 20px"></el-input>
<el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit style="width: 1082px;height: 20px"></el-input>
</el-form-item>
</el-form>
<el-tabs v-model="detailTable" style="margin-top: 65px; width: 100%; min-height: 120px" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
<el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%; min-height: 120px" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
<!-- Routing明细信息页签 -->
<el-tab-pane label="Product Structure" name="routing_detail">
<el-form label-position="top" style="margin-top: -10px">
@ -157,12 +155,12 @@
</el-select>
</el-form-item>
<el-form-item :label="'替代名称'">
<el-input v-model="detailData.alternativeDescription" disabled style="width: 221px"></el-input>
<el-input v-model="detailData.alternativeDescription" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px">
<el-form-item label="备注">
<el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' maxlength="300" show-word-limit style="width: 925px;height: 20px"></el-input>
<el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' show-word-limit style="width: 1073px;height: 20px"></el-input>
</el-form-item>
</el-form>
</el-tab-pane>
@ -323,75 +321,79 @@
<!-- 子明细新增模态框 -->
<el-dialog title="工序" :close-on-click-modal="false" v-drag :visible.sync="componentSaveModal" width="500px">
<el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
<el-form-item prop="operationId" :rules="componentRules.operationId">
<span v-if="!componentDisableFlag" slot="label" @click="queryOperationList()"><a herf="#">工序号</a></span>
<span v-if="componentDisableFlag" slot="label">工序号</span>
<el-input v-model="componentData.operationId" :disabled="componentDisableFlag" style="width: 221px"></el-input>
<!-- <el-form-item prop="operationId" :rules="componentRules.operationId">-->
<!-- <span v-if="!componentDisableFlag" slot="label" @click="queryOperationList()"><a herf="#">工序号</a></span>-->
<!-- <span v-if="componentDisableFlag" slot="label">工序号</span>-->
<!-- <el-input v-model="componentData.operationId" :disabled="componentDisableFlag" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
<el-form-item :label="'工序编码'" prop="operationNo" :rules="componentRules.operationNo">
<el-input v-model="componentData.operationNo" :disabled="componentDisableFlag" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'工序名称'" prop="operationName" :rules="componentRules.operationName">
<el-input v-model="componentData.operationName" disabled style="width: 221px"></el-input>
<el-input v-model="componentData.operationName" :disabled="componentDisableFlag" style="width: 221px"></el-input>
</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="operationNo" :rules="componentRules.operationNo">
<el-input v-model="componentData.operationNo" :disabled="componentDisableFlag" style="width: 221px"></el-input>
</el-form-item>
<el-form-item>
<span slot="label" @click="getBaseList(103)"><a herf="#">加工中心</a></span>
<el-input v-model="componentData.workCenterDesc" style="width: 221px"></el-input>
<span slot="label" @click="getBaseList(119)"><a herf="#">加工中心编码</a></span>
<el-input v-model="componentData.workCenterNo" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'加工中心名称'">
<el-input v-model="componentData.workCenterDesc" disabled style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'机器效率'">
<el-input v-model="componentData.efficiencyFactor" type="number" style="width: 221px"></el-input>
<el-form-item :label="'机器效率%'">
<el-input class="numInput" v-model="componentData.efficiencyFactor" @input="handleInputB(componentData.efficiencyFactor,1)" type="number" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'机器运行速度'">
<el-input v-model="componentData.machRunFactor" type="number" style="width: 221px"></el-input>
<el-input class="numInput" v-model="componentData.machRunFactor" @input="handleInput(componentData.machRunFactor,1)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'调机时长'">
<el-input v-model="componentData.machSetupTime" type="number" style="width: 221px"></el-input>
<el-input class="numInput" v-model="componentData.machSetupTime" @input="handleInput(componentData.machSetupTime,2)" type="number" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'时长单位'">
<el-select v-model="componentData.runTimeCode" clearable style="width: 221px">
<el-option label="单位/小时" value="A"></el-option>
<el-option label="小时/单位" value="B"></el-option>
</el-select>
<el-form-item :label="'调机过程中人数'">
<el-input class="numInput" v-model="componentData.setupCrewSize" @input="handleInput(componentData.setupCrewSize,3)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'人工效率'">
<el-input v-model="componentData.laborRunFactor" type="number" style="width: 221px"></el-input>
<el-form-item>
<span slot="label" @click="getBaseList(118, 2)"><a herf="#">调机时的人员等级</a></span>
<el-input v-model="componentData.setupLaborClassDesc" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'人工生产速度'">
<el-input v-model="componentData.laborSetupTime" type="number" style="width: 221px"></el-input>
<el-form-item :label="'人工效率%'">
<el-input class="numInput" v-model="componentData.laborRunFactor" @input="handleInputB(componentData.laborRunFactor,2)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item :label="'生产过程中人数'">
<el-input v-model="componentData.crewSize" type="number" style="width: 221px"></el-input>
<el-input class="numInput" v-model="componentData.crewSize" @input="handleInput(componentData.crewSize,4)" type="number" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'调机过程中人数'">
<el-input v-model="componentData.setupCrewSize" type="number" style="width: 221px"></el-input>
<el-form-item :label="'人工生产速度'">
<el-input class="numInput" v-model="componentData.laborSetupTime" @input="handleInput(componentData.laborSetupTime,5)" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item>
<span slot="label" @click="getBaseList(118, 1)"><a herf="#">人员等级</a></span>
<el-input v-model="componentData.laborClassDesc" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'外协采购料号'">
<el-input v-model="componentData.outsideOpItem" style="width: 221px"></el-input>
</el-form-item>
<el-form-item :label="'机台'">
<el-input v-model="componentData.machineNo" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
<el-form-item>
<span slot="label" @click="getBaseList(118, 1)"><a herf="#">人员等级</a></span>
<el-input v-model="componentData.laborClassDesc" style="width: 221px"></el-input>
<el-form-item :label="'时长单位'">
<el-select v-model="componentData.runTimeCode" clearable style="width: 221px">
<el-option label="单位/小时" value="A"></el-option>
<el-option label="小时/单位" value="B"></el-option>
<el-option label="小时" value="C"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<span slot="label" @click="getBaseList(118, 2)"><a herf="#">调机时的人员等级</a></span>
<el-input v-model="componentData.setupLaborClassDesc" style="width: 221px"></el-input>
<el-form-item :label="'机台'">
<el-input v-model="componentData.machineNo" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
@ -795,24 +797,6 @@ export default {
}
],
columnSubDetailList: [
{
userId: this.$store.state.user.name,
functionId: 104003,
serialNumber: '104003Table2OperationId',
tableId: '104003Table2',
tableName: 'Routing工序表',
columnProp: 'operationId',
headerAlign: 'center',
align: 'center',
columnLabel: '工序号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 104003,
@ -1319,7 +1303,7 @@ export default {
routingRevision: '',
routingType: '',
noteText: '',
phaseInDate: '',
phaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
phaseOutDate: '',
createBy: this.$store.state.user.name
}
@ -1398,14 +1382,14 @@ export default {
operationId: '',
operationNo: '',
operationName: '',
efficiencyFactor: '',
efficiencyFactor: 100,
machRunFactor: '',
machSetupTime: '',
runTimeCode: '',
laborRunFactor: '',
laborRunFactor: 100,
laborSetupTime: '',
crewSize: '',
setupCrewSize: '',
setupCrewSize: 1,
outsideOpItem: '',
machineNo: '',
workCenterNo: '',
@ -1790,14 +1774,14 @@ export default {
this.$message.warning('请填写主记录Routing版本号!')
return
}
if (this.componentData.operationId === '' || this.componentData.operationId == null) {
this.$message.warning('请选择工序号!')
return
}
if (this.componentData.operationNo === '' || this.componentData.operationNo == null) {
this.$message.warning('请填写工序编码!')
return
}
if (this.componentData.operationName === '' || this.componentData.operationName == null) {
this.$message.warning('请选择工序名称!')
return
}
if (this.componentData.flag === '1') {
this.saveComponentLoading = true
saveRoutingComponent(this.componentData).then(({data}) => {
@ -2054,6 +2038,47 @@ export default {
})
},
// ======= =======
handleInput (value, type) {
// 04
let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
if (val == null || val == undefined || val == '') {
val = 0
}
if (type === 1) {
this.modalData.machRunFactor = val
} else if (type === 2) {
this.detailData.machSetupTime = val
} else if (type === 3) {
this.saveDetailData.setupCrewSize = val
} else if (type === 4) {
this.componentData.crewSize = val
} else if (type === 5) {
this.componentData.laborSetupTime = val
}
},
handleInputB (value, type) {
const reg = /^(([1-9]?\d{0,1}(\.\d{1,2})?)|100|100\.(0){1,2})$/
if (type === 1) {
if (reg.test(value) === true) {
this.componentData.efficiencyFactor = value
} else if (value > 100) {
this.componentData.efficiencyFactor = 100
} else {
this.componentData.efficiencyFactor = 0
}
} else if (type === 2) {
if (reg.test(value) === true) {
this.componentData.laborRunFactor = value
} else if (value > 100) {
this.componentData.laborRunFactor = 100
} else {
this.componentData.laborRunFactor = 0
}
}
},
// ======== chooseList ========
/**
* 获取基础数据列表S
@ -2065,9 +2090,6 @@ export default {
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 117) {
strVal = this.componentData.issueToLoc
}
if (val === 118) {
if(type === 1) {
strVal = this.componentData.laborClassNo
@ -2075,6 +2097,9 @@ export default {
strVal = this.componentData.setupLaborClassNo
}
}
if (val === 119) {
strVal = this.componentData.workCenterNo
}
this.$refs.baseList.init(val, strVal)
})
},
@ -2083,10 +2108,6 @@ export default {
* @param val
*/
getBaseData (val) {
if (this.tagNo === 117) {
this.componentData.issueToLoc = val.location_id
this.componentData.issueToLocName = val.location_name
}
if (this.tagNo === 118) {
if (this.tagNo1 === 1) {
this.componentData.laborClassNo = val.level_id
@ -2096,6 +2117,10 @@ export default {
this.componentData.setupLaborClassDesc = val.level_desc
}
}
if (this.tagNo === 119) {
this.componentData.workCenterNo = val.work_center_no
this.componentData.workCenterDesc = val.work_center_desc
}
},
// ======== ========
@ -2133,14 +2158,16 @@ export default {
<style scoped lang="scss">
/deep/ .detail-tab .el-tabs__content {
height: 180px;
height: 165px;
padding: 15px 0px 0px 0px;
}
/deep/ .sub_detail-tab .el-tabs__content {
height: 280px;
padding: 0px;
}
.numInput /deep/ .el-input__inner{
text-align: right;
}
</style>

Loading…
Cancel
Save