二级库模块

This commit is contained in:
zhouzy062 2024-03-01 18:17:50 +08:00
parent 3bbcd5f634
commit b02eb4a588
6 changed files with 148 additions and 36 deletions

View File

@ -185,7 +185,13 @@ export function getLeaseApplyListAll(query) {
})
}
export function getLeaseApplyAuditListAll(query) {
return request({
url: '/base/tm_task/getLeaseApplyAuditListAll',
method: 'get',
params: query
})
}

View File

@ -165,7 +165,7 @@ import {
submitLeaseApply,
getTaskDetail,
editLeaseApply,
getLeaseApplyListAll
getLeaseApplyAuditListAll
} from '@/api/claimAndRefund/receive'
import { getInfo } from '@/api/login'
export default {
@ -413,7 +413,7 @@ export default {
//
async GetTaskDetail(taskId){
const res = await getLeaseApplyListAll({taskId})
const res = await getLeaseApplyAuditListAll({taskId})
const data = res.rows[0]

View File

@ -75,12 +75,24 @@
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
<el-table-column label="进场数量" align="center" prop="jcNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- <span class="clickText" @click="openRecords">{{scope.row.jcNum}}</span> -->
<span class="clickText" @click="openRecords(scope.row,1)">{{scope.row.jcNum}}</span>
</template>
</el-table-column>
<el-table-column label="退场数量" align="center" prop="tcNUm" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="clickText" @click="openRecords(scope.row,2)">{{scope.row.tcNUm}}</span>
</template>
</el-table-column>
<el-table-column label="场内库存量" align="center" prop="kcNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="clickText" @click="openRecords(scope.row,3)">{{scope.row.kcNum}}</span>
</template>
</el-table-column>
<el-table-column label="已出库数量" align="center" prop="ckNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span class="clickText" @click="openRecords(scope.row,4)">{{scope.row.ckNum}}</span>
</template>
</el-table-column>
<el-table-column label="退场数量" align="center" prop="tcNUm" :show-overflow-tooltip="true" />
<el-table-column label="场内库存量" align="center" prop="kcNum" :show-overflow-tooltip="true" />
<el-table-column label="已出库数量" align="center" prop="ckNum" :show-overflow-tooltip="true" />
<el-table-column label="在库数量" align="center" prop="zkNum" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="nuitName" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -169,8 +181,52 @@
</el-dialog>
<!-- 记录弹窗 -->
<el-dialog :title="title" :visible.sync="openIn" width="600px" append-to-body>
<el-dialog :title="title" :visible.sync="openRecord" width="1200px" append-to-body>
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="80px">
<el-form-item label="记录时间" prop="startTime">
<el-date-picker
v-model="dialogQuery.startTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="date"
placeholder="记录时间"
></el-date-picker>
</el-form-item>
<el-form-item label="类型名称" prop="typeName">
<el-input
v-model="dialogQuery.typeName"
disabled
/>
</el-form-item>
<el-form-item label="规格型号" prop="modelName">
<el-input v-model="dialogQuery.modelName" disabled />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dialogList">
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="记录时间" align="center" prop="startTime" :show-overflow-tooltip="true" />
<el-table-column label="操作类型" align="center" prop="" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="dialogTotal>0"
:total="dialogTotal"
:page.sync="dialogQuery.pageNum"
:limit.sync="dialogQuery.pageSize"
@pagination="getDialogList"
/>
</el-dialog>
@ -246,6 +302,19 @@ export default {
{ required: true, message: "班组名称不能为空", trigger: "blur" }
]
},
//
openRecord:false,
dialogQuery: {
pageNum: 1,
pageSize: 10,
startTime: undefined,
unitId: undefined,
modelId: undefined,
typeId: undefined
},
dialogList:[],
queryType:1,
dialogTotal: 0,
};
},
created() {
@ -326,17 +395,38 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
handleDialogQuery() {
this.dialogQuery.pageNum = 1;
this.getDialogList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
resetDialogQuery() {
this.resetForm("dialogQuery");
this.handleDialogQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.dictId)
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 按钮操作 */
handleOut(row) {//1
this.reset();
this.form = row;
console.log(this.form)
this.openOut = true;
this.title = "出库";
},
handleIn(row) {//2
this.reset();
this.nform = row;
this.openIn = true;
this.title = "退库";
},
/** 提交按钮 */
submitForm: function(type) {
@ -369,19 +459,26 @@ export default {
});
}
},
/** 按钮操作 */
handleOut(row) {//1
this.reset();
this.form = row;
console.log(this.form)
this.openOut = true;
this.title = "出库";
//
openRecords(row,type){
this.openRecord = true;
this.queryType = type
this.dialogQuery.typeName = row.typeName;
this.dialogQuery.modelName = row.modelName;
this.dialogQuery.unitId = row.unitId;
this.dialogQuery.typeId = row.typeId;
this.getDialogList();
},
handleIn(row) {//2
this.reset();
this.nform = row;
this.openIn = true;
this.title = "退库";
/** 查询列表 */
getDialogList() {
this.dialogQuery.queryType = this.queryType;
getRecords(this.dialogQuery).then(response => {
this.dialogList = response.rows;
this.dialogTotal = response.total;
}
);
},
/** 导出按钮操作 */
handleExport() {

View File

@ -60,7 +60,12 @@
</el-table-column>
<el-table-column label="维修数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true" />
<el-table-column label="类型" align="center" prop="partType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.partType==0">不收费</span>
<span v-if="scope.row.partType==1">收费</span>
</template>
</el-table-column>
</el-table-column>
</el-table>
<div style="width: 100%;text-align: right;padding: 20px 20px;">维修费用小计{{repairCost}}</div>
@ -83,7 +88,7 @@
<span v-if="scope.row.scrapType==1">人为</span>
</template>
</el-table-column>
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true" />
<el-table-column label="报废费用" align="center" prop="costs" :show-overflow-tooltip="true" />
</el-table-column>
</el-table>
<div style="width: 100%;text-align: right;padding: 20px 20px;">报废费用小计{{scrapCost}}</div>
@ -296,8 +301,14 @@
countCost(list){
let arrCost = 0;
list.forEach(item=>{
arrCost = arrCost + Number(item.costs)
console.log(arrCost)
if(item.partType==0){
arrCost = arrCost
}else if(item.scrapType==0){
arrCost = arrCost
}else{
arrCost = arrCost + Number(item.costs)
}
// console.log(arrCost)
})
console.log(arrCost)
return arrCost.toFixed(2)
@ -334,7 +345,6 @@
}
});
return sums;
},
countNum(row){
@ -361,13 +371,7 @@
path:'/cost/cost/costApplyList',
})
}
})
},
//
handleBack(){

View File

@ -55,9 +55,9 @@
<el-table-column label="合计费用" align="center" prop="cost" :show-overflow-tooltip="true" />
<el-table-column label="结算状态" align="center" prop="sltStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.sltStatus=='1'">待审核</span>
<span v-if="scope.row.sltStatus=='2'">审核通过</span>
<span v-if="scope.row.sltStatus=='3'">审核驳回</span>
<span v-if="scope.row.sltStatus=='1'">未结算</span>
<span v-if="scope.row.sltStatus=='2'">已结算</span>
<span v-if="scope.row.sltStatus=='3'">审核</span>
</template>
</el-table-column>
<!-- <el-table-column label="租赁期限(天)" align="center" prop="leaseDay" :show-overflow-tooltip="true" />

View File

@ -64,7 +64,12 @@
</el-table-column>
<el-table-column label="维修数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true" />
<el-table-column label="类型" align="center" prop="partType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.partType==0">不收费</span>
<span v-if="scope.row.partType==1">收费</span>
</template>
</el-table-column>
</el-table-column>
</el-table>
<div style="width: 100%;text-align: right;padding: 20px 20px;">维修费用小计{{repairCost}}</div>