项目管理

This commit is contained in:
liushuai
2019-04-16 18:36:29 +08:00
parent 5f2d820671
commit 20de11ab5e
3 changed files with 57 additions and 6 deletions

View File

@@ -21,6 +21,30 @@ export function getToolNum(check, num) {
} }
}) })
} }
// 组件查询
export function searchgroup(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据',
param: '机床流水号=' + num
}
})
}
// 组件名称查询
export function searchgroupName(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_组件名称_查询数据_查询名称',
param: '组件流水号=' + num
}
})
}
export function getCustomerName() { export function getCustomerName() {
return request({ return request({
url: '', url: '',
@@ -72,7 +96,7 @@ export function editTable2(num1, num2, num3, num4, num5, num6, num7, num8, num9,
data: { data: {
type: '2', type: '2',
name: '项目计划管理_项目详细计划_编辑数据', name: '项目计划管理_项目详细计划_编辑数据',
param: `组件计划流水号=` + num1 + '&组号=' + num2 + '&任务名称=' + num3 + '&负责人=' + num4 + '&接收任务时间=' + num5 + '&任务开始时间=' + num6 + '&计划完成时间=' + num7 + '&货期=' + num8 + '&实际完成时间=' + num9 + '&备注=' + num10 param: `组件计划流水号=` + num1 + '&组件流水号=' + num2 + '&任务名称=' + num3 + '&负责人=' + num4 + '&接收任务时间=' + num5 + '&任务开始时间=' + num6 + '&计划完成时间=' + num7 + '&货期=' + num8 + '&实际完成时间=' + num9 + '&备注=' + num10
} }
}) })
} }

View File

@@ -20,7 +20,7 @@ const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`, baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`, // baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间

View File

@@ -188,7 +188,13 @@
<el-table-column min-width="100px" label="组号" align="center"> <el-table-column min-width="100px" label="组号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.edit"> <template v-if="scope.row.edit">
<el-input v-model="scope.row.组号" size="mini" style="width: 100%"/> <el-select v-model="scope.row.组件流水号" filterable clearable size="small" style="width: 100px" @change="groupChange(scope.row, scope.$index)">
<el-option
v-for="item in groupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</template> </template>
<template v-else> <template v-else>
{{ scope.row.组号 }} {{ scope.row.组号 }}
@@ -257,7 +263,7 @@
</el-table-column> </el-table-column>
<el-table-column label="实际完成时间" align="center" width="150px"> <el-table-column label="实际完成时间" align="center" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.edit"> <template v-if="scope.row.edit && !scope.row.组件流水号">
<el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/> <el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template> </template>
<template v-else> <template v-else>
@@ -289,7 +295,7 @@
</template> </template>
<script> <script>
import { getProject, getCustomerName, getToolNum, searchtable, editTable, searchTable2, editTable2, Delete, addTable } from '@/api/ManufacturingCenter/ProjectPlanningManagement' import { getProject, getCustomerName, getToolNum, searchtable, editTable, searchTable2, editTable2, Delete, addTable, searchgroup, searchgroupName } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
export default { export default {
data() { data() {
return { return {
@@ -309,6 +315,7 @@ export default {
CustomerName: [], // 客户名称 CustomerName: [], // 客户名称
toolNumValue: '', toolNumValue: '',
toolNum: [], // 机床 toolNum: [], // 机床
groupNum: [],
loading: false, loading: false,
tableData: [], // 表格数据 tableData: [], // 表格数据
total: null, // 总条数 total: null, // 总条数
@@ -349,6 +356,15 @@ export default {
}) })
} }
}, },
groupChange(row, index) {
console.log(row.组件流水号)
if (row.组件流水号 !== '') {
searchgroupName(row.组件流水号).then(response => {
console.log(response.data)
this.tableData2[index].任务名称 = response.data[0].组件名称
})
}
},
getCustomerName() { getCustomerName() {
this.CustomerNameValue = '' this.CustomerNameValue = ''
this.CustomerName = [] this.CustomerName = []
@@ -459,6 +475,15 @@ export default {
} else if (this.code === 5) { } else if (this.code === 5) {
this.title = '装配' this.title = '装配'
} }
this.groupNum = []
searchgroup(row.机床流水号).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNum.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
searchTable2(row.机床流水号, this.code).then(response => { searchTable2(row.机床流水号, this.code).then(response => {
this.jichuang = row.机床流水号 this.jichuang = row.机床流水号
if (response.data.length === 0) { if (response.data.length === 0) {
@@ -484,6 +509,7 @@ export default {
edit: false, edit: false,
组件计划流水号: response.data[i].组件计划流水号, 组件计划流水号: response.data[i].组件计划流水号,
机床流水号: response.data[i].机床流水号, 机床流水号: response.data[i].机床流水号,
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号, 组号: response.data[i].组号,
任务名称: response.data[i].任务名称, 任务名称: response.data[i].任务名称,
负责人: response.data[i].负责人, 负责人: response.data[i].负责人,
@@ -538,6 +564,7 @@ export default {
edit: false, edit: false,
组件计划流水号: response.data[i].组件计划流水号, 组件计划流水号: response.data[i].组件计划流水号,
机床流水号: response.data[i].机床流水号, 机床流水号: response.data[i].机床流水号,
组件流水号: response.data[i].组件流水号,
组号: response.data[i].组号, 组号: response.data[i].组号,
任务名称: response.data[i].任务名称, 任务名称: response.data[i].任务名称,
负责人: response.data[i].负责人, 负责人: response.data[i].负责人,
@@ -556,7 +583,7 @@ export default {
}, },
// 表格2保存 // 表格2保存
confirmEdit2(row) { confirmEdit2(row) {
editTable2(row.组件计划流水号, row.组号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => { editTable2(row.组件计划流水号, row.件流水, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
row.edit = false row.edit = false
this.$notify({ this.$notify({