任务分配标准外购
This commit is contained in:
@@ -77,7 +77,7 @@ export function searchTable1(...params) {
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_采购部采购_查询物料_分配后',
|
||||
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&机床流水号_check=${params[8]}&机床流水号=${params[9]}&组件流水号_check=${params[10]}&组件流水号=${params[11]}&物料名称_check=${params[12]}&物料名称=${params[13]}&物料状态编号=${params[14]}&物料规格_check=${params[15]}&物料规格=${params[16]}&物料型号_check=${params[17]}&物料型号=${params[18]}`,
|
||||
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&机床流水号_check=${params[8]}&机床流水号=${params[9]}&组件流水号_check=${params[10]}&组件流水号=${params[11]}&物料名称_check=${params[12]}&物料名称=${params[13]}&物料状态编号=${params[14]}&物料规格_check=${params[15]}&物料规格=${params[16]}&物料型号_check=${params[17]}&物料型号=${params[18]}&零件类型=${params[19]}`,
|
||||
Pagination: params[0] + '&' + params[1]
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,7 +1,221 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="tabName" type="border-card" @tab-click="searchTable1();searchTable2()">
|
||||
<el-tab-pane label="标准件和外购件" name="标准件和外购件">
|
||||
<el-tabs v-model="tabName" type="border-card" @tab-click="searchTable0();searchTable1();searchTable2();">
|
||||
<el-tab-pane label="标准件" name="标准件">
|
||||
<el-row style="margin-bottom: 5px">
|
||||
<span style="margin-left: 0">项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="machineValue" placeholder="机床图号" size="small" filterable clearable @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<b style="float: left">{{ item.label }}</b>
|
||||
<b style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</b>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent0=1;pageSize0=20;total0=0;searchTable0()">查询</el-button>
|
||||
<div style="float:right;">
|
||||
<span style="margin-left: 0">采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 5px">
|
||||
<span style="margin-left: 0">组 号:</span>
|
||||
<el-select v-model="groupValue" placeholder="组号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-right: -10px">物料状态:</span>
|
||||
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
||||
<div style="float:right;padding-top:10px;">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-menu"
|
||||
style="margin-left: 10px"
|
||||
@click="allocateTask1">分配</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-back"
|
||||
style="margin-left: 10px"
|
||||
@click="executeReturn1">退回</el-button>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 15px">
|
||||
<span style="margin-left: 0">物料类别:</span>
|
||||
<el-select
|
||||
v-model="MaterialCategoryValue"
|
||||
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"
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in MaterialVariety"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 15px">
|
||||
<span style="margin-left: 0">物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<span>物料规格:</span>
|
||||
<el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/>
|
||||
<span>物料型号:</span>
|
||||
<el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 10px">
|
||||
<el-table v-loading="" :data="tableData0" size="mini" style="max-height: 600px" height="500px" border stripe @selection-change="handleSelectionChange1">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection"/>
|
||||
<el-table-column align="center" label="采购情况" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
|
||||
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
|
||||
</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="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="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="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="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="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 :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计划到货时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="生产分配时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="姓名">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购分配时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="撤回分配" min-width="100px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="!(parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='')"
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-back"
|
||||
@click="retract(scope.row)">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent0"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize0"
|
||||
:total="total0"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange0"
|
||||
@current-change="handleCurrentChange0"/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="外购件" name="外购件">
|
||||
<el-row style="margin-bottom: 5px">
|
||||
<span style="margin-left: 0">项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
|
||||
@@ -419,7 +633,7 @@ export default {
|
||||
value: 2
|
||||
}
|
||||
],
|
||||
tabName: '标准件和外购件',
|
||||
tabName: '标准件',
|
||||
partNum: '',
|
||||
partName: '',
|
||||
partSpec: '',
|
||||
@@ -472,12 +686,16 @@ export default {
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
tableData0: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
standardAndPurchase: [],
|
||||
basic: [],
|
||||
groupAndPart: [],
|
||||
groupAndPartBasic: [],
|
||||
pageCurrent0: 1,
|
||||
pageSize0: 20,
|
||||
total0: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
total1: 0,
|
||||
@@ -493,7 +711,7 @@ export default {
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchTable1() // 查表1
|
||||
this.searchTable0() // 查表1
|
||||
this.fetchData() // 初始化数据
|
||||
},
|
||||
methods: {
|
||||
@@ -520,6 +738,7 @@ export default {
|
||||
retract1(row.标准件和外购件流水号).then(res => {
|
||||
if (Number(res.data[0].result) === 1) {
|
||||
this.$message.success('撤回成功')
|
||||
this.searchTable0()
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('撤回失败')
|
||||
@@ -585,7 +804,7 @@ export default {
|
||||
this.MaterialVarietyValue = ''
|
||||
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety', this.MaterialCategoryValue)
|
||||
},
|
||||
searchTable1() { // 查询标准件和外购件
|
||||
searchTable0() { // 查询标准件
|
||||
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.projectValue ? this.check3 = 1 : this.check3 = 0
|
||||
@@ -595,8 +814,22 @@ export default {
|
||||
this.materialName ? this.check4 = 1 : this.check4 = 0
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
this.materialModel ? check3 = 1 : check3 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel).then(response => {
|
||||
console.log(response.data.rows)
|
||||
searchTable1(this.pageCurrent0, this.pageSize0, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel, 1).then(response => {
|
||||
this.tableData0 = response.data.rows
|
||||
this.total0 = response.data.total
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询外购件
|
||||
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.projectValue ? this.check3 = 1 : this.check3 = 0
|
||||
let check0, check1, check2, check3
|
||||
this.machineValue ? check0 = 1 : check0 = 0
|
||||
this.groupValue ? check1 = 1 : check1 = 0
|
||||
this.materialName ? this.check4 = 1 : this.check4 = 0
|
||||
this.materialSpec ? check2 = 1 : check2 = 0
|
||||
this.materialModel ? check3 = 1 : check3 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel, 2).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
@@ -648,6 +881,7 @@ export default {
|
||||
allocateTask1(this.standardAndPurchase, this.personValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable0()
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
@@ -687,6 +921,15 @@ export default {
|
||||
filterHandler(value, row) {
|
||||
return parseInt(row['人员编号']) === parseInt(value)
|
||||
},
|
||||
handleSizeChange0(val) {
|
||||
this.pageSize0 = val
|
||||
this.pageCurrent0 = 1
|
||||
this.searchTable0()
|
||||
},
|
||||
handleCurrentChange0(val) {
|
||||
this.pageCurrent0 = val
|
||||
this.searchTable0()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
@@ -717,6 +960,7 @@ export default {
|
||||
executeReturn1(this.standardAndPurchase, this.groupAndPart).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable0()
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user