询价单项目机床分组
This commit is contained in:
@@ -1,27 +1,27 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询分配后的标准件和外购件
|
// 查询分配后的标准件和外购件
|
||||||
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
|
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '采购管理_采购部采购_查询物料_分配后',
|
name: '采购管理_采购部采购_查询物料_分配后',
|
||||||
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}`,
|
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}`,
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询分配后的基本件
|
// 查询分配后的基本件
|
||||||
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
|
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person, check4, val4, check5, val5, check6, val6) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '采购管理_采购部采购_查询物料_基本件_分配后',
|
name: '采购管理_采购部采购_查询物料_基本件_分配后',
|
||||||
param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}`,
|
param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}&项目流水号_check=${check4}&项目流水号=${val4}&机床流水号_check=${check5}&机床流水号=${val5}&组件流水号_check=${check6}&组件流水号=${val6}`,
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -207,3 +207,38 @@ export function cancelUseInventory(...params) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 初始化项目
|
||||||
|
export function initProject() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 机床查询
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,6 +2,32 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-tabs type="border-card" @tab-click="searchTable11();searchTable12()">
|
<el-tabs type="border-card" @tab-click="searchTable11();searchTable12()">
|
||||||
<el-tab-pane label="标准件和外购件">
|
<el-tab-pane label="标准件和外购件">
|
||||||
|
<el-row style="margin-bottom: 10px">
|
||||||
|
<span>项目名称:</span>
|
||||||
|
<el-select v-model="projectValue" style="width:200px" 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-row>
|
||||||
<el-row style="margin-bottom: 10px">
|
<el-row style="margin-bottom: 10px">
|
||||||
<span style="margin-right: -10px">物料状态:</span>
|
<span style="margin-right: -10px">物料状态:</span>
|
||||||
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
||||||
@@ -143,6 +169,32 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="基本件">
|
<el-tab-pane label="基本件">
|
||||||
|
<el-row style="margin-bottom: 10px">
|
||||||
|
<span>项目名称:</span>
|
||||||
|
<el-select v-model="projectValue" style="width:200px" 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-row>
|
||||||
<el-row style="margin-bottom: 10px">
|
<el-row style="margin-bottom: 10px">
|
||||||
<span style="margin-right: -10px">物料状态:</span>
|
<span style="margin-right: -10px">物料状态:</span>
|
||||||
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
||||||
@@ -602,7 +654,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
import { searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||||
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
|
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
|
||||||
submitUseInventory } from '@/api/PurchasingCenter/CreateInquirySheet'
|
submitUseInventory, initProject, searchMachine, searchGroup } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { exportExcelMethod } from './exportExcel'
|
import { exportExcelMethod } from './exportExcel'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
@@ -611,6 +663,12 @@ export default {
|
|||||||
name: '', // 创建询价单
|
name: '', // 创建询价单
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
projectValue: '',
|
||||||
|
project: [],
|
||||||
|
machineValue: '',
|
||||||
|
machine: [],
|
||||||
|
groupValue: '',
|
||||||
|
group: [],
|
||||||
partNum: '',
|
partNum: '',
|
||||||
partName: '',
|
partName: '',
|
||||||
partSpec: '',
|
partSpec: '',
|
||||||
@@ -727,10 +785,47 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.fetchData()
|
||||||
this.searchTable11() // 查表1
|
this.searchTable11() // 查表1
|
||||||
this.searchTable2() // 查表2
|
this.searchTable2() // 查表2
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
fetchData() {
|
||||||
|
initProject().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.project.push({
|
||||||
|
label: response.data[i].项目名称,
|
||||||
|
value: response.data[i].项目流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
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].组号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
submitUseInventory() {
|
submitUseInventory() {
|
||||||
submitUseInventory(this.backlogMaterialNum, this.useNumber, this.backlogGroupPartNum, this.id).then(response => {
|
submitUseInventory(this.backlogMaterialNum, this.useNumber, this.backlogGroupPartNum, this.id).then(response => {
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
@@ -792,12 +887,14 @@ export default {
|
|||||||
return row['供货商'] === value
|
return row['供货商'] === value
|
||||||
},
|
},
|
||||||
searchTable11() { // 查询标准件和外购件列表
|
searchTable11() { // 查询标准件和外购件列表
|
||||||
let check1, check2, check3
|
let check1, check2, check3, check4, check5, check6
|
||||||
this.materialName ? check1 = 1 : check1 = 0
|
this.materialName ? check1 = 1 : check1 = 0
|
||||||
this.materialSpec ? check2 = 1 : check2 = 0
|
this.materialSpec ? check2 = 1 : check2 = 0
|
||||||
this.materialModel ? check3 = 1 : check3 = 0
|
this.materialModel ? check3 = 1 : check3 = 0
|
||||||
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id).then(response => {
|
this.projectValue ? check4 = 1 : check4 = 0
|
||||||
console.log(response.data.rows)
|
this.machineValue ? check5 = 1 : check5 = 0
|
||||||
|
this.groupValue ? check6 = 1 : check6 = 0
|
||||||
|
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue).then(response => {
|
||||||
this.tableData11 = response.data.rows
|
this.tableData11 = response.data.rows
|
||||||
this.total11 = response.data.total
|
this.total11 = response.data.total
|
||||||
})
|
})
|
||||||
@@ -812,12 +909,14 @@ export default {
|
|||||||
this.searchTable11()
|
this.searchTable11()
|
||||||
},
|
},
|
||||||
searchTable12() { // 查询基本件列表
|
searchTable12() { // 查询基本件列表
|
||||||
let check1, check2, check3
|
let check1, check2, check3, check4, check5, check6
|
||||||
this.partNum ? check1 = 1 : check1 = 0
|
this.partNum ? check1 = 1 : check1 = 0
|
||||||
this.partName ? check2 = 1 : check2 = 0
|
this.partName ? check2 = 1 : check2 = 0
|
||||||
this.partSpec ? check3 = 1 : check3 = 0
|
this.partSpec ? check3 = 1 : check3 = 0
|
||||||
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id).then(response => {
|
this.projectValue ? check4 = 1 : check4 = 0
|
||||||
console.log(response.data.rows, 9999)
|
this.machineValue ? check5 = 1 : check5 = 0
|
||||||
|
this.groupValue ? check6 = 1 : check6 = 0
|
||||||
|
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue).then(response => {
|
||||||
this.tableData12 = response.data.rows
|
this.tableData12 = response.data.rows
|
||||||
this.total12 = response.data.total
|
this.total12 = response.data.total
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user