Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
hayu 2024-04-20 14:55:54 +08:00
commit 57291ad37e
3 changed files with 1026 additions and 1353 deletions

View File

@ -1,46 +1,49 @@
<template> <template>
<div class="app-container" id="backRecord"> <div class="app-container" id="backRecord">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="退料日期"> <el-form-item label="退料日期" prop="time">
<el-date-picker <el-date-picker
v-model="queryParams.time" v-model="queryParams.time"
type="daterange" type="daterange"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期"
</el-date-picker>
</el-form-item>
<el-form-item label="往来单位">
<el-select v-model="queryParams.unitId" 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="工程名称">
<el-select v-model="queryParams.proId" 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" style="width: 240px"
@keyup.enter.native="handleQuery" ></el-date-picker>
/>
</el-form-item> </el-form-item>
<el-form-item label="往来单位" prop="unitId">
<el-select
v-model="queryParams.unitId"
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"
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-form-item label="机具名称" prop="typeName">
<el-input <el-input
v-model="queryParams.typeName" v-model="queryParams.typeName"
@ -72,26 +75,17 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<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"> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<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 v-loading="loading" :data="leaseAuditList">
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
@ -108,24 +102,21 @@
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
:page-sizes="[5,10,15,20,30]" :page-sizes="[5, 10, 15, 20, 30]"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
<script> <script>
import { backRecord,exportList,getUnitData,getProData } from "@/api/stquery/backRecord"; import { backRecord, exportList, getUnitData, getProData } from '@/api/stquery/backRecord'
export default { export default {
name: "backRecord", name: 'backRecord',
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
return { return {
@ -153,98 +144,101 @@ export default {
dictType: undefined, dictType: undefined,
status: undefined, status: undefined,
time:null, // time: null, //
unitId:null, //id unitId: null, //id
proId:null, //id proId: null, //id
typeName: '',
typeModelName: '',
keyWord: '',
types: 1, // 1 2 types: 1, // 1 2
}, },
unitList:[], // unitList: [], //
proList:[], // proList: [], //
}; }
}, },
created() { created() {
this.getList(); this.getList()
this.getUnitList(); this.getUnitList()
this.getProList(); this.getProList()
}, },
methods: { methods: {
// //
async getList() { async getList() {
this.loading = true; this.loading = true
const params = { const params = {
unitId:this.queryParams.unitId, unitId: this.queryParams.unitId,
proId:this.queryParams.proId, proId: this.queryParams.proId,
keyWord:this.queryParams.keyWord, keyWord: this.queryParams.keyWord,
agreementCode:this.queryParams.agreementCode, agreementCode: this.queryParams.agreementCode,
typeName:this.queryParams.typeName, typeName: this.queryParams.typeName,
typeModelName:this.queryParams.typeModelName, typeModelName: this.queryParams.typeModelName,
startTime:this.queryParams.time && this.queryParams.time[0], startTime: this.queryParams.time && this.queryParams.time[0],
endTime:this.queryParams.time && this.queryParams.time[1], endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum pageNum: this.queryParams.pageNum,
} }
const res = await backRecord(params) const res = await backRecord(params)
this.loading = false; this.loading = false
this.leaseAuditList = res.data.rows; this.leaseAuditList = res.data.rows
this.total = res.data.total; this.total = res.data.total
}, },
// //
async getUnitList(){ async getUnitList() {
const params = { const params = {
id:this.queryParams.proId id: this.queryParams.proId,
} }
const res = await getUnitData(params) const res = await getUnitData(params)
this.unitList = res.data this.unitList = res.data
console.log('GetUnitData ======================',res) console.log('GetUnitData ======================', res)
}, },
// //
async getProList(){ async getProList() {
const params = { const params = {
id:this.queryParams.unitId id: this.queryParams.unitId,
} }
const res = await getProData(params) const res = await getProData(params)
this.proList = res.data this.proList = res.data
console.log('GetProData ======================',res) console.log('GetProData ======================', res)
}, },
// //
reset() { reset() {
this.form = { this.form = {
dictId: undefined, dictId: undefined,
dictName: undefined, dictName: undefined,
dictType: undefined, dictType: undefined,
status: "0", status: '0',
remark: undefined remark: undefined,
}; }
this.resetForm("form"); this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = []
this.resetForm("queryForm"); this.resetForm('queryForm')
this.handleQuery(); this.handleQuery()
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('material/backRecord/export', { this.download(
...this.queryParams 'material/backRecord/export',
}, `综合查询_退料记录_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
},
} `综合查询_退料记录_${new Date().getTime()}.xlsx`
}; )
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini { ::v-deep.el-table .fixed-width .el-button--mini {

View File

@ -8,27 +8,30 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期"> end-placeholder="结束日期"
</el-date-picker> style="width: 240px"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="往来单位"> <el-form-item label="往来单位">
<el-select v-model="queryParams.unitId" clearable @change="GetProData" style="width: 240px" placeholder="请选择"> <el-select
<el-option v-model="queryParams.unitId"
v-for="item in unitList" clearable
:key="item.id" @change="GetProData"
:label="item.name" style="width: 240px"
:value="item.id"> placeholder="请选择"
</el-option> >
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工程名称"> <el-form-item label="工程名称">
<el-select v-model="queryParams.proId" clearable @change="GetUnitData" style="width: 240px" placeholder="请选择"> <el-select
<el-option v-model="queryParams.proId"
v-for="item in proList" clearable
:key="item.id" @change="GetUnitData"
:label="item.name" style="width: 240px"
:value="item.id"> placeholder="请选择"
</el-option> >
<el-option v-for="item in proList" :key="item.id" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="机具名称" prop="typeName"> <el-form-item label="机具名称" prop="typeName">
@ -62,26 +65,17 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<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"> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<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 v-loading="loading" :data="leaseAuditList">
<!-- <el-table-column type="selection" width="55" align="center" /> --> <!-- <el-table-column type="selection" width="55" align="center" /> -->
@ -99,24 +93,21 @@
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
:page-sizes="[5,10,15,20,30]" :page-sizes="[5, 10, 15, 20, 30]"
@pagination="getList" @pagination="getList"
/> />
</div> </div>
</template> </template>
<script> <script>
import { leaseRecord,exportList,getUnitData,getProData } from "@/api/stquery/stquery"; import { leaseRecord, exportList, getUnitData, getProData } from '@/api/stquery/stquery'
export default { export default {
name: "leaseRecord", name: 'leaseRecord',
dicts: ['sys_normal_disable'], dicts: ['sys_normal_disable'],
data() { data() {
return { return {
@ -144,99 +135,100 @@ export default {
dictType: undefined, dictType: undefined,
status: undefined, status: undefined,
time:null, // time: null, //
unitId:null, //id unitId: null, //id
proId:null, //id proId: null, //id
types: 1, // 1 2 types: 1, // 1 2
}, },
unitList:[], // unitList: [], //
proList:[], // proList: [], //
}; }
}, },
created() { created() {
this.getList(); this.getList()
this.getUnitList(); this.getUnitList()
this.getProList(); this.getProList()
}, },
methods: { methods: {
// //
async getList() { async getList() {
this.loading = true; this.loading = true
const params = { const params = {
unitId:this.queryParams.unitId, unitId: this.queryParams.unitId,
proId:this.queryParams.proId, proId: this.queryParams.proId,
keyWord:this.queryParams.keyWord, keyWord: this.queryParams.keyWord,
typeName:this.queryParams.typeName, typeName: this.queryParams.typeName,
typeModelName:this.queryParams.typeModelName, typeModelName: this.queryParams.typeModelName,
startTime:this.queryParams.time && this.queryParams.time[0], startTime: this.queryParams.time && this.queryParams.time[0],
endTime:this.queryParams.time && this.queryParams.time[1], endTime: this.queryParams.time && this.queryParams.time[1],
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
pageNum: this.queryParams.pageNum pageNum: this.queryParams.pageNum,
} }
const res = await leaseRecord(params) const res = await leaseRecord(params)
this.loading = false; this.loading = false
this.leaseAuditList = res.data.rows; this.leaseAuditList = res.data.rows
this.total = res.data.total; this.total = res.data.total
}, },
// //
async getUnitList(){ async getUnitList() {
const params = { const params = {
id:this.queryParams.proId id: this.queryParams.proId,
} }
const res = await getUnitData(params) const res = await getUnitData(params)
this.unitList = res.data this.unitList = res.data
console.log('GetUnitData ======================',res) console.log('GetUnitData ======================', res)
}, },
// //
async getProList(){ async getProList() {
const params = { const params = {
id:this.queryParams.unitId id: this.queryParams.unitId,
} }
const res = await getProData(params) const res = await getProData(params)
this.proList = res.data this.proList = res.data
console.log('GetProData ======================',res) console.log('GetProData ======================', res)
}, },
// //
reset() { reset() {
this.form = { this.form = {
dictId: undefined, dictId: undefined,
dictName: undefined, dictName: undefined,
dictType: undefined, dictType: undefined,
status: "0", status: '0',
remark: undefined remark: undefined,
}; }
this.resetForm("form"); this.resetForm('form')
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = []; this.dateRange = []
this.resetForm("queryForm"); this.resetForm('queryForm')
this.getUnitList(); this.getUnitList()
this.getProList(); this.getProList()
this.handleQuery(); this.handleQuery()
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('material/leaseRecord/export', { this.download(
...this.queryParams 'material/leaseRecord/export',
}, `综合查询_领料记录_${new Date().getTime()}.xlsx`) {
} ...this.queryParams,
},
} `综合查询_领料记录_${new Date().getTime()}.xlsx`
}; )
},
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini { ::v-deep.el-table .fixed-width .el-button--mini {