This commit is contained in:
liushuai
2020-04-25 18:03:21 +08:00
5 changed files with 74 additions and 19 deletions

View File

@@ -146,3 +146,16 @@ export function addTable(num1, num2, num3) {
}
})
}
// 获取人员
export function personalNumber(num) {
return request({
url: '',
method: 'post',
data: {
UserID: state.state.user.id,
ModularID: router.currentRoute.path,
type: '1',
name: '项目计划管理_获取人员_查询'
}
})
}

View File

@@ -21,7 +21,6 @@
<!-- <h3 style="display: inline-block;margin: 0 0 0 20px">客户名称:</h3> -->
<el-input v-model="CustomerNameValue" placeholder="客户名称" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="primary" plain style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-button size="small" style="margin: 0px 0px 3px 680px" type="success" icon="el-icon-edit-outline" plain @click="limit1()">保存</el-button>
</el-row>
<el-row v-if="false">
<h3 style="display: inline-block;margin: 0">签订日期:</h3>
@@ -133,7 +132,14 @@
</el-col>
<el-col style="width: 180px;margin-left: 20px">
<el-form-item label="设计者" prop="设计者" >
<el-input v-model="设计者" placeholder="设计者" clearable size="small" style="width: 180px"/>
<el-select v-model="设计者" filterable clearable size="small" style="width: 180px" placeholder="设计者">
<el-option
v-for="item in personalNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input v-model="设计者" placeholder="设计者" clearable size="small" style="width: 180px"/>-->
</el-form-item>
</el-col>
</el-row>
@@ -240,6 +246,7 @@
<span v-if="radio==='4'" style="float:left;margin: 10px 0 10px 0">子计划{{ machineNum }} 制造</span>
<span v-if="radio==='5'" style="float:left;margin: 10px 0 10px 0">子计划{{ machineNum }} 装配</span>
<el-button size="small" icon="el-icon-circle-plus" type="warning" style="float:right;margin: 5px 100px 3px 0px" plain @click="addTable()">计划</el-button>
<el-button size="small" style="float:right;margin: 5px 20px 3px 0px" type="success" icon="el-icon-edit-outline" plain @click="limit1()">保存</el-button>
<el-table v-loading="loading2" :data="tableData2" style="margin-top: 10px;width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column min-width="100px" label="组号" align="center">
<template slot-scope="scope">
@@ -270,7 +277,14 @@
<el-table-column min-width="100px" label="负责人" align="center">
<template slot-scope="scope">
<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: 100%" placeholder="负责人">
<el-option
v-for="item in personalNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input v-model="scope.row.负责人" size="mini" style="width: 100%"/>-->
</template>
<template v-else>
{{ scope.row.负责人 }}
@@ -352,12 +366,15 @@
</template>
<script>
import { getProject, getCustomerName, searchgroupName, getToolNum, searchtable, editTable, searchTable2, searchgroup, addTable, editTable2, Delete } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
import { personalNumber, getProject, getCustomerName, searchgroupName, getToolNum, searchtable, editTable, searchTable2, searchgroup, addTable, editTable2, Delete } from '@/api/ManufacturingCenter/ProjectPlanningManagement'
import { mapGetters } from 'vuex'
export default {
data() {
return {
personalNumberValue1: '',
personalNumberValue2: '',
personalNumber: [],
empty: '',
radio: '',
项目流水号: '',
@@ -427,6 +444,17 @@ export default {
})
}
})
this.personalNumber = []
this.personalNumberValue1 = ''
this.personalNumberValue2 = ''
personalNumber().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.personalNumber.push({
label: response.data[i].姓名,
value: response.data[i].姓名
})
}
})
},
typeChange() {
this.toolNumValue = ''
@@ -572,6 +600,7 @@ export default {
} else if (!this.装配完成) {
this.$message.error('请选择装配完成时间')
} else {
console.log(this.审图结束, this.审图开始)
if (this.审图结束 < this.审图开始) {
this.$message.error('审图结束时间应大于审图开始时间')
} else if (this.发图完成 < this.审图结束) {
@@ -766,19 +795,23 @@ export default {
} else if (row.计划完成时间 < row.任务开始时间) {
this.$message.error('计划完成时间应大于任务开始时间')
} else {
editTable2(row.组件计划流水号, row.组件流水号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
if (response.data[0].result === '1') {
row.edit = false
this.$notify({
title: '成功',
message: '信息修改成功',
type: 'success'
})
this.searchTable2()
} else {
this.$message.error('信息修改失败')
}
})
if (row.组件流水号 && row.任务名称 && row.负责人 && row.接收任务时间 && row.任务开始时间 && row.计划完成时间 && row.货期) {
editTable2(row.组件计划流水号, row.组件流水号, row.任务名称, row.负责人, row.接收任务时间, row.任务开始时间, row.计划完成时间, row.货期, row.实际完成时间, row.备注).then(response => {
if (response.data[0].result === '1') {
row.edit = false
this.$notify({
title: '成功',
message: '信息修改成功',
type: 'success'
})
this.searchTable2()
} else {
this.$message.error('信息修改失败')
}
})
} else {
this.$message.error('请未输入项')
}
}
},
// 表格2取消

View File

@@ -271,6 +271,8 @@ export default {
this.$message.success('执行成功')
// 记录付款金额及时间
this.searchTable1()
this.gridData1 = []
this.contractDetail2 = []
} else { this.$message.error('执行失败') }
})
}).catch(() => {
@@ -289,6 +291,8 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
this.gridData1 = []
this.contractDetail2 = []
} else { this.$message.error('执行失败') }
})
}).catch(() => {

View File

@@ -684,7 +684,7 @@ export default {
addInStoreRecord() {
if (this.applyOrderNum) {
this.searchTable01()
this.title2 = '追加入库'
this.title2 = '追加到票'
this.dialogVisible2 = true
} else {
this.$message.error('请选择到票!')

View File

@@ -96,6 +96,11 @@
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="利用库存数" width="100px">
<template slot-scope="scope">
{{ scope.row.使用库存数 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量" width="100px">
<template slot-scope="scope">
{{ scope.row.采购数量 }}
@@ -330,7 +335,7 @@
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量" width="100px">
<el-table-column align="center" label="采购数量" width="100px">
<template slot-scope="scope">
{{ scope.row.采购数量 }}
{{ parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!=='' ? '—' : scope.row.数量 || '—' }}