序间外协和预算项目机床分组
This commit is contained in:
@@ -1,27 +1,47 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询(未编制)
|
export function machine() {
|
||||||
export function searchPartNum1(num1, start, end, pageCurrent, pageSize) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间生产管理工艺_零件工艺计划_查询序间外协零件_价格预算',
|
name: '车间生产管理工艺_序间外协_项目查询'
|
||||||
param: '定额人员编号=0&零件图号=' + num1 + '&开始时间=' + start + '&结束时间=' + end + '&预算状态=0',
|
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询零件号(已编制)
|
export function getToolNum(num) {
|
||||||
export function searchPartNum2(num, start, end, pageCurrent, pageSize) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间生产管理工艺_零件工艺计划_查询序间外协零件_价格预算',
|
name: '车间生产管理工艺_传递后_机床名称_查询数据_查询所有机床',
|
||||||
param: '定额人员编号=0&零件图号=' + num + '&开始时间=' + start + '&结束时间=' + end + '&预算状态=1',
|
param: '项目流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 组号
|
||||||
|
export function getNum(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_传递后_组件名称_查询数据_查询所有组',
|
||||||
|
param: '机床流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询(未编制)
|
||||||
|
export function searchPartNum1(num1, num2, num3, num4, num5, num6, num7, num8, num9, pageCurrent, pageSize) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_零件工艺计划_查询序间外协零件_价格预算_new',
|
||||||
|
param: '项目流水号_check=' + num1 + '&项目流水号=' + num2 + '&机床流水号_check=' + num3 + '&机床流水号=' + num4 + '&组件流水号_check=' + num5 + '&组件流水号=' + num6 + '&零件图号_check=' + num7 + '&零件图号=' + num8 + '&预算状态=' + num9,
|
||||||
Pagination: pageCurrent + '&' + pageSize
|
Pagination: pageCurrent + '&' + pageSize
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,28 +7,33 @@
|
|||||||
<el-radio :label="1">未编制</el-radio>
|
<el-radio :label="1">未编制</el-radio>
|
||||||
<el-radio :label="2">已编制</el-radio>
|
<el-radio :label="2">已编制</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
<span>项目名称:</span>
|
||||||
|
<el-select v-model="entryNameValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="项目名称" @change="typeChange()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in entryName"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>机床名称:</span>
|
||||||
|
<el-select v-model="toolNumValue" clearable filterable size="small" placeholder="机床号" style="margin-bottom:10px" @change="typeChange1()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in toolNum"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
<span>分组:</span>
|
||||||
|
<el-select v-model="NumValue" clearable filterable size="small" style="margin-bottom:10px" placeholder="机床组号">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Num"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
<span>零件图号:</span>
|
<span>零件图号:</span>
|
||||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||||
|
|
||||||
<span>开始时间:</span>
|
|
||||||
<el-date-picker
|
|
||||||
v-model="date01"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
type="date"
|
|
||||||
size="small"
|
|
||||||
placeholder="选择开始日期"/>
|
|
||||||
|
|
||||||
<span>结束时间:</span>
|
|
||||||
<el-date-picker
|
|
||||||
v-model="date02"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
type="date"
|
|
||||||
size="small"
|
|
||||||
placeholder="选择结束日期"/>
|
|
||||||
|
|
||||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize2=10; pageCurrent2=1;searchPartNum()">查询</el-button>
|
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize2=10; pageCurrent2=1;searchPartNum()">查询</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@@ -165,10 +170,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { searchPartNum1, searchPartNum2, searchTable, saveWeightArea, saveMaterialPrice, saveRowPrice } from '@/api/Outsourcing/InterBudgetaryBudgets'
|
import { machine, getToolNum, getNum, searchPartNum1, searchTable, saveWeightArea, saveMaterialPrice, saveRowPrice } from '@/api/Outsourcing/InterBudgetaryBudgets'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
entryNameValue: '',
|
||||||
|
entryName: [], // 项目名称
|
||||||
|
toolNumValue: '',
|
||||||
|
toolNum: [], // 机床号
|
||||||
|
NumValue: '',
|
||||||
|
Num: [], // 分组
|
||||||
lingjianhao: '',
|
lingjianhao: '',
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
form: {
|
form: {
|
||||||
@@ -183,8 +194,6 @@ export default {
|
|||||||
result2: [],
|
result2: [],
|
||||||
radio: 1,
|
radio: 1,
|
||||||
partName: '', // 零件名称
|
partName: '', // 零件名称
|
||||||
date01: '', // 开始时间
|
|
||||||
date02: '', // 结束时间
|
|
||||||
loading0: false,
|
loading0: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
loading2: false,
|
loading2: false,
|
||||||
@@ -194,33 +203,91 @@ export default {
|
|||||||
pageCurrent2: 1 // 后台获取页
|
pageCurrent2: 1 // 后台获取页
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchData()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
radioChange() {
|
radioChange() {
|
||||||
this.tableData2 = []
|
this.tableData2 = []
|
||||||
|
this.entryNameValue = ''
|
||||||
|
this.toolNumValue = ''
|
||||||
|
this.NumValue = ''
|
||||||
|
},
|
||||||
|
fetchData() {
|
||||||
|
this.entryNameValue = ''
|
||||||
|
this.entryName = []
|
||||||
|
machine().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.entryName.push({
|
||||||
|
label: response.data[i].项目名称,
|
||||||
|
value: response.data[i].项目流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
typeChange() {
|
||||||
|
this.toolNumValue = ''
|
||||||
|
this.toolNum = []
|
||||||
|
this.NumValue = ''
|
||||||
|
this.Num = []
|
||||||
|
getToolNum(this.entryNameValue).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.toolNum.push({
|
||||||
|
label: response.data[i].机床图号,
|
||||||
|
value: response.data[i].机床流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
typeChange1() {
|
||||||
|
this.NumValue = ''
|
||||||
|
this.Num = []
|
||||||
|
getNum(this.toolNumValue).then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.Num.push({
|
||||||
|
label: response.data[i].组号,
|
||||||
|
value: response.data[i].组件流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 查零件号
|
// 查零件号
|
||||||
searchPartNum() {
|
searchPartNum() {
|
||||||
if (this.partName === null) {
|
if (this.partName === null) {
|
||||||
this.partName = ''
|
this.partName = ''
|
||||||
}
|
}
|
||||||
if (this.date01 === '') {
|
if (this.entryNameValue !== null && this.entryNameValue !== '') {
|
||||||
this.date01 = null
|
this.check_entryNameValue = 1
|
||||||
|
} else {
|
||||||
|
this.check_entryNameValue = 0
|
||||||
}
|
}
|
||||||
if (this.date02 === '') {
|
if (this.toolNumValue !== null && this.toolNumValue !== '') {
|
||||||
this.date02 = null
|
this.check_toolNumValue = 1
|
||||||
|
} else {
|
||||||
|
this.check_toolNumValue = 0
|
||||||
|
}
|
||||||
|
if (this.NumValue !== null && this.NumValue !== '') {
|
||||||
|
this.check_NumValue = 1
|
||||||
|
} else {
|
||||||
|
this.check_NumValue = 0
|
||||||
|
}
|
||||||
|
if (this.partName !== null && this.partName !== '') {
|
||||||
|
this.check_partName = 1
|
||||||
|
} else {
|
||||||
|
this.check_partName = 0
|
||||||
}
|
}
|
||||||
this.loading2 = true
|
this.loading2 = true
|
||||||
this.tableData2 = []
|
this.tableData2 = []
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
if (this.radio === 1) {
|
if (this.radio === 1) {
|
||||||
searchPartNum1(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
searchPartNum1(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, 0, this.pageCurrent2, this.pageSize2).then(response => {
|
||||||
this.tableData2 = response.data.rows
|
this.tableData2 = response.data.rows
|
||||||
this.total2 = response.data.total
|
this.total2 = response.data.total
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.loading2 = false
|
this.loading2 = false
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
searchPartNum2(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
searchPartNum1(this.check_entryNameValue, this.entryNameValue, this.check_toolNumValue, this.toolNumValue, this.check_NumValue, this.NumValue, this.check_partName, this.partName, 1, this.pageCurrent2, this.pageSize2).then(response => {
|
||||||
this.tableData2 = response.data.rows
|
this.tableData2 = response.data.rows
|
||||||
this.total2 = response.data.total
|
this.total2 = response.data.total
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
|||||||
@@ -165,7 +165,6 @@ export default {
|
|||||||
this.entryNameValue = ''
|
this.entryNameValue = ''
|
||||||
this.entryName = []
|
this.entryName = []
|
||||||
machine().then(response => {
|
machine().then(response => {
|
||||||
console.log(response.data)
|
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.entryName.push({
|
this.entryName.push({
|
||||||
label: response.data[i].项目名称,
|
label: response.data[i].项目名称,
|
||||||
|
|||||||
Reference in New Issue
Block a user