This commit is contained in:
Vergil
2020-02-14 15:18:43 +08:00
parent e8eeade817
commit 1895977eb2
25 changed files with 1304 additions and 738 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-card style="width: 900px;margin: 0px 0px 5px 0px">
<el-card style="width: 950px;margin: 0px 0px 5px 0px">
<el-row style="margin-bottom:10px;margin-top: 10px">
<el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 150px" @change="machineChange">
<el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 180px" @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
@@ -12,20 +12,30 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-select v-model="groupValue" style="width:150px;margin-left: 10px" placeholder="组号" size="small" clearable filterable>
<el-select v-model="groupValue" style="width:90px;margin-left: 10px" placeholder="组号" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="name" placeholder="名称图号规格" style="width:150px;margin-left: 10px" clearable size="small" @keyup.enter.native="searchRecord()"/>
<el-input v-model="name" placeholder="名称图号规格入库人" style="width:165px;margin-left: 10px" clearable size="small" @keyup.enter.native="searchRecord()"/>
<!--<el-input v-model="model" placeholder="图号或型号" style="width:150px;margin-left: 10px" clearable size="small" />-->
<!--<el-input v-model="spec" placeholder="规格" clearable size="small" style="width:150px;margin: 0px 10px" />-->
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="searchRecord()">查询</el-button>
<el-button type="success" plain size="small" @click="exportExcel()">导出</el-button>
<el-date-picker
v-model="inTime"
type="daterange"
size="small"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator=""
style="width:240px;margin-left: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px" plain @click="searchRecord()">查询</el-button>
<el-button type="success" icon="el-icon-bottom" plain size="small" style="margin-left: 15px" @click="exportExcel()">导出</el-button>
</el-row>
<el-row v-show="false" style="margin-bottom:10px">
<el-row v-show="false" style="margin-left:10px">
<el-date-picker
v-model="inTime"
type="daterange"
@@ -38,19 +48,19 @@
end-placeholder="结束时间"/>
</el-row>
</el-card>
<el-card style="width: 900px">
<el-card style="width: 950px">
<el-table :data="tableData1" border stripe size="mini" style="width: 100%;" height="700">
<el-table-column label="名称" prop="名称" align="center" min-width="100" show-overflow-tooltip>
<el-table-column label="名称" prop="名称" align="center" width="180" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" prop="图号或型号" align="center" min-width="120" show-overflow-tooltip>
<el-table-column label="图号或型号" prop="图号或型号" align="center" width="260" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.图号或型号 }}
</template>
</el-table-column>
<el-table-column label="规格" prop="规格" align="center" min-width="180" show-overflow-tooltip>
<el-table-column label="规格" prop="规格" align="center" width="220" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
@@ -65,7 +75,7 @@
{{ scope.row.入库人 }}
</template>
</el-table-column>
<el-table-column label="入库时间" prop="入库时间" align="center" width="145">
<el-table-column label="入库时间" prop="入库时间" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.入库时间 ? scope.row.入库时间.split(' ')[0] : '-' }}
</template>
@@ -92,6 +102,7 @@ export default {
name: 'PurchaseInRecord',
data() {
return {
date: [],
machineValue: '',
machine: [],
groupValue: '',
@@ -106,6 +117,11 @@ export default {
total1: 0
}
},
watch: {
groupValue() {
this.searchRecord()
}
},
created() {
this.fetchData()
},
@@ -164,6 +180,9 @@ export default {
label: response.data[i].组号
})
}
if (response.data.length > 0) {
this.groupValue = this.group[0].value
}
})
},
searchRecord() {
@@ -172,6 +191,7 @@ export default {
this.searchRecord1()
},
searchRecord1() {
console.log(111111)
let check1, check2, check3, check4, check5, check6, check7
this.projectValue ? check1 = 1 : check1 = 0
this.machineValue ? check2 = 1 : check2 = 0
@@ -180,6 +200,8 @@ export default {
this.spec ? check5 = 1 : check5 = 0
this.model ? check6 = 1 : check6 = 0
this.inTime ? check7 = 1 : (check7 = 0, this.inTime = '')
this.tableData = ''
this.total1 = 0
searchRecord1(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.inTime[0], this.inTime[1], this.pageCurrent1, this.pageSize1).then(res => {
this.tableData1 = res.data.rows
this.total1 = res.data.total

View File

@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-card style="width: 900px;margin: 0px 0px 5px 0px">
<el-card style="width: 950px;margin: 0px 0px 5px 0px">
<el-row style="margin-bottom:10px;margin-top: 10px">
<el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 150px" @change="machineChange">
<el-select v-model="machineValue" filterable placeholder="机床图号" size="small" clearable style="width: 180px" @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
@@ -12,18 +12,28 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-select v-model="groupValue" placeholder="组号" size="small" style="width: 150px;margin-left: 10px" clearable filterable>
<el-select v-model="groupValue" placeholder="组号" size="small" style="width: 90px;margin-left: 10px" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="name" placeholder="名称图号规格" clearable size="small" style="width:150px;margin-left: 10px" @keyup.enter.native="pageCurrent1=1;pageSize1=100;searchRecord()"/>
<el-input v-model="name" placeholder="名称图号规格领料人" clearable size="small" style="width:165px;margin-left: 10px" @keyup.enter.native="pageCurrent1=1;pageSize1=100;searchRecord()"/>
<!--<el-input v-model="model" placeholder="图号或型号" clearable size="small" style="width:150px;margin-left: 10px" />-->
<!--<el-input v-model="spec" placeholder="规格" clearable size="small" style="width:150px;margin: 0px 10px" />-->
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="pageCurrent1=1;pageSize1=100;searchRecord()">查询</el-button>
<el-button type="success" plain size="small" @click="exportExcel()">导出</el-button>
<el-date-picker
v-model="outTime"
type="daterange"
size="small"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator="~"
style="width:240px;margin-left: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 20px" plain @click="pageCurrent1=1;pageSize1=100;searchRecord()">查询</el-button>
<el-button type="success" icon="el-icon-bottom" plain size="small" style="margin-left: 15px" @click="exportExcel()">导出</el-button>
</el-row>
<el-row v-show="false" style="margin-bottom:10px">
<el-date-picker
@@ -38,19 +48,19 @@
end-placeholder="结束时间"/>
</el-row>
</el-card>
<el-card style="width: 900px">
<el-table :data="tableData" border stripe size="mini" style="width: 100%;" width="100%" height="700">
<el-table-column label="名称" align="center" min-width="160" show-overflow-tooltip>
<el-card style="width: 950px">
<el-table :data="tableData" border stripe size="mini" height="700">
<el-table-column label="名称" align="center" width="180" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="160" show-overflow-tooltip>
<el-table-column label="图号或型号" align="center" width="180" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.图号或型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="160" show-overflow-tooltip>
<el-table-column label="规格" align="center" width="270" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
@@ -65,7 +75,7 @@
{{ scope.row.领料人 }}
</template>
</el-table-column>
<el-table-column label="出库时间" align="center" width="145">
<el-table-column label="出库时间" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.出库时间 ? scope.row.出库时间.split(' ')[0] : '-' }}
</template>
@@ -108,6 +118,11 @@ export default {
outTime: '' // 出库时间
}
},
watch: {
groupValue() {
this.searchRecord()
}
},
created() {
this.fetchData()
},
@@ -125,7 +140,7 @@ export default {
this.name ? check4 = 1 : check4 = 0
this.spec ? check5 = 1 : check5 = 0
this.model ? check6 = 1 : check6 = 0
this.inTime ? check7 = 1 : (check7 = 0, this.inTime = '')
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
var param = []
param[0] = ['项目流水号_check', check1]
param[1] = ['项目流水号', this.projectValue]
@@ -139,9 +154,9 @@ export default {
param[9] = ['规格', this.spec]
param[10] = ['图号或型号_check', check6]
param[11] = ['图号或型号', this.model]
param[12] = ['库时间_check', check7]
param[13] = ['库开始时间', this.inTime[0]]
param[14] = ['库结束时间', this.inTime[1]]
param[12] = ['库时间_check', check7]
param[13] = ['库开始时间', this.outTime[0]]
param[14] = ['库结束时间', this.outTime[1]]
var Data = this.CreateData('00', '报表_采购部仓库_出库记录_查询', param)
this.exportExcel_NPOI(Data)
},
@@ -166,6 +181,9 @@ export default {
label: response.data[i].组号
})
}
if (response.data.length > 0) {
this.groupValue = this.group[0].value
}
})
},
searchRecord() {
@@ -177,7 +195,8 @@ export default {
this.spec ? check5 = 1 : check5 = 0
this.model ? check6 = 1 : check6 = 0
this.outTime ? check7 = 1 : (check7 = 0, this.outTime = '')
console.log(this.outTime, 999)
this.tableData = []
this.total1 = 0
searchRecord(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, check7, this.outTime[0], this.outTime[1], this.pageCurrent1, this.pageSize1).then(res => {
this.tableData = res.data.rows
this.total1 = res.data.total