退料数据-弹框
This commit is contained in:
parent
bc22b4397e
commit
0861d579b5
|
|
@ -2,15 +2,19 @@ import { POST, GET } from './index.js'
|
|||
|
||||
const URL_TYPE_LIST = '/screen/material/returnOfMaterialsInfo/getTypeList'
|
||||
const URL_DETAILS = '/screen/base/largeScreen/home/getMaterialReqData/details'
|
||||
const URL_RETURN_DETAILS = '/screen/base/largeScreen/home/getMaterialReturnData/details'
|
||||
const URL_UNIT_LIST = '/screen/material/agreementInfo/getUnitList'
|
||||
const URL_PROJECT_LIST = '/screen/material/agreementInfo/getProjectList'
|
||||
|
||||
// 设备类型
|
||||
export const getTypeList = params => GET(URL_TYPE_LIST, params)
|
||||
|
||||
// 详情
|
||||
// 领料数据
|
||||
export const getDetails = data => POST(URL_DETAILS, data)
|
||||
|
||||
// 退料数据
|
||||
export const getReturnDetails = data => POST(URL_RETURN_DETAILS, data)
|
||||
|
||||
// 往来单位-下拉
|
||||
export const getUnitList = params => GET(URL_UNIT_LIST, params)
|
||||
|
||||
|
|
|
|||
|
|
@ -55,10 +55,8 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleClick(val) {
|
||||
console.log('🚀 ~ handleClick ~ val:', val);
|
||||
const params = {
|
||||
open: true,
|
||||
toolPutOut: true,
|
||||
maType: val
|
||||
}
|
||||
this.$refs.materialsDialog.setOpen(params);
|
||||
|
|
|
|||
|
|
@ -25,10 +25,17 @@
|
|||
</div>
|
||||
<div v-if="suffix" class="count-flop-unit">{{ suffix }}</div>
|
||||
</div>
|
||||
|
||||
<returnMaterialsDialog ref="returnMaterialsDialog"></returnMaterialsDialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import returnMaterialsDialog from './returnMaterialsDialog'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
returnMaterialsDialog
|
||||
},
|
||||
name: 'countFlop',
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -47,6 +54,15 @@ export default {
|
|||
mounted() {
|
||||
this.value = this.val.toString().split("");
|
||||
},
|
||||
methods: {
|
||||
handleClick(val) {
|
||||
const params = {
|
||||
open: true,
|
||||
maType: val
|
||||
}
|
||||
this.$refs.returnMaterialsDialog.setOpen(params);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
:key="item.prop"
|
||||
:align="item.align"
|
||||
:type="item.type"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
<div class="access-rate-box-title-bg">
|
||||
<h5 class="access-rate-box-title">退料数据</h5>
|
||||
</div>
|
||||
<CountFlopTwo :val="num" sonTitle="施工机具今日退库"></CountFlopTwo>
|
||||
<div class="access-rate-box-top">
|
||||
<div @click="handleClick(1)">
|
||||
<CountFlopTwo :val="num" sonTitle="施工机具今日退库" ref="countFlopOne"></CountFlopTwo>
|
||||
</div>
|
||||
<div class="access-rate-box-top" @click="handleClick(2)">
|
||||
<CountFlopTwo :val="num2" sonTitle="工器具今日退料"></CountFlopTwo>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -51,6 +53,9 @@ export default {
|
|||
this.num2 = this.formatNumber(res.data.num2)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleClick(maType) {
|
||||
this.$refs.countFlopOne.handleClick(maType)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,232 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title=""
|
||||
:visible.sync="open"
|
||||
width="85%"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="content">
|
||||
<el-form :model="formData" ref="form" label-width="80px" :inline="false" size="small" inline>
|
||||
<el-form-item label="退料单号" size="small" prop="materialReqNo">
|
||||
<el-input v-model="formData.materialReqNo" placeholder="请输入退料单号" size="small" clearable filterable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" size="small" prop="materialReqUnitValue">
|
||||
<el-select v-model="formData.materialReqUnitValue" placeholder="请选择单位" size="small" clearable filterable @change="handleUnit">
|
||||
<el-option
|
||||
v-for="item in formData.materialReqUnitList"
|
||||
:key="item.unitId"
|
||||
:label="item.unitName"
|
||||
:value="item.unitId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工程名称" size="small" prop="materialReqProjectValue">
|
||||
<el-select v-model="formData.materialReqProjectValue" placeholder="请选择工程名称" size="small" clearable filterable @change="handleProject">
|
||||
<el-option
|
||||
v-for="item in formData.materialReqProjectList"
|
||||
:key="item.projectId"
|
||||
:label="item.projectName"
|
||||
:value="item.projectId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" size="small" prop="materialReqTypeValue">
|
||||
<el-select v-model="formData.materialReqTypeValue" placeholder="请选择设备类型" size="small" clearable filterable @change="handleType">
|
||||
<el-option v-for="item in formData.materialReqTypeList"
|
||||
:key="item.typeId"
|
||||
:label="item.typeName"
|
||||
:value="item.typeId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="handleSearch">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="small" @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%">
|
||||
<el-table-column
|
||||
v-for="item in tableColumn"
|
||||
v-if="item.isShow"
|
||||
:prop="item.prop"
|
||||
:label="item.label"
|
||||
:width="item.width"
|
||||
:key="item.prop"
|
||||
:align="item.align"
|
||||
:type="item.type"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<Pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page="queryParams.pageNum"
|
||||
:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="open = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Pagination from '../Pagination/index.vue'
|
||||
import { getTypeList, getReturnDetails, getUnitList, getProjectList } from '../../api/dialog'
|
||||
|
||||
export default {
|
||||
name: 'returnMaterialsDialog',
|
||||
components: {
|
||||
Pagination
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
open: false,
|
||||
material: false, // 领料
|
||||
formData: {
|
||||
materialReqNo: '',
|
||||
materialReqUnitValue: '',
|
||||
materialReqProjectValue: '',
|
||||
materialReqTypeValue: '',
|
||||
materialReqUnitList: [],
|
||||
materialReqProjectList: [],
|
||||
materialReqTypeList: [],
|
||||
},
|
||||
tableData: [],
|
||||
tableColumn: [
|
||||
{
|
||||
label: '序号',
|
||||
type: 'index',
|
||||
width: 60,
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料时间',
|
||||
prop: 'materialTime',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料单号',
|
||||
prop: 'materialCode',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料单位',
|
||||
prop: 'unitName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料工程',
|
||||
prop: 'projectName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '设备类型',
|
||||
prop: 'typeName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '规格型号',
|
||||
prop: 'typeModelName',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料数量',
|
||||
prop: 'num',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
label: '退料状态',
|
||||
prop: 'statusName',
|
||||
align: 'center'
|
||||
}
|
||||
],
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
maType: 1
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getUnit()
|
||||
this.getProject()
|
||||
this.getType()
|
||||
|
||||
},
|
||||
methods: {
|
||||
setOpen(params) {
|
||||
this.open = params.open,
|
||||
this.maType = params.maType,
|
||||
this.tableData = []
|
||||
setTimeout(() => {
|
||||
this.$refs.form.resetFields()
|
||||
this.getList()
|
||||
}, 100)
|
||||
},
|
||||
getList() {
|
||||
const params = {
|
||||
pageNum: this.queryParams.pageNum,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
maType: this.maType,
|
||||
materialCode: this.formData.materialReqNo.trim(),
|
||||
unitId: this.formData.materialReqUnitValue,
|
||||
projectId: this.formData.materialReqProjectValue,
|
||||
typeId: this.formData.materialReqTypeValue
|
||||
}
|
||||
getReturnDetails(params).then(({data}) => {
|
||||
this.tableData = data.rows
|
||||
this.total = data.total
|
||||
})
|
||||
},
|
||||
getUnit() {
|
||||
getUnitList().then(res => {
|
||||
this.formData.materialReqUnitList = res.data
|
||||
})
|
||||
},
|
||||
handleUnit(val) {
|
||||
this.formData.materialReqUnitValue = val
|
||||
},
|
||||
getProject() {
|
||||
getProjectList().then(res => {
|
||||
this.formData.materialReqProjectList = res.data
|
||||
})
|
||||
},
|
||||
handleProject(val) {
|
||||
this.formData.materialReqProjectValue = val
|
||||
},
|
||||
getType() {
|
||||
getTypeList({ level: '3' }).then(res => {
|
||||
this.formData.materialReqTypeList = res.data
|
||||
})
|
||||
},
|
||||
handleType(val) {
|
||||
this.formData.materialReqTypeValue = val
|
||||
},
|
||||
handleSearch() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.$refs.form.resetFields()
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content{
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue