项目计划管理查询
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
<!-- <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="editPro()">保存</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>
|
||||
@@ -36,7 +36,7 @@
|
||||
<el-col style="width: 1325px;">
|
||||
<el-card>
|
||||
<!--<h2 style="display: inline-block;margin: 0 0 10px 0">总计划:</h2>-->
|
||||
<el-table v-loading="loading" :data="tableData" height="355" highlight-current-row style="margin-top: 5px;width: 100%;" border element-loading-text="拼命加载中" @row-click="rowClick">
|
||||
<el-table v-loading="loading" :data="tableData" height="315" highlight-current-row style="margin-top: 5px;width: 100%;" border element-loading-text="拼命加载中" @row-click="rowClick">
|
||||
<el-table-column label="项目编号" align="center" width="170px" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
@@ -97,11 +97,16 @@
|
||||
{{ scope.row.项目计划制定人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="修改时间" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.修改时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" label="操作" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||
<el-button v-if="scope.row.edit" type="primary" size="small" @click="scope.row.edit=!scope.row.edit">取消</el-button>
|
||||
<el-button v-if="scope.row.edit" type="primary" size="small" @click="cennel(scope.row)">取消</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -212,17 +217,17 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col style="width: 20px">
|
||||
<!--<el-radio v-model="radio" label="9">{{ empty }}</el-radio>-->
|
||||
</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-date-picker v-model="更新时间" size="small" value-format="yyyy-MM-dd" type="date" style="width: 150px" placeholder="更新时间" class="time"/>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>-->
|
||||
<!--<el-col style="width: 20px">-->
|
||||
<!--<!–<el-radio v-model="radio" label="9">{{ empty }}</el-radio>–>-->
|
||||
<!--</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-date-picker v-model="更新时间" size="small" value-format="yyyy-MM-dd" type="date" style="width: 150px" placeholder="更新时间" class="time"/>–>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-col>
|
||||
@@ -336,7 +341,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.edit" type="text" size="small" @click="confirmEdit2(scope.row)">确定</el-button>
|
||||
<el-button v-else type="text" size="small" icon="el-icon-edit-outline" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
|
||||
<el-button v-if="scope.row.edit" type="text" size="small" @click="scope.row.edit=!scope.row.edit">取消</el-button>
|
||||
<el-button v-if="scope.row.edit" type="text" size="small" @click="cennel(scope.row)">取消</el-button>
|
||||
<el-button v-else type="text" size="small" icon="el-icon-delete" @click="Delete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -512,6 +517,7 @@ export default {
|
||||
审图实际完成时间: response.data.rows[i].审图实际完成时间,
|
||||
完成顺序: response.data.rows[i].完成顺序,
|
||||
更新: response.data.rows[i].更新,
|
||||
修改时间: response.data.rows[i].修改时间,
|
||||
项目流水号: response.data.rows[i].项目流水号,
|
||||
机床流水号: response.data.rows[i].机床流水号,
|
||||
项目生成: response.data.rows[i].项目生成,
|
||||
@@ -544,9 +550,50 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表1 保存判断
|
||||
limit1() {
|
||||
if (this.项目流水号) {
|
||||
if (!this.设计者) {
|
||||
this.$message.error('请输入设计者')
|
||||
} else if (!this.项目编号) {
|
||||
this.$message.error('请输入项目编号')
|
||||
} else if (!this.审图开始) {
|
||||
this.$message.error('请选择审图开始时间')
|
||||
} else if (!this.审图结束) {
|
||||
this.$message.error('请选择审图结束时间')
|
||||
} else if (!this.发图完成) {
|
||||
this.$message.error('请选择发图完成始时间')
|
||||
} else if (!this.采购完成) {
|
||||
this.$message.error('请选择采购完成时间')
|
||||
} else if (!this.备料完成) {
|
||||
this.$message.error('请选择备料完成时间')
|
||||
} else if (!this.制造完成) {
|
||||
this.$message.error('请选择制造完成时间')
|
||||
} else if (!this.装配完成) {
|
||||
this.$message.error('请选择装配完成时间')
|
||||
} else {
|
||||
if (this.审图结束 < this.审图开始) {
|
||||
this.$message.error('审图结束时间应大于审图开始时间')
|
||||
} else if (this.发图完成 < this.审图结束) {
|
||||
this.$message.error('发图完成时间应大于审图结束时间')
|
||||
} else if (this.采购完成 < this.发图完成) {
|
||||
this.$message.error('采购完成时间应大于发图完成时间')
|
||||
} else if (this.备料完成 < this.发图完成) {
|
||||
this.$message.error('备料完成时间应大于发图完成时间')
|
||||
} else if (this.制造完成 < this.发图完成) {
|
||||
this.$message.error('制造完成时间应大于发图完成时间')
|
||||
} else if (this.装配完成 < this.制造完成) {
|
||||
this.$message.error('装配完成时间应大于制造完成时间')
|
||||
} else {
|
||||
this.editPro()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.error('请先选择项目')
|
||||
}
|
||||
},
|
||||
// 表格1保存
|
||||
editPro() {
|
||||
if (this.项目流水号) {
|
||||
this.审图开始 ? this.审图开始 : this.审图开始 = null
|
||||
this.审图结束 ? this.审图结束 : this.审图结束 = null
|
||||
this.发图完成 ? this.发图完成 : this.发图完成 = null
|
||||
@@ -566,9 +613,6 @@ export default {
|
||||
this.$message.error('信息修改失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请先选择项目')
|
||||
}
|
||||
},
|
||||
// 查询表格2数据
|
||||
openDialog() {
|
||||
@@ -595,7 +639,6 @@ export default {
|
||||
}
|
||||
})
|
||||
searchTable2(this.机床流水号, this.radio).then(response => {
|
||||
console.log('')
|
||||
if (response.data.length === 0) {
|
||||
this.loading2 = false
|
||||
} else {
|
||||
@@ -628,7 +671,16 @@ export default {
|
||||
计划完成时间: 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].计划完成时间,
|
||||
货期_原: response.data[i].货期,
|
||||
实际完成时间_原: response.data[i].实际完成时间,
|
||||
备注_原: response.data[i].备注
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -690,7 +742,16 @@ export default {
|
||||
计划完成时间: 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].计划完成时间,
|
||||
货期_原: response.data[i].货期,
|
||||
实际完成时间_原: response.data[i].实际完成时间,
|
||||
备注_原: response.data[i].备注
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -700,6 +761,11 @@ export default {
|
||||
},
|
||||
// 表格2保存
|
||||
confirmEdit2(row) {
|
||||
if (row.任务开始时间 < row.接收任务时间) {
|
||||
this.$message.error('任务开始时间应大于接收任务时间')
|
||||
} 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
|
||||
@@ -713,6 +779,20 @@ export default {
|
||||
this.$message.error('信息修改失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 表格2取消
|
||||
cennel(row) {
|
||||
row.组号 = row.组号_原
|
||||
row.任务名称 = row.任务名称_原
|
||||
row.负责人 = row.负责人_原
|
||||
row.接收任务时间 = row.接收任务时间_原
|
||||
row.任务开始时间 = row.任务开始时间_原
|
||||
row.计划完成时间 = row.计划完成时间_原
|
||||
row.货期 = row.货期_原
|
||||
row.实际完成时间 = row.实际完成时间_原
|
||||
row.备注 = row.备注_原
|
||||
row.edit = !row.edit
|
||||
},
|
||||
// 表格2删除
|
||||
Delete(row) {
|
||||
|
||||
Reference in New Issue
Block a user