| | |
| | | style="display: flex;justify-content: space-between" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label-width="70px" label="产品名称" style=" display: flex;"> |
| | | <el-form-item label="产品名称/编码" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.partcode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | |
| | | @change="partChange" |
| | | > |
| | | <!-- @focus="getPartSelect"--> |
| | | <el-option |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :label="item.partname+' / '+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | min-width="160" |
| | | min-width="300" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | |
| | | /> |
| | | <el-table-column |
| | | prop="eqpcode" |
| | | label="设备编码" |
| | | :label="eqpTable.steptype==='W'?'供应商编码':'设备编码'" |
| | | sortable="custom" |
| | | min-width="110" |
| | | show-tooltip-when-overflow |
| | | min-width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="eqpname" |
| | | label="设备名称" |
| | | min-width="110" |
| | | :label="eqpTable.steptype==='W'?'供应商名称':'设备名称'" |
| | | min-width="120" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="wksp_name" |
| | | sortable="custom" |
| | | label="生产车间" |
| | | show-tooltip-when-overflow |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | sortable="custom" |
| | | prop="eqp_value" |
| | | show-tooltip-when-overflow |
| | | label="设备节拍" |
| | | width="110" |
| | | > |
| | |
| | | partcode: '', |
| | | routecode: '', |
| | | stepcode: '', |
| | | steptype: '', |
| | | page: 1, |
| | | rows: 10, |
| | | prop: 'eqpcode', |
| | |
| | | }, |
| | | async getEqpTable(val) { |
| | | if (typeof val === 'string') { |
| | | 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') { |
| | | } 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 |
| | |
| | | }, |
| | | // 保存行 |
| | | async saveRow(row) { |
| | | if (parseFloat(row.unprice) <= 0 && this.eqpTable.steptype !== 'W') { |
| | | return this.$message.info('计件单价必须大于零!') |
| | | } |
| | | const data = { |
| | | partcode: this.eqpTable.partcode, // 产品编码 |
| | | routecode: this.eqpTable.routecode, // 工艺路线编码 |