| | |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="产品名称" style=" display: flex;"> |
| | | <el-form-item label="产品名称/编码" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.partcode" |
| | | filterable |
| | |
| | | <el-option |
| | | v-for="item in partArr" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <TableColumnSettings |
| | | :list1="tableColumnSettingsArray" |
| | | @tableColumnUpdate="tableColumnUpdate" |
| | | /> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | :key="tableTimeStampArrayKey" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="tableHeight" |
| | |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | |
| | | <el-table-column |
| | | v-for="item in tableColumnSettingsArray" |
| | | v-if="item.show" |
| | | :key="item.id" |
| | | :sortable="item.sortable" |
| | | :prop="item.prop" |
| | | :min-width="item.minWidth" |
| | | :label="item.label" |
| | | :width="item.width" |
| | | show-tooltip-when-overflow |
| | | :fixed="item.fixed?(item.fixed==='left'?'left':'right'):false" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="!row[item.prop]">/</div> |
| | | <div v-else-if="item.prop==='eqp_value'||item.prop==='stand_value'"> |
| | | {{ row[item.prop] }} 秒 |
| | | </div> |
| | | <div v-else>{{ row[item.prop] }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="RowNum" |
| | | width="50" |
| | | label="序号" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="partcode" |
| | | min-width="160" |
| | | show-tooltip-when-overflow |
| | | label="产品编码" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | show-tooltip-when-overflow |
| | | min-width="160" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="partspec" |
| | | label="产品规格" |
| | | min-width="110" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.partspec">{{ row.partspec }}</div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wksp_name" |
| | | label="生产车间" |
| | | min-width="110" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="route_name" |
| | | label="工艺路线" |
| | | sortable="custom" |
| | | min-width="120" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="加工工序" |
| | | sortable="custom" |
| | | min-width="110" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="eqp_name" |
| | | label="加工设备" |
| | | show-tooltip-when-overflow |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="eqp_value" |
| | | label="设备节拍" |
| | | show-tooltip-when-overflow |
| | | width="110" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.eqp_value">{{ row.eqp_value }} <span style="margin-left: 2px">秒</span></div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="stand_value" |
| | | label="生产节拍" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.stand_value">{{ row.stand_value }} <span style="margin-left: 2px">秒</span></div> |
| | | <div v-else>/</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="cavity_qty" |
| | | label="型腔数" |
| | | show-tooltip-when-overflow |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="unprice" |
| | | width="110" |
| | | label="计件单价" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="RowNum"--> |
| | | <!-- width="50"--> |
| | | <!-- label="序号"--> |
| | | <!-- fixed--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="partcode"--> |
| | | <!-- min-width="160"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- label="产品编码"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="partname"--> |
| | | <!-- label="产品名称"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- min-width="160"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="partspec"--> |
| | | <!-- label="产品规格"--> |
| | | <!-- min-width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.partspec">{{ row.partspec }}</div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="wksp_name"--> |
| | | <!-- label="生产车间"--> |
| | | <!-- min-width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="route_name"--> |
| | | <!-- label="工艺路线"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- min-width="120"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="stepname"--> |
| | | <!-- label="加工工序"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- min-width="110"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="eqp_name"--> |
| | | <!-- label="加工设备"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- min-width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="eqp_value"--> |
| | | <!-- label="设备节拍"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.eqp_value">{{ row.eqp_value }} <span style="margin-left: 2px">秒</span></div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="stand_value"--> |
| | | <!-- label="生产节拍"--> |
| | | <!-- width="110"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- sortable="custom"--> |
| | | <!-- >--> |
| | | <!-- <template slot-scope="{row}">--> |
| | | <!-- <div v-if="row.stand_value">{{ row.stand_value }} <span style="margin-left: 2px">秒</span></div>--> |
| | | <!-- <div v-else>/</div>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="cavity_qty"--> |
| | | <!-- label="型腔数"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- width="110"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="unprice"--> |
| | | <!-- width="110"--> |
| | | <!-- label="计件单价"--> |
| | | <!-- show-tooltip-when-overflow--> |
| | | <!-- sortable="custom"--> |
| | | <!-- />--> |
| | | |
| | | <el-table-column |
| | | label="操作" |
| | |
| | | v-el-drag-dialog |
| | | :title="operation==='add'?'新增':'编辑'" |
| | | :visible.sync="dialogVisible" |
| | | width="1000px" |
| | | width="1100px" |
| | | :top="isIpad?'5vh':'15vh'" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="100px"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin-top: -20px" /> |
| | | <el-form-item prop="partcode" label="产品名称"> |
| | | <el-form-item prop="partcode" label="产品名称/编码"> |
| | | <el-select |
| | | v-show="operation==='add'" |
| | | v-model="dialogForm.partcode" |
| | |
| | | <el-option |
| | | v-for="item in partArr2" |
| | | :key="item.partcode" |
| | | :label="item.partname" |
| | | :label="item.partname+'/'+item.partcode" |
| | | :value="item.partcode" |
| | | /> |
| | | </el-select> |
| | |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import TableColumnSettings from '@/components/TableColumnSettings' |
| | | |
| | | export default { |
| | | name: 'JPGJ', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | Pagination, ImportPicker, TableColumnSettings |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | |
| | | eqpArr: [], // 产品集合 |
| | | total: 10, |
| | | tableData: [], |
| | | tableColumnSettingsArray: [ |
| | | // { minWidth: 50, width: false, prop: 'id', label: 'id', id: 1, show: false, fixed: false, sortable: false }, // 隐藏列 show: false隐藏,true显示 |
| | | { minWidth: 25, width: 50, prop: 'RowNum', label: '序号', id: 2, show: true, fixed: 'left', sortable: false }, // custom |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partcode', |
| | | label: '产品编码', |
| | | id: 3, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partname', |
| | | label: '产品名称', |
| | | id: 4, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'partspec', |
| | | label: '产品规格', |
| | | id: 5, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 130, |
| | | prop: 'wksp_code', |
| | | label: '生产车间编码', |
| | | id: 6, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, |
| | | { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'wksp_name', |
| | | label: '生产车间', |
| | | id: 7, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 130, |
| | | prop: 'route_code', |
| | | label: '工艺路线编码', |
| | | id: 8, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'route_name', |
| | | label: '工艺路线', |
| | | id: 9, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 130, |
| | | prop: 'stepcode', |
| | | label: '加工工序编码', |
| | | id: 10, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'stepname', |
| | | label: '加工设备', |
| | | id: 11, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 130, |
| | | prop: 'eqp_code', |
| | | label: '加工设备编码', |
| | | id: 12, |
| | | show: false, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: 110, |
| | | width: false, |
| | | prop: 'eqp_name', |
| | | label: '加工工序', |
| | | id: 13, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'eqp_value', |
| | | label: '设备节拍', |
| | | id: 14, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'stand_value', |
| | | label: '生产节拍', |
| | | id: 15, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'cavity_qty', |
| | | label: '腔型数', |
| | | id: 16, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | }, { |
| | | minWidth: false, |
| | | width: 110, |
| | | prop: 'cavity_qty', |
| | | label: '计件单价', |
| | | id: 17, |
| | | show: true, |
| | | fixed: false, |
| | | sortable: true |
| | | } |
| | | |
| | | ], |
| | | tableTimeStampArrayKey: new Date().getTime(), // 表格key |
| | | dialogVisible: false, |
| | | dialogForm: { |
| | | partcode: '', // 产品编码 |
| | |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | tableColumnUpdate(val, isCopyTrue) { |
| | | if (isCopyTrue) { |
| | | this.tableColumnSettingsArray = val |
| | | } |
| | | this.tableTimeStampArrayKey = new Date().getTime() |
| | | this.$refs.tableDataRef.doLayout() |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | return 'custom-row' |
| | | }, |
| | |
| | | radioChange(val) { |
| | | this.isEqpTableEdit = true |
| | | |
| | | this.eqpTable.page = 1 |
| | | this.eqpTable.rows = 10 |
| | | |
| | | this.radioChangeTempValue = val |
| | | console.log(val, 'val') |
| | | // this.dialogForm.stepcode = this.stepDialogArr.find(item => item.name === val).code |
| | | this.getEqpTable(val) |
| | | }, |
| | |
| | | this.getEqpTable() |
| | | }, |
| | | async getEqpTable(val) { |
| | | console.log(val) |
| | | console.log(typeof 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 if (typeof val === 'object') { |
| | | const index = this.stepDialogArr.findIndex(i => i.name === this.radioChangeTempValue) |
| | | this.eqpTable.steptype = this.stepDialogArr[index].flag |
| | | this.eqpTable.partcode = this.dialogForm.partcode |
| | | this.eqpTable.routecode = this.dialogForm.routecode |
| | | this.eqpTable.stepcode = this.stepDialogArr[index].code |
| | | this.dialogForm.stepcode = this.stepDialogArr[index].name |
| | | } else { |
| | | this.eqpTable.steptype = this.stepDialogArr[0].flag |
| | | this.eqpTable.partcode = this.dialogForm.partcode |