采购任务分配:重新调整

This commit is contained in:
chenjianan
2018-12-08 17:45:25 +08:00
parent 39a0b8ef13
commit e055d3cb2e
3 changed files with 129 additions and 40 deletions

View File

@@ -3,30 +3,61 @@
<el-row :gutter="10">
<el-col :span="16">
<el-card>
<span style="margin:0">项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
<span>分配情况:</span>
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
<el-option
v-for="item in allocateState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
<el-row style="margin-bottom: 10px">
<span style="margin-left: 0">物料类别:</span>
<el-select
v-model="MaterialCategoryValue"
style="width:150px"
placeholder="请选择"
size="small"
clearable
@change="searchMaterialVariety">
<el-option
v-for="item in MaterialCategory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料品种:</span>
<el-select
v-model="MaterialVarietyValue"
style="width:150px"
placeholder="请选择"
size="small"
clearable>
<el-option
v-for="item in MaterialVariety"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
</el-row>
<el-row>
<span style="margin-left: 0">项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>分配情况:</span>
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
<el-option
v-for="item in allocateState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
</el-card>
</el-col>
<el-col :span="8">
@@ -71,27 +102,42 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料名称" min-width="150px">
<el-table-column align="center" label="物料类别" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号" min-width="150px">
<el-table-column align="center" label="物料品种" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料品种 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格" min-width="150px">
<el-table-column align="center" label="名称" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" min-width="80px">
<el-table-column align="center" label="数量" min-width="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商" min-width="150px">
<el-table-column align="center" label="备注" min-width="100px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column align="center" label="供货商" min-width="100px">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
@@ -123,13 +169,17 @@
</template>
<script>
import { initProject, initBuyer, searchTable1, allocateTask, executeReturn } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { initMaterialCategory, initMaterialVariety, initProject, initBuyer, searchTable1, allocateTask, executeReturn } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购任务分配
data() {
return {
MaterialCategoryValue: '', // 物料类别
MaterialCategory: [], // 物料类别数组
MaterialVarietyValue: '', // 物料品种
MaterialVariety: [], // 物料品种数组
projectValue: '',
project: [],
materialName: '',
@@ -152,6 +202,8 @@ export default {
person: [],
check1: 0,
check2: 0,
check3: 0,
check4: 0,
tableData1: [],
standardAndPurchase: [],
groupAndPart: [],
@@ -170,6 +222,7 @@ export default {
},
created() {
this.fetchData()
this.searchMaterialCategory()
},
methods: {
fetchData() { // 初始化
@@ -191,11 +244,24 @@ export default {
}
})
},
searchMaterialCategory() { // 获取物料类别
this.MaterialCategory = []
this.MaterialVariety = []
this.MaterialCategoryValue = ''
this.MaterialVarietyValue = ''
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory', [0, this.DepartmentValue])
},
searchMaterialVariety() { // 初始化物料品种
this.MaterialVariety = []
this.MaterialVarietyValue = ''
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety', this.MaterialCategoryValue)
},
searchTable1() { // 查询
this.projectValue ? this.check1 = 1 : this.check1 = 0
this.materialName ? this.check2 = 1 : this.check2 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.materialName, this.allocateStateValue).then(response => {
console.log(response.data)
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0
this.materialName ? this.check4 = 1 : this.check4 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, this.check4, this.materialName, this.allocateStateValue).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})