This commit is contained in:
liushuai
2019-06-10 20:06:09 +08:00
4 changed files with 409 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ export function searchgroup(num) {
}
})
}
// 组件查询
// 质检管理_质量情况_查询数据
export function selecttable(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, pageCurrent, pageSize) {
return request({
url: '',

View File

@@ -34,7 +34,42 @@ export function groupSelect(machineValue) {
}
})
}
export function searchTable5(pageCurrent, pageSize, projectCheck, project, machineCheck, machine, groupCheck, group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_零件明细表_外购件和标准件_临时表数据查询',
param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchTable6(pageCurrent, pageSize, projectCheck, project, machineCheck, machine, groupCheck, group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_零件明细表_基本件_临时表数据查询',
param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function searchTable7(pageCurrent, pageSize, projectCheck, project, machineCheck, machine, groupCheck, group) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_零件明细表_外购件_临时表数据查询',
param: `项目名字_check=${projectCheck}&项目名字=${project}&机床名字_check=${machineCheck}&机床名字=${machine}&组号_check=${groupCheck}&组号=${group}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function basicPartsData(project_check, project, machine_check, machine, group_check, group, pageSize, pageCurrent) {
return request({
url: '',
@@ -70,6 +105,61 @@ export function deleteBasicParts(basicNum) {
}
})
}
export function alldelete(basicNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_零件明细表_基本件_删除数据_根据组件流水号',
param: `组件流水号=${basicNum}`
}
})
}
export function deleteBasicParts5(basicNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_零件明细表_外购件和标准件_临时表_删除',
param: `id=${basicNum}`
}
})
}
export function alldeleteBasicParts5(project, machine, group) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_零件明细表_外购件和标准件_临时表_全部删除',
param: `项目=${project}&机床=${machine}&组号=${group}`
}
})
}
export function deleteBasicParts6(basicNum) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_零件明细表_基本件_临时表_删除',
param: `id=${basicNum}`
}
})
}
export function alldeleteBasicParts6(project, machine, group) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_零件明细表_基本件_临时表_全部删除',
param: `项目=${project}&机床=${machine}&组号=${group}`
}
})
}
export function deletePurchaseData(num) {
return request({
url: '',
@@ -81,6 +171,17 @@ export function deletePurchaseData(num) {
}
})
}
export function alldeleteWB(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_零件明细表_标准件和外购件_删除数据_根据组件流水号',
param: '组件流水号=' + num + '=int'
}
})
}
export function editPurchaseData(num, num1) {
return request({
url: '',

View File

@@ -22,7 +22,7 @@ export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231
export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231
const service = axios.create({
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间
})

View File

@@ -9,7 +9,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号</span>
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
<el-option
@@ -34,7 +33,10 @@
<el-button icon="el-icon-search" type="success" size="small" @click="pageCurrentWB = 1;pageSizeWB = 10;pageCurrent = 1;pageSize = 10;getTableData();pageCurrent1 = 1;pageSize1 = 10;getTable();pageCurrent2 = 1;pageSize2 = 10;getTable1()">查询</el-button>
</el-card>
<el-card>
<div style="font-size: 20px;margin-bottom: 20px">基本件三表数量</div>
<div>
<span style="font-size: 20px;margin-bottom: 20px">基本件三表数量</span>
<el-button style="float: right;margin-bottom: 20px" type="danger" size="small" @click="alldelete()">全部删除</el-button>
</div>
<el-table
v-loading="loading"
:data="tableData"
@@ -144,7 +146,10 @@
</div>
</el-card>
<el-card>
<div style="font-size: 20px;margin-bottom: 20px">外购件和标准件三表数量</div>
<div>
<span style="font-size: 20px;margin-bottom: 20px">外购件和标准件三表数量</span>
<el-button style="float: right;margin-bottom: 20px" type="danger" size="small" @click="alldeleteWB()">全部删除</el-button>
</div>
<el-table
v-loading="loadingWB"
:data="tableDataWB"
@@ -493,6 +498,125 @@
</el-tab-pane>
</el-tabs>
</el-card>
<el-card>
<div>
<span style="font-size: 20px">临时表</span>
<el-button style="float: right" type="danger" size="small" @click="alldelete5()">全部删除</el-button>
</div>
<el-tabs v-model="activeName" style="margin-top: 20px" type="border-card" @tab-click="searchTable5();searchTable6()">
<el-tab-pane label="标准件和外购件" name="1">
<el-table :data="tableData5" size="mini" style="max-height: 320px" height="320px" border>
<el-table-column align="center" label="项目" min-width="100px">
<template slot-scope="scope">
{{ scope.row.项目 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床" min-width="80px">
<template slot-scope="scope">
{{ scope.row.机床 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料名称" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="装机数量" min-width="100px">
<template slot-scope="scope">
{{ scope.row.装机数量 }}
</template>
</el-table-column>
<el-table-column label="操作" width="200px" fixed="right" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
@click="handleDelete5(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent5"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize5"
:total="total5"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange5"
@current-change="handleCurrentChange5"/>
</div>
</el-tab-pane>
<el-tab-pane label="基本件" name="2">
<el-table :data="tableData6" size="mini" style="max-height: 320px" height="320px" border>
<el-table-column align="center" label="项目" min-width="100px">
<template slot-scope="scope">
{{ scope.row.项目 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床" min-width="80px">
<template slot-scope="scope">
{{ scope.row.机床 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号或者型号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.图号或者型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="材料或者规格" min-width="100px">
<template slot-scope="scope">
{{ scope.row.材料或者规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="装机数量" min-width="100px">
<template slot-scope="scope">
{{ scope.row.装机数量 }}
</template>
</el-table-column>
<el-table-column label="操作" width="200px" fixed="right" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="danger"
@click="handleDelete6(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent6"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize6"
:total="total6"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange6"
@current-change="handleCurrentChange6"/>
</div>
</el-tab-pane>
</el-tabs>
</el-card>
<el-dialog :visible.sync="dialogFormVisible3" title="更改数量" center style="min-height: 300px" width="400px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="数量" prop="数量">
@@ -510,12 +634,14 @@
</template>
<script>
import { projectSelect, machineSelect, groupSelect, basicPartsData, deleteBasicParts, purchasePartsData, deletePurchaseData, editPurchaseData, editBasicParts, getTable, editProductNum, getTable1, editProduceNum, searchTable1, searchTable2, editGroupBasicPartNum, editGroupPartNum } from '@/api/BasicData/PartsNumberMaintenance'
import { alldeleteWB, alldelete, projectSelect, machineSelect, groupSelect, basicPartsData, deleteBasicParts, deleteBasicParts5, deleteBasicParts6, alldeleteBasicParts5, alldeleteBasicParts6, purchasePartsData, deletePurchaseData, editPurchaseData, editBasicParts, getTable, editProductNum, getTable1, editProduceNum, searchTable1, searchTable2, searchTable5, searchTable6, searchTable7, editGroupBasicPartNum, editGroupPartNum } from '@/api/BasicData/PartsNumberMaintenance'
export default {
name: 'Index',
data() {
return {
activeName: '1',
projectValue: '',
projectName: '',
BasicParts: '',
PurchaseData: '',
productNum: '',
@@ -526,6 +652,7 @@ export default {
type: '',
project: [],
machineValue: '',
machineName: '',
machine: [],
groupValue: '',
group: [],
@@ -543,6 +670,10 @@ export default {
tableData1: [],
tableData2: [],
tableData3: [],
tableData4: [],
tableData5: [],
tableData6: [],
tableData7: [],
tableDataWB: [],
pageCurrent: 1,
pageSize: 10,
@@ -558,6 +689,15 @@ export default {
pageCurrent4: 1,
pageSize4: 10,
total4: 0,
pageCurrent5: 1,
pageSize5: 10,
total5: 0,
pageCurrent6: 1,
pageSize6: 10,
total6: 0,
pageCurrent7: 1,
pageSize7: 10,
total7: 0,
pageCurrentWB: 1,
pageSizeWB: 10,
totalWB: 0
@@ -574,12 +714,16 @@ export default {
},
watch: {
project(val) {
console.log(val)
if (val.length > 0) {
this.projectValue = val[0].value
}
},
projectValue(val) {
for (let i = 0; i < this.project.length; i++) {
if (this.project[i].value === this.projectValue) {
this.projectName = this.project[i].label
}
}
this.machineValue = ''
this.machine = []
this.groupValue = ''
@@ -591,6 +735,11 @@ export default {
machine(val) {
if (val.length > 0) {
this.machineValue = val[0].value
for (let i = 0; i < this.machine.length; i++) {
if (this.machine[i].value === val[0].value) {
this.machineName = this.machine[i].label
}
}
}
},
machineValue(val) {
@@ -611,11 +760,14 @@ export default {
this.pageSizeWB = 10
this.pageCurrent = 1
this.pageSize = 10
// console.log(this.projectName, this.machineName, this.groupName)
this.getTableData()
this.getTable()
this.getTable1()
this.searchTable1()
this.searchTable2()
this.searchTable5()
this.searchTable6()
}
}
},
@@ -632,6 +784,76 @@ export default {
getGroupSelect(val) {
this.getSelect(groupSelect, ['组号', '组件流水号'], 'group', val)
},
alldelete5() {
this.$confirm('此操作将永久删除所有数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.activeName === '1') {
alldeleteBasicParts5(this.projectName, this.machineName, this.groupName).then(res => {
console.log(res, 1)
if (res.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTable5()
this.searchTable6()
} else { this.$message.error('删除失败') }
})
} else if (this.activeName === '2') {
alldeleteBasicParts6(this.projectName, this.machineName, this.groupName).then(res => {
console.log(res, 2)
if (res.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTable5()
this.searchTable6()
} else { this.$message.error('删除失败') }
})
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
alldelete() {
this.$confirm('此操作将永久删除所有数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
alldelete(this.groupValue).then(res => {
if (res.data[0].result === '1') {
this.$message.success('删除成功')
this.getTableData()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
alldeleteWB() {
this.$confirm('此操作将永久删除所有数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
alldeleteWB(this.groupValue).then(res => {
if (res.data[0].result === '1') {
this.$message.success('删除成功')
this.getTableData()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
getTableData() {
const project_check = this.projectValue ? 1 : 0
const machine_check = this.machineValue ? 1 : 0
@@ -641,7 +863,7 @@ export default {
this.loading = false
const res = response.data
this.total = res.total
console.log(this.tableData)
// console.log(this.tableData)
this.tableData = res.rows.map(item => {
if (item.整改类型 === '1') {
item.整改类型 = '新增'
@@ -744,6 +966,40 @@ export default {
this.total4 = response.data.total
})
},
searchTable5() { // 查询标准件
let check0, check1, check2
this.projectName ? check2 = 1 : check2 = 0
this.machineName ? check0 = 1 : check0 = 0
this.groupName ? check1 = 1 : check1 = 0
searchTable5(this.pageCurrent6, this.pageSize6, check2, this.projectName, check0, this.machineName, check1, this.groupName).then(response => {
console.log(response, 5, this.activeName)
this.tableData5 = response.data.rows
this.total5 = response.data.total
})
},
searchTable6() { // 查询基本件
let check0, check1, check2
this.projectName ? check2 = 1 : check2 = 0
this.machineName ? check0 = 1 : check0 = 0
this.groupName ? check1 = 1 : check1 = 0
// console.log(this.projectName, this.machineName, this.groupName, 44)
searchTable6(this.pageCurrent6, this.pageSize6, check2, this.projectName, check0, this.machineName, check1, this.groupName).then(response => {
console.log(response, 6)
this.tableData6 = response.data.rows
this.total6 = response.data.total
})
},
searchTable7() { // 查询外购件
let check0, check1, check2
this.projectName ? check2 = 1 : check2 = 0
this.machineName ? check0 = 1 : check0 = 0
this.groupName ? check1 = 1 : check1 = 0
searchTable7(this.pageCurrent7, this.pageSize7, check2, this.projectName, check0, this.machineName, check1, this.groupName).then(response => {
console.log(response, 7)
this.tableData7 = response.data.rows
this.total7 = response.data.total
})
},
handleEdit(row) {
this.BasicParts = ''
this.PurchaseData = ''
@@ -842,6 +1098,22 @@ export default {
})
}
},
handleDelete5(row) {
if (row.id) {
this.deleteRow(deleteBasicParts5, row.id, function() {
this.searchTable5()
this.searchTable6()
})
}
},
handleDelete6(row) {
if (row.id) {
this.deleteRow(deleteBasicParts6, row.id, function() {
this.searchTable5()
this.searchTable6()
})
}
},
handleSizeChanges(val) {
this.pageCurrent = 1
this.pageSize = val
@@ -895,6 +1167,33 @@ export default {
handleCurrentChange4(val) {
this.pageCurrent4 = val
this.searchTable2()
},
handleSizeChange5(val) {
this.pageSize5 = val
this.pageCurrent5 = 1
this.searchTable5()
},
handleCurrentChange5(val) {
this.pageCurrent5 = val
this.searchTable5()
},
handleSizeChange6(val) {
this.pageSize6 = val
this.pageCurrent6 = 1
this.searchTable6()
},
handleCurrentChange6(val) {
this.pageCurrent6 = val
this.searchTable6()
},
handleSizeChange7(val) {
this.pageSize7 = val
this.pageCurrent7 = 1
this.searchTable7()
},
handleCurrentChange7(val) {
this.pageCurrent7 = val
this.searchTable7()
}
}
}