This commit is contained in:
zhangdingyu
2019-03-25 17:25:00 +08:00
8 changed files with 138 additions and 45 deletions

View File

@@ -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({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_项目采购总价_查询数据',
param: `项目流水号=${num}`
param: `项目流水号_check=${check1}&项目流水号=${num1}&机床流水号_check=${check2}&机床流水号=${num2}&组件流水号_check=${check3}&组件流水号=${num3}`
}
})
}

View File

@@ -1,16 +1,10 @@
<template>
<div class="app-container">
<el-card>
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADD()">增加</el-button>
</el-card>
<el-card>
<el-table
:data="tableData"
border
size="mini"
style="width: 100%;max-height: 400px"
height="400"
@row-click="getWarehouse">
<div slot="header" class="clearfix">
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin: 0 0 0 10px" @click="ADD()">新建仓库</el-button>
</div>
<el-table :data="tableData" border size="mini" style="width: 100%;max-height: 300px" height="300" @row-click="getWarehouse">
<el-table-column label="仓库编号" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.仓库编号 }}
@@ -21,27 +15,27 @@
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="仓库描述" align="center" width="110">
<el-table-column label="仓库描述" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.仓库描述 }}
</template>
</el-table-column>
<el-table-column label="地址" align="center">
<el-table-column label="地址" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column label="联系人" align="center">
<el-table-column label="联系人" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column label="备注" width="180" align="center">
<el-table-column label="备注" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" min-width="200" align="center" fixed="right">
<el-table-column label="操作" width="300" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
@@ -59,13 +53,7 @@
</el-table>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData2"
border
size="mini"
style="width: 100%;max-height: 400px"
height="400">
<el-table v-loading="listLoading" :data="tableData2" border size="mini" style="width: 100%;max-height: 300px" height="300">
<el-table-column label="货位名称" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.货位名称 }}
@@ -592,8 +580,20 @@ export default {
</script>
<style scoped>
.code{
width:120px!important;
height: auto!important;
}
.code{
width:120px!important;
height: auto!important;
}
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
</style>

View File

@@ -206,6 +206,7 @@ export default {
rules: { // 表单验证规则
ProjectValue: [{ required: true, message: '请选择项目', trigger: 'blur' }],
MachineValue: [{ required: true, message: '请选择机床', trigger: 'blur' }],
GroupNumValue: [{ required: true, message: '请选择分组', trigger: 'blur' }],
DirectNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }]
},
locateNumber: '',

View File

@@ -62,7 +62,7 @@
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<el-table-column label="申请时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
@@ -72,7 +72,7 @@
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
@@ -82,7 +82,7 @@
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
</template>
@@ -92,7 +92,7 @@
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>

View File

@@ -62,7 +62,7 @@
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template>
</el-table-column>
<el-table-column label="申请时间" align="center" min-width="110">
<el-table-column label="申请时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
</template>
@@ -72,29 +72,29 @@
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="110">
<el-table-column label="审批时间" align="center" min-width="115">
<template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100">

View File

@@ -309,6 +309,11 @@
@click.native="param=1;openSupplier()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="常用符号">
Φ ×
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">

View File

@@ -2,13 +2,29 @@
<div class="app-container">
<el-card>
<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
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</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
type="success"
size="small"
@@ -25,9 +41,14 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="100">
<el-table-column align="center" label="机床图号" width="100px">
<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>
</el-table-column>
<el-table-column label="名称" align="center" min-width="100">
@@ -35,6 +56,11 @@
{{ scope.row.名称 }}
</template>
</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">
<template slot-scope="scope">
{{ scope.row.规格 }}
@@ -66,7 +92,7 @@
</template>
<script>
import { initProject, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
import { initProject, searchMachine, searchGroup, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
import { mapGetters } from 'vuex'
export default {
@@ -75,6 +101,10 @@ export default {
return {
projectValue: '',
project: [],
machineValue: '',
machine: [],
groupValue: '',
group: [],
pageCurrent1: 1,
pageSize1: 10,
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() {
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)
this.tableData1 = response.data
})

View File

@@ -121,6 +121,9 @@ 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({
@@ -132,6 +135,7 @@ export default {
},
machineChange() {
this.group = []
this.groupValue = ''
searchGroup(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.group.push({