减免费用
This commit is contained in:
parent
61247f3f9e
commit
2e0b9374e2
|
|
@ -224,6 +224,30 @@
|
|||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row style="margin-bottom:20px;margin-left:20px">
|
||||
<el-col :span="10">
|
||||
<span style="font-family: Arial; font-size: 16px; position: relative; padding-left: 20px;">
|
||||
<span style="position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; background-color: #f5f7fa; border-radius: 50%; display: inline-block;"></span>
|
||||
当前减免时间符合的数据条数:{{ num1 }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span style="font-family: Arial; font-size: 16px; position: relative; padding-left: 20px;">
|
||||
<span style="position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; background-color: #c0e6fa; border-radius: 50%; display: inline-block;"></span>
|
||||
当前减免时间不符合的数据条数:{{ num2 }}
|
||||
</span>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@click="handleClean"
|
||||
v-if="num2>0"
|
||||
>一键去除</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" row-key="id" :data="applyList"
|
||||
:span-method="objectSpanMethodApply"
|
||||
border
|
||||
|
|
@ -283,7 +307,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button type="primary" @click="submitForm" >确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
|
@ -353,6 +377,8 @@ export default {
|
|||
|
||||
//减免申请list
|
||||
applyList: [],
|
||||
//备份所选的数据
|
||||
applyListTemp: [],
|
||||
|
||||
//减免费用弹窗
|
||||
showApply: false,
|
||||
|
|
@ -394,6 +420,11 @@ export default {
|
|||
|
||||
//弹窗确定按钮是否能点击
|
||||
btnDisabled: false,
|
||||
|
||||
//当前符合的数据条数
|
||||
num1: 0,
|
||||
//当前不符合的数据条数
|
||||
num2: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -411,8 +442,9 @@ export default {
|
|||
methods: {
|
||||
getRowClassName({ row, rowIndex }) {
|
||||
if (this.dialogAppy.reduceStartTime && this.dialogAppy.reduceEndTime) {
|
||||
if ((!row.reduceStartTime || !row.reduceEndTime)&&rowIndex!=this.applyList.length-1) {
|
||||
if ((!row.reduceStartTime || !row.reduceEndTime) && rowIndex!=this.applyList.length-1) {
|
||||
return 'highlight-row'
|
||||
}else{
|
||||
}
|
||||
}
|
||||
return '';
|
||||
|
|
@ -606,6 +638,7 @@ export default {
|
|||
this.uploadKey = Date.now();
|
||||
this.delBusinessFileIdList=[];
|
||||
this.applyList=[];
|
||||
this.applyListTemp=[];
|
||||
// 去除 pushReviewList 数组的最后一个元素,将剩余元素赋值给 paramList
|
||||
const paramList = this.pushReviewList.slice(0, -1);
|
||||
paramList.forEach((item) => {
|
||||
|
|
@ -625,6 +658,7 @@ export default {
|
|||
reduceLeaseMoney: 0,
|
||||
}
|
||||
this.applyList.push(obj)
|
||||
this.applyListTemp = this.applyList;
|
||||
this.showApply = true;
|
||||
this.title = "减免申请";
|
||||
},
|
||||
|
|
@ -780,23 +814,37 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
updateNum() {
|
||||
if (this.dialogAppy.reduceStartTime && this.dialogAppy.reduceEndTime) {
|
||||
this.num2 = this.applyList.slice(0,-1).filter(item =>!item.reduceStartTime ||!item.reduceEndTime).length;
|
||||
this.num1 = this.applyList.filter(item => item.reduceStartTime && item.reduceEndTime).length;
|
||||
}
|
||||
},
|
||||
|
||||
// 更新表格中所有数据的减免开始时间
|
||||
updateTableStartTime() {
|
||||
this.applyList = this.applyListTemp;
|
||||
const pickStartTime = new Date(this.dialogAppy.reduceStartTime);
|
||||
this.applyList.slice(0,-1).forEach(item => {
|
||||
let validEndTime = item.endTime ? new Date(item.endTime) : new Date();
|
||||
if(pickStartTime < new Date(item.startTime) || pickStartTime > validEndTime){
|
||||
console.log('日期无效',validEndTime)
|
||||
this.$set(item, 'reduceStartTime', null);
|
||||
}else{
|
||||
console.log('日期有效',validEndTime,this.dialogAppy.reduceStartTime)
|
||||
this.$set(item, 'reduceStartTime', this.dialogAppy.reduceStartTime);
|
||||
}
|
||||
// item.reduceStartTime = this.dialogAppy.reduceStartTime;
|
||||
});
|
||||
if (this.dialogAppy.reduceEndTime) {
|
||||
|
||||
this.applyList.slice(0,-1).forEach(item => {
|
||||
const startTime = new Date(item.reduceStartTime);
|
||||
const endTime = new Date(item.reduceEndTime);
|
||||
if (!isNaN(startTime) && !isNaN(endTime) && startTime.getTime()!=0 && endTime.getTime()!=0 && endTime.getTime() >= startTime.getTime()) {
|
||||
const startTimeTemp = item.reduceStartTime;
|
||||
const endTimeTemp = item.reduceEndTime;
|
||||
console.log('日期无效sdadasdsada',startTimeTemp,endTimeTemp,startTime,endTime)
|
||||
if (startTimeTemp!=null && endTimeTemp!=null && startTime.getTime()!=0 && endTime.getTime()!=0 && endTime.getTime() >= startTime.getTime()) {
|
||||
const oneDay = 24 * 60 * 60 * 1000; // 一天的毫秒数
|
||||
const diffDays = Math.ceil(Math.abs((endTime - startTime) / oneDay)) + (endTime - startTime === 0 ? 1 : 1);
|
||||
this.$set(item, 'reduceDays', diffDays);
|
||||
|
|
@ -804,7 +852,12 @@ export default {
|
|||
this.$set(item, 'reduceLeaseMoney', item.reduceDays*item.leasePrice*item.reduceNum);
|
||||
}
|
||||
// row.leaseDays = diffDays;
|
||||
}else {
|
||||
}else if(startTimeTemp!=null && item.reduceEndTime==null && startTimeTemp>=item.startTime && startTimeTemp<=item.endTime){
|
||||
this.$set(item, 'reduceEndTime', startTime);
|
||||
this.$set(item, 'reduceDays', 0);
|
||||
this.$set(item, 'reduceLeaseMoney', 0);
|
||||
}
|
||||
else {
|
||||
this.$set(item, 'reduceStartTime', null);
|
||||
// 如果日期无效,将减免天数设为 0 或者清空
|
||||
this.$set(item, 'reduceDays', 0);
|
||||
|
|
@ -815,13 +868,17 @@ export default {
|
|||
}, 0);
|
||||
});
|
||||
}
|
||||
this.updateNum()
|
||||
},
|
||||
// 更新表格中所有数据的减免结束时间
|
||||
updateTableEndTime() {
|
||||
this.applyList = this.applyListTemp;
|
||||
const pickEndTime = new Date(this.dialogAppy.reduceEndTime);
|
||||
this.applyList.slice(0,-1).forEach(item => {
|
||||
let validEndTime = item.endTime ? new Date(item.endTime) : new Date();
|
||||
console.log('666666666666',item.startTime,pickEndTime)
|
||||
if(pickEndTime < new Date(item.startTime) || pickEndTime > validEndTime){
|
||||
|
||||
this.$set(item, 'reduceEndTime', null);
|
||||
}else{
|
||||
this.$set(item, 'reduceEndTime', this.dialogAppy.reduceEndTime);
|
||||
|
|
@ -832,7 +889,11 @@ export default {
|
|||
this.applyList.slice(0,-1).forEach(item => {
|
||||
const startTime = new Date(item.reduceStartTime);
|
||||
const endTime = new Date(item.reduceEndTime);
|
||||
if (!isNaN(startTime) && !isNaN(endTime) && startTime.getTime()!=0 && endTime.getTime()!=0 && endTime.getTime() >= startTime.getTime()) {
|
||||
const startTimeTemp = item.reduceStartTime;
|
||||
const endTimeTemp = item.reduceEndTime;
|
||||
console.log('xxxxxxxxxxxxx',endTimeTemp,item.startTime,item.endTime,item.reduceEndTime)
|
||||
if (startTimeTemp!=null && endTimeTemp!=null && startTime.getTime()!=0 && endTime.getTime()!=0 && endTime.getTime() >= startTime.getTime()) {
|
||||
console.log('zzzzzzzzzzzzzz')
|
||||
const oneDay = 24 * 60 * 60 * 1000; // 一天的毫秒数
|
||||
const diffDays = Math.ceil(Math.abs((endTime - startTime) / oneDay)) + (endTime - startTime === 0 ? 1 : 1);
|
||||
this.$set(item, 'reduceDays', diffDays);
|
||||
|
|
@ -841,6 +902,11 @@ export default {
|
|||
this.$set(item, 'reduceLeaseMoney', item.reduceDays*item.leasePrice*item.reduceNum);
|
||||
}
|
||||
// row.leaseDays = diffDays;
|
||||
}else if(endTimeTemp!=null && item.reduceStartTime==null && endTimeTemp>=item.startTime && endTimeTemp<=item.endTime){
|
||||
console.log('yyyyyyyyyyy',item.reduceEndTime)
|
||||
this.$set(item, 'reduceEndTime', endTime);
|
||||
this.$set(item, 'reduceDays', 0);
|
||||
this.$set(item, 'reduceLeaseMoney', 0);
|
||||
}else {
|
||||
this.$set(item, 'reduceEndTime', null);
|
||||
// 如果日期无效,将减免天数设为 0 或者清空
|
||||
|
|
@ -852,6 +918,7 @@ export default {
|
|||
}, 0);
|
||||
});
|
||||
}
|
||||
this.updateNum()
|
||||
},
|
||||
|
||||
//table中时间改变
|
||||
|
|
@ -897,6 +964,7 @@ export default {
|
|||
this.applyList[this.applyList.length-1].reduceLeaseMoney = this.applyList.slice(0,-1).reduce((total, item) => {
|
||||
return total + Number(item.reduceLeaseMoney);
|
||||
}, 0);
|
||||
this.updateNum()
|
||||
},
|
||||
|
||||
updateLeaseDaysEnd(row) {
|
||||
|
|
@ -939,6 +1007,7 @@ export default {
|
|||
this.applyList[this.applyList.length-1].reduceLeaseMoney = this.applyList.slice(0,-1).reduce((total, item) => {
|
||||
return total + Number(item.reduceLeaseMoney);
|
||||
}, 0);
|
||||
this.updateNum()
|
||||
},
|
||||
|
||||
//table中数量改变
|
||||
|
|
@ -968,13 +1037,13 @@ export default {
|
|||
if(index3>-1){
|
||||
this.$modal.msgError('减免数量不能为0!')
|
||||
}else if(index4>-1){
|
||||
this.$modal.msgError('请选择减免开始时间!')
|
||||
this.$modal.msgError('请先去除减免时间不符合的数据!')
|
||||
}else if(index5>-1){
|
||||
this.$modal.msgError('请选择减免结束时间!')
|
||||
this.$modal.msgError('请先去除减免时间不符合的数据!')
|
||||
}else if(index2>-1){
|
||||
this.$modal.msgError('减免数量不能大于领料数量!')
|
||||
}else if(index>-1){
|
||||
this.$modal.msgError('减免结束时间不能小于减免开始时间!')
|
||||
this.$modal.msgError('请先去除减免时间不符合的数据!')
|
||||
}else{
|
||||
const param = {
|
||||
agreementId: this.queryParams.agreementId,
|
||||
|
|
@ -1009,6 +1078,15 @@ export default {
|
|||
},
|
||||
closeDiag() {
|
||||
this.cancel();
|
||||
},
|
||||
|
||||
handleClean(){
|
||||
// 过滤掉不符合的数据
|
||||
this.applyList = this.applyList.filter((item, index) => {
|
||||
return index === this.applyList.length - 1 || (item.reduceStartTime && item.reduceEndTime);
|
||||
});
|
||||
// 更新符合和不符合的数据条数
|
||||
this.updateNum();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
@ -1035,68 +1113,6 @@ export default {
|
|||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
// .clickText {
|
||||
// color: #02a7f0;
|
||||
// cursor: pointer;
|
||||
// }
|
||||
|
||||
// .tabelAllBottom {
|
||||
// display: flex;
|
||||
// border: 1px solid #dfe6ec;
|
||||
// width:100%;
|
||||
// border-bottom: 1px solid #dfe6ec;
|
||||
// border-top: none;
|
||||
// }
|
||||
// .columnAll {
|
||||
// flex: 1;
|
||||
// display: flex;
|
||||
// padding: 5px;
|
||||
// border-left: 1px solid #dfe6ec;
|
||||
// width:100%;
|
||||
// align-items: center;
|
||||
// text-align: center;
|
||||
// justify-content: center; /* 将内容对齐到中间 */
|
||||
// }
|
||||
// .columnAllNum {
|
||||
// padding: 5px;
|
||||
// text-align: center;
|
||||
// width:88.6%;
|
||||
// border-left: none;
|
||||
// }
|
||||
|
||||
// .tabelFirstBottom {
|
||||
// display: flex;
|
||||
// border: 1px solid #dfe6ec;
|
||||
// width:100%;
|
||||
// border-bottom: 1px solid #dfe6ec;
|
||||
// border-top: none;
|
||||
// }
|
||||
// .columnFirst {
|
||||
// display: flex ;
|
||||
// background-color: #f8f8f9;
|
||||
// padding: 5px;
|
||||
// border-left: 1px solid #dfe6ec;
|
||||
// width:14.5%;
|
||||
// align-items: center;
|
||||
// text-align: center;
|
||||
// justify-content: center; /* 将内容对齐到中间 */
|
||||
// }
|
||||
// .columnFirstRight {
|
||||
// padding: 5px;
|
||||
// background-color: #f8f8f9;
|
||||
// border-left: 1px solid #dfe6ec;
|
||||
// width:28.5%;
|
||||
// align-items: center;
|
||||
// text-align: center;
|
||||
// justify-content: center; /* 将内容对齐到中间 */
|
||||
// }
|
||||
// .columnFirstNum {
|
||||
// background-color: #f8f8f9;
|
||||
// padding: 5px;
|
||||
// text-align: center;
|
||||
// width:41.7%;
|
||||
// border-left: none;
|
||||
// }
|
||||
|
||||
//文件上传样式
|
||||
//隐藏图片上传框的css
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,370 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="queryParams.time"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 240px"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="taskStatus">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
placeholder="请选择状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.lease_task_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增报废
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" row-key="id" @selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
|
||||
<el-table-column width="60" align="center" label="序号" type="index" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="报废单号" align="center" prop="createTime" width="160" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="物资类型" align="center" prop="createBy" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="提交人" align="center" prop="impUnitName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="提交时间" align="center" prop="contractPart" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="状态" align="center" prop="taskStatus" :show-overflow-tooltip="true" width="150">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.lease_task_status" :value="scope.row.taskStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" style="margin-bottom: 10px" type="normal"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button>
|
||||
<el-button size="mini" style="margin-bottom: 10px" type="primary"
|
||||
@click="handleUpdate(scope.row)" v-if="scope.row.taskStatus != 4" v-hasPermi="['purchase:info:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button size="mini" type="danger"
|
||||
@click="handleDeletePurchase(scope.row)" v-if="scope.row.taskStatus == 1" v-hasPermi="['purchase:info:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getListLeaseApply,
|
||||
getPurchaseCheckInfo,
|
||||
getAcceptanceForm,
|
||||
purchaseCheckInfoRemove,
|
||||
queryStatusDataApi,
|
||||
getApplyInfo,
|
||||
applyRemove,
|
||||
applySend,
|
||||
applySendAll,
|
||||
getCheckInfo
|
||||
} from "@/api/lease/apply";
|
||||
|
||||
import vueEasyPrint from "vue-easy-print";
|
||||
import printJS from 'print-js';
|
||||
|
||||
export default {
|
||||
name: "Home",
|
||||
dicts: ["lease_task_status", "ma_type_manage_type"],
|
||||
components: { vueEasyPrint },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loadingTwo: true,
|
||||
updateTime: "",
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showPeople: false,
|
||||
peopleOpen: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
totalTwo: 0,
|
||||
//搜索下拉数据
|
||||
typesList: [],
|
||||
modelList: [],
|
||||
// 字典表格数据
|
||||
typeList: [],
|
||||
getListPeople: [],
|
||||
configUserList: [],
|
||||
phoneNumbers: [],
|
||||
//选择人员
|
||||
chosenUserList: [],
|
||||
userList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
statusDataRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null, //申请时间
|
||||
keyWord: "",
|
||||
taskStatus: null, //申请时间
|
||||
},
|
||||
form: {
|
||||
remark: "",
|
||||
},
|
||||
openPrint: false,
|
||||
open: false,
|
||||
printData: {},
|
||||
printTableData: [],
|
||||
checkDataInfo: {},
|
||||
// 供应商
|
||||
supplierStr: "",
|
||||
|
||||
//领料单
|
||||
leaseApplyDetails: [],
|
||||
// 领料任务详情数据
|
||||
leaseApplyData: {},
|
||||
sendTemp: [],
|
||||
// 编码管理查看弹窗
|
||||
showView: false,
|
||||
titleView: "",
|
||||
getListViewInfo: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getStatusList();
|
||||
this.getList();
|
||||
// this.getTypeList()
|
||||
},
|
||||
methods: {
|
||||
// getTypeList() {
|
||||
// getTypeList({ level: '3' }).then((response) => {
|
||||
// this.typesList = response.data
|
||||
// })
|
||||
// getTypeList({ level: '4' }).then((response) => {
|
||||
// this.modelList = response.data
|
||||
// })
|
||||
// },
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.sendTemp = [];
|
||||
this.ids = selection.map((item) => item.id);
|
||||
selection.forEach((item) => {
|
||||
this.sendTemp.push({ id: item.id, taskId: item.taskId });
|
||||
});
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
if (row.taskStatus == 1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const params = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
taskStatus: this.queryParams.taskStatus,
|
||||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
statusList:[this.queryParams.taskStatus]
|
||||
};
|
||||
getListLeaseApply(params).then((response) => {
|
||||
this.typeList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time = [];
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams.keyWord = "";
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.$emit("addTools");
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
this.$emit("queryTools", row.taskId, row.id);
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.$emit("editTools", row.taskId, row.id);
|
||||
},
|
||||
|
||||
//----消息通知
|
||||
getNowTime() {
|
||||
var today = new Date();
|
||||
var year = today.getFullYear(); //获取年份
|
||||
var month = today.getMonth() + 1; //获取月份
|
||||
var day = today.getDate(); //获取日期
|
||||
return year + "-" + month + "-" + day;
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
taskId: "",
|
||||
remark: "",
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
//获取验收单数据
|
||||
getPrintTable(taskId) {
|
||||
getAcceptanceForm({ taskId: taskId }).then((response) => {
|
||||
this.printData = response.data;
|
||||
this.printTableData = response.data.checkDetailsList;
|
||||
|
||||
let supplierList = [];
|
||||
this.printTableData.forEach((e) => {
|
||||
if (e.supplier) {
|
||||
supplierList.push(e.supplier);
|
||||
}
|
||||
});
|
||||
supplierList = [...new Set(supplierList)];
|
||||
|
||||
this.supplierStr = supplierList.join(",");
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 关闭弹窗并刷新页面
|
||||
closeDialogAndRefresh() {
|
||||
this.openPrint = false;
|
||||
},
|
||||
|
||||
codeInfo(row) {
|
||||
this.showView = true;
|
||||
this.titleView = "查看";
|
||||
this.getListViewInfo = row.maCodeVoList;
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDeletePurchase(row) {
|
||||
// console.log(row)
|
||||
let ids = [];
|
||||
ids.push(row.id);
|
||||
console.log("ids", ids);
|
||||
this.$modal
|
||||
.confirm("是否确认删除所选择的数据项?")
|
||||
.then(function () {
|
||||
return applyRemove(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
// ::v-deep.el-table .fixed-width .el-button--mini {
|
||||
// width: 70px !important;
|
||||
// margin-bottom: 10px;
|
||||
// }
|
||||
|
||||
.image-type {
|
||||
/* 旋转图片 */
|
||||
transform: rotate(-90deg);
|
||||
/* 确保旋转后的图片不会超出容器 */
|
||||
max-width: 100%;
|
||||
/* 保持图片的宽高比 */
|
||||
width: 40px;
|
||||
height: 100px;
|
||||
}
|
||||
.sign-type{
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,276 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="租赁单位" prop="unitId">
|
||||
<el-cascader
|
||||
v-model="unitId"
|
||||
:show-all-levels="false"
|
||||
:options="uniteList"
|
||||
:props="selectTreeProps"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
disabled
|
||||
placeholder="请选择租赁单位"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="租赁工程" prop="projectId">
|
||||
<el-cascader
|
||||
v-model="projectId"
|
||||
:show-all-levels="false"
|
||||
:options="projectList"
|
||||
:props="selectTreeProps"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
disabled
|
||||
placeholder="请选择租赁工程"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="领料人" prop="leasePerson">
|
||||
<el-input
|
||||
v-model="maForm.leasePerson"
|
||||
placeholder="请输入领料人"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="maForm.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="equipmentList">
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="类型名称"
|
||||
align="center"
|
||||
prop="maTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
align="center"
|
||||
prop="typeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
prop="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="当前库存"
|
||||
align="center"
|
||||
prop="storageNum"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="预领数量"
|
||||
align="center"
|
||||
prop="preNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="出库数量"
|
||||
align="center"
|
||||
prop="alNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPurchaseCheckInfo } from "@/api/purchase/goodsArrived";
|
||||
import {
|
||||
uploadPurchaseFile,
|
||||
getPurchaseFileList,
|
||||
} from "@/api/purchase/goodsAccept";
|
||||
import { getApplyInfo, getListProject, getListUnite } from "@/api/lease/apply";
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
name: "QueryTools",
|
||||
dicts: ["purchase_task_status"],
|
||||
components: {
|
||||
// UploadImg,
|
||||
},
|
||||
props: {
|
||||
isView: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
queryTaskId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
queryId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return "";
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//任务ID
|
||||
taskId: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
//租赁单位
|
||||
uniteList: [],
|
||||
//租赁工程
|
||||
projectList: [],
|
||||
// 表格数据
|
||||
equipmentList: [],
|
||||
unitId: null,
|
||||
projectId: null,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData: {},
|
||||
maForm: {
|
||||
unitId: undefined,
|
||||
projectId: undefined,
|
||||
},
|
||||
selectTreeProps: {
|
||||
children: "children",
|
||||
label: "name",
|
||||
// multiple: false,
|
||||
value: "id",
|
||||
// multiple: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.taskId = this.queryTaskId;
|
||||
this.id = this.queryId;
|
||||
this.projectInfoList();
|
||||
this.getTaskInfo();
|
||||
},
|
||||
methods: {
|
||||
/** 租赁单位和工程-下拉选 */
|
||||
projectInfoList() {
|
||||
getListUnite({ id: null }).then((response) => {
|
||||
this.uniteList = response.data;
|
||||
});
|
||||
getListProject({ id: null }).then((response) => {
|
||||
this.projectList = response.data;
|
||||
});
|
||||
},
|
||||
//获取任务详情-列表数据
|
||||
getTaskInfo() {
|
||||
this.loading = true;
|
||||
getApplyInfo(this.id).then((response) => {
|
||||
this.maForm = response.data.leaseApplyInfo;
|
||||
this.maForm.unitId = response.data.leaseApplyInfo.leaseUnitId;
|
||||
this.maForm.projectId = response.data.leaseApplyInfo.leaseProjectId;
|
||||
this.unitId = this.treeParentsById(this.uniteList, this.maForm.unitId);
|
||||
this.projectId = this.treeParentsById(
|
||||
this.projectList,
|
||||
this.maForm.projectId
|
||||
);
|
||||
this.equipmentList = response.data.leaseApplyDetailsList;
|
||||
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//单位,工程树结构数据获取父
|
||||
treeParentsById(list, id) {
|
||||
for (let i in list) {
|
||||
if (list[i].id == id) {
|
||||
//查询到就返回该数组对象的value
|
||||
return [list[i].id];
|
||||
}
|
||||
if (list[i].children) {
|
||||
let node = this.treeParentsById(list[i].children, id);
|
||||
if (node !== undefined) {
|
||||
//查询到把父节把父节点加到数组前面
|
||||
node.unshift(list[i].id);
|
||||
return node;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"/material/lease_apply_info/exportDetails",
|
||||
{ id: this.id },
|
||||
`领料申请详情_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
//隐藏图片上传框的css
|
||||
::v-deep.disabled {
|
||||
.el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.custom-textarea {
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
}
|
||||
.accept-img {
|
||||
color: #409eff;
|
||||
|
||||
.a-two {
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.left-tip {
|
||||
font-size: 16px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<template>
|
||||
<!-- 盘点报废管理 -->
|
||||
<div class="app-container">
|
||||
<PageHeaderApply
|
||||
v-if="isShowComponent != 'Home'"
|
||||
:pageContent="pageContent"
|
||||
@goBack="goBack"
|
||||
/>
|
||||
<component
|
||||
:is="isShowComponent"
|
||||
:isEdit="isEdit"
|
||||
:editTaskId="editTaskId"
|
||||
:editId="editId"
|
||||
:queryTaskId="queryTaskId"
|
||||
:queryId="queryId"
|
||||
:isView="isView"
|
||||
:codingTaskId="codingTaskId"
|
||||
@addTools="addTools"
|
||||
@editTools="editTools"
|
||||
@addToolsSuccess="addToolsSuccess"
|
||||
@queryTools="queryTools"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeaderApply from "@/components/pageHeaderApply";
|
||||
import Home from "./component/homeApply.vue"; // 主列表
|
||||
import AddTools from "./component/addToolsApply.vue"; // 新增机具 和 修改机具
|
||||
import QueryTools from "./component/queryToolsApply.vue"; // 查询机具 和 验收机具
|
||||
export default {
|
||||
components: {
|
||||
Home,
|
||||
PageHeaderApply,
|
||||
AddTools,
|
||||
QueryTools,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShowComponent: "Home",
|
||||
pageContent: "盘点报废申请",
|
||||
isEdit: false,
|
||||
editTaskId: "",
|
||||
editId: "",
|
||||
queryId: "",
|
||||
queryTaskId: "",
|
||||
isView: false,
|
||||
codingTaskId: "",
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* 新增工机具 */
|
||||
addTools() {
|
||||
this.isEdit = false;
|
||||
this.editTaskId = "";
|
||||
this.queryTaskId = "";
|
||||
this.pageContent = "报废新增";
|
||||
this.isShowComponent = "AddTools";
|
||||
},
|
||||
/* 新增成功 */
|
||||
addToolsSuccess() {
|
||||
this.isShowComponent = "Home";
|
||||
},
|
||||
/* 编辑工机具 */
|
||||
editTools(taskId, id) {
|
||||
this.isEdit = true;
|
||||
this.pageContent = "报废编辑";
|
||||
this.editTaskId = taskId;
|
||||
this.editId = id;
|
||||
this.isShowComponent = "AddTools";
|
||||
},
|
||||
/* 查询工机具 */
|
||||
queryTools(taskId, id) {
|
||||
this.isView = true;
|
||||
this.pageContent = "详情信息";
|
||||
this.queryTaskId = taskId;
|
||||
this.queryId = id;
|
||||
this.isShowComponent = "QueryTools";
|
||||
},
|
||||
/* 返回按钮 */
|
||||
goBack() {
|
||||
this.isShowComponent = "Home";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue