| | |
| | | <h2>编辑-工序</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | | <el-button :disabled="isSubmit" v-thinclick="`dataFormSubmit`" |
| | | <el-button type="primary" :disabled="isSubmit" v-thinclick="`dataFormSubmit`" |
| | | >保存</el-button |
| | | > |
| | | </div> |
| | |
| | | <div class="page-main"> |
| | | <div class="operation-basic"> |
| | | <el-form |
| | | :inline="true" |
| | | style="width:100%" |
| | | :model="dataForm" |
| | | :rules="dataRule" |
| | | ref="dataForm" |
| | | label-width="100px" |
| | | class="l-mes form-content" |
| | | > |
| | | class="l-mes"> |
| | | <el-row class="first-row"> |
| | | <el-col :span="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="工序名称" prop="name"> |
| | | <el-input |
| | | style="width:100%" |
| | | v-model="dataForm.name" |
| | | placeholder="工序名称" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="工序编号" prop="operationNo"> |
| | | <el-input |
| | | style="width:100%" |
| | | v-model="dataForm.operationNo" |
| | | placeholder="工序编号" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="零件族" prop="partFamilyId"> |
| | | <el-select |
| | | v-model="dataForm.partFamilyId" |
| | | filterable |
| | | placeholder="请选择" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in this.partFamilyOptions" |
| | | :key="index" |
| | | :label="item.partFamilyName" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="工作中心" prop="workCenter"> |
| | | <el-select |
| | | v-model="dataForm.workCenter" |
| | | placeholder="工作中心" |
| | | style="width: 100%" |
| | | filterable |
| | | > |
| | | filterable > |
| | | <el-option |
| | | v-for="item in workCenterOptions" |
| | | :key="item.id" |
| | |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="机器运转因素" prop="machRunFactor"> |
| | | <el-input |
| | | v-model="dataForm.machRunFactor" |
| | | placeholder="机器运转因素" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="机器设置时间" prop="machSetupTime"> |
| | | <el-input |
| | | v-model="dataForm.machSetupTime" |
| | | placeholder="机器设置时间" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="人工类别" prop="laborClassNo"> |
| | | <el-select |
| | | v-model="dataForm.laborClassNo" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="劳力运转因素" prop="laborRunFactor"> |
| | | <el-input |
| | | v-model="dataForm.laborRunFactor" |
| | | placeholder="劳力运转因素" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="劳力设置时间" prop="laborSetupTime"> |
| | | <el-input |
| | | v-model="dataForm.laborSetupTime" |
| | | placeholder="劳力设置时间" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label="因素单位" prop="runTimeCodeDb"> |
| | | <el-select |
| | | v-model="dataForm.runTimeCodeDb" |
| | | placeholder="因素单位" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in runTimeCodeDbOptions" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="班组人员" prop="crewSize"> |
| | | <el-input |
| | | style="width:100%" |
| | | v-model="dataForm.crewSize" |
| | | placeholder="班组人员" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="外部工序项目" prop="outsideOpItem"> |
| | | <el-select |
| | | v-model="dataForm.outsideOpItem" |
| | | placeholder="外部工序项目" |
| | | style="width: 170px" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="item in outsideOpItemOptions" |
| | | :key="item.id" |
| | | :label='item.value + "-" + item.label ' |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input |
| | | v-model="dataForm.remark" |
| | | placeholder="备注" |
| | | style="width: 280px" |
| | | style="width: 100%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="padding-top: 10px"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="配置项"> |
| | | <el-checkbox-group |
| | | v-model="checkboxGroup" |
| | | @change="checkboxGroupChange()" |
| | | > |
| | | <el-checkbox-button |
| | | label="productionCounting" |
| | | key="productionCounting" |
| | | >报工</el-checkbox-button |
| | | > |
| | | <el-checkbox-button label="daq" key="daq" |
| | | >采集</el-checkbox-button |
| | | > |
| | | <el-checkbox-button label="inspection" key="inspection" |
| | | >检验</el-checkbox-button |
| | | > |
| | | <el-checkbox-button |
| | | label="autoInspection" |
| | | key="autoInspection" |
| | | >自动报检</el-checkbox-button |
| | | > |
| | | <el-checkbox-button label="semiFinished" key="semiFinished" |
| | | >半成品</el-checkbox-button |
| | | > |
| | | <el-checkbox-button label="materialCost" key="materialCost" |
| | | >投料</el-checkbox-button |
| | | > |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-col :span="6"> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | |
| | | <div class="operation-detail"> |
| | | <el-tabs type="card" style="width: 100%;height: 100%"> |
| | | <el-tab-pane label="基础" style="height: 100%"> |
| | | <!-- <el-tab-pane label="基础" style="height: 100%"> |
| | | <el-card class="operation-capacity" header="工序能力"> |
| | | <el-transfer |
| | | filterable |
| | |
| | | </div> |
| | | </el-upload> |
| | | </el-card> |
| | | </el-tab-pane> |
| | | </el-tab-pane> --> |
| | | <el-tab-pane label="参数" style="height: 100%"> |
| | | <el-card class="operation-capacity" header="工序参数集模板"> |
| | | <div slot="header"> |
| | |
| | | laborRunFactor: 0, |
| | | laborSetupTime: 0, |
| | | runTimeCodeDb: '2', |
| | | crewSize: 1, |
| | | crewSize: null, |
| | | outsideOpItem:null |
| | | }, |
| | | operationTemplateList: [], |
| | |
| | | ], |
| | | name: [ |
| | | { required: true, message: '工序名称不能为空', trigger: 'blur' } |
| | | ], |
| | | workCenter: [ |
| | | { required: true, message: '工作中心不能为空', trigger: 'blur' } |
| | | ], |
| | | productionCounting: [ |
| | | { required: true, message: '是否报工不能为空', trigger: 'blur' } |
| | |
| | | // } |
| | | }, |
| | | init() { |
| | | this.operationId = this.dataForm.id |
| | | this.fetchCapabilityForOperation() |
| | | // this.operationId = this.dataForm.id |
| | | // this.fetchCapabilityForOperation() |
| | | if (this.dataForm.id) { |
| | | getObj(this.dataForm.id).then((response) => { |
| | | this.dataForm = response.data.data |
| | |
| | | this.dataForm.laborRunFactor = 0 |
| | | this.dataForm.laborSetupTime = 0 |
| | | this.dataForm.runTimeCodeDb = '2' |
| | | this.dataForm.crewSize = 1 |
| | | this.dataForm.crewSize = null |
| | | this.fileList = [] |
| | | this.operationTemplateList = [] |
| | | this.stepList = [] |
| | |
| | | this.$refs.dataForm.validate((valid) => { |
| | | if (valid) { |
| | | // 校验【机器运转因素】、【机器设置时间】、【劳力运转因素】、【劳力设置时间】中至少有一个字段的值须大于0 |
| | | if ( |
| | | this.dataForm.machRunFactor == 0 && |
| | | this.dataForm.machSetupTime == 0 && |
| | | this.dataForm.laborRunFactor == 0 && |
| | | this.dataForm.laborSetupTime == 0 |
| | | ) { |
| | | this.$message.error( |
| | | '【机器运转因素】、【机器设置时间】、【劳力运转因素】、【劳力设置时间】中至少有一个字段的值须大于0' |
| | | ) |
| | | this.isSubmit = false |
| | | } else { |
| | | // if ( |
| | | // this.dataForm.machRunFactor == 0 && |
| | | // this.dataForm.machSetupTime == 0 && |
| | | // this.dataForm.laborRunFactor == 0 && |
| | | // this.dataForm.laborSetupTime == 0 |
| | | // ) { |
| | | // this.$message.error( |
| | | // '【机器运转因素】、【机器设置时间】、【劳力运转因素】、【劳力设置时间】中至少有一个字段的值须大于0' |
| | | // ) |
| | | // this.isSubmit = false |
| | | // } else { |
| | | // 【人工类别】为空时【班组人员】必须为空,否则必须大于0 |
| | | let remindInfo = '' |
| | | let remindFlag = false |
| | |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | // } |
| | | } else { |
| | | this.isSubmit = false |
| | | } |
| | |
| | | <style> |
| | | .operation-basic { |
| | | background-color: #fff; |
| | | height: 200px; |
| | | height: 130px; |
| | | display: flex; |
| | | padding: 20px 30px; |
| | | border: 1px solid #ddd; |