报废审核台账

This commit is contained in:
hongchao 2025-02-14 15:17:53 +08:00
parent 0d70716f45
commit 83825b59a1
2 changed files with 135 additions and 82 deletions

View File

@ -0,0 +1,38 @@
import request from '@/utils/request'
// 查询报废台账审核列表
export function getTotalList(query) {
return request({
url: '/material/scrap_apply_details/getTotalList',
method: 'get',
params: query
})
}
// 查询待审核周期和审核金额
export function getTotalPrice(query) {
return request({
url: '/material/scrap_apply_details/getTotalPrice',
method: 'get',
params: query
})
}
// 通过
export function ledgerApprove(data) {
return request({
url: '/material/scrap_apply_details/ledgerApprove',
method: 'post',
data: data,
})
}
// 驳回
export function ledgerReject(data) {
return request({
url: '/material/scrap_apply_details/ledgerReject',
method: 'post',
data: data,
})
}

View File

@ -47,7 +47,6 @@
type="success" type="success"
@click="batchPass" @click="batchPass"
icon="el-icon-check" icon="el-icon-check"
v-show="!isView"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
>通过</el-button >通过</el-button
@ -59,7 +58,6 @@
type="danger" type="danger"
@click="batchReject" @click="batchReject"
icon="el-icon-close" icon="el-icon-close"
v-show="!isView"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
>驳回</el-button >驳回</el-button
@ -67,15 +65,15 @@
</el-col> </el-col>
<el-col :span="21" style="text-align: right;"> <el-col :span="21" style="text-align: right;">
<div style="color: red;">待审核周期{{ reviewPeriod }}</div> <div style="color: red;">待审核周期{{ reviewPeriod }}</div>
<div style="color: red;">审核费用{{ 999.25 }}</div> <div style="color: red;">审核费用(万元){{ reviewCost }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="tableList" :data="tableList"
ref="multipleTable"
row-key="id" row-key="id"
ref="multipleTable"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
@ -84,29 +82,53 @@
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
/> />
<el-table-column label="序号" align="center" width="80" type="index"/> <el-table-column label="序号" align="center" width="80" type="index">
<el-table-column label="类型名称" align="center" prop="maTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="maName" :show-overflow-tooltip="true"/>
<el-table-column label="到货数量" align="center" prop="arrivalNum" :show-overflow-tooltip="true"/>
<el-table-column label="报废数量" align="center" prop="scrapNum" :show-overflow-tooltip="true"/>
<el-table-column label="报废费用(万元)" align="center" prop="scrapPrice" :show-overflow-tooltip="true"/>
<el-table-column label="报废类型" align="center" prop="scrapType" :show-overflow-tooltip="true"/>
<el-table-column label="提交人" align="center" prop="submitName" :show-overflow-tooltip="true"/>
<el-table-column label="本次审核周期" align="center" prop="reviewTime" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true"/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" width="180" v-if="!isView">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="success" @click="pass(scope.row)" v-if="scope.row.status==0"> <span>{{
(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
}}</span>
</template>
</el-table-column>
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="报废数量" align="center" prop="scrapNum" :show-overflow-tooltip="true"/>
<el-table-column label="报废费用(万元)" align="center" prop="totalCost" :show-overflow-tooltip="true"/>
<el-table-column label="报废类型" align="center" prop="scrapStyle" :show-overflow-tooltip="true"/>
<el-table-column label="损坏类型" align="center" prop="scrapType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.scrapType==0">{{ '自然损坏' }}</span>
<span v-if="scope.row.scrapType==1">{{ '人为损坏' }}</span>
</template>
</el-table-column>
<el-table-column label="提交人" align="center" prop="createName" :show-overflow-tooltip="true"/>
<el-table-column label="本次审核周期" align="center" prop="month" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" prop="ledgerStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span style="color:#70B603">{{ '待审核'}}</span>
</template>
</el-table-column>
<!-- <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/> -->
<el-table-column label="操作" align="center" width="180" >
<template slot-scope="scope">
<el-button size="mini" type="success" @click="pass(scope.row)" v-if="scope.row.ledgerStatus==0">
通过 通过
</el-button> </el-button>
<el-button size="mini" type="danger" @click="reject(scope.row)" v-if="scope.row.status==0"> <el-button size="mini" type="danger" @click="reject(scope.row)" v-if="scope.row.ledgerStatus==0">
驳回 驳回
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 驳回弹窗 --> <!-- 驳回弹窗 -->
<el-dialog title="驳回" :visible.sync="confirmShow" width="600px" height="300px" @close="closeCancel"> <el-dialog title="驳回" :visible.sync="confirmShow" width="600px" height="300px" @close="closeCancel">
<div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;"> <div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;">
@ -128,34 +150,26 @@
</template> </template>
<script> <script>
import { getManufacturerSelect } from "@/api/ma/supplier"; import { getTotalList,getTotalPrice,ledgerApprove,ledgerReject } from '@/api/repair/scrapLedgerReview';
import {
acceptInnerVerifyer,
getPurchaseFileList,
uploadPurchaseFile,
} from "@/api/purchase/goodsAccept";
import { getPartType,partTypeWarehouse,partTypeReject } from '@/api/part/partAccept';
import { getPartTypeCheckInfo } from '@/api/part/partArrived';
export default { export default {
name: "AcceptDetail", name: "AcceptDetail",
dicts: ["part_task_status"], dicts: ["part_task_status"],
data() { data() {
return { return {
Id: "",
taskId: "",
// //
loading: false, loading: false,
dialogLoading: false,
isView: false,
// //
single: true, single: true,
// //
multiple: true, multiple: true,
total: 0,
// //
showSearch: true, showSearch: true,
showHouse: false, showHouse: false,
ids: [], ids: [],
infos: [], idList: [],
taskIds: [],
taskIdList: [],
checkList: [], checkList: [],
// //
tableList: [], tableList: [],
@ -164,6 +178,8 @@ export default {
// //
queryParams: { queryParams: {
pageNum: 1,
pageSize: 10,
time: null, time: null,
keyWord: '', keyWord: '',
}, },
@ -172,10 +188,12 @@ export default {
checkResult: "", // checkResult: "", //
reviewPeriod: '', // reviewPeriod: '', //
reviewCost: null, //
}; };
}, },
created() { created() {
this.getTopData();
this.getList(); this.getList();
}, },
@ -202,54 +220,47 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.tableList = [{ getTotalList(null).then((response) => {
maTypeName: '手扶机绞磨', this.tableList = response.data.rows;
maName: '123456', this.total = response.data.total;
arrivalNum: '100', this.loading = false;
scrapNum: '10', });
scrapPrice: '100', },
scrapType: '1',
submitName: '张三', //
reviewTime: '2023-09-01', getTopData() {
status: '0', getTotalPrice().then((response) => {
remark: '无', this.reviewPeriod = response.data.month;
}, this.reviewCost = response.data.totalCost;
{ });
maTypeName: '手拉葫芦',
maName: '123456',
arrivalNum: '100',
scrapNum: '10',
scrapPrice: '100',
scrapType: '1',
submitName: '李四',
reviewTime: '2023-09-01',
status: '0',
remark: '无',
}]
this.loading = false;
// getPartTypeCheckInfo(this.queryParams).then((response) => {
// this.tableList = response.data.partTypeCheckDetailsList;
// // this.total = response.total;
// this.loading = false;
// });
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.$refs.multipleTable.clearSelection();
this.queryParams.keyWord = null; this.queryParams.keyWord = null;
this.handleQuery(); this.handleQuery();
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.reviewPeriod = this.formatDateRange(this.queryParams.time); // this.queryParams.pageNum = 1;
// this.reviewPeriod = this.formatDateRange(this.queryParams.time); //
this.getTopData();
this.getList(); this.getList();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log('111111111',selection)
this.ids = selection; this.ids = selection;
this.infos = []; this.idList = [];
this.taskIdList = [];
selection.forEach((item) => { selection.forEach((item) => {
this.infos.push({id:item.id,partId:item.partId,purchaseNum:item.purchaseNum,taskId:item.taskId}); if (item.idList) {
this.idList = this.idList.concat(item.idList);
}
if (item.taskIdList) {
this.taskIdList = this.taskIdList.concat(item.taskIdList);
}
}); });
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
@ -261,18 +272,19 @@ export default {
// return; // return;
// } // }
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}] const infos={'idList':this.idList,'taskIdList':this.taskIdList}
this.$modal.confirm('是否确认通过?') this.$modal.confirm('是否确认通过?')
.then(function() { .then(function() {
return partTypeWarehouse(infos) return ledgerApprove(infos)
}).then(() => { }).then(() => {
this.$modal.msgSuccess('入库成功') this.$modal.msgSuccess('入库成功')
this.getTopData();
this.getList() this.getList()
}).catch(() => {}); }).catch(() => {});
}, },
// //
reject(row) { reject(row) {
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}] this.checkResult = "不合格";
this.confirmShow = true; this.confirmShow = true;
// this.$modal.confirm('') // this.$modal.confirm('')
// .then(function() { // .then(function() {
@ -283,18 +295,21 @@ export default {
// }).catch(() => {}); // }).catch(() => {});
}, },
// //
batchPass() { batchPass() {
if(this.infos==0){ if(this.ids.length==0){
this.$modal.msgError("请选择数据"); this.$modal.msgError("请选择数据");
return; return;
} }
const infos={'idList':this.idList,'taskIdList':this.taskIdList}
console.log('111111111infos',infos)
this.$modal.confirm('是否确认通过?') this.$modal.confirm('是否确认通过?')
.then(() => { .then(() => {
// return partTypeWarehouse(this.infos) return ledgerApprove(infos)
}) })
.then(() => { .then(() => {
this.$modal.msgSuccess('通过成功') this.$modal.msgSuccess('通过成功')
this.getTopData();
this.getList() this.getList()
// //
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();
@ -304,26 +319,26 @@ export default {
// //
batchReject() { batchReject() {
if(this.infos==0){ if(this.ids.length==0){
this.$modal.msgError("请选择数据"); this.$modal.msgError("请选择数据");
return; return;
} }
this.checkResult = "不合格";
this.confirmShow = true; this.confirmShow = true;
}, },
// //
confirmCheck() { confirmCheck() {
let param = { const infos={'idList':this.idList,'taskIdList':this.taskIdList,'rejectReason':this.checkResult}
ledgerReject(infos).then((response) => {
} if (response.code == 200) {
// acceptInnerVerifyer(param).then((response) => { this.$modal.msgSuccess("驳回成功");
// if (response.code == 200) { this.confirmShow = false;
// this.$modal.msgSuccess(""); this.getTopData();
// this.confirmShow = false; this.getList();
// this.getList(); this.$refs.multipleTable.clearSelection();
// this.$refs.multipleTable.clearSelection(); }
// } });
// });
}, },
// //