✨ feat: 物料台账改为时间段搜索
This commit is contained in:
@@ -18,9 +18,10 @@
|
||||
<el-input v-else disabled v-model="queryParams.itemId" placeholder="请先选择物料类型" :disabled="true" style="width: 100%;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="变动时间" prop="changeTime">
|
||||
<el-date-picker clearable
|
||||
<el-date-picker
|
||||
clearable
|
||||
v-model="queryParams.changeTime"
|
||||
type="date"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择实际库存变动时间">
|
||||
</el-date-picker>
|
||||
@@ -48,8 +49,17 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键ID" align="center" prop="id" v-if="true"/>
|
||||
<el-table-column label="仓库/库区/库位ID" align="center" prop="warehouseId" />
|
||||
<el-table-column label="物品ID" align="center" prop="itemId" />
|
||||
<el-table-column label="物品类型" align="center" prop="itemType" />
|
||||
<el-table-column label="物品ID" align="center" prop="itemId">
|
||||
<template slot-scope="scope">
|
||||
<RawMaterialInfo v-if="scope.row.itemType == 'raw_material'" :material-id="scope.row.itemId" />
|
||||
<ProductInfo v-else-if="scope.row.itemType == 'product'" :product-id="scope.row.itemId" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物品类型" align="center" prop="itemType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.stock_item_type" :value="scope.row.itemType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变动数量" align="center" prop="changeQty" />
|
||||
<el-table-column label="变动后的库存数量" align="center" prop="afterQty" />
|
||||
<el-table-column label="变动类型" align="center" prop="changeType" />
|
||||
@@ -115,17 +125,21 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStockLog, getStockLog, delStockLog, addStockLog, updateStockLog } from "@/api/wms/stockLog";
|
||||
import { listStockLog, getStockLog, updateStockLog } from "@/api/wms/stockLog";
|
||||
import WarehouseSelect from '@/components/KLPService/WarehouseSelect/index.vue';
|
||||
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect/index.vue';
|
||||
import ProductSelect from '@/components/KLPService/ProductSelect/index.vue';
|
||||
import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo.vue';
|
||||
import ProductInfo from '@/components/KLPService/Renderer/ProductInfo.vue';
|
||||
|
||||
export default {
|
||||
name: "StockLog",
|
||||
components: {
|
||||
WarehouseSelect,
|
||||
RawMaterialSelect,
|
||||
ProductSelect
|
||||
ProductSelect,
|
||||
RawMaterialInfo,
|
||||
ProductInfo
|
||||
},
|
||||
dicts: ['stock_item_type'],
|
||||
data() {
|
||||
@@ -182,7 +196,12 @@ export default {
|
||||
/** 查询库存流水列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listStockLog(this.queryParams).then(response => {
|
||||
const payload = {
|
||||
...this.queryParams,
|
||||
startTime: this.queryParams.changeTime ? this.queryParams.changeTime[0] + ' 00:00:00' : undefined,
|
||||
endTime: this.queryParams.changeTime ? this.queryParams.changeTime[1] + ' 23:59:59' : undefined
|
||||
}
|
||||
listStockLog(payload).then(response => {
|
||||
this.stockLogList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
||||
Reference in New Issue
Block a user