style
This commit is contained in:
@@ -11,15 +11,39 @@ export function initProject() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 机床查询
|
||||||
|
export function searchMachine(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_机床名称_查询数据',
|
||||||
|
param: '项目流水号_check=1&项目流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 分组查询
|
||||||
|
export function searchGroup(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_组件名称_查询数据',
|
||||||
|
param: '机床流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 初始化项目金额统计表
|
// 初始化项目金额统计表
|
||||||
export function searchProjectTotal(num) {
|
export function searchProjectTotal(check1, num1, check2, num2, check3, num3) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '采购管理_项目采购总价_查询数据',
|
name: '采购管理_项目采购总价_查询数据',
|
||||||
param: `项目流水号=${num}`
|
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ export default {
|
|||||||
rules: { // 表单验证规则
|
rules: { // 表单验证规则
|
||||||
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
|
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
|
||||||
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
|
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
|
||||||
|
GroupNumValue: [{ required: true, message: '请选择分组', trigger: 'blur' }],
|
||||||
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
|
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
|
||||||
},
|
},
|
||||||
locateNumber: '',
|
locateNumber: '',
|
||||||
|
|||||||
@@ -2,13 +2,29 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<span>项目名称:</span>
|
<span>项目名称:</span>
|
||||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in project"
|
v-for="item in project"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<span>机床图号:</span>
|
||||||
|
<el-select v-model="machineValue" style="width:200px" 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>
|
||||||
|
<span>组号:</span>
|
||||||
|
<el-select v-model="groupValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in group"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -25,9 +41,14 @@
|
|||||||
{{ scope.row.项目名称 }}
|
{{ scope.row.项目名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="图号" align="center" min-width="100">
|
<el-table-column align="center" label="机床图号" width="100px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.图号 }}
|
{{ scope.row.机床图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="组号" width="80px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.组号 || '—' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="名称" align="center" min-width="100">
|
<el-table-column label="名称" align="center" min-width="100">
|
||||||
@@ -35,6 +56,11 @@
|
|||||||
{{ scope.row.名称 }}
|
{{ scope.row.名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.图号 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="规格" align="center" min-width="100">
|
<el-table-column label="规格" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.规格 }}
|
{{ scope.row.规格 }}
|
||||||
@@ -66,7 +92,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initProject, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
|
import { initProject, searchMachine, searchGroup, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -75,6 +101,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
projectValue: '',
|
projectValue: '',
|
||||||
project: [],
|
project: [],
|
||||||
|
machineValue: '',
|
||||||
|
machine: [],
|
||||||
|
groupValue: '',
|
||||||
|
group: [],
|
||||||
pageCurrent1: 1,
|
pageCurrent1: 1,
|
||||||
pageSize1: 10,
|
pageSize1: 10,
|
||||||
total1: 0,
|
total1: 0,
|
||||||
@@ -103,9 +133,38 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
projectChange() {
|
||||||
|
this.machine = []
|
||||||
|
this.machineValue = ''
|
||||||
|
this.group = []
|
||||||
|
this.groupValue = ''
|
||||||
|
searchMachine(this.projectValue).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.machine.push({
|
||||||
|
value: response.data[i].机床流水号,
|
||||||
|
label: response.data[i].机床图号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
machineChange() {
|
||||||
|
this.group = []
|
||||||
|
this.groupValue = ''
|
||||||
|
searchGroup(this.machineValue).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.group.push({
|
||||||
|
value: response.data[i].组件流水号,
|
||||||
|
label: response.data[i].组号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
searchTable1() {
|
searchTable1() {
|
||||||
if (this.projectValue) {
|
if (this.projectValue) {
|
||||||
searchProjectTotal(this.projectValue).then(response => {
|
let check2, check3
|
||||||
|
this.machineValue ? check2 = 1 : check2 = 0
|
||||||
|
this.groupValue ? check3 = 1 : check3 = 0
|
||||||
|
searchProjectTotal(1, this.projectValue, check2, this.machineValue, check3, this.groupValue).then(response => {
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
this.tableData1 = response.data
|
this.tableData1 = response.data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -121,6 +121,9 @@ export default {
|
|||||||
},
|
},
|
||||||
projectChange() {
|
projectChange() {
|
||||||
this.machine = []
|
this.machine = []
|
||||||
|
this.machineValue = ''
|
||||||
|
this.group = []
|
||||||
|
this.groupValue = ''
|
||||||
searchMachine(this.projectValue).then(response => {
|
searchMachine(this.projectValue).then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.machine.push({
|
this.machine.push({
|
||||||
@@ -132,6 +135,7 @@ export default {
|
|||||||
},
|
},
|
||||||
machineChange() {
|
machineChange() {
|
||||||
this.group = []
|
this.group = []
|
||||||
|
this.groupValue = ''
|
||||||
searchGroup(this.machineValue).then(response => {
|
searchGroup(this.machineValue).then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.group.push({
|
this.group.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user