From f364224aeb8dee19b266c6ff53f29b93fe04911e Mon Sep 17 00:00:00 2001
From: zzq <a13193816592@163.com>
Date: 星期二, 26 九月 2023 19:37:58 +0800
Subject: [PATCH] "库存报表,位置报表"
---
src/views/operate/scrap/index.vue | 51 +++++++++++++++++++++++++++++++--------------------
1 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/src/views/operate/scrap/index.vue b/src/views/operate/scrap/index.vue
index 87c6af0..dbdeef6 100644
--- a/src/views/operate/scrap/index.vue
+++ b/src/views/operate/scrap/index.vue
@@ -29,7 +29,7 @@
<script>
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getProductList } from "@/api/product/product"
+import { getDisuseList } from "@/api/operate/scrap"
// import DetailProduct from "@/views/productManage/product/DetailProduct"
import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog"
@@ -47,7 +47,8 @@
visible: false,
title: "鏂板缓",
infomation: {}
- }
+ },
+ keyword: ""
}
},
created() {
@@ -77,43 +78,43 @@
let tableColumn = [
{
label: "鍗曞彿",
- prop: "id",
+ prop: "number",
isShowColumn: true,
default: true
},
{
label: "鏃ユ湡",
- prop: "deviceName",
+ prop: "operationDate",
isShowColumn: true,
default: true
},
{
label: "浜у搧",
- prop: "id",
+ prop: "productName",
isShowColumn: true,
default: true
},
{
label: "鏁伴噺",
- prop: "deviceId",
+ prop: "amount",
isShowColumn: true,
default: false
},
{
label: "璁¢噺鍗曚綅",
- prop: "shopName",
+ prop: "unit",
isShowColumn: true,
default: false
},
{
label: "婧愪綅缃�",
- prop: "preTime",
+ prop: "from",
isShowColumn: true,
default: false
},
{
label: "鎶ュ簾浣嶇疆",
- prop: "status",
+ prop: "to",
isShowColumn: true,
default: false
},
@@ -122,8 +123,10 @@
prop: "status",
width: 120,
isShowColumn: true,
- default: true,
- status: true
+ default: false,
+ status: true,
+ isCallMethod: true,
+ getCallMethod: this.getStatus
}
]
return tableColumn
@@ -133,29 +136,32 @@
this.tableList.tableColumn = this.setTableColumn(val)
},
// 璇锋眰鏁版嵁
- async getData(val, content) {
- await getProductList({
- [val]: content,
+ async getData() {
+ await getDisuseList({
+ number: this.keyword,
+ sourceNumber: this.keyword,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
- if (res.data.code === 200) {
- const list = res.data.data.list.map((item) => {
+ if (res.code === 200) {
+ const list = res.data.map((item) => {
return {
...item,
- supplierNumber: item.supplier.number,
- status: "鑽夌",
- preTime: "2023-09-04 11:20:00"
+ from: item.fromLocation.name,
+ to: item.toLocation.name
}
})
this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.data.total
+ this.pagerOptions.totalCount = res.total
}
})
},
// 鎼滅储
getList(val) {
+ this.keyword = val
console.log(val)
+ this.pagerOptions.currPage = 1
+ this.getData()
},
// 琛岀偣鍑�
tableRowClick(row) {
@@ -168,6 +174,11 @@
addBtnClick() {
this.editConfig.visible = true
this.editConfig.title = "鏂板缓"
+ this.editConfig.infomation = {}
+ },
+ // 鐘舵��
+ getStatus(val) {
+ return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
}
}
}
--
Gitblit v1.8.0