分配任务加机床分组查
This commit is contained in:
@@ -45,6 +45,30 @@ export function initBuyer() {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 机床查询
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 查询表1标准件和外购件
|
// 查询表1标准件和外购件
|
||||||
export function searchTable1(...params) {
|
export function searchTable1(...params) {
|
||||||
return request({
|
return request({
|
||||||
@@ -53,7 +77,7 @@ export function searchTable1(...params) {
|
|||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '采购管理_采购部采购_查询物料',
|
name: '采购管理_采购部采购_查询物料',
|
||||||
param: `物料类别流水号_check=${params[2]}&物料类别流水号=${params[3]}&物料品种流水号_check=${params[4]}&物料品种流水号=${params[5]}&项目流水号_check=${params[6]}&项目流水号=${params[7]}&物料名称_check=${params[8]}&物料名称=${params[9]}&物料状态=${params[10]}&物料规格_check=${params[11]}&物料规格=${params[12]}&物料型号_check=${params[13]}&物料型号=${params[14]}`,
|
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]}`,
|
||||||
Pagination: params[0] + '&' + params[1]
|
Pagination: params[0] + '&' + params[1]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -66,7 +90,7 @@ export function searchTable2(...params) {
|
|||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '采购管理_采购部采购_查询物料_基本件',
|
name: '采购管理_采购部采购_查询物料_基本件',
|
||||||
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&物料状态=${params[4]}&零件图号_check=${params[5]}&零件图号=${params[6]}&零件名称_check=${params[7]}&零件名称=${params[8]}&规格_check=${params[9]}&规格=${params[10]}&材料_check=${params[11]}&材料=${params[12]}`,
|
param: `项目流水号_check=${params[2]}&项目流水号=${params[3]}&机床流水号_check=${params[4]}&机床流水号=${params[5]}&组件流水号_check=${params[6]}&组件流水号=${params[7]}&物料状态=${params[8]}&零件图号_check=${params[9]}&零件图号=${params[10]}&零件名称_check=${params[11]}&零件名称=${params[12]}&规格_check=${params[13]}&规格=${params[14]}&材料_check=${params[15]}&材料=${params[16]}`,
|
||||||
Pagination: params[0] + '&' + params[1]
|
Pagination: params[0] + '&' + params[1]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ import { searchInquirySheet, searchSheetContract, doneContract } from '@/api/Pur
|
|||||||
import { convertCurrency } from '@/vendor/int2Chinese'
|
import { convertCurrency } from '@/vendor/int2Chinese'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import { sleep } from '@/utils/tool'
|
|
||||||
export default {
|
export default {
|
||||||
components: { Tinymce },
|
components: { Tinymce },
|
||||||
inject: ['reload'],
|
inject: ['reload'],
|
||||||
|
|||||||
@@ -4,22 +4,28 @@
|
|||||||
<el-tab-pane label="标准件和外购件">
|
<el-tab-pane label="标准件和外购件">
|
||||||
<el-row style="margin-bottom: 5px">
|
<el-row style="margin-bottom: 5px">
|
||||||
<span style="margin-left: 0">项目名称:</span>
|
<span style="margin-left: 0">项目名称:</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 style="margin-right: -10px">物料状态:</span>
|
<span>机床图号:</span>
|
||||||
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
<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"/>
|
||||||
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
||||||
<div style="float:right;padding-top:10px;">
|
<div style="float:right;">
|
||||||
<span style="margin-left: 0">采购员:</span>
|
<span style="margin-left: 0">采购员:</span>
|
||||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -30,6 +36,32 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</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">
|
<el-row style="margin-bottom: 15px">
|
||||||
<span style="margin-left: 0">物料类别:</span>
|
<span style="margin-left: 0">物料类别:</span>
|
||||||
<el-select
|
<el-select
|
||||||
@@ -56,20 +88,6 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<div style="float:right;">
|
|
||||||
<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>
|
||||||
<el-row style="margin-bottom: 15px">
|
<el-row style="margin-bottom: 15px">
|
||||||
<span style="margin-left: 0">物料名称:</span>
|
<span style="margin-left: 0">物料名称:</span>
|
||||||
@@ -177,22 +195,28 @@
|
|||||||
<el-tab-pane label="基本件">
|
<el-tab-pane label="基本件">
|
||||||
<el-row style="margin-bottom: 5px">
|
<el-row style="margin-bottom: 5px">
|
||||||
<span style="margin-left: 0">项目名称:</span>
|
<span style="margin-left: 0">项目名称:</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 style="margin-right: -10px">物料状态:</span>
|
<span>机床图号:</span>
|
||||||
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
|
<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"/>
|
||||||
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
style="margin-left: 10px"
|
style="margin-left: 10px"
|
||||||
@click="pageCurrent2=1;pageSize2=20;total2=0;searchTable2()">查询</el-button>
|
@click="pageCurrent2=1;pageSize2=20;total2=0;searchTable2()">查询</el-button>
|
||||||
<div style="float:right;padding-top: 10px">
|
<div style="float:right">
|
||||||
<span style="margin-left: 0">采购员:</span>
|
<span style="margin-left: 0">采购员:</span>
|
||||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -203,12 +227,18 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-bottom: 15px">
|
<el-row style="margin-bottom: 5px">
|
||||||
<span style="margin-left: 0">零件图号:</span>
|
<span style="margin-left: 0">组 号:</span>
|
||||||
<el-input v-model="partNum" placeholder="零件图号" size="small" clearable/>
|
<el-select v-model="groupValue" placeholder="组号" size="small" filterable clearable>
|
||||||
<span>零件名称:</span>
|
<el-option
|
||||||
<el-input v-model="partName" placeholder="零件名称" size="small" clearable/>
|
v-for="item in group"
|
||||||
<div style="float:right;">
|
: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
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -223,6 +253,12 @@
|
|||||||
@click="executeReturn2">退回</el-button>
|
@click="executeReturn2">退回</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row style="margin-bottom: 15px">
|
||||||
|
<span style="margin-left: 0">零件图号:</span>
|
||||||
|
<el-input v-model="partNum" placeholder="零件图号" size="small" clearable/>
|
||||||
|
<span>零件名称:</span>
|
||||||
|
<el-input v-model="partName" placeholder="零件名称" size="small" clearable/>
|
||||||
|
</el-row>
|
||||||
<el-row style="margin-bottom: 15px">
|
<el-row style="margin-bottom: 15px">
|
||||||
<span style="margin-left: 0">零件规格:</span>
|
<span style="margin-left: 0">零件规格:</span>
|
||||||
<el-input v-model="partSpec" placeholder="零件规格" size="small" clearable/>
|
<el-input v-model="partSpec" placeholder="零件规格" size="small" clearable/>
|
||||||
@@ -324,7 +360,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initMaterialCategory, initMaterialVariety, initProject, initBuyer, searchTable1, searchTable2, allocateTask1, allocateTask2, executeReturn1, executeReturn2 } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
import { initMaterialCategory, initMaterialVariety, initProject, initBuyer, searchMachine, searchGroup, searchTable1, searchTable2, allocateTask1, allocateTask2, executeReturn1, executeReturn2 } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -343,6 +379,10 @@ export default {
|
|||||||
MaterialVariety: [], // 物料品种数组
|
MaterialVariety: [], // 物料品种数组
|
||||||
projectValue: '',
|
projectValue: '',
|
||||||
project: [],
|
project: [],
|
||||||
|
machineValue: '',
|
||||||
|
machine: [],
|
||||||
|
groupValue: '',
|
||||||
|
group: [],
|
||||||
materialName: '',
|
materialName: '',
|
||||||
materialStatusValue: [0], // 物料状态
|
materialStatusValue: [0], // 物料状态
|
||||||
materialStatus: [
|
materialStatus: [
|
||||||
@@ -424,6 +464,32 @@ export default {
|
|||||||
})
|
})
|
||||||
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory', [0, this.DepartmentValue])
|
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory', [0, this.DepartmentValue])
|
||||||
},
|
},
|
||||||
|
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].组号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
searchMaterialVariety() { // 初始化物料品种
|
searchMaterialVariety() { // 初始化物料品种
|
||||||
this.MaterialVariety = []
|
this.MaterialVariety = []
|
||||||
this.MaterialVarietyValue = ''
|
this.MaterialVarietyValue = ''
|
||||||
@@ -433,23 +499,27 @@ export default {
|
|||||||
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
|
this.MaterialCategoryValue ? this.check1 = 1 : this.check1 = 0
|
||||||
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
|
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
|
||||||
this.projectValue ? this.check3 = 1 : this.check3 = 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.materialName ? this.check4 = 1 : this.check4 = 0
|
||||||
let check2, check3
|
|
||||||
this.materialSpec ? check2 = 1 : check2 = 0
|
this.materialSpec ? check2 = 1 : check2 = 0
|
||||||
this.materialModel ? check3 = 1 : check3 = 0
|
this.materialModel ? check3 = 1 : check3 = 0
|
||||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1], check2, this.materialSpec, check3, this.materialModel).then(response => {
|
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 => {
|
||||||
this.tableData1 = response.data.rows
|
this.tableData1 = response.data.rows
|
||||||
this.total1 = response.data.total
|
this.total1 = response.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchTable2() { // 查询基本件
|
searchTable2() { // 查询基本件
|
||||||
this.projectValue ? this.check3 = 1 : this.check3 = 0
|
this.projectValue ? this.check3 = 1 : this.check3 = 0
|
||||||
let check1, check2, check3, check4
|
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
|
||||||
this.partMaterial ? check4 = 1 : check4 = 0
|
this.partMaterial ? check4 = 1 : check4 = 0
|
||||||
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
|
this.machineValue ? check5 = 1 : check5 = 0
|
||||||
|
this.groupValue ? check6 = 1 : check6 = 0
|
||||||
|
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, check5, this.machineValue, check6, this.groupValue, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
|
||||||
this.tableData2 = response.data.rows
|
this.tableData2 = response.data.rows
|
||||||
console.log(response.data.rows)
|
console.log(response.data.rows)
|
||||||
this.total2 = response.data.total
|
this.total2 = response.data.total
|
||||||
|
|||||||
Reference in New Issue
Block a user