提交
This commit is contained in:
@@ -12,8 +12,9 @@ export function listStock(data) {
|
|||||||
// 查询统计
|
// 查询统计
|
||||||
export function getTotal(data) {
|
export function getTotal(data) {
|
||||||
return request({
|
return request({
|
||||||
url: "/wisdom/record/statistic",
|
url: "/wisdom/record/statistics",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: data,
|
data: data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1215,7 +1215,7 @@ function handleAdd() {
|
|||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
if (outBoundData.value.length !== checkOutList.value) {
|
if (outBoundData.value.length !== checkOutList.value.length) {
|
||||||
proxy.$modal.msgError("请查看勾选数据");
|
proxy.$modal.msgError("请查看勾选数据");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,8 @@
|
|||||||
:row-class-name="tableBillRowClassName"
|
:row-class-name="tableBillRowClassName"
|
||||||
ref="infoTableRef"
|
ref="infoTableRef"
|
||||||
highlight-current-row
|
highlight-current-row
|
||||||
|
show-summary
|
||||||
|
:summary-method="getSummaries"
|
||||||
@row-click="(row) => tableInfoRowClick(row, infoTableRef)">
|
@row-click="(row) => tableInfoRowClick(row, infoTableRef)">
|
||||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||||
<el-table-column label="操作类型" align="center" prop="bizType" width="100">
|
<el-table-column label="操作类型" align="center" prop="bizType" width="100">
|
||||||
@@ -140,7 +142,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Record">
|
<script setup name="Record">
|
||||||
import { listStock } from "@/api/wisdom/record";
|
import { listStock, getTotal } from "@/api/wisdom/record";
|
||||||
import { listOuttype } from "@/api/information/outtype"; //出库类型
|
import { listOuttype } from "@/api/information/outtype"; //出库类型
|
||||||
import { warehouseAll } from "@/api/information/warehouseinfo"; //所属仓库
|
import { warehouseAll } from "@/api/information/warehouseinfo"; //所属仓库
|
||||||
import { materialtypeDict } from "@/api/information/materialtype"; //物资类型
|
import { materialtypeDict } from "@/api/information/materialtype"; //物资类型
|
||||||
@@ -277,7 +279,7 @@ function handleQuery() {
|
|||||||
queryParams.value.cangku = warehouseCode.value[1]
|
queryParams.value.cangku = warehouseCode.value[1]
|
||||||
}
|
}
|
||||||
//详细类型
|
//详细类型
|
||||||
if (operationTypeCK.value || operationTypeRK.value) {
|
if (operationTypeCK.value.length > 0 || operationTypeRK.value.length > 0) {
|
||||||
queryParams.value.operationType = operationTypeRK.value || operationTypeCK.value
|
queryParams.value.operationType = operationTypeRK.value || operationTypeCK.value
|
||||||
}
|
}
|
||||||
//操作时间
|
//操作时间
|
||||||
@@ -290,6 +292,7 @@ function handleQuery() {
|
|||||||
}
|
}
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
getList();
|
getList();
|
||||||
|
getSumInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重置按钮操作
|
// 重置按钮操作
|
||||||
@@ -317,8 +320,6 @@ const infoTableRef = ref(null);
|
|||||||
|
|
||||||
// 显示预出库的状态
|
// 显示预出库的状态
|
||||||
const tableBillRowClassName = ({ row, rowIndex }) => {
|
const tableBillRowClassName = ({ row, rowIndex }) => {
|
||||||
console.log('row===>',row);
|
|
||||||
|
|
||||||
if (row.execStatus == 0) {
|
if (row.execStatus == 0) {
|
||||||
return 'success-row'
|
return 'success-row'
|
||||||
}
|
}
|
||||||
@@ -331,6 +332,44 @@ const dictTagData = () => {
|
|||||||
value: String(item.value)
|
value: String(item.value)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getSummaries(param) {
|
||||||
|
const { columns, data } = param;
|
||||||
|
// console.log(columns)
|
||||||
|
const sums = [];
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||||
|
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||||
|
return;
|
||||||
|
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||||
|
sums[index] = '总金额:' + totalMoney.value;
|
||||||
|
// }else if(index === 2){
|
||||||
|
// sums[index] = totalMoney.value
|
||||||
|
} else if (index === 3) {
|
||||||
|
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||||
|
} else if (index === 4) {
|
||||||
|
sums[index] = '总数:' + sumQty.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取总计
|
||||||
|
const totalMoney = ref(null)
|
||||||
|
const pcodeCount = ref(null)
|
||||||
|
const sumQty = ref(null)
|
||||||
|
function getSumInfo() {
|
||||||
|
//统计信息
|
||||||
|
let rkInfo = JSON.parse(JSON.stringify(queryParams.value))
|
||||||
|
delete rkInfo.pageNum
|
||||||
|
delete rkInfo.pageSize
|
||||||
|
getTotal(rkInfo).then(response => {
|
||||||
|
totalMoney.value = response.data.totalAmount
|
||||||
|
pcodeCount.value = response.data.locationCount
|
||||||
|
sumQty.value = response.data.totalQuantity
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getSumInfo()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user