| | |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | min-width="160" |
| | | min-width="120" |
| | | label="产品编码" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | min-width="160" |
| | | min-width="200" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | prop="wksp_name" |
| | | label="生产车间" |
| | | min-width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | prop="stepname" |
| | | label="加工工序" |
| | | sortable="custom" |
| | | min-width="90" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="eqp_name" |
| | | label="加工设备/供方" |
| | | label="加工设备" |
| | | min-width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | style="width: 220px" |
| | | placeholder="请选择" |
| | | :popper-append-to-body="false" |
| | | |
| | | @change="partDialogChange" |
| | | > |
| | | <!-- @focus="getPartSelect2"--> |
| | |
| | | <div> |
| | | <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />工序集合 |
| | | </div> |
| | | <div style="display: flex;background-color: #F2F6FC;padding:20px 0 20px 20px; min-height: 100px"> |
| | | |
| | | <div style="display: flex;background-color: #F2F6FC;padding:10px; min-height: 100px"> |
| | | <el-radio-group v-model="dialogForm.stepcode" @change="radioChange"> |
| | | <el-radio |
| | | v-for="item in stepDialogArr" |
| | | v-for="(item,index) in stepDialogArr" |
| | | :key="item.code" |
| | | :style="{marginLeft:index%7===0?0:'10px',marginBottom:'10px'}" |
| | | :label="item.name" |
| | | border |
| | | /> |
| | |
| | | class="tableFixed" |
| | | :data="eqpDialogArr" |
| | | :height="tableHeight" |
| | | :style="{width: 100+'%',height:tableHeight-50+'px',}" |
| | | :style="{width: 100+'%',height:tableHeight-50+'px'}" |
| | | border |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | highlight-current-row |
| | | @sort-change="dialogSortChange" |
| | | > |
| | | <!-- @row-click="rowClick"--> |
| | | <el-table-column |
| | | width="50" |
| | | label="序号" |
| | |
| | | /> |
| | | <el-table-column |
| | | prop="eqpcode" |
| | | :label="eqpTable.steptype==='Z'?'设备编码':'外协供方编码'" |
| | | label="设备编码" |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="eqpname" |
| | | :label="eqpTable.steptype==='Z'?'设备名称':'外协供方名称'" |
| | | label="设备名称" |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | v-if="eqpTable.steptype==='Z'" |
| | | prop="wksp_name" |
| | | sortable="custom" |
| | | label="生产车间" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | v-if="eqpTable.steptype==='Z'" |
| | | sortable="custom" |
| | | prop="eqp_value" |
| | | label="设备节拍" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="eqpTable.steptype==='Z'" |
| | | prop="stand_value" |
| | | label="生产节拍" |
| | | sortable="custom" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="eqpTable.steptype==='Z'" |
| | | prop="cavity_qty" |
| | | label="腔型数" |
| | | sortable="custom" |
| | |
| | | page: 1, |
| | | rows: 10, |
| | | prop: 'eqpcode', |
| | | order: 'asc' |
| | | order: 'desc' |
| | | }, |
| | | eqpTableLength: 0, |
| | | isEqpTableEdit: true, |
| | |
| | | editStepName: '', // 编辑时加工工序名称 |
| | | operation: '', |
| | | dialogFormRules: {}, |
| | | radioChangeTempValue: '', |
| | | |
| | | title_value: '数据导入 / 节拍工价', |
| | | code: '24', |
| | |
| | | this.routeDialogArr = res |
| | | this.stepDialogArr = [] |
| | | this.eqpDialogArr = [] |
| | | this.dialogForm.routecode = '' |
| | | }, |
| | | async routeDialogChange(val) { |
| | | const { data: res } = await RouteSelectStep({ routecode: val }) |
| | | this.stepDialogArr = res |
| | | this.eqpDialogArr = [] |
| | | this.radioChangeTempValue = '' |
| | | }, |
| | | radioChange(val) { |
| | | this.isEqpTableEdit = true |
| | | |
| | | this.radioChangeTempValue = val |
| | | // this.dialogForm.stepcode = this.stepDialogArr.find(item => item.name === val).code |
| | | this.getEqpTable(val) |
| | | }, |
| | |
| | | }, |
| | | async getEqpTable(val) { |
| | | if (typeof val === 'string') { |
| | | console.log('执行1') |
| | | this.eqpTable.steptype = this.stepDialogArr.find(item => item.name === val).flag |
| | | this.eqpTable.partcode = this.dialogForm.partcode |
| | | this.eqpTable.routecode = this.dialogForm.routecode |
| | | this.eqpTable.stepcode = this.stepDialogArr.find(item => item.name === val).code |
| | | } else if (typeof val === 'number') { |
| | | console.log('执行2') |
| | | // console.log(this.stepDialogArr) |
| | | // } else if (typeof val === 'number') { |
| | | } else { |
| | | this.eqpTable.steptype = this.stepDialogArr[0].flag |
| | | this.eqpTable.partcode = this.dialogForm.partcode |
| | | this.eqpTable.routecode = this.dialogForm.routecode |
| | | this.eqpTable.stepcode = this.stepDialogArr[0].code |
| | | this.dialogForm.stepcode = this.stepDialogArr[0].name |
| | | } |
| | | |
| | | const res = await StepSelectEqpList(this.eqpTable) |
| | | this.eqpDialogArr = res.data |
| | | this.eqpTableLength = res.count |
| | |
| | | if (res.code === '200') { |
| | | this.isEqpTableEdit = true |
| | | this.$message.success('保存成功!') |
| | | await this.getEqpTable() |
| | | this.radioChange(this.radioChangeTempValue) |
| | | } |
| | | }, |
| | | // 取消行 |
| | | cancelRow(row) { |
| | | this.getEqpTable() |
| | | this.radioChange(this.radioChangeTempValue) |
| | | this.dialogForm.stepcode = this.radioChangeTempValue |
| | | this.isEqpTableEdit = true |
| | | }, |
| | | // 编辑行 |
| | |
| | | return this.$message.info('只能一行一行修改!') |
| | | } |
| | | }, |
| | | // rowClick(row, column, event) { |
| | | // console.log(row, column, event, 3) |
| | | // console.log(this.dialogForm.stepcode, 4) |
| | | // this.getEqpTable(this.dialogForm.stepcode) |
| | | // }, |
| | | // 复制行 |
| | | async copyRow(row) { |
| | | async copyRow(row) { |
| | | let currentData = {}// 当前行对象 |
| | | let nextData = {}// 下一行对象 |
| | | if (row.RowNum === this.eqpDialogArr.length) { |
| | |
| | | const res = await SaveBeatRate(newData) |
| | | if (res.code === '200') { |
| | | this.$message.success('复制成功!') |
| | | await this.getEqpTable() |
| | | this.radioChange(this.radioChangeTempValue) |
| | | this.isEqpTableEdit = true |
| | | } |
| | | }, |
| | |
| | | this.getPartSelect2() |
| | | }, |
| | | // 修改按钮 |
| | | async edit(operation, row) { |
| | | async edit(operation, row) { |
| | | this.operation = operation |
| | | this.dialogVisible = true |
| | | |
| | |
| | | this.editRouteName = row.route_name |
| | | this.editStepName = row.stepname |
| | | |
| | | // this.$nextTick(() => { |
| | | await this.partDialogChange(row.partcode) |
| | | await this.routeDialogChange(row.route_code) |
| | | this.dialogForm.partcode = row.partcode |
| | | this.dialogForm.routecode = row.route_code |
| | | this.dialogForm.stepcode = row.stepcode |
| | | // }) |
| | | await this.partDialogChange(row.partcode) |
| | | await this.routeDialogChange(row.route_code) |
| | | await this.radioChange(0) |
| | | }, |
| | | // 删除按钮 |
| | |
| | | <!--公共页面样式--> |
| | | <style lang="scss" scoped> |
| | | $main_color: #42b983; |
| | | .el-button--text{ |
| | | .el-button--text { |
| | | font-size: 14px; |
| | | cursor: pointer; |
| | | } |
| | | .el-icon-share ,.el-icon-delete,.el-icon-edit-outline{ |
| | | |
| | | .el-icon-share, .el-icon-delete, .el-icon-edit-outline { |
| | | color: $main_color; |
| | | cursor: pointer; |
| | | } |
| | | .el-icon-edit-outline{ |
| | | |
| | | .el-icon-edit-outline { |
| | | margin-right: 15px; |
| | | } |
| | | |
| | |
| | | background-color: #f8f8fa; |
| | | } |
| | | |
| | | ::v-deep .el-table__body .el-table__row.hover-row td{ |
| | | background-color: #eaecef ; |
| | | ::v-deep .el-table__body .el-table__row.hover-row td { |
| | | background-color: #eaecef; |
| | | } |
| | | |
| | | ::v-deep .el-form--inline .el-form-item__label { |
| | |
| | | .body ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .userDialogVisible ::v-deep .el-form-item { |
| | | margin-bottom: 0; |
| | | } |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | |
| | | .tableFixed { |
| | | ::v-deep .el-table__fixed-right { |
| | | height: 100% !important; |
| | | } |
| | | ::v-deep .el-table__fixed{ |
| | | |
| | | ::v-deep .el-table__fixed { |
| | | height: 100% !important; |
| | | } |
| | | } |