外购备料查询

This commit is contained in:
bryan sun
2019-11-30 14:39:19 +08:00
parent a9f8a4dd08
commit bc1a58aead
3 changed files with 175 additions and 2 deletions

View File

@@ -0,0 +1,159 @@
<template>
<div class="app-container">
<el-card>
<span>供应商</span>
<el-select v-model="supplierNameValue" placeholder="供应商" size="small" style="margin: 3px 20px 3px 0px" filterable clearable>
<el-option
v-for="item in supplierName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件图号</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px;margin: 3px 20px 3px 0px"/>
<span>备料</span>
<el-select v-model="sparePartValue" placeholder="供应商" size="small" style="margin: 3px 20px 3px 0px" filterable clearable>
<el-option
v-for="item in spareParts"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>结算</span>
<el-select v-model="businessAccountingValue" placeholder="供应商" size="small" style="margin: 3px 20px 3px 0px" filterable clearable>
<el-option
v-for="item in businessAccounting"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="danger" size="small">删除</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading"
:data="tableData"
border
style="width: 100%;max-height: 460px;"
height="460"
size="mini">
<el-table-column label="备料" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.库存是否不足)===1" type="danger" size="small">未到</el-tag>
<el-tag v-else type="success" size="small">已到</el-tag>
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料编号" min-width="150" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料名称" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="材料" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="备料件数" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<el-table-column label="备料时间" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
</template>
</el-table-column>
<el-table-column label="到货件数" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.到货件数 }}
</template>
</el-table-column>
<el-table-column label="到货时间" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.到货时间 }}
</template>
</el-table-column>
<el-table-column label="结算" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.结算 }}
</template>
</el-table-column>
<el-table-column label="结算时间" min-width="70" align="center">
<template slot-scope="scope">
{{ scope.row.结算时间 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
style="display:inline-block;width:800px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { searchSupplier } from '@/api/WorkshopProcurement/PurchaseMaterialPreparationQuery.js'
export default {
data() {
return {
supplierNameValue: '', // 供应商
supplierName: [],
partName: '', // 零件图号
spareParts: [{
value: '0',
label: '未到'
}, {
value: '1',
label: '已到'
}], // 备料
sparePartValue: '',
businessAccountingValue: '',
businessAccounting: [{
value: '0',
label: '未结算'
}, {
value: '1',
label: '已结算'
}] // 核算
}
},
created() {
this.fetchdata()
},
methods: {
fetchdata() {
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplierName.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
}
}
}
</script>
<style scoped>
</style>