| | |
| | | <template> |
| | | <div class="content-main"> |
| | | <div v-if="!showAddPage" class="rawPage"> |
| | | <div v-if="!showAdd" class="rawPage"> |
| | | <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12">成品检验</el-col> |
| | |
| | | </div> |
| | | <div class="nav"> |
| | | <span>检验结果:</span> |
| | | <el-select v-model="searchData.inspectResult" size="small" placeholder="请选择" style="width: 224px;margin-right: 52px;"> |
| | | <el-option value="1" label="合格"></el-option> |
| | | <el-option value="2" label="不合格"></el-option> |
| | | <el-select v-model="searchData.result" size="small" placeholder="请选择" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="''" label="全部"></el-option> |
| | | <el-option :value="1" label="合格"></el-option> |
| | | <el-option :value="0" label="不合格"></el-option> |
| | | </el-select> |
| | | <span>检验日期:</span> |
| | | <el-date-picker |
| | | v-model="searchData.inspectDate" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="margin-right: 52px"> |
| | | </el-date-picker> |
| | | <span>检验人:</span> |
| | | <el-select v-model="searchData.inspectUsername" size="small" placeholder="请选择" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="item.id" :key="item.id" :label="item.name" v-for="item in usernameOptions"></el-option> |
| | | </el-select> |
| | | <span>产品名称:</span> |
| | | <el-input v-model="searchData.material" size="small" placeholder="请输入产品名称" style="width: 224px;margin-right: 52px;"></el-input> |
| | | <el-button size="mini" @click="()=>{searchData={};getInspectionTableData()}"><span>重 置</span></el-button> |
| | | <el-button size="mini" type="primary" @click="getInspectionTableData" style="background: #004EA2;"><span>查 询</span></el-button> |
| | | </div> |
| | |
| | | min-width="108" |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | prop="material_code" |
| | | label="产品编码" |
| | | min-width="100" |
| | | /> |
| | |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="goToDetail(scope.row)">查看</el-button> |
| | | <el-button type="text" size="small">打印</el-button> |
| | | <el-button type="text" size="small">编辑</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <!-- 分页器 --> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | :current-page="pageParams.pageNo" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :page-size="pageParams.pageSize" |
| | | :current-page="pageParams.pageSize" |
| | | :page-sizes="[10, 50, 100, 200]" |
| | | :page-size="pageParams.countSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="pageParams.total" |
| | | @size-change="handleSizeChange" |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="newPage" v-if="showAdd"> |
| | | <finishedProductInspectionAdd /> |
| | | </div> |
| | | <div class="newPage" v-if="showLook"> |
| | | <finishedProductInspectionLook :rowInfo="rowInfo"/> |
| | | </div> |
| | | <div class="newPage" v-if="showUp"> |
| | | <finishedProductInspectionUp :rowInfo="rowInfo"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import finishedProductInspectionAdd from '@/components/view/finishedProductInspectionAdd' |
| | | import finishedProductInspectionUp from '@/components/view/finishedProductInspectionUp' |
| | | import finishedProductInspectionLook from '@/components/view/finishedProductInspectionLook' |
| | | export default { |
| | | components: { finishedProductInspectionAdd,finishedProductInspectionUp, finishedProductInspectionLook}, |
| | | data(){ |
| | | return { |
| | | searchData:{ |
| | | inspectionResult: '', |
| | | inspectionDate: '', |
| | | inspecter: '', |
| | | result: '', |
| | | material: '', |
| | | }, |
| | | // 主机工下拉框 |
| | | usernameOptions:[], |
| | | inspectionTable:[ |
| | | ], |
| | | rowInfo:{}, |
| | | pageParams:{ |
| | | pageNo: 1, // 当前页码 |
| | | pageSize: 100, |
| | | countSize: 10, //每页数量 |
| | | pageSize: 1, // 当前页码 |
| | | total:0 |
| | | }, |
| | | showAddPage: false, |
| | | showAdd: false, |
| | | showLook: false, |
| | | showUp: false, |
| | | showDetail:false, |
| | | addInspectionform: [{ |
| | | number: '', |
| | |
| | | this.currentPage = val |
| | | }, |
| | | handleAddNew(){ |
| | | this.showAddPage=true |
| | | this.showAdd=true |
| | | }, |
| | | async getInspectionTableData() { |
| | | const {data:{row,total}} = await this.$axios.get(this.$api.url.finishedInsListPage,{params:{...this.pageParams,...this.searchData}}) |
| | |
| | | this.pageParams.total = total |
| | | }, |
| | | goToDetail(row) { |
| | | this.showAddPage = true |
| | | this.showDetail = true |
| | | // this.showAddPage = true |
| | | // this.showDetail = true |
| | | this.finishedInsInfo = row |
| | | console.log(this.showDetail) |
| | | |
| | | // this.addInspectionform = [] |
| | | }, |
| | | async init() { |
| | | const {data} = await this.$axios.get(this.$api.url.finishedInspectUser) |
| | | this.usernameOptions = data |
| | | // const {data} = await this.$axios.get(this.$api.url.finishedInspectUser) |
| | | // this.usernameOptions = data |
| | | |
| | | } |
| | | } |