修改领料查询,退料查询在领退料菜单下

This commit is contained in:
BianLzhaoMin 2024-07-12 13:08:55 +08:00
parent 24e06003d9
commit 88a9b4fa46
4 changed files with 725 additions and 11 deletions

View File

@ -0,0 +1,358 @@
<template>
<!-- 领料查询页面 -->
<div class="app-container" id="leaseRecord">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form-item label="领料日期" prop="time">
<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 label="往来单位" prop="unitId">
<el-select
v-model="queryParams.unitId"
filterable
clearable
@change="GetProData"
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="proId">
<el-select
v-model="queryParams.proId"
filterable
clearable
@change="GetUnitData"
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="机具名称" prop="typeName">
<el-input
v-model="queryParams.typeName"
placeholder="请输入机具名称"
clearable
:maxlength="20"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="规格型号" prop="typeModelName">
<el-input
v-model="queryParams.typeModelName"
placeholder="请输入规格型号"
clearable
:maxlength="20"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
:maxlength="20"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</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-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<el-table v-loading="loading" :data="leaseAuditList">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column
align="center"
label="序号"
type="index"
:index="
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
/>
<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="agreementCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备编码"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="单位"
align="center"
prop="unit"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料数量"
align="center"
prop="preNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料人"
align="center"
prop="leasePerson"
:show-overflow-tooltip="true"
/>
<el-table-column
label="车牌号"
align="center"
prop="carCode"
show-overflow-tooltip
/>
<el-table-column
label="领料单号"
align="center"
prop="code"
show-overflow-tooltip
/>
<el-table-column
label="领料日期"
align="center"
prop="createTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="领料工程"
align="center"
prop="proName"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
:page-sizes="[5, 10, 15, 20, 30]"
@pagination="getList"
/>
</div>
</template>
<script>
import {
leaseRecord,
exportList,
getUnitData,
getProData,
} from '@/api/stquery/stquery'
export default {
name: 'leaseRecord',
dicts: ['sys_normal_disable'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
leaseAuditList: [],
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined,
time: null, //
unitId: null, //id
proId: null, //id
typeName: '',
typeModelName: '',
keyWord: '',
types: 1, // 1 2
},
unitList: [], //
proList: [], //
}
},
created() {
this.getList()
this.getUnitList()
this.getProList()
},
methods: {
//
async getList() {
this.loading = true
const params = {
unitId: this.queryParams.unitId,
proId: this.queryParams.proId,
keyWord: this.queryParams.keyWord,
typeName: this.queryParams.typeName,
typeModelName: this.queryParams.typeModelName,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
}
const res = await leaseRecord(params)
this.loading = false
this.leaseAuditList = res.data.rows
this.total = res.data.total
},
//
async getUnitList() {
const params = {
id: this.queryParams.proId,
}
const res = await getUnitData(params)
this.unitList = res.data
console.log('GetUnitData ======================', res)
},
//
async getProList() {
const params = {
id: this.queryParams.unitId,
}
const res = await getProData(params)
this.proList = res.data
console.log('GetProData ======================', res)
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: '0',
remark: undefined,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.time = []
this.queryParams.unitId = ''
this.queryParams.proId = ''
this.resetForm('queryForm')
this.getUnitList()
this.getProList()
this.handleQuery()
},
/** 导出按钮操作 */
handleExport() {
this.download(
'material/leaseRecord/export',
{
...this.queryParams,
},
`综合查询_领料记录_${new Date().getTime()}.xlsx`,
)
},
},
}
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
</style>

View File

