From 59e3711a8b1e524c030523e7108e47400517bd2b Mon Sep 17 00:00:00 2001
From: zzyuan <781948537@qq.com>
Date: Fri, 20 Dec 2024 18:33:52 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2=E4=B8=80?=
=?UTF-8?q?=E7=BA=A7=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/stquery/stquery.js | 34 +++++++
src/views/material/stquery/deviceInBound.vue | 42 ++++-----
src/views/material/stquery/deviceOutBound.vue | 42 ++++-----
.../material/stquery/deviceStatusRecord.vue | 94 ++++++++++++-------
4 files changed, 138 insertions(+), 74 deletions(-)
diff --git a/src/api/stquery/stquery.js b/src/api/stquery/stquery.js
index a8355970..1275caf6 100644
--- a/src/api/stquery/stquery.js
+++ b/src/api/stquery/stquery.js
@@ -1,5 +1,22 @@
import request from '@/utils/request'
+// 保有设备总量查询
+export function getRetainedEquipmentListApi(query) {
+ return request({
+ url: '/material/complex_query/getRetainedEquipmentList',
+ method: 'get',
+ params: query
+ })
+}
+// 保有设备总量查询-无分页
+export function getRetainedEquipmentListNoPageApi(query) {
+ return request({
+ url: '/material/complex_query/getRetainedEquipmentListNoPage',
+ method: 'get',
+ params: query
+ })
+}
+
// 查询工程机具使用列表
export function getProjUsingRecordListApi(query) {
return request({
@@ -28,6 +45,23 @@ export function getMachineHistoryRecordListApi(query) {
}
+ // 入库记录列表
+export function getInputRecordListApi(query) {
+ return request({
+ url: '/material/complex_query/getInputRecordList',
+ method: 'get',
+ params: query
+ })
+}
+ // 出库记录列表
+export function getOutRecordListApi(query) {
+ return request({
+ url: '/material/complex_query/getOutRecordList',
+ method: 'get',
+ params: query
+ })
+}
+
diff --git a/src/views/material/stquery/deviceInBound.vue b/src/views/material/stquery/deviceInBound.vue
index 247319c6..8808bc6a 100644
--- a/src/views/material/stquery/deviceInBound.vue
+++ b/src/views/material/stquery/deviceInBound.vue
@@ -9,7 +9,7 @@
end-placeholder="结束日期"
type="daterange"
value-format="yyyy-MM-dd"
- style="width: 240px"
+ style="width: 220px"
>
@@ -17,7 +17,7 @@
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable :maxlength="20"
- style="width: 240px"
+ style="width: 220px"
/>
@@ -25,7 +25,7 @@
v-model="queryParams.typeName"
placeholder="请输入物资名称"
clearable :maxlength="20"
- style="width: 240px"
+ style="width: 220px"
/>
@@ -33,24 +33,24 @@
v-model="queryParams.typeModelName"
placeholder="请输入规格型号"
clearable :maxlength="20"
- style="width: 240px"
+ style="width: 220px"
/>
-
-
+
@@ -89,11 +89,11 @@
-
-
-
-
-
+
+
+
+
+
import {
- getMachineHistoryRecordListApi
+ getInputRecordListApi
} from '@/api/stquery/stquery';
export default {
name: '',
@@ -127,7 +127,7 @@ export default {
multiple: true,
// 显示搜索条件
showSearch: true,
- sltList:[{id:'0',name:'未结算'},{id:'1',name:'已结算'}],
+ inputTypeList:[{id:'新购入库',name:'新购入库'},{id:'修试后入库',name:'修试后入库'},{id:'盘点入库',name:'盘点入库'}],
// 总条数
total: 0,
// 主表格数据
@@ -155,13 +155,13 @@ export default {
unitId: this.queryParams.unitId,
proId: this.queryParams.proId,
keyWord: this.queryParams.keyWord,
- isSlt: this.queryParams.isSlt,
+ inputType: this.queryParams.inputType,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum
}
- const res = await getMachineHistoryRecordListApi(params)
+ const res = await getInputRecordListApi(params)
this.loading = false
if(res.data.rows.length>0){
this.tableList = res.data.rows;
@@ -193,11 +193,11 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download(
- 'material/complex_query/exportProjUsingRecord',
+ 'material/complex_query/exportInputRecord',
{
...this.queryParams,
},
- `综合查询_工程机具使用_${new Date().getTime()}.xlsx`,
+ `综合查询_入库记录_${new Date().getTime()}.xlsx`,
)
},
diff --git a/src/views/material/stquery/deviceOutBound.vue b/src/views/material/stquery/deviceOutBound.vue
index e30c9cd4..a3c8c555 100644
--- a/src/views/material/stquery/deviceOutBound.vue
+++ b/src/views/material/stquery/deviceOutBound.vue
@@ -9,7 +9,7 @@
end-placeholder="结束日期"
type="daterange"
value-format="yyyy-MM-dd"
- style="width: 240px"
+ style="width: 200px"
>
@@ -48,7 +48,7 @@
v-model="queryParams.typeName"
placeholder="请输入物资名称"
clearable :maxlength="20"
- style="width: 240px"
+ style="width: 200px"
/>
@@ -56,24 +56,24 @@
v-model="queryParams.typeModelName"
placeholder="请输入规格型号"
clearable :maxlength="20"
- style="width: 240px"
+ style="width: 200px"
/>
-
-
+
@@ -114,11 +114,11 @@
-
-
-
-
-
+
+
+
+
+
import {
- getMachineHistoryRecordListApi
+ getOutRecordListApi
} from '@/api/stquery/stquery';
import {
getProjectList,
@@ -167,7 +167,7 @@ export default {
projectId: null,
unitList: [],
proList: [],
- sltList:[{id:'0',name:'未结算'},{id:'1',name:'已结算'}],
+ outStyleList:[{id:'标准箱',name:'标准箱'},{id:'编码',name:'编码'},{id:'二维码',name:'二维码'},{id:'数量',name:'数量'}],
// 总条数
total: 0,
// 主表格数据
@@ -230,13 +230,13 @@ export default {
unitId: this.queryParams.unitId,
proId: this.queryParams.proId,
keyWord: this.queryParams.keyWord,
- isSlt: this.queryParams.isSlt,
+ outStyle: this.queryParams.outStyle,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum
}
- const res = await getMachineHistoryRecordListApi(params)
+ const res = await getOutRecordListApi(params)
this.loading = false
if(res.data.rows.length>0){
this.tableList = res.data.rows;
@@ -268,11 +268,11 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.download(
- 'material/complex_query/exportProjUsingRecord',
+ 'material/complex_query/exportOutRecord',
{
...this.queryParams,
},
- `综合查询_工程机具使用_${new Date().getTime()}.xlsx`,
+ `综合查询_出库记录_${new Date().getTime()}.xlsx`,
)
},
diff --git a/src/views/material/stquery/deviceStatusRecord.vue b/src/views/material/stquery/deviceStatusRecord.vue
index 50cbc3fa..96f2ab41 100644
--- a/src/views/material/stquery/deviceStatusRecord.vue
+++ b/src/views/material/stquery/deviceStatusRecord.vue
@@ -54,19 +54,19 @@
-
+
合计:
{{ (queryParams.pageNum - 1) * 10 + scope.$index }}
-
-
-
+
+
+
-
+
@@ -79,14 +79,14 @@
-
+
- {{ scope.row.useNum }}
+ {{ scope.row.usNum }}
- {{ scope.row.useNum }}
+ {{ scope.row.usNum }}
@@ -127,11 +127,11 @@
-
+
-
-
-
+
+
+
@@ -371,7 +371,9 @@
// getUserRecords,getAllRecords,
// } from '@/api/stquery/deviceStatusRecord'
// import {getRecords} from "@/api/claimAndRefund/secondStore";
-
+import {
+ getRetainedEquipmentListApi, getRetainedEquipmentListNoPageApi
+} from '@/api/stquery/stquery';
export default {
name: '',
dicts: [],
@@ -457,18 +459,46 @@ export default {
},
methods: {
// 获取列表
- async getList() {
- // this.loading = true
- // const res = await statusList(this.queryParams)
- // this.loading = false
- // this.tableList = res.data.rows
- // this.total = res.data.total
- this.tableList = [
- {storeNum:9,useNum:19,repairNum:29,inputNum:39,repairInputNum:19,allNum:99,allCost:999,newRate1:"95%",newRate2:"80%",newRate3:"10%"},
- {houseName:'机具', type:'张力架线设备', typeName:'牵引机', typeModelName:'SA-QY-80', unitName:'台', storeNum:5,manageType:'编码',useNum:10,repairNum:20,inputNum:20,repairInputNum:20,allNum:75,allCost:750,newRate1:"95%",newRate2:"80%",newRate3:"10%"},
- {houseName:'机具', type:'连接器类', typeName:'卸扣', typeModelName:'DG-50', unitName:'只', storeNum:5,manageType:'数量',useNum:100,repairNum:20,inputNum:20,repairInputNum:20,allNum:165,allCost:1650,newRate1:"95%",newRate2:"80%",newRate3:"10%"},
- ]
- this.total = 2
+ async getList() {
+ this.loading = true
+ const params = {
+ keyWord: this.queryParams.keyWord,
+ typeName: this.queryParams.typeName,
+ typeModelName: this.queryParams.typeModelName,
+ pageSize: this.queryParams.pageSize,
+ pageNum: this.queryParams.pageNum
+ }
+ const res = await getRetainedEquipmentListApi(params)
+ if(res.data.rows.length>0){
+ this.tableList = res.data.rows;
+ }else{
+ this.tableList=[]
+ }
+ this.total = res.data.total;
+ console.log(this.tableList)
+ let param = {
+ keyWord: this.queryParams.keyWord,
+ typeName: this.queryParams.typeName,
+ typeModelName: this.queryParams.typeModelName,
+ }
+ const response = await getRetainedEquipmentListNoPageApi(param)
+ let obj = {
+ // storeNum manageType usNum repairNum inputNum repairInputNum allNum
+ storeNum: response.data.storeNum||0,
+ usNum: response.data.usNum||0,
+ repairNum: response.data.repairNum||0,
+ inputNum: response.data.inputNum||0,
+ repairInputNum: response.data.repairInputNum||0,
+ allNum: response.data.allNum||0,
+ totalPrice: response.data.totalPrice||0,
+ fiveReplacementRate: response.data.fiveReplacementRate||0,
+ tenReplacementRate: response.data.tenReplacementRate||0,
+ tenPlusReplacementRate: response.data.tenPlusReplacementRate||0,
+ manageType:response.data.manageType||"",
+ }
+ this.tableList.unshift(obj)
+ console.log(this.tableList)
+ this.loading = false
},
indexContinuationForTable(num, size) {
let number = (num - 1) * size
@@ -510,13 +540,13 @@ export default {
},
/** 导出按钮操作 */
handleExport() {
- // this.download(
- // 'material/storageStatus/export',
- // {
- // ...this.queryParams,
- // },
- // `综合查询_机具仓储状态_${new Date().getTime()}.xlsx`,
- // )
+ this.download(
+ 'material/complex_query/exportRetainedEquipmentList',
+ {
+ ...this.queryParams,
+ },
+ `综合查询_保有设备总量_${new Date().getTime()}.xlsx`,
+ )
},
// ------------------
//查看在库编码数据