减免记录查询管理,盘点报废页面搭建

This commit is contained in:
hongchao 2025-02-20 15:28:19 +08:00
parent 0ad9db8776
commit 95ba75749e
11 changed files with 1430 additions and 838 deletions

View File

@ -101,7 +101,23 @@ export function addRelief(params){
})
}
// 减免费用详情
export function getDiscountViewList(id) {
return request({
url: '/material/derateRecordQuery/' + id,
method: 'get'
})
}
// 减免费用修改
export function editRelief(params){
return request({
url: '/material/slt_agreement_reduce/editApply',
method: 'post',
data: params
})
}

View File

@ -35,4 +35,13 @@ export function ledgerReject(data) {
method: 'post',
data: data,
})
}
//盘带报废编码获取下拉框
export function getMachineListByCode(query) {
return request({
url: '/material/ma_machine/getMachineList',
method: 'get',
params: query
})
}

File diff suppressed because it is too large Load Diff

View File

@ -159,13 +159,13 @@
<el-row>
<el-col :span="12">
<el-form-item label="减免原因" prop="reason">
<el-form-item label="减免原因" prop="remark">
<el-input
type="textarea"
style="width: 80%"
:rows="5"
placeholder="请输入减免原因"
v-model="dialogAppy.reason"
v-model="dialogAppy.remark"
maxlength="100"
show-word-limit
>
@ -298,7 +298,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" v-if="!isView"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -313,7 +313,7 @@
<script>
import {getReliefList,addRelief } from "@/api/cost/cost";
import {getReliefList,editRelief,getDiscountViewList } from "@/api/cost/cost";
import {getReliefRecordList,deleteRedif } from "@/api/business/index";
import {downloadFile, downloadFileData} from '@/utils/download'
import {getToken} from '@/utils/auth'
@ -373,7 +373,7 @@ export default {
dialogAppy: {
reduceStartTime: undefined,
reduceEndTime: undefined,
reason: '',
remark: '',
decreaseFile: [],
},
rules: {
@ -412,6 +412,9 @@ export default {
num1: 0,
//
num2: 0,
isView: false,
agreementId: '',
idTemp: null,
};
},
created() {
@ -466,13 +469,11 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
unitId: null,
projectId: null,
agreementId: '',
agreementCode: '',
keyWord: null,
status: null,
time: null,
}
this.resetForm('queryForm')
this.queryParams.time=[]
this.handleQuery()
},
@ -533,35 +534,63 @@ export default {
//
handleView(row) {
this.showApply = true;
this.isView = true;
this.title = "查看";
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.applyList=[];
this.applyListTemp=[];
this.applyList = JSON.parse(JSON.stringify(row));
this.applyList.forEach((item) => {
this.$set(item,'reduceNum', item.num);
this.$set(item,'reduceDays', 0);
this.$set(item,'reduceLeaseMoney', 0);
});
getDiscountViewList(row.id).then(async(response) => {
if(response.code==200){
this.dialogAppy.decreaseFile = response.data.bmFileInfos;
this.dialogAppy.reduceStartTime = response.data.reduceStartTime;
this.dialogAppy.reduceEndTime = response.data.reduceEndTime;
this.dialogAppy.remark = response.data.remark;
this.applyList = response.data.detailList;
this.leaseAll = this.applyList.reduce((total, item) => {
return total + Number(item.reduceLeaseMoney);
}, 0);
let obj = {
id:null,
reduceLeaseMoney: this.leaseAll,
}
this.applyList.push(obj)
this.applyListTemp=this.applyList;
await this.updateNum();
}
})
this.showApply = true;
},
//
handleEdit(row) {
this.showApply = true;
this.title = "编辑";
this.isView = false;
this.title = "修改";
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.applyList=[];
this.applyListTemp=[];
this.applyList = JSON.parse(JSON.stringify(row));
this.applyList.forEach((item) => {
this.$set(item,'reduceNum', item.num);
this.$set(item,'reduceDays', 0);
this.$set(item,'reduceLeaseMoney', 0);
});
getDiscountViewList(row.id).then(async (response) => {
if(response.code==200){
this.agreementId = response.data.agreementId;
this.idTemp = response.data.id;
this.dialogAppy.decreaseFile = response.data.bmFileInfos;
this.dialogAppy.reduceStartTime = response.data.reduceStartTime;
this.dialogAppy.reduceEndTime = response.data.reduceEndTime;
this.dialogAppy.remark = response.data.remark;
this.applyList = response.data.detailList;
this.leaseAll = this.applyList.reduce((total, item) => {
return total + Number(item.reduceLeaseMoney);
}, 0);
let obj = {
id:null,
reduceLeaseMoney: this.leaseAll,
}
this.applyList.push(obj)
this.applyListTemp=this.applyList;
await this.updateNum();
}
})
this.showApply = true;
},
// rowIndex= columnIndex=
// table +
// 0
@ -780,27 +809,6 @@ export default {
this.$set(item, 'reduceDays', 0);
this.$set(item, 'reduceLeaseMoney', 0);
}
// 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);
// if(item.reduceNum && item.reduceDays && item.leasePrice){
// this.$set(item, 'reduceLeaseMoney', item.reduceDays*item.leasePrice*item.reduceNum);
// }
// // row.leaseDays = diffDays;
// }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);
// this.$set(item, 'reduceLeaseMoney', 0);
// }
this.applyList[this.applyList.length-1].reduceLeaseMoney = this.applyList.slice(0,-1).reduce((total, item) => {
return total + Number(item.reduceLeaseMoney);
}, 0);
@ -811,18 +819,6 @@ export default {
//
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);
// }
// // item.reduceStartTime = this.dialogAppy.reduceStartTime;
// });
if (this.dialogAppy.reduceStartTime) {
const pickStartTime = new Date(this.dialogAppy.reduceStartTime);
const pickEndTime = new Date(this.dialogAppy.reduceEndTime);
@ -1015,22 +1011,23 @@ export default {
this.$modal.msgError('请先去除减免时间不符合的数据!')
}else{
const param = {
agreementId: this.queryParams.agreementId,
id: this.idTemp,
agreementId: this.agreementId,
reduceStartTime: this.dialogAppy.reduceStartTime,
reduceEndTime: this.dialogAppy.reduceEndTime,
bmFileInfos: this.dialogAppy.decreaseFile,
remark: this.dialogAppy.remark,
detailList: this.applyList.slice(0,-1),
}
addRelief(param).then((response) => {
}
console.log("xxxxxxxxxxxxxx",param.bmFileInfos)
editRelief(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("驳回成功");
this.$modal.msgSuccess("修改成功");
this.confirmShow = false;
this.getList();
this.$refs.multipleTable.clearSelection();
this.showApply = false;
}
});
this.$message({
type: 'success',
message: '提交成功!',
})
this.showApply = false;
}
} else {
return false;
@ -1060,7 +1057,7 @@ export default {
handleAdd() {
console.log('减免申请')
this.$router.push({ path: '/cost/costDecreaseList' })
this.$router.push({ path: '/business/businessHandling/discountApply' })
},
handleExport() {

View File

@ -448,7 +448,7 @@ export default {
this.reset()
unitInfoAll(row.unitId).then((response) => {
this.form = response.data
this.form.typeId = this.form.typeId+''
this.form.typeId = this.form.typeId
})
this.open = true
this.title = '编辑'

View File

@ -168,13 +168,13 @@
<el-row>
<el-col :span="12">
<el-form-item label="减免原因" prop="reason">
<el-form-item label="减免原因" prop="remark">
<el-input
type="textarea"
style="width: 80%"
:rows="5"
placeholder="请输入减免原因"
v-model="dialogAppy.reason"
v-model="dialogAppy.remark"
maxlength="100"
show-word-limit
>
@ -386,7 +386,7 @@ export default {
dialogAppy: {
reduceStartTime: undefined,
reduceEndTime: undefined,
reason: '',
remark: '',
decreaseFile: [],
},
rules: {
@ -396,7 +396,7 @@ export default {
reduceEndTime: [
{ required: true, message: "请选择减免结束日期", trigger: "change" },
],
reason: [
remark: [
{ required: true, message: "减免原因不能为空", trigger: "blur" },
],
decreaseFile: [
@ -526,56 +526,6 @@ export default {
/** 查询列表 */
async getList() {
this.loading = true;
// this.pushReviewList = [
// {
// id:1,
// deviceName: '',
// typeName: '200m',
// unit: '',
// leasePrice: 3.00,
// num: 10,
// startTime: '2025-01-07',
// backNum: '1',
// endTime: null,
// leaseDays: 17,
// costs: 510.00,
// },
// {
// id:2,
// deviceName: '线',
// typeName: 'φ11~15',
// unit: '',
// leasePrice: 0.9,
// num: 26,
// startTime: '2025-01-06',
// backNum: '1',
// endTime: '2025-01-23',
// leaseDays: 18,
// costs: 421.20,
// },
// {
// id:3,
// deviceName: '',
// typeName: 'DTDM-1',
// unit: '',
// leasePrice: 0.04,
// num: 76,
// startTime: '2025-01-07',
// backNum: '1',
// endTime: '2025-01-23',
// leaseDays: 17,
// costs: 51.68,
// },
// ];
// this.leaseAll = this.pushReviewList.reduce((total, item) => {
// return total + Number(item.costs);
// }, 0);
// let obj = {
// id:null,
// costs: this.leaseAll,
// }
// this.pushReviewList.push(obj)
const params = {
deviceName: this.queryParams.deviceName,
typeName: this.queryParams.typeName,
@ -1117,21 +1067,21 @@ export default {
}else{
const param = {
agreementId: this.queryParams.agreementId,
reduceStartTime: this.dialogAppy.reduceStartTime,
reduceEndTime: this.dialogAppy.reduceEndTime,
bmFileInfos: this.dialogAppy.decreaseFile,
remark: this.dialogAppy.remark,
detailList: this.applyList.slice(0,-1),
}
addRelief(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("驳回成功");
this.$modal.msgSuccess("提交成功");
this.confirmShow = false;
this.getList();
this.showApply = false;
this.$refs.multipleTable.clearSelection();
}
});
this.$message({
type: 'success',
message: '提交成功!',
})
this.showApply = false;
}
} else {
return false;

View File

@ -55,7 +55,6 @@
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="taskId" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="selectable"/>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
@ -189,7 +188,7 @@
prop="partName"
/>
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
<el-table-column label="入库数量" align="center" prop="inputNum" />
<!-- <el-table-column label="验收情况" align="center">
<el-table-column
label="到货数量"

View File

@ -55,7 +55,6 @@
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="taskId" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="selectable"/>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>

View File

@ -62,6 +62,7 @@
</el-col>
</el-row>
</el-form-item>
<div>
<el-form-item label="附件" prop="bmFileInfos" >
<el-upload
:action="uploadUrl"
@ -100,6 +101,7 @@
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</div>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -138,17 +140,39 @@
/>
<el-table-column align="center" label="计量单位" prop="unitName" />
<el-table-column align="center" label="当前库存" prop="storageNum" />
<el-table-column label="预领数量" prop="preNum" align="center">
<el-table-column label="报废数量" prop="preNum" align="center">
<template v-slot="scope">
<span>{{ scope.row.preNum }}</span>
</template>
</el-table-column>
<el-table-column label="设备编号" align="center" prop="deviceCode" width="200px">
<template v-slot="scope">
<el-input
v-model.number="scope.row.preNum"
controls-position="right" type="number"
style="width: 100%" :disabled="scope.row.alNum && scope.row.alNum != 0 ? true : false"
:min="0" @input="(v)=>(scope.row.unitValue==1?scope.row.preNum=Number(v.replace(/[^\d.]/g,'')) : scope.row.preNum=Number(v.replace(/[^\d]/g,'')))"
></el-input>
<template v-if="scope.row.manageType === '0'">
<el-select
v-model="scope.row.deviceCode"
placeholder="请选择设备编号"
multiple
collapse-tags
filterable
@change="handleDeviceCodeChange(scope.row)"
style="width: 180px;"
>
<el-option
v-for="item in scope.row.deviceCodeOptions"
:key="item.id"
:label="item.code"
:value="item.code"
></el-option>
</el-select>
</template>
<template v-else-if="scope.row.manageType === '1'">
<span>计数</span>
</template>
<template v-else>
<span>{{ scope.row.deviceCode }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="已出库数量" align="center" prop="alNum" v-if="maForm.taskId" :show-overflow-tooltip="true"/>
<!-- <el-table-column align="center" label="出库数量" prop="alNum" /> -->
<el-table-column
label="备注"
@ -207,6 +231,9 @@ import {
import {downloadFile, downloadFileData} from '@/utils/download'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import {
getMachineListByCode
} from "@/api/repair/scrapLedgerReview";
export default {
name: "AddTools",
@ -363,11 +390,16 @@ export default {
}
},
methods: {
handleDeviceCodeChange(row) {
const newDeviceCount = row.deviceCode.length;
row.preNum = newDeviceCount;
},
/** 机具类型 */
equipmentType() {
equipmentTypeTree().then((response) => {
this.equipmentTypeList = response.data;
console.log("this.equipmentTypeList", this.equipmentTypeList);
//
this.flattenTypeOptions = this.processTypeData(response.data);
//
@ -396,7 +428,8 @@ export default {
maTypeName: parents[parents.length - 1] || '',
specificationType: node.typeName,
unitName: node.unitName,
unitValue: node.unitValue
unitValue: node.unitValue,
manageType: node.manageType
});
}
@ -428,7 +461,7 @@ export default {
//
const lastSelected = val[val.length - 1];
const typeData = this.flattenTypeOptions.find(item => item.typeId === lastSelected);
console.log("typeData", typeData)
if (typeData) {
if (this.equipmentList.some(item => item.typeId === lastSelected)) {
this.$message({
@ -440,17 +473,22 @@ export default {
this.$message.error("所选物资规格类型暂时无库存,无法申请!");
this.tempDeviceType = this.tempDeviceType.filter(id => id !== lastSelected);
} else {
//
this.equipmentList.unshift({
const newItem = {
...typeData,
preNum: 0
});
preNum: 0,
};
//
this.equipmentList.unshift(newItem);
this.deviceType.push(lastSelected);
this.$message({
message: `已添加 ${typeData.typeName}`,
type: 'success'
});
}
// getDeviceCodeOptions
this.getDeviceCodeOptions(newItem).then(options => {
this.$set(newItem, 'deviceCodeOptions', options);
});
}
}
//
@ -458,6 +496,19 @@ export default {
this.tempDeviceType = [];
});
},
getDeviceCodeOptions(row) {
// handleTypeChange
// this.equipmentList
return getMachineListByCode({"typeId":row.typeId}).then((response) => {
console.log("response", response);
const relatedData = response.data.map(item => ({ id: item.maId, code: item.maCode,type: item.typeId }));
console.log("relatedData", relatedData);
return relatedData;
});
},
//---
async getTaskInfo() {
// this.loading = true;

View File

@ -8,38 +8,21 @@
v-show="showSearch"
label-width="90px"
>
<el-form-item label="类型规格:" prop="partId">
<el-select
v-model="queryParams.partId"
placeholder="请选择类型规格"
clearable
>
<el-option
v-for="dict in materialModelList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-form-item prop="dateRange">
<el-date-picker
v-model="queryParams.time"
type="month"
placeholder="请选择月份">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="机具厂家:" prop="supplierId">
<el-select v-model="queryParams.supplierId" placeholder="请选择机具厂家" clearable>
<el-option
v-for="dict in supplierList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> -->
<el-form-item label="出厂日期:" prop="productionTime">
<el-date-picker
v-model="queryParams.productionTime"
placeholder="请选择出厂日期"
value-format="yyyy-MM-dd"
type="date"
>
</el-date-picker>
<el-form-item prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键词"
clearable
@keyup.enter.native="handleQuery"
maxlength="20"
/>
</el-form-item>
<el-form-item>
@ -63,43 +46,20 @@
size="mini"
icon="el-icon-back"
@click="jumpList"
>配件验收</el-button
>报废台账</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col> -->
<el-col :span="1.5">
<el-button
type="success"
@click="batchPass"
icon="el-icon-check"
v-show="!isView"
size="mini"
:disabled="multiple"
>合格</el-button
>导出数据</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@click="batchReject"
icon="el-icon-close"
v-show="!isView"
size="mini"
:disabled="multiple"
>不合格</el-button
>
</el-col>
</el-row>
<el-table
@ -107,172 +67,20 @@
:data="tableList"
ref="multipleTable"
row-key="partId"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
align="center" :selectable="selectable"
:reserve-selection="true"
/>
<el-table-column label="序号" align="center" width="80" type="index">
</el-table-column>
<el-table-column
label="配件类型"
align="center"
prop="maName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="配件名称"
align="center"
prop="maTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="partName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="到货数量"
align="center"
prop="purchaseNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column
label="供应商"
align="center"
prop="supplier"
:show-overflow-tooltip="true"
/> -->
<el-table-column
label="出厂日期"
align="center"
prop="productionTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="相关配套资料"
align="center"
prop=""
>
<template slot-scope="scope">
<div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</div>
<div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div>
</template>
</el-table-column>
<el-table-column
label="状态"
align="center"
prop="status"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.purchase_task_status"
:value="scope.row.status"
/>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="180" v-if="!isView">
<template slot-scope="scope">
<el-button size="mini" type="success" @click="pass(scope.row)" v-if="scope.row.status==0">
入库
</el-button>
<el-button size="mini" type="danger" @click="reject(scope.row)" v-if="scope.row.status==0">
驳回
</el-button>
</template>
</el-table-column> -->
<el-table-column label="类型名称" align="center" prop="maName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="maTypeName" :show-overflow-tooltip="true" />
<el-table-column label="计量单位" align="center" prop="partName" :show-overflow-tooltip="true" />
<el-table-column label="报废数量" align="center" prop="purchaseNum" :show-overflow-tooltip="true" />
<el-table-column label="报废费用(万元)" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="报废类型" align="center" prop="productionTime" :show-overflow-tooltip="true" />
<el-table-column label="损坏类型" align="center" prop="productionTime" :show-overflow-tooltip="true" />
<el-table-column label="审核人" align="center" prop="productionTime" :show-overflow-tooltip="true" />
<el-table-column label="审核日期" align="center" prop="productionTime" :show-overflow-tooltip="true" />
<el-table-column label="备注" align="center" prop="status" :show-overflow-tooltip="true" />
</el-table>
<!-- 验收弹窗 -->
<el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px">
<div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;">
<div style="width:15%;">验收结论</div>
<el-input
type="textarea"
:rows="3" style="width:80%;"
placeholder="请输入结论"
v-model="checkResult"
maxlength="100">
</el-input>
</div>
<div style="width: 100%;height: 20%;display: flex;justify-content: flex-end;align-items: center;">
<el-button type="primary" @click="confirmCheck">确认</el-button>
<el-button size="mini" @click="confirmShow = false">取消</el-button>
</div>
</el-dialog>
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
<el-table :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center"/>
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true"/>
<el-table-column label="类型名称" align="center" :show-overflow-tooltip="true">
<template>
<div>{{this.rowData.maTypeName}}</div>
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" :show-overflow-tooltip="true">
<template>
<div>{{this.rowData.partName}}</div>
</template>
</el-table-column>
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<!-- <el-upload ref="upload" :limit="1" :headers="upload.headers"
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
:on-success="handleFileSuccess" :auto-upload="true"
>
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
上传
</el-button>
</el-upload> -->
<el-button size="mini" type="text" @click="picturePreviewFile(scope.row)" v-if="scope.row.fileListTemp!=0">
查看
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-dialog>
<!-- 图片查看弹窗 -->
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
<img width="100%" height="500px" :src="dialogImageUrl" />
</el-dialog>
<!-- 文件查看列表 -->
<el-dialog title="文件列表" :visible.sync="dialogVisibleFile" width="500px" height="500px" >
<el-table :data="fileListInfo" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center"/>
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" >
<template slot-scope="scope">
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" >
查看
</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
@ -288,8 +96,7 @@ import { getPartTypeCheckInfo,getPartTypeFileList } from '@/api/part/partArrived
import { downloadFile } from "@/utils/download";
import { getToken } from "@/utils/auth";
export default {
name: "AcceptDetail",
dicts: ["purchase_task_status"],
name: "ScrapLedgerDetail",
data() {
return {
Id: "",
@ -370,18 +177,10 @@ export default {
this.getList();
},
methods: {
//
selectable(row) {
console.log(row)
if (row.status == 2||row.status == 13 ||row.status == 14) {
return true
} else {
return false
}
},
//
jumpList() {
const obj = { path: "/part/partAcceptTwo" };
const obj = { path: "/repair/scrapLedger" };
this.$tab.closeOpenPage(obj);
},
getPartType() {
@ -428,185 +227,8 @@ export default {
this.queryParams.pageNum = 1;
this.getList();
},
//
handleSelectionChange(selection) {
this.ids = selection;
this.infos = [];
selection.forEach((item) => {
this.infos.push({id:item.id,partId:item.partId,purchaseNum:item.purchaseNum,taskId:item.taskId});
});
this.single = selection.length != 1;
this.multiple = !selection.length;
},
//
pass(row) {
// if(this.infos==0){
// this.$modal.msgError("");
// return;
// }
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}]
this.$modal.confirm('是否确认入库该配件?')
.then(function() {
return partTypeWarehouse(infos)
}).then(() => {
this.$modal.msgSuccess('入库成功')
this.getList()
}).catch(() => {});
},
//
reject(row) {
const infos=[{id:row.id,partId:row.partId,purchaseNum:row.purchaseNum,taskId:this.taskId}]
this.$modal.confirm('是否确认驳回该配件?')
.then(function() {
return partTypeReject(infos)
}).then(() => {
this.$modal.msgSuccess('驳回成功')
this.getList()
}).catch(() => {});
},
//
batchPass() {
if(this.infos==0){
this.$modal.msgError("请选择配件");
return;
}
this.taskStatus = "3";
this.checkResult = "合格";
this.verifyPass = true;
this.checkList = [];
this.checkList = this.ids.map((item) => {
let obj = {
taskId: item.taskId,
partId: item.partId,
checkResult: this.checkResult,
};
return obj;
});
this.confirmShow = true;
},
//
batchReject() {
if(this.infos==0){
this.$modal.msgError("请选择配件");
return;
}
this.taskStatus = "1";
this.checkResult = "不合格";
this.verifyPass = false;
this.checkList = [];
this.checkList = this.ids.map((item) => {
let obj = {
taskId: item.taskId,
partId: item.partId,
checkResult: this.checkResult,
};
return obj;
});
this.confirmShow = true;
},
//
confirmCheck() {
this.checkList.forEach((item) => {
item.checkResult = this.checkResult;
});
let param = {
purchaseCheckDetailsList:this.checkList,
verifyPass:this.verifyPass
}
console.log(param);
innerVerify(param).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("验收成功");
this.confirmShow = false;
this.getList();
this.$refs.multipleTable.clearSelection();
}
});
},
//
openFileDialog(row){
this.rowData=row;
this.fileDataList = [{dictLabel:"合格证",fileType:"0",name:"",url:"",fileList:[],fileListTemp:[]},
{dictLabel:"型式试验报告",fileType:"1",name:"",url:"",fileList:[],fileListTemp:[]},
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:"",fileList:[],fileListTemp:[]},
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:"",fileList:[],fileListTemp:[]},
{dictLabel:"其他",fileType:"4",name:"",url:"",fileList:[],fileListTemp:[]}]
this.getFileData()
this.open=true
},
getFileData(){
let param = {
modelId:this.rowData.partId,
taskType:13,
taskId:this.rowData.taskId
}
getPartTypeFileList(param).then((response) => {
if(response.data.length>0){
response.data.forEach(item=>{
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
item.fileDetailList.forEach(item2=>{
this.fileDataList[index].fileList.push({
name:item2.name,
url:item2.url
})
this.fileDataList[index].fileListTemp.push({
name:item2.name,
url:item2.url
})
})
})
}
}).catch(() => {
})
},
//
beforeFileUpload(row) {
this.rowData.fileType = row.fileType;
// this.rowData.dictLabel=row.dictLabel;
},
//
handleFileSuccess(response, file, fileList) {
if (response.code == 200) {
let param = {
taskId: this.taskId,
taskType: "0",
name: response.data.name,
url: response.data.url,
modelId: this.rowData.typeId,
fileType: this.rowData.fileType,
};
console.log(param);
uploadPurchaseFile(param)
.then((response) => {
this.$modal.msgSuccess("上传成功");
this.getFileData();
})
.catch(() => {
this.$modal.msgError("上传失败");
});
}
},
picturePreviewFile(row) {
this.fileListInfo = row.fileListTemp
this.dialogVisibleFile = true
},
//
picturePreview(file) {
this.dialogImageUrl = file.url;
const parts = file.name.split(".");
const extension = parts.pop();
if (extension === 'doc' || extension === 'DOC' || extension === 'docx' || extension === 'DOCX' || extension === 'pdf' || extension === 'PDF') {
const windowName = file.name;
window.open(file.url, windowName);
} else {
this.dialogVisible = true;
}
},
/** 导出按钮操作 */
handleExport() {
this.download(

View File

@ -3,12 +3,9 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item prop="dateRange">
<el-date-picker
v-model="dateRange"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
v-model="queryParams.time"
type="month"
placeholder="请选择月份">
</el-date-picker>
</el-form-item>
<el-form-item prop="keyWord">
@ -20,22 +17,6 @@
maxlength="20"
/>
</el-form-item>
<el-form-item prop="taskStatus">
<el-select
clearable
filterable
style="width: 240px"
placeholder="状态筛选"
v-model="queryParams.taskStatus"
>
<el-option
:key="dict.id"
:label="dict.name"
:value="dict.id"
v-for="dict in taskStatusList"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
@ -54,51 +35,27 @@
</el-row>
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="taskId" @selection-change="handleSelectionChange" border>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="selectable"/>
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="taskId" border>
<el-table-column label="序号" align="center" width="80" 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="arrivalTime" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="采购单号" align="center" prop="code" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="采购配件" align="center" prop="purchaseMaTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" :show-overflow-tooltip="true"/>
<el-table-column label="物资厂家" align="center" prop="supplier" :show-overflow-tooltip="true"/>
<el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="状态" align="center" prop="taskStatusName" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.purchase_task_status" :value="scope.row.taskStatus"/>-->
<!-- </template>-->
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="月份" align="center" prop="arrivalTime" :show-overflow-tooltip="true"/>
<el-table-column label="报废数量" align="center" prop="code" :show-overflow-tooltip="true"/>
<el-table-column label="报废费用(万元)" align="center" prop="purchaseMaTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" width="230">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleView(scope.row)"
>
查看
</el-button>
<el-button
size="mini"
type="primary" v-if="scope.row.taskStatusName == '未完成'"
@click="handleUpdate(scope.row)"
>
验收
</el-button>
<el-button
size="mini"
type="warning"
@click="handlePrint(scope.row)"
>
验收单
</el-button>
</template>
</el-table-column>
<template slot-scope="scope">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleView(scope.row)"
>
查看
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -109,140 +66,6 @@
@pagination="getList"
/>
<!-- 入库单弹窗 -->
<el-dialog
:title="title"
:visible.sync="openPrint"
width="1090px"
append-to-body
>
<div style="height: 500px; overflow-y: scroll">
<!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
<div id="checkId">
<div
class="title"
style="text-align: center; font-weight: 600; font-size: 16px"
>
机具配件到货验收单
</div>
<div
class="info"
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
<div
class="item"
style="
width: 100%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>单据编号{{printData.code}}</span>
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>生产厂家供应商{{printData.supplier}}</span>
</div>
<div
class="item"
style="
width: 50%;
flex-shrink: 0;
margin-bottom: 5px;
font-size: 14px;
"
>
<span>到货日期{{printData.arrivalTime}}</span>
</div>
</div>
<el-table
:data="printTableData"
class="table"
style="margin-top: 20px; width: 1000px; "
border
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2" width="60px"/>
<el-table-column
label="配件类型"
align="center"
prop="maName"
/>
<el-table-column
label="配件名称"
align="center"
prop="maTypeName"
/>
<el-table-column
label="规格型号"
align="center"
prop="partName"
/>
<el-table-column label="单位" align="center" prop="unitName" />
<!-- <el-table-column label="采购数量" align="center" prop="purchaseNum" /> -->
<el-table-column label="验收情况" align="center">
<el-table-column
label="到货数量"
align="center"
prop="purchaseNum"
/>
<el-table-column
label="验收结论"
align="center"
prop="checkResult"
/>
</el-table-column>
</el-table>
<div class="fillIn" style="margin-top: 20px;display: flex;justify-content: space-between;" >
<div class="item" style="width: 33%;display: flex;align-items: center;">
<div style="width: 25%;">供应科</div>
<div style="width: 75%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.gySignUrl">
<div v-for="(sign, index) in printDataSign.gySignUrl" :key="index" style="width: 35%;margin-left: 5px;">
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
</div>
</div>
</div>
<div class="item" style="width: 33%;display: flex;align-items: center;">
<div style="width: 30%;">生产技术科</div>
<div style="width: 70%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.scSignUrl">
<div v-for="(sign, index) in printDataSign.scSignUrl" :key="index" style="width: 35%;margin-left: 5px;">
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
</div>
</div>
</div>
<div class="item" style="width: 33%;display: flex;align-items: center;">
<div style="width: 25%;">库管班</div>
<div style="width: 75%;display: flex;align-items: center;flex-wrap: wrap;" v-if="printDataSign.kgSignUrl">
<div v-for="(sign, index) in printDataSign.kgSignUrl" :key="index" style="width: 35%;margin-left: 5px;">
<img :src="sign.signUrl" :class="sign.signType=='0' ? 'image-type':'sign-type'" alt="">
</div>
</div>
<!-- <div>
<span>库管班{{printData.warehouseTeam}}</span>
</div> -->
</div>
</div>
</div>
<!-- </vue-easy-print> -->
</div>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="print"> </el-button>
<el-button @click="openPrint = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -253,7 +76,7 @@ import vueEasyPrint from "vue-easy-print";
import { downloadFile } from '@/utils/download'
import { getToken } from '@/utils/auth'
export default {
name: "PartAcceptList",
name: "ScrapLedgerList",
dicts: ['part_task_status'],
components: { vueEasyPrint },
data() {
@ -339,92 +162,15 @@ import { getToken } from '@/utils/auth'
this.queryParams.pageNum = 1;
this.getList();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.taskId)
this.infos = [];
selection.forEach((item) => {
this.infos.push({taskId:item.taskId});
});
this.single = selection.length != 1
this.multiple = !selection.length
},
handleUpdate(row){
console.log(row)
let query = { Id:row.id,taskId: row.taskId,isView:"false" }
this.$tab.closeOpenPage({
path: '/part/partAcceptDetailTwo',
query,
})
},
//
handleView(row){
console.log(row)
let query = { Id:row.id,taskId: row.taskId,isView:"true" }
this.$tab.closeOpenPage({
path: '/part/partAcceptDetailTwo',
path: '/repair/scrapLedgerDetail',
query,
})
},
//
passAll(){
passAll(this.infos).then((response) => {
if(response.code==200){
this.$modal.msgSuccess('入库成功')
}else{
this.$modal.msgSuccess('入库失败')
}
this.getList()
this.$refs.multipleTable.clearSelection()
}).catch(() => {
this.$modal.msgError('入库失败')
})
},
//
rejectAll(){
rejectAll(this.infos).then((response) => {
if(response.code==200){
this.$modal.msgSuccess('驳回成功')
}else{
this.$modal.msgSuccess('驳回失败')
}
this.getList()
this.$refs.multipleTable.clearSelection()
}).catch(() => {
this.$modal.msgError('驳回失败')
})
},
//
handlePrint(row) {
// this.query.taskId = row.taskId
this.openPrint = true;
this.title = "机具配件到货验收单";
let params = {
id: row.id,
taskId: row.taskId,
};
this.getPrintTable(params)
},
//
getPrintTable(params) {
getInBoundForm({ id: params.id,taskId:params.taskId }).then((response) => {
this.printDataSign = response.data;
this.printData = response.data.partTypeCheckInfo;
this.printTableData = response.data.partTypeCheckDetailsList;
});
},
//
print() {
// this.$refs.remarksPrintRef.print()
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
},
handleExport() {
this.download(
"/material/part_arrived/export",