@ -0,0 +1,346 @@
<template>
<!-- 退料查询页面 -->
<div class="app-container" id="backRecord">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form-item label="退料日期" prop="time">
<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 label="往来单位" prop="unitId">
<el-select
v-model="queryParams.unitId"
filterable
clearable
@change="GetProData"
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in unitList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="proId">
<el-select
v-model="queryParams.proId"
filterable
clearable
@change="GetUnitData"
style="width: 240px"
placeholder="请选择"
>
<el-option
v-for="item in proList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="协议号" prop="agreementCode"> -->
<!-- <el-input -->
<!-- v-model="queryParams.agreementCode" -->
<!-- placeholder="请输入协议号" -->
<!-- clearable -->
<!-- :maxlength="20" -->
<!-- style="width: 240px" -->
<!-- @keyup.enter.native="handleQuery" -->
<!-- /> -->
<!-- </el-form-item> -->
<el-form-item label="机具名称" prop="typeName">
<el-input
v-model="queryParams.typeName"
placeholder="请输入机具名称"
clearable
:maxlength="20"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="规格型号" prop="typeModelName">
<el-input
v-model="queryParams.typeModelName"
placeholder="请输入规格型号"
clearable
:maxlength="20"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable
:maxlength="20"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</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-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<el-table v-loading="loading" :data="leaseAuditList">
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column
align="center"
label="序号"
type="index"
:index="
indexContinuation(queryParams.pageNum, queryParams.pageSize)
"
/>
<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="code"
:show-overflow-tooltip="true"
/>
<el-table-column
label="设备编码"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料数量"
align="center"
prop="backNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料人"
align="center"
prop="backPerson"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料日期"
align="center"
prop="createTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料单位"
align="center"
prop="unitName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="退料工程"
align="center"
prop="proName"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
:page-sizes="[5, 10, 15, 20, 30]"
@pagination="getList"
/>
</div>
</template>
<script>
import {
backRecord,
exportList,
getUnitData,
getProData,
} from '@/api/stquery/backRecord'
export default {
name: 'backRecord',
dicts: ['sys_normal_disable'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
leaseAuditList: [],
//
dateRange: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined,
time: null, //
unitId: null, //id
proId: null, //id
typeName: '',
typeModelName: '',
keyWord: '',
types: 1, // 1 2
},
unitList: [], //
proList: [], //
}
},
created() {
this.getList()
this.getUnitList()
this.getProList()
},
methods: {
//
async getList() {
this.loading = true
const params = {
unitId: this.queryParams.unitId,
proId: this.queryParams.proId,
keyWord: this.queryParams.keyWord,
agreementCode: this.queryParams.agreementCode,
typeName: this.queryParams.typeName,
typeModelName: this.queryParams.typeModelName,
startTime: this.queryParams.time && this.queryParams.time[0],
endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum,
}
const res = await backRecord(params)
this.loading = false
this.leaseAuditList = res.data.rows
this.total = res.data.total
},
//
async getUnitList() {
const params = {
id: this.queryParams.proId,
}
const res = await getUnitData(params)
this.unitList = res.data
console.log('GetUnitData ======================', res)
},
//
async getProList() {
const params = {
id: this.queryParams.unitId,
}
const res = await getProData(params)
this.proList = res.data
console.log('GetProData ======================', res)
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: '0',
remark: undefined,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.time = []
this.resetForm('queryForm')
this.handleQuery()
},
/** 导出按钮操作 */
handleExport() {
this.download(
'material/backRecord/export',
{
...this.queryParams,
},
`综合查询_退料记录_${new Date().getTime()}.xlsx`,
)
},
},
}
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
</style>

View File

@ -32,7 +32,7 @@
type="text"
@click="handlePreview(data)"
v-if="data.num == 0"
icon="el-icon-search"
icon="el-icon-zoom-in"
>
查看
</el-button>
@ -339,7 +339,6 @@ import {
dialogConfigReturnDet,
} from './config.js'
import { receiveView } from '@/api/claimAndRefund/return.js'
import {
getScrapReturnDetailsApi,
getScrapEditReturnApi,
@ -460,7 +459,7 @@ export default {
//
handlePreview(data) {
if (data.manageType == 0) {
this.sendParamsReturnDetails.parentId = data.parentId
this.sendParamsReturnDetails.parentId = data.parentIds
this.sendParamsReturnDetails.typeId = data.typeId
this.isQuery = false
this.isNumDetails = false
@ -534,11 +533,14 @@ export default {
type: 'warning',
})
.then(() => {
const { manageType, parentId, typeId } = data
const { manageType, typeId } = data
getScrapReturnRevokeApi({
createBy: sessionStorage.getItem('userId'),
manageType,
parentId,
parentId:
data.manageType == 0
? data.parentIds
: data.parentId,
typeId,
}).then((res) => {
this.$message.success('已撤回')
@ -562,7 +564,7 @@ export default {
let arr = []
arr = this.taSelList.map((item) => {
return {
parentId: this.parentId,
parentId: item.parentId,
typeId: item.typeId,
backNum: 1,
backStatus: type,
@ -595,7 +597,7 @@ export default {
// type 1 2 3
let arr = [
{
parentId: this.parentId,
parentId: data.parentId,
typeId: data.typeId,
backNum: 1,
backStatus: type,
@ -765,7 +767,7 @@ export default {
if (this.currentRows) {
let arr = [
{
parentId: this.parentId,
parentId: this.currentRows.parentId,
typeId: this.currentRows.typeId,
backNum: 1,
backStatus: 3,
@ -801,7 +803,7 @@ export default {
let arr = []
arr = this.taSelList.map((item) => {
return {
parentId: this.parentId,
parentId: item.parentId,
typeId: item.typeId,
backNum: 1,
backStatus: 3,

View File

@ -86,8 +86,16 @@
type="text"
v-if="data.taskStatus == 61"
@click="handleReject(data)"
style="color: #e6a23c"
icon="el-icon-document-delete"
:style="
data.commit == 0
? 'color: #e6a23c'
: 'color: #4FADFF'
"
:icon="
data.commit == 0
? 'el-icon-document-delete'
: 'el-icon-postcard'
"
>{{
data.commit == 0 ? '驳回退料' : '退料详情'
}}</el-button