| | |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button type="primary" icon="el-icon-setting" @click="setting('setting')">设置</el-button> |
| | | <el-button v-waves type="primary" icon="el-icon-setting" @click="setting('setting')">设置</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" style="justify-content: flex-start"> |
| | | <el-form-item label-width="70px" label="生产车间" style=" display: flex;"> |
| | | <div class="elForm"> |
| | | <el-form-item label="生产车间" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.workshop" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | @change="getWhkspIsEqpSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in workshopArr" |
| | |
| | | v-model="form.devicetype" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | :disabled="form.workshop===''" |
| | | > |
| | | <el-option |
| | | v-for="item in devicetypeArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | :key="item.eqp_code" |
| | | :label="item.eqp_name" |
| | | :value="item.eqp_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </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 |
| | |
| | | label="生产车间" |
| | | sortable="custom" |
| | | width="160" |
| | | show-tooltip-when-overflow |
| | | /> |
| | | <el-table-column |
| | | prop="CaptPlanDeviceType" |
| | | label="生产单元" |
| | | width="160" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | readonly |
| | | /> |
| | | <el-button |
| | | |
| | | type="primary" |
| | | style="padding: 0 10px;margin-left: 5px" |
| | | class="el-icon-search" |
| | |
| | | min-width="300" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-input v-if="row.CaptPlanWorkShift===null" :disabled="row.CaptPlanWorkShift===null" /> |
| | | <date-picker |
| | | v-else |
| | | v-model="row.CaptPlanShopCalendarList" |
| | | :row-data="row" |
| | | style="width: 100%;" |
| | |
| | | prop="CaptPlanUser" |
| | | label="创建人员" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="CaptPlanDate" |
| | | width="160" |
| | | label="创建时间" |
| | | show-tooltip-when-overflow |
| | | sortable="custom" |
| | | /> |
| | | |
| | |
| | | width="120" |
| | | label="有效状态" |
| | | sortable="custom" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.CaptPlanStus==='Y'"> |
| | | <svg-icon icon-class="circleYes" style="margin-right: 2px" /> |
| | | <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" /> |
| | | 有效 |
| | | </div> |
| | | <div v-else-if="row.CaptPlanStus==='N'"> |
| | | <svg-icon icon-class="circleNo" style="margin-right: 2px" /> |
| | | <i class="el-icon-info" style="margin-right: 2px" /> |
| | | 无效 |
| | | </div> |
| | | <div v-else>/</div> |
| | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="operation==='setting'?'设置':'默认方案'" |
| | | :visible.sync="dialogVisible" |
| | | width="1360px" |
| | |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-button v-if="operation==='setting'" type="primary" @click="addRow">新增</el-button> |
| | | <el-button v-if="operation==='setting'" v-waves type="primary" @click="addRow">新增</el-button> |
| | | <div class="elTableDiv"> |
| | | <!-- 选择默认方案的时候是这个table--> |
| | | <el-table |
| | | v-if="operation!=='setting'" |
| | | ref="tableDataDialogRef" |
| | | class="tableFixedDialog" |
| | | :data="tableDataDialog" |
| | |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @row-click="rowClick" |
| | | > |
| | | |
| | | <el-table-column |
| | | v-if="operation!=='setting'" |
| | | width="50" |
| | | fixed |
| | | > |
| | |
| | | v-model="radioSelectedCode" |
| | | :label="row.code" |
| | | style="padding-left: 10px;" |
| | | @change.native="getCurrentRowSource(row.code)" |
| | | /> |
| | | <!-- @change.native="getCurrentRowSource(row.code)"--> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="code" |
| | | label="方案编码" |
| | | width="100" |
| | | fixed |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="delRow(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="delRow(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> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <!-- 设置的时候是这个table--> |
| | | <el-table |
| | | v-else |
| | | ref="tableDataDialogRef" |
| | | class="tableFixedDialog" |
| | | :data="tableDataDialog" |
| | | :style="{width: 100+'%',height:(tableHeight-200)+'px'}" |
| | | border |
| | | :height="(tableHeight-200)+'px'" |
| | | :row-class-name="tableRowClassName" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | > |
| | | <el-table-column |
| | | prop="code" |
| | | label="方案编码" |
| | | width="100" |
| | | fixed |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.code }}</div> |
| | | <el-input v-else v-model="row.code" placeholder="请输入" type="text" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="方案名称" |
| | | width="150" |
| | | fixed |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0">{{ row.name }}</div> |
| | | <el-input v-else v-model="row.name" placeholder="请输入" type="text" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="duration" |
| | | label="工作时长" |
| | | width="100" |
| | | show-tooltip-when-overflow |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div>{{ row.duration ? parseFloat(row.duration.toFixed(2)) : '0' }} 小时</div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="wktme1_start" |
| | | label="工作时间一" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0"> |
| | | <div v-if="row.wktme1_start">{{ row.wktme1_start }}</div> |
| | | <div v-else>/</div> |
| | | </div> |
| | | <el-time-picker |
| | | v-else |
| | | v-model="row.wktme1_start" |
| | | is-range |
| | | :editable="false" |
| | | :clearable="false" |
| | | range-separator="~" |
| | | start-placeholder="开始" |
| | | end-placeholder="结束" |
| | | format="HH:mm" |
| | | @blur="val=>getTime(val,row,'wktme1_start')" |
| | | @focus="val=>getTime(val,row,'wktme1_start')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wktme2_start" |
| | | label="工作时间二" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0"> |
| | | <div v-if="row.wktme2_start">{{ row.wktme2_start }}</div> |
| | | <div v-else>/</div> |
| | | </div> |
| | | <el-time-picker |
| | | v-else-if="row.isVisible===1" |
| | | v-model="row.wktme2_start" |
| | | is-range |
| | | :disabled="row.wktme1_start.length===0" |
| | | :editable="false" |
| | | :clearable="false" |
| | | range-separator="~" |
| | | start-placeholder="开始" |
| | | end-placeholder="结束" |
| | | format="HH:mm" |
| | | @blur="val=>getTime(val,row,'wktme2_start')" |
| | | @focus="val=>getTime(val,row,'wktme2_start')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wktme3_start" |
| | | label="工作时间三" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0"> |
| | | <div v-if="row.wktme3_start">{{ row.wktme3_start }}</div> |
| | | <div v-else>/</div> |
| | | </div> |
| | | <el-time-picker |
| | | v-else-if="row.isVisible===1" |
| | | v-model="row.wktme3_start" |
| | | is-range |
| | | :disabled="row.wktme2_start.length===0" |
| | | :editable="false" |
| | | :clearable="false" |
| | | format="HH:mm" |
| | | range-separator="~" |
| | | start-placeholder="开始" |
| | | end-placeholder="结束" |
| | | @blur="val=>getTime(val,row,'wktme3_start')" |
| | | @focus="val=>getTime(val,row,'wktme3_start')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wktme4_start" |
| | | label="工作时间四" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0"> |
| | | <div v-if="row.wktme4_start">{{ row.wktme4_start }}</div> |
| | | <div v-else>/</div> |
| | | </div> |
| | | <el-time-picker |
| | | v-else-if="row.isVisible===1" |
| | | v-model="row.wktme4_start" |
| | | is-range |
| | | :disabled="row.wktme3_start.length===0" |
| | | format="HH:mm" |
| | | :clearable="false" |
| | | :editable="false" |
| | | range-separator="~" |
| | | start-placeholder="开始" |
| | | end-placeholder="结束" |
| | | @blur="val=>getTime(val,row,'wktme4_start')" |
| | | @focus="val=>getTime(val,row,'wktme4_start')" |
| | | /> |
| | | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wktme5_start" |
| | | label="工作时间五" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.isVisible===0"> |
| | | <div v-if="row.wktme5_start">{{ row.wktme5_start }}</div> |
| | | <div v-else>/</div> |
| | | </div> |
| | | <el-time-picker |
| | | v-else-if="row.isVisible===1" |
| | | v-model="row.wktme5_start" |
| | | is-range |
| | | :disabled="row.wktme4_start.length===0" |
| | | :clearable="false" |
| | | :editable="false" |
| | | format="HH:mm" |
| | | range-separator="~" |
| | | start-placeholder="开始" |
| | | end-placeholder="结束" |
| | | @blur="val=>getTime(val,row,'wktme5_start')" |
| | | @focus="val=>getTime(val,row,'wktme5_start')" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="operation==='setting'" |
| | | width="100" |
| | | fixed="right" |
| | | label="操作" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="delRow(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> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">返 回</el-button> |
| | | <el-button v-waves @click="dialogVisibleCancel">返 回</el-button> |
| | | <el-button |
| | | v-if="operation!=='setting'" |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | |
| | | } from '@/api/scgl' |
| | | import { DeviceTypeSelect, WorkShopSelect } from '@/api/sbgl' |
| | | import { handleDatetime3 } from '@/utils/global' |
| | | import { WhkspIsEqpSearch } from '@/api/jcsz' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | |
| | | export default { |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination, DatePicker |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | |
| | | this.getHeight() |
| | | }, |
| | | methods: { |
| | | // 行点击事件 |
| | | rowClick(row, event, column) { |
| | | this.radioSelectedCode = row.code |
| | | }, |
| | | // 子组件失焦时执行 |
| | | over(val) { |
| | | if (val) { |
| | |
| | | this.getCapacityPlanningSearch().then(res => { |
| | | if (res.code === '200') { |
| | | this.getWorkShopSelect() |
| | | this.getDeviceTypeSelect() |
| | | // this.getDeviceTypeSelect() |
| | | } |
| | | }) |
| | | }, |
| | |
| | | const { data: res } = await WorkShopSelect() |
| | | this.workshopArr = res |
| | | }, |
| | | async getDeviceTypeSelect() { |
| | | const { data: res } = await DeviceTypeSelect() |
| | | // async getDeviceTypeSelect() { |
| | | // const { data: res } = await DeviceTypeSelect() |
| | | // this.devicetypeArr = res |
| | | // }, |
| | | async getWhkspIsEqpSearch(val) { |
| | | this.form.devicetype = '' |
| | | const { data: res } = await WhkspIsEqpSearch({ wkshpcode: val }) |
| | | this.devicetypeArr = res |
| | | }, |
| | | mrfaSearch(row, operation) { |
| | |
| | | } |
| | | } |
| | | </style> |
| | | <style> |
| | | <style lang="scss"> |
| | | |
| | | .el-table .custom-row { |
| | | background: #f8f8fa; |
| | | } |
| | | |
| | | /*为了让面板在超出区域可显示*/ |
| | | .el-table__body-wrapper{ |
| | | overflow: visible !important |
| | | } |
| | | .table_only{ |
| | | overflow: visible !important |
| | | overflow: visible !important; |
| | | .el-table__body-wrapper{ |
| | | overflow: visible !important |
| | | } |
| | | } |
| | | /*为了让面板在超出区域可显示*/ |
| | | /*.el-table__body-wrapper{*/ |
| | | /* overflow: visible !important*/ |
| | | /*}*/ |
| | | /*.table_only{*/ |
| | | /*overflow: visible !important*/ |
| | | /*}*/ |
| | | </style> |