From efdd02d3d80253bf93f1c58e3ae25016db2d6b31 Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期三, 09 四月 2025 17:25:50 +0800 Subject: [PATCH] 检验任务,进货检验车间文件选择 --- src/views/business/finishedProductSampling/index.vue | 262 +++++++++++++-------------------------------------- 1 files changed, 68 insertions(+), 194 deletions(-) diff --git a/src/views/business/finishedProductSampling/index.vue b/src/views/business/finishedProductSampling/index.vue index b4f9986..818f531 100644 --- a/src/views/business/finishedProductSampling/index.vue +++ b/src/views/business/finishedProductSampling/index.vue @@ -4,261 +4,134 @@ <div class="card"> <div class="title"> <el-button size="small" type="primary" @click="addTemQuarter">鏂板</el-button> - <el-button size="small" type="primary" @click="quarterSample">瀛e害鎶芥牱</el-button> + <el-button size="small" type="primary" @click="quarterSample">鍙潬鎬ф娊鏍�</el-button> <el-button size="small" type="primary" @click="handleStockList">鍒锋柊</el-button> </div> - <el-table - ref="finishedproducttransferTable" - v-loading="tableLoading" - :data="stockList" - :header-cell-style="lineSideWarehouseTableHeaderCellStyle" - :row-class-name="lineSideWarehouseTableRowClassName" - class="finishedproducttransfer-table" - height="calc(100vh - 240px)" - @selection-change="handleSelectionChange" - > + <el-table ref="finishedproducttransferTable" v-loading="tableLoading" :data="stockList" + :header-cell-style="lineSideWarehouseTableHeaderCellStyle" :row-class-name="lineSideWarehouseTableRowClassName" + class="finishedproducttransfer-table" height="calc(100vh - 240px)" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="45"></el-table-column> - <el-table-column - :show-overflow-tooltip="true" - align="center" - label="瀹㈡埛璁㈠崟缂栧彿" - prop="customerOrderNo" - width="140" - > + <el-table-column :show-overflow-tooltip="true" align="center" label="瀹㈡埛璁㈠崟缂栧彿" prop="customerOrderNo" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">瀹㈡埛璁㈠崟缂栧彿</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.customerOrderNo" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.customerOrderNo" clearable size="mini" type="text" + @clear="handleStockList" @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.customerOrderNo }}</span> </template> </el-table-column> - <el-table-column - align="center" - label="鎴愬搧闆朵欢鍙�" - prop="partNo" - width="140" - > + <el-table-column align="center" label="鎴愬搧闆朵欢鍙�" prop="partNo" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">鎴愬搧闆朵欢鍙�</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.partNo" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.partNo" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.partNo }}</span> </template> </el-table-column> - <el-table-column - align="center" - label="闆朵欢鍚嶇О" - prop="partName" - width="140" - > + <el-table-column align="center" label="闆朵欢鍚嶇О" prop="partName" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">闆朵欢鍚嶇О</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.partName" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.partName" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.partName }}</span> </template> </el-table-column> - <el-table-column - :show-overflow-tooltip="true" - align="center" - label="浠撳簱" - prop="warehouseName" - width="140" - > + <el-table-column :show-overflow-tooltip="true" align="center" label="浠撳簱" prop="warehouseName" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">浠撳簱</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.warehouseName" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.warehouseName" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.warehouseName }}</span> </template> </el-table-column> - <el-table-column - :show-overflow-tooltip="true" - align="center" - label="搴撲綅鍙�" - prop="locationNo" - width="140" - > + <el-table-column :show-overflow-tooltip="true" align="center" label="搴撲綅鍙�" prop="locationNo" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">搴撲綅鍙�</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.locationNo" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.locationNo" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.locationNo }}</span> </template> </el-table-column> - <el-table-column - :show-overflow-tooltip="true" - align="center" - label="搴撲綅鍚嶇О" - prop="locationName" - width="140" - > + <el-table-column :show-overflow-tooltip="true" align="center" label="搴撲綅鍚嶇О" prop="locationName" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">搴撲綅鍚嶇О</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.locationName" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.locationName" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.locationName }}</span> </template> </el-table-column> - <el-table-column - align="center" - label="鎵规鍙�" - prop="partBatchNo" - width="140" - > + <el-table-column align="center" label="鎵规鍙�" prop="partBatchNo" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">鎵规鍙�</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.partBatchNo" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.partBatchNo" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.partBatchNo }}</span> </template> </el-table-column> - <el-table-column - align="center" - label="鍏ュ簱鏉ユ簮" - prop="inSource" - width="140" - > + <el-table-column align="center" label="鍏ュ簱鏉ユ簮" prop="inSource" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">鍏ュ簱鏉ユ簮</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.inSource" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.inSource" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.inSource }}</span> </template> </el-table-column> - <el-table-column - align="center" - label="澶栨姢棰滆壊" - prop="outerColor" - width="140" - > + <el-table-column align="center" label="澶栨姢棰滆壊" prop="outerColor" width="140"> <template slot="header" slot-scope="scope"> <div style="line-height: 14px;margin-bottom: 6px">澶栨姢棰滆壊</div> <div class="th" @click.stop> - <el-input - v-model="queryParamOne.outerColor" - clearable - size="mini" - type="text" - @clear="handleStockList" - @keyup.enter.native="handleStockList" - ></el-input> + <el-input v-model="queryParamOne.outerColor" clearable size="mini" type="text" @clear="handleStockList" + @keyup.enter.native="handleStockList"></el-input> </div> </template> <template slot-scope="scope"> <span>{{ scope.row.outerColor }}</span> </template> </el-table-column> - <el-table-column - align="center" - label="搴撳瓨鏁伴噺" - prop="stockQuantity" - width="140" - > + <el-table-column align="center" label="搴撳瓨鏁伴噺" prop="stockQuantity" width="140"> </el-table-column> - <el-table-column - align="center" - label="鍙敤搴撳瓨鏁伴噺" - prop="availableStockQuantity" - width="140" - > + <el-table-column align="center" label="鍙敤搴撳瓨鏁伴噺" prop="availableStockQuantity" width="140"> <template slot-scope="scope"> <span>{{ scope.row.availableStockQuantity }}</span> </template> </el-table-column> </el-table> <div class="pagin-page" style="margin-top: 0;margin-bottom: 0;"> - <el-pagination - background - :current-page="queryReport.current" - :page-size="queryReport.size" - :page-sizes="[10, 15, 20, 50, 100]" - :total="queryReport.total" - layout="total, sizes, prev, pager, next, jumper" - style="text-align:right;padding: 20px 16px;" - @size-change="handleSizeChangeReport" - @current-change="handleCurrentChangeReport" - > + <el-pagination background :current-page="queryReport.current" :page-size="queryReport.size" + :page-sizes="[10, 15, 20, 50, 100]" :total="queryReport.total" + layout="total, sizes, prev, pager, next, jumper" style="text-align:right;padding: 20px 16px;" + @size-change="handleSizeChangeReport" @current-change="handleCurrentChangeReport"> </el-pagination> </div> </div> @@ -269,10 +142,11 @@ <script> import AddQuarterItem from "./components/addQuarterItem.vue"; -import {getIfsStock} from "@/api/business/finishedProductSampling"; -import {mapGetters} from "vuex"; +import { getIfsStock } from "@/api/business/finishedProductSampling"; +import { mapGetters } from "vuex"; export default { + name: 'FinishedProductSampling', data() { return { stockList: [], @@ -306,7 +180,7 @@ operationType: '' } }, - components: {AddQuarterItem}, + components: { AddQuarterItem }, mounted() { this.getIfsStock() }, @@ -319,11 +193,11 @@ ...mapGetters(["nickName"]), }, methods: { - // 瀛e害鎶芥牱 - quarterSample () { + // 鍙潬鎬ф娊鏍� + quarterSample() { this.$refs.addQuarterItem.openDia(this.quarterTemItems, 'add') }, - addTemQuarter () { + addTemQuarter() { if (this.multipleSelection.length > 0) { const multipleSelection = JSON.parse(JSON.stringify(this.multipleSelection)) if (multipleSelection.length > 0) { @@ -350,31 +224,29 @@ this.tableLoading = true this.stockList = [] const newReqParam = this.getFinalParam() - getIfsStock(newReqParam) - .then((response) => { - const resData = response.data - this.queryReport.total = resData.total - const resStockList = resData.data - resStockList.forEach((item) => { - this.stockList.push({ - partNo: item.PART_NO, - partName: item.PART_DESC, - warehouseName: item.WAREHOUSE_ID, - locationName: item.LOCATION_DESC, - locationNo: item.LOCATION_NO, - partBatchNo: item.LOT_BATCH_NO, - stockQuantity: item.QTY_ONHAND, - availableStockQuantity: item.QTY_AVAILABLE, - outerColor: item.ATTR4, - customerOrderNo: item.ATTR6, - inSource: item.ATTR23, - }) + getIfsStock(newReqParam).then((response) => { + this.tableLoading = false + const resData = response.data + this.queryReport.total = resData.total + const resStockList = resData.data + resStockList.forEach((item) => { + this.stockList.push({ + partNo: item.PART_NO, + partName: item.PART_DESC, + warehouseName: item.WAREHOUSE_ID, + locationName: item.LOCATION_DESC, + locationNo: item.LOCATION_NO, + partBatchNo: item.LOT_BATCH_NO, + stockQuantity: item.QTY_ONHAND, + availableStockQuantity: item.QTY_AVAILABLE, + outerColor: item.ATTR4, + customerOrderNo: item.ATTR6, + inSource: item.ATTR23, }) - this.tableLoading = false }) - .catch(() => { - this.tableLoading = false - }) + }).catch(() => { + this.tableLoading = false + }) }, getFinalParam() { const newReqParam = { @@ -396,7 +268,7 @@ } return newReqParam }, - lineSideWarehouseTableHeaderCellStyle({row, column, rowIndex, columnIndex}) { + lineSideWarehouseTableHeaderCellStyle({ row, column, rowIndex, columnIndex }) { let headerStyle = 'background:#FAFAFA;color:#666;' if (columnIndex === 0) { headerStyle += 'border-radius: 6px 0px 0px 0px;' @@ -436,11 +308,13 @@ >>>.el-table__header { height: 70px; } + .card { height: calc(100% - 40px); background: #ffffff; padding: 10px; } + .title { text-align: right; margin-bottom: 10px; -- Gitblit v1.9.3