更新
This commit is contained in:
@@ -1,85 +1,60 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<el-row style="margin-bottom:10px">
|
||||
<el-col style="width:250px">
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" style="width:150px" placeholder="请选择" size="small" clearable filterable @change="projectChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col style="width:250px">
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="machineValue" style="width:150px" placeholder="请选择" size="small" clearable filterable @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col style="width:250px">
|
||||
<span>组 号:</span>
|
||||
<el-select v-model="groupValue" style="width:150px" placeholder="请选择" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom:10px">
|
||||
<el-col style="width:250px">
|
||||
<span>名 称:</span>
|
||||
<el-input v-model="name" clearable size="small" style="width:150px" />
|
||||
</el-col>
|
||||
<el-col style="width:250px">
|
||||
<span>规 格:</span>
|
||||
<el-input v-model="spec" clearable size="small" style="width:150px" />
|
||||
</el-col>
|
||||
<el-col style="width:250px">
|
||||
<span>图号或型号:</span>
|
||||
<el-input v-model="model" clearable size="small" style="width:150px" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>出库时间:</span>
|
||||
<el-date-picker
|
||||
v-model="outTime"
|
||||
type="daterange"
|
||||
size="small"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:250px"
|
||||
start-placeholder=""
|
||||
end-placeholder=""/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;searchRecord()">查询</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-table :data="tableData" border stripe size="mini" style="width: 100%;" height="600">
|
||||
<el-table-column label="名称" align="center" width="100" show-overflow-tooltip>
|
||||
<el-card style="width: 900px;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-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<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-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" />
|
||||
<el-input v-model="model" placeholder="图号或型号" clearable size="small" style="width:150px;margin-left: 10px" />
|
||||
</el-row>
|
||||
<el-row style="margin-bottom:10px">
|
||||
<el-input v-model="spec" placeholder="规格" clearable size="small" style="width:150px" />
|
||||
<el-date-picker
|
||||
v-model="outTime"
|
||||
type="daterange"
|
||||
size="small"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:250px;margin-left: 10px"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=100;searchRecord()">查询</el-button>
|
||||
</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>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" width="120" show-overflow-tooltip>
|
||||
<el-table-column label="图号或型号" align="center" min-width="160" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" width="120" show-overflow-tooltip>
|
||||
<el-table-column label="规格" align="center" min-width="160" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库数量" align="center" width="100" show-overflow-tooltip>
|
||||
<el-table-column label="出库数量" align="center" width="90" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
@@ -89,16 +64,16 @@
|
||||
{{ scope.row.领料人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出库时间" align="center" min-width="100">
|
||||
<el-table-column label="出库时间" align="center" width="145">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
{{ scope.row.出库时间 ? scope.row.出库时间.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
@@ -111,7 +86,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchGroup, searchRecord } from '@/api/Inventory/PurchaseOutRecord'
|
||||
import { initMachineProject, searchGroup, searchRecord } from '@/api/Inventory/PurchaseOutRecord'
|
||||
export default {
|
||||
name: 'PurchaseOutRecord',
|
||||
data() {
|
||||
@@ -126,27 +101,26 @@ export default {
|
||||
spec: '',
|
||||
model: '',
|
||||
tableData: [],
|
||||
pageSize1: 10,
|
||||
pageSize1: 100,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
outTime: '' // 出库时间
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
mounted() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
this.searchRecord()
|
||||
},
|
||||
methods: {
|
||||
projectChange() {
|
||||
this.machine = []
|
||||
this.machineValue = ''
|
||||
this.group = []
|
||||
this.groupValue = ''
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
fetchData() {
|
||||
initMachineProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machine.push({
|
||||
value: response.data[i].机床流水号,
|
||||
label: response.data[i].机床图号
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user