| | |
| | | <template /> |
| | | <template> |
| | | <div> |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-check" @click="reportAdjust()">报工审核</el-button> |
| | | <!-- <el-button v-waves type="success" icon="el-icon-download" @click="$router.push('./../systemSetting/dataImport?fileCode=2')">导入</el-button>--> |
| | | </div> |
| | | |
| | | <div class="bodyTopFormGroup"> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label="审核状态" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.reviewstatus" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in reviewstatusArr" |
| | | :key="item.code" |
| | | :label="item.name" |
| | | :value="item.code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车间名称" style=" display: flex;"> |
| | | <el-select |
| | | v-model="form.wkshopcode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in wkshopcodeArr" |
| | | :key="item.torg_code" |
| | | :label="item.torg_name" |
| | | :value="item.torg_code" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工单编码" style=" display: flex;"> |
| | | <el-input v-model="form.wo_code" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="产品编码" style=" display: flex;"> |
| | | <el-input v-model="form.partnumber" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="产品名称" style=" display: flex;"> |
| | | <el-input v-model="form.partname" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item v-show="isExpandForm" label="产品规格" style=" display: flex;">--> |
| | | <!-- <el-input v-model="form.partspec" placeholder="请输入" style="width: 200px" />--> |
| | | <!-- </el-form-item>--> |
| | | |
| | | <el-form-item v-show="isExpandForm" label="工序名称" style=" display: flex;"> |
| | | <el-input v-model="form.stepname" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-show="isExpandForm" label="报工人员" style=" display: flex;"> |
| | | <el-input v-model="form.reportuser" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item v-show="isExpandForm" label="报工时间" style=" display: flex;"> |
| | | <el-date-picker |
| | | v-model="form.reportdate" |
| | | type="daterange" |
| | | range-separator="~" |
| | | class="timeMini" |
| | | size="mini" |
| | | style="width: 200px;" |
| | | :clearable="false" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | /> |
| | | </el-form-item> |
| | | </div> |
| | | <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="getMesOrderStepReportVerifySearch">查询 |
| | | </el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | | class="bodyTopFormExpand" |
| | | > |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseout'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'" |
| | | @mouseenter="mouseHoverType=$event.type" |
| | | /> |
| | | <svg-icon |
| | | v-show="mouseHoverType==='mouseenter'" |
| | | style="cursor: pointer" |
| | | :icon-class="!isExpandForm?'doubleDown':'doubleUp'" |
| | | @click="isExpandForm=!isExpandForm" |
| | | @mouseout="mouseHoverType=$event.type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | class="tableFixed" |
| | | :data="tableData" |
| | | :height="isExpandForm?tableHeight:(tableHeight+40)+'px'" |
| | | border |
| | | row-class-name="custom-row" |
| | | :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="50" |
| | | :selectable="selected" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | prop="rowNum" |
| | | width="50" |
| | | fixed |
| | | label="序号" |
| | | /> |
| | | <el-table-column |
| | | prop="verify" |
| | | label="是否已审核" |
| | | sortable="custom" |
| | | width="120" |
| | | show-overflow-tooltip |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-tag v-if="row.verify==='Y'" size="small" type="success">已审核</el-tag> |
| | | <el-tag v-if="row.verify==='N'" size="small" type="danger">未审核</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wo_code" |
| | | label="报工工单" |
| | | sortable="custom" |
| | | min-width="160" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | prop="partnumber" |
| | | label="产品编码" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="partname" |
| | | label="产品名称" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="wkshp_name" |
| | | label="车间名称" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="task_qty" |
| | | label="任务数量" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | min-width="110" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="wkshp_name"--> |
| | | <!-- label="车间名称"--> |
| | | <!-- show-overflow-tooltip--> |
| | | <!-- sortable="custom"--> |
| | | <!-- min-width="110"--> |
| | | <!-- />--> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="eqp_name"--> |
| | | <!-- label="设备名称"--> |
| | | <!-- sortable="custom"--> |
| | | <!-- show-overflow-tooltip--> |
| | | <!-- min-width="110"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="stepname" |
| | | label="工序名称" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <!-- <el-table-column--> |
| | | <!-- prop="step_price"--> |
| | | <!-- label="工序单价"--> |
| | | <!-- show-overflow-tooltip--> |
| | | <!-- sortable="custom"--> |
| | | <!-- min-width="110"--> |
| | | <!-- />--> |
| | | <el-table-column |
| | | prop="steptype" |
| | | label="工序类型" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | min-width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.steptype === 'Z' ? '自制' : '外协' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="wx_name" |
| | | label="供应商" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | min-width="110" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.wx_name ? row.wx_name : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="usergroup_name" |
| | | label="报工班组" |
| | | show-overflow-tooltip |
| | | min-width="110" |
| | | sortable="custom" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | {{ row.usergroup_name ? row.usergroup_name : '/' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="username" |
| | | label="报工人员" |
| | | show-overflow-tooltip |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="report_qty" |
| | | label="合格数量" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="ng_qty" |
| | | label="不良数量" |
| | | show-overflow-tooltip |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="laborbad_qty" |
| | | label="工废数量" |
| | | min-width="110" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="materielbad_qty" |
| | | label="料废数量" |
| | | show-overflow-tooltip |
| | | min-width="110" |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | prop="report_date" |
| | | label="报工时间" |
| | | min-width="160" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | width="100" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button |
| | | type="text" |
| | | style="cursor: pointer;font-size: 14px" |
| | | @click="reportAdjust(row)" |
| | | >报工审核 |
| | | </el-button> |
| | | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <!--分页--> |
| | | <pagination |
| | | :total="total" |
| | | :page.sync="form.page" |
| | | :limit.sync="form.rows" |
| | | align="right" |
| | | layout="total,prev, pager, next,sizes,jumper" |
| | | popper-class="select_bottom" |
| | | @pagination="getMesOrderStepReportVerifySearch" |
| | | /> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Pagination from '@/components/Pagination' |
| | | import { handleDatetime } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | import { MesOrderDistribution, MesOrderStepReportVerifySearch, MesOrderStepReportVerifySeave } from '@/api/WorkOrder' |
| | | import { PrentOrganizationNoCompany } from '@/api/GeneralBasicData' |
| | | |
| | | export default { |
| | | name: 'ReportVerify' |
| | | name: 'Zzjg', |
| | | components: { |
| | | Pagination |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | mouseHoverType: 'mouseout', |
| | | isExpandForm: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | | wkshopcode: '', |
| | | wo_code: '', // 工单编码 |
| | | partnumber: '', // 产品编码 |
| | | partname: '', // 产品名称 |
| | | partspec: '', // 产品规格 |
| | | |
| | | stepname: '', // 工序名称 |
| | | reportuser: '', // 报工人员 |
| | | reportdate: '', // 报工时间 |
| | | |
| | | reviewstatus: '', // 审核状态 |
| | | |
| | | prop: 'report_date', // 排序字段 |
| | | order: 'desc', // 排序字段 |
| | | page: 1, // 第几页 |
| | | rows: 20 // 每页多少条 |
| | | }, |
| | | total: 10, |
| | | tableData: [], |
| | | wkshopcodeArr: [], |
| | | |
| | | multipleSelection: [], |
| | | reviewstatusArr: [ |
| | | { code: 'Y', name: '已审核' }, |
| | | { code: 'N', name: '未审核' } |
| | | ] |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | window.addEventListener('resize', this.getHeight) |
| | | this.getHeight() |
| | | |
| | | this.getMesOrderStepReportVerifySearch() |
| | | this.getPrentOrganizationNoCompany() |
| | | }, |
| | | methods: { |
| | | async getPrentOrganizationNoCompany() { |
| | | const { data: res } = await PrentOrganizationNoCompany() |
| | | this.wkshopcodeArr = res |
| | | }, |
| | | // 报工调整列表查询 |
| | | async getMesOrderStepReportVerifySearch() { |
| | | let tempDate = this.form.reportdate |
| | | if (tempDate.length > 0) { |
| | | tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1]) |
| | | } |
| | | const data = { |
| | | wkshopcode: this.form.wkshopcode, |
| | | wo_code: this.form.wo_code, |
| | | reviewstatus: this.form.reviewstatus, |
| | | partnumber: this.form.partnumber, |
| | | partname: this.form.partname, |
| | | partspec: this.form.partspec, |
| | | reportuser: this.form.reportuser, |
| | | stepname: this.form.stepname, |
| | | reportdate: tempDate, |
| | | |
| | | prop: this.form.prop, // 排序字段 |
| | | order: this.form.order, // 排序字段 |
| | | page: this.form.page, // 第几页 |
| | | rows: this.form.rows // 每页多少条 |
| | | } |
| | | const res = await MesOrderStepReportVerifySearch(data) |
| | | this.tableData = res.data |
| | | this.total = res.count |
| | | }, |
| | | // 排序改变时 |
| | | sortChange({ column, prop, order }) { |
| | | if (order === 'descending') { |
| | | order = 'desc' |
| | | } else if (order === 'ascending') { |
| | | order = 'asc' |
| | | } else { |
| | | order = 'desc' |
| | | } |
| | | this.form.order = order |
| | | this.form.prop = prop |
| | | this.getMesOrderStepReportVerifySearch() |
| | | }, |
| | | // 重置 |
| | | reset() { |
| | | this.form.wkshopcode = '' |
| | | this.form.wo_code = '' |
| | | this.form.partnumber = '' |
| | | this.form.partname = '' |
| | | this.form.partspec = '' |
| | | this.form.stepname = '' |
| | | this.form.reportuser = '' |
| | | this.form.reportdate = '' |
| | | this.form.reviewstatus = '' |
| | | this.getMesOrderStepReportVerifySearch() |
| | | }, |
| | | |
| | | // 报工审核 |
| | | async reportAdjust(row) { |
| | | if (row && row.verify === 'Y') { |
| | | return this.$message.info('此工单已审核!') |
| | | } |
| | | this.$confirm('是否确认审核?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (row) { |
| | | this.multipleSelection = [row] |
| | | } |
| | | const data = { |
| | | zdata: [], |
| | | wdata: [] |
| | | } |
| | | this.multipleSelection.forEach(i => { |
| | | if (i.steptype === 'Z') { |
| | | data.zdata.push(i.id) |
| | | } else { |
| | | data.wdata.push(i.id) |
| | | } |
| | | }) |
| | | MesOrderStepReportVerifySeave(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$notify.success('审核成功!') |
| | | this.getMesOrderStepReportVerifySearch() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$notify.info('已取消审核!') |
| | | }) |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | selected(row) { |
| | | return row.verify === 'N' |
| | | }, |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | this.mainHeight = window.innerHeight - 85 |
| | | this.tableHeight = this.mainHeight - 255 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style scoped lang="scss"> |
| | | .dialogFormItem { |
| | | margin: 0 10px 0 0; |
| | | } |
| | | |
| | | ::v-deep .el-dialog .el-divider__text { |
| | | font-weight: bolder !important; |
| | | } |
| | | |
| | | ::v-deep .el-dialog .el-form-item__label { |
| | | font-weight: lighter !important; |
| | | } |
| | | |
| | | ::v-deep .el-select__caret { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | ::v-deep .el-range__icon { |
| | | line-height: 28px !important; |
| | | } |
| | | |
| | | ::v-deep .el-range-separator { |
| | | line-height: 28px !important; |
| | | } |
| | | |
| | | ::v-deep .el-range-input { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | ::v-deep .el-range-separator { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | } |
| | | |
| | | </style> |