🎈 perf: 仅优化UI使其更紧凑
This commit is contained in:
@@ -19,13 +19,12 @@
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
|
||||
<!-- 合并批次<el-switch v-model="queryParams.mergeBatch" :active-value="1" :inactive-value="0" @change="handleQuery" /> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
||||
|
||||
|
||||
<KLPTable v-loading="loading" :data="stockList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="仓库" align="center" prop="warehouseName" />
|
||||
@@ -58,6 +57,11 @@
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="批次号" align="center" prop="batchNo" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="handleTrace(scope.row)">物料追溯</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</KLPTable>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@@ -104,12 +108,27 @@
|
||||
<el-dialog :visible.sync="stockBoxVisible" title="暂存单据" width="800px" append-to-body>
|
||||
<stock-io :data="stockBoxData" @generateBill="handleGenerateBill" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="stockTraceVisible" title="物料追溯" width="800px" append-to-body>
|
||||
<el-table :data="stockTraceList" style="width: 100%">
|
||||
<el-table-column label="单据类型" align="center" prop="ioType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.stock_io_type" :value="scope.row.ioType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据ID" align="center" prop="stockIoId" />
|
||||
<el-table-column label="单据编号" align="center" prop="stockIoCode" />
|
||||
<!-- <el-table-column label="创建时间" align="center" prop="createTime" /> -->
|
||||
<el-table-column label="变更数量" align="center" prop="quantity" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStock, delStock, addStock, updateStock } from "@/api/wms/stock";
|
||||
import { listStock, delStock, addStock, updateStock, getStockTrace } from "@/api/wms/stock";
|
||||
import { addStockIoWithDetail } from "@/api/wms/stockIo";
|
||||
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
||||
import ProductSelect from "@/components/KLPService/ProductSelect";
|
||||
@@ -124,7 +143,7 @@ import MaterialSelect from "@/components/KLPService/MaterialSelect";
|
||||
|
||||
export default {
|
||||
name: "Stock",
|
||||
dicts: ['stock_item_type'],
|
||||
dicts: ['stock_item_type', 'stock_io_type'],
|
||||
components: {
|
||||
WarehouseSelect,
|
||||
RawMaterialSelect,
|
||||
@@ -171,6 +190,7 @@ export default {
|
||||
quantity: undefined,
|
||||
unit: undefined,
|
||||
batchNo: undefined,
|
||||
mergeBatch: false,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -199,7 +219,9 @@ export default {
|
||||
stockBoxData: [],
|
||||
stockBoxVisible: false,
|
||||
// 选中的数据
|
||||
selectedRows: []
|
||||
selectedRows: [],
|
||||
stockTraceList: [],
|
||||
stockTraceVisible: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -328,6 +350,13 @@ export default {
|
||||
// 查看暂存单据
|
||||
console.log(this.stockBoxData);
|
||||
this.stockBoxVisible = true;
|
||||
},
|
||||
handleTrace(row) {
|
||||
// 查询对应批次号的的出库和入库单据明细并展示
|
||||
getStockTrace(row.batchNo).then(response => {
|
||||
this.stockTraceList = response.data;
|
||||
this.stockTraceVisible = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user