| | |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button icon="el-icon-download" @click="upload">导入</el-button> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button v-waves icon="el-icon-download" @click="upload">导入</el-button> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | |
| | | :model="form" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | style="display: flex;" |
| | | > |
| | | <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 |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}"> |
| | | <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}"> |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | |
| | | <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" |
| | | /> |
| | |
| | | label="生产车间" |
| | | min-width="110" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="route_name" |
| | |
| | | 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" |
| | | > |
| | |
| | | prop="stand_value" |
| | | label="生产节拍" |
| | | width="110" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | <el-table-column |
| | | prop="cavity_qty" |
| | | label="型腔数" |
| | | show-tooltip-when-overflow |
| | | width="110" |
| | | sortable="custom" |
| | | /> |
| | |
| | | prop="unprice" |
| | | width="110" |
| | | label="计件单价" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | |
| | |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-tooltip class="item" effect="dark" content="编辑" placement="top"> |
| | | <i class="el-icon-edit-outline" @click="edit('edit',row)" /> |
| | | <i :style="{color:$store.state.settings.theme}" class="el-icon-edit-outline" @click="edit('edit',row)" /> |
| | | </el-tooltip> |
| | | <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top"> |
| | | <i class="el-icon-delete" @click="del(row)" /> |
| | | <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" /> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="operation==='add'?'新增':'编辑'" |
| | | :visible.sync="dialogVisible" |
| | | width="1000px" |
| | |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <div style="display: flex;align-items: center"> |
| | | <i class="el-icon-s-comment" style="color:#42b983;margin-top: -20px" /> |
| | | <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" style="margin-top: -20px" /> |
| | | <el-form-item prop="partcode" label="产品名称"> |
| | | <el-select |
| | | v-show="operation==='add'" |
| | |
| | | </el-form> |
| | | <div style="display: flex;flex-direction: column;margin-bottom: 20px"> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />工序集合 |
| | | <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 0" />工序集合 |
| | | </div> |
| | | <div style="display: flex;background-color: #F2F6FC;padding:20px 0 20px 20px; min-height: 100px"> |
| | | <el-radio-group v-model="dialogForm.stepcode" @change="radioChange"> |
| | |
| | | |
| | | <div style="display: flex;flex-direction: column;min-height: 300px"> |
| | | <div> |
| | | <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />设备列表 |
| | | <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin: -20px 10px 20px 0" />设备列表 |
| | | </div> |
| | | |
| | | <el-table |
| | | ref="eqpDialogArrRef" |
| | | :key="tableTimeStampKey" |
| | | class="tableFixed" |
| | | :data="eqpDialogArr" |
| | | :height="tableHeight" |
| | |
| | | prop="eqpcode" |
| | | label="设备编码" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="eqpname" |
| | | label="设备名称" |
| | | min-width="110" |
| | | 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" |
| | | label="设备节拍" |
| | | show-tooltip-when-overflow |
| | | width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button> |
| | | <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">复制</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="editRow(row)">编辑</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="copyRow(row)">复制</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">返 回</el-button> |
| | | <!-- <el-button @click="dialogVisibleCancel">取 消</el-button>--> |
| | | <!-- <el-button type="primary" @click="dialogVisibleConfirm">确 定</el-button>--> |
| | | <el-button v-waves @click="dialogVisibleCancel">返 回</el-button> |
| | | <!-- <el-button v-waves @click="dialogVisibleCancel">取 消</el-button>--> |
| | | <!-- <el-button v-waves type="primary" @click="dialogVisibleConfirm">确 定</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | |
| | | StepSelectEqpList |
| | | } from '@/api/zzmx' |
| | | import ImportPicker from '@/components/ImportPicker' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | |
| | | export default { |
| | | name: 'JPGJ', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | isIpad: false, |
| | |
| | | editStepName: '', // 编辑时加工工序名称 |
| | | operation: '', |
| | | dialogFormRules: {}, |
| | | radioChangeTempValue: '', |
| | | |
| | | tableTimeStampKey: new Date().getTime(), |
| | | |
| | | title_value: '数据导入 / 节拍工价', |
| | | code: '24', |
| | |
| | | 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 saveRow(row) { |
| | | if (parseFloat(row.unprice) <= 0) { |
| | | return this.$message.info('计件单价必须大于零!') |
| | | } |
| | | |
| | | const data = { |
| | | partcode: this.eqpTable.partcode, // 产品编码 |
| | | routecode: this.eqpTable.routecode, // 工艺路线编码 |
| | |
| | | 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 |
| | | }, |
| | | // 编辑行 |
| | |
| | | } |
| | | }) |
| | | this.isEqpTableEdit = false |
| | | this.tableTimeStampKey = new Date().getTime() |
| | | } else { |
| | | return this.$message.info('只能一行一行修改!') |
| | | } |
| | |
| | | const res = await SaveBeatRate(newData) |
| | | if (res.code === '200') { |
| | | this.$message.success('复制成功!') |
| | | await this.getEqpTable() |
| | | this.radioChange(this.radioChangeTempValue) |
| | | this.isEqpTableEdit = true |
| | | } |
| | | }, |