From e03f39a06c9f17ee0bf9a2b1fa24b7de0ea2e3d4 Mon Sep 17 00:00:00 2001 From: zouyu <2723363702@qq.com> Date: 星期五, 15 九月 2023 11:47:29 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.0.22:9001/r/mom-before --- src/components/view/finishedProductInspection.vue | 93 ++++++++++++++++++++++++++++------------------ 1 files changed, 57 insertions(+), 36 deletions(-) diff --git a/src/components/view/finishedProductInspection.vue b/src/components/view/finishedProductInspection.vue index bc27b7e..d0c4a51 100644 --- a/src/components/view/finishedProductInspection.vue +++ b/src/components/view/finishedProductInspection.vue @@ -1,6 +1,6 @@ <template> <div class="content-main"> - <div v-if="!showAddPage" class="rawPage"> + <div v-if="!showAdd&&!showLook&&!showUp" class="rawPage"> <div class="title"> <el-row> <el-col :span="12">鎴愬搧妫�楠�</el-col> @@ -12,22 +12,14 @@ </el-row> </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> + <span>妫�娴嬬粨鏋滐細</span> + <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> @@ -66,7 +58,7 @@ min-width="108" /> <el-table-column - prop="code" + prop="material_code" label="浜у搧缂栫爜" min-width="100" /> @@ -101,8 +93,10 @@ min-width="80" > <template slot-scope="scope"> - <span>{{scope.row.result===1?'鍚堟牸':'涓嶅悎鏍�'}}</span> - </template> + <span style="color: #34BD66;" v-if="scope.row.result === 1">鍚堟牸</span> + <span style="color: #E84738;" v-else-if="scope.row.result === 0">涓嶅悎鏍�</span> + <span v-else-if="scope.row.result === null || scope.row.result === undefined">鏆傛湭缁撹</span> + </template> </el-table-column> @@ -113,6 +107,7 @@ <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 v-if="scope.row.result == null" type="text" size="small" @click="goUp(scope.row)">缂栬緫</el-button> </template> </el-table-column> </el-table> @@ -120,9 +115,9 @@ <!-- 鍒嗛〉鍣� --> <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" @@ -261,29 +256,45 @@ </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: '', @@ -335,25 +346,35 @@ 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}}) - console.log(row) this.inspectionTable = row this.pageParams.total = total }, goToDetail(row) { - this.showAddPage = true - this.showDetail = true - this.finishedInsInfo = row - console.log(this.showDetail) - // this.addInspectionform = [] + this.rowInfo = row + this.showLook=true + }, + goUp(row){ + this.rowInfo = row + this.showUp=true }, 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 + }, + comBackMain(val){ + this.showAdd=false + this.showLook=false + this.showUp=false + this.init() + this.getInspectionTableData() + if(val){ + this.$parent.removeAllTab() + } } } -- Gitblit v1.9.3