Browse Source

2024.8.9 ①产品文档收集-项目信息进一步优化

②代办事宜功能第一版

------------------------
进一步优化
java8
yuejiayang 2 years ago
parent
commit
a436cc0189
  1. 4
      src/api/eam/eamProject.js
  2. 2
      src/views/modules/common/uploadFileList1.vue
  3. 15
      src/views/modules/eam/com_project_proof_record.vue
  4. 221
      src/views/modules/eam/eamProjectInfo.vue
  5. 2
      src/views/modules/eam/eamProjectInfoForConfirm.vue
  6. 2
      src/views/modules/eam/eamProjectInfoForUploads.vue
  7. 399
      src/views/modules/eam/eamProjectPartInfo.vue

4
src/api/eam/eamProject.js

@ -5,14 +5,16 @@ export const eamProjectInfoSave= data => createAPI(`/pms/eamProject/eamProjectIn
export const eamProjectInfoEdit= data => createAPI(`/pms/eamProject/eamProjectInfoEdit`,'post',data)
export const eamProjectInfoDelete= data => createAPI(`/pms/eamProject/eamProjectInfoDelete`,'post',data)
export const saveFormalPartNo= data => createAPI(`/pms/eamProject/saveFormalPartNo`,'post',data)
export const getFinalPartDesc= data => createAPI(`/pms/eamProject/getFinalPartDesc`,'post',data)
export const getTestPartNo= data => createAPI(`/pms/eamProject/getTestPartNo`,'post',data)
export const eamProjectPartSearch= data => createAPI(`/pms/eamProject/eamProjectPartSearch`,'post',data)
export const eamProjectPartInfoSave= data => createAPI(`/pms/eamProject/eamProjectPartInfoSave`,'post',data)
export const eamProjectPartInfoEdit= data => createAPI(`/pms/eamProject/eamProjectPartInfoEdit`,'post',data)
export const saveNewProjectPart= data => createAPI(`/pms/eamProject/saveNewProjectPart`,'post',data)
export const eamProjectPartInfoDelete= data => createAPI(`/pms/eamProject/eamProjectPartInfoDelete`,'post',data)
export const searchConfirmatorList= data => createAPI(`/pms/eamProject/searchConfirmatorList`,'post',data)
export const saveProductionValidationDocumentConfirmator= data => createAPI(`/pms/eamProject/saveProductionValidationDocumentConfirmator`,'post',data)
export const saveProductionValidationDocument= data => createAPI(`/pms/eamProject/saveProductionValidationDocument`,'post',data)
export const deleteConfirmatorInformation= data => createAPI(`/pms/eamProject/deleteConfirmatorInformation`,'post',data)
export const deleteDocumentInformation= data => createAPI(`/pms/eamProject/deleteDocumentInformation`,'post',data)
export const checkProductionValidationDocument= data => createAPI(`/pms/eamProject/checkProductionValidationDocument`,'post',data)
export const checkConfirmationRecord= data => createAPI(`/pms/eamProject/checkConfirmationRecord`,'post',data)

2
src/views/modules/common/uploadFileList1.vue

@ -252,7 +252,7 @@ export default {
this.fileName = '';
this.noType = '';
EventBus.$emit('updateAgencyMatterForUploads');
EventBus.$emit('updateProjectPartInfo');
EventBus.$emit('updateProjectPartDocumentInfo');
// this.$emit('get-document-list');
// this.$emit('get-proof-document');
} else {

15
src/views/modules/eam/com_project_proof_record.vue

@ -3,13 +3,13 @@
<div class="container">
<el-row>
<el-col class="left-section" :span="12">
<div class="table-container" style="height: 214px;margin-top: -10px">
<div class="table-container" style="height: 100%;margin-top: -5px">
<p style="margin-top: -5px">打样记录</p>
<el-table
:data="dataList"
border
style="width: 100%;margin-top: -10px;"
:height="this.height - 14"
style="width: 100%;margin-top: -5px;"
:height="this.height - 38"
highlight-current-row
ref="proofingTable"
@row-click="proofDocumentClickRow"
@ -47,14 +47,14 @@
</div>
</el-col>
<el-col :span="12" class="right-section" >
<el-tabs style="font-size: 12px;margin-top: -10px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
<el-tabs style="font-size: 12px;margin-top: -5px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="打样文档" name="proofDocument">
<el-button type="primary" icon="el-icon-upload" v-if="isUpload" style="margin-top: -3px;" @click="uploadOtherDocument()">上传其他文档</el-button>
<el-table
:data="proofDocumentList"
border
style="width: 100%;margin-top: 5px;"
:height="height - 64"
:height="this.height - 79"
ref="proofDocumentTable"
@row-click="uploadDocumentClickRow"
@current-change="changeCurrentRow1"
@ -1542,15 +1542,10 @@
this.extraDocumentList = []
},
newProofingDocument(proofingId) {
console.log(proofingId)
this.modalData.proofingId = proofingId
proofingDocumentSave(this.modalData).then(({data}) => {
//
if (data && data.code === 0) {
this.$message({
message: '新增成功',
type: 'success'
})
this.documentListVisible = false
//
this.refreshCurrentTabTable()

221
src/views/modules/eam/eamProjectInfo.vue

@ -74,13 +74,13 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item :label="' '">
<el-button v-if="!authSearch" @click="agencyMatter()">查询</el-button>
<el-button v-if="!authSave" type="primary" @click="addModal()">新增</el-button>
<el-button @click="agencyMatter()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
</el-form-item>
</el-form>
<el-table
:height="height + 110"
:height="this.height + 100"
:data="dataList"
ref="mainTable"
highlight-current-row
@ -111,7 +111,7 @@
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="addProjectPartModal(scope.row)">新增产品</a>
<a v-if="scope.row.status !== '已结案'" type="text" size="small" @click="updateModal(scope.row)">修改</a>
<a v-if="scope.row.status !== '已量产'" type="text" size="small" @click="updateModal(scope.row)">修改</a>
<a type="text" size="small" @click="eamProjectInfoDelete(scope.row)">删除</a>
</template>
</el-table-column>
@ -153,9 +153,12 @@
<el-form-item label="项目编码" prop="projectNo" :rules="rules.projectNo">
<el-input v-model="modalData.projectNo" :disabled="modalPartDisableFlag" style="width: 110px"></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectDesc" :rules="rules.projectDesc">
<el-form-item label="项目名称" prop="projectDesc" v-if="!modalPartDisableFlag" :rules="rules.projectDesc">
<el-input v-model="modalData.projectDesc" :disabled="modalPartDisableFlag" style="width: 170px"></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectDesc" v-if="modalPartDisableFlag" :rules="rules.projectDesc">
<el-input v-model="modalData.projectDesc" :disabled="modalPartDisableFlag" style="width: 294px"></el-input>
</el-form-item>
<el-form-item label="区域" prop="cProjectRegion" v-if="!modalPartDisableFlag" :rules="rules.cProjectRegion">
<el-select v-model="modalData.cProjectRegion" placeholder="请选择" :disabled="modalPartDisableFlag" clearable style="width: 110px">
<el-option
@ -635,13 +638,13 @@
</el-footer>
</el-dialog>
<el-tabs style="margin-top: 0px; width: 100%; height: 250px;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">
<el-tabs style="height:100%; margin-top: 0px; width: 100%;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">
<el-tab-pane label="项目物料" name="projectPart">
<el-table
:data="projectPartList"
border
style="width: 100%;margin-top: 5px;"
:height="height + 128"
:height="this.height + 128"
ref="projectPartTable"
:row-style="rowStyle"
v-loading="dataListLoading">
@ -654,6 +657,7 @@
<template slot-scope="scope">
<a type="text" size="small" @click="updatePartModal(scope.row)">编辑</a>
<a type="text" size="small" @click="toMes(scope.row)">详情</a>
<a type="text" size="small" @click="deletePartModal(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column
@ -704,6 +708,7 @@ import {
} from "@/api/eam/eamProject.js";
import UploadFileList1 from "../common/uploadFileList1.vue";
import {
eamProjectPartInfoDelete,
eamProjectPartInfoEdit,
eamProjectPartInfoSave,
eamProjectPartSearch
@ -1339,42 +1344,7 @@ import {EventBus} from "../../../main";
},
],
columnPartList: [
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1ProjectId',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'projectNo',
headerAlign: "center",
align: "center",
columnLabel: '项目编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1ProjectDesc',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: 'projectDesc',
headerAlign: "center",
align: "center",
columnLabel: '项目名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
@ -1411,42 +1381,6 @@ import {EventBus} from "../../../main";
fixed: '',
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1customerNo',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: "customerNo",
headerAlign: "center",
align: "left",
columnLabel: "客户编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
serialNumber: '101001014Table1customerDesc',
tableId: "101001014Table1",
tableName: "项目信息表",
columnProp: "customerDesc",
headerAlign: "center",
align: "left",
columnLabel: "客户名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 101001014,
@ -2055,7 +1989,10 @@ import {EventBus} from "../../../main";
priority: 'Low',
},
{
priority: 'Risk',
priority: 'Middle',
},
{
priority: 'High',
},
],
statusList: [
@ -2066,7 +2003,7 @@ import {EventBus} from "../../../main";
status: '进行中',
},
{
status: '已结案',
status: '已量产',
}
],
userBuList: [],
@ -2445,49 +2382,70 @@ import {EventBus} from "../../../main";
// }
if (this.modalData.flag === '1') {
if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
this.$message.warning('预计完成日期不能小于当前日期!')
return
}
this.modalData.status = '草稿'
eamProjectInfoSave(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.modalFlag=false
EventBus.$emit('updateProjectPartInfo')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {},
this.$confirm('预计完成日期小于当前日期,确定继续保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.modalData.status = '草稿'
eamProjectInfoSave(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.modalFlag=false
EventBus.$emit('updateProjectPartInfo')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {},
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
}).catch(() => {
//
this.$message({
type: 'info',
message: '已取消操作'
})
}
})
})
}
} else if (this.modalData.flag === '2'){
if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
this.$message.warning('预计完成日期不能小于当前日期!')
return
}
eamProjectInfoEdit(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.modalFlag=false
EventBus.$emit('updateProjectPartInfo')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
this.$confirm('预计完成日期小于当前日期,确定继续保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
eamProjectInfoEdit(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.modalFlag=false
EventBus.$emit('updateProjectPartInfo')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
})
).catch(() => {
//
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
} else if (this.modalData.flag === '3') {
if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
this.$message.warning('请输入项目料号!')
@ -2694,6 +2652,7 @@ import {EventBus} from "../../../main";
FQCRowDblclick (row) {
this.modalData.cQualityEngineer3 = row.username + '-' + row.userDisplay
this.modalData.cQualityEngineer3Name = this.modalData.cQualityEngineer3.split('-')[1] //
this.FQCFlag = false
},
MFGRowDblclick (row) {
this.modalData.cManufactureEngineer = row.username + '-' + row.userDisplay
@ -2837,6 +2796,32 @@ import {EventBus} from "../../../main";
this.$router.push({ path: 'eam-eamProjectPartInfo', query: { testPartNo: row.testPartNo }})
},
deletePartModal (row) {
this.$confirm(`是否删除这个项目料号信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
eamProjectPartInfoDelete(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
EventBus.$emit('updateProjectPartInfo')
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
//
async getTableUserColumn(tableId, columnId) {
let queryTableUser = {

2
src/views/modules/eam/eamProjectInfoForConfirm.vue

@ -787,7 +787,7 @@ export default {
status: '进行中',
},
{
status: '已结案',
status: '已量产',
}
],
};

2
src/views/modules/eam/eamProjectInfoForUploads.vue

@ -901,7 +901,7 @@ export default {
status: '进行中',
},
{
status: '已结案',
status: '已量产',
}
],
};

399
src/views/modules/eam/eamProjectPartInfo.vue

@ -80,12 +80,12 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item :label="' '">
<el-button v-if="!authSearch" @click="agencyMatter()">查询</el-button>
<el-button @click="agencyMatter()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="height + 110"
:height="this.height + 100"
:data="dataList"
ref="mainTable"
highlight-current-row
@ -112,14 +112,13 @@
fixed="right"
header-align="center"
align="center"
width="160"
width="180"
label="操作">
<template slot-scope="scope">
<a v-if="scope.row.status === '草稿'" type="text" size="small" @click="updateModalStatus(scope.row)">下达</a>
<a v-if="scope.row.status === '进行中'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
<a v-if="scope.row.status === '进行中'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
<a v-if="scope.row.status === '进行中'" type="text" size="small" @click="updateModalStatus(scope.row)">结案</a>
<p v-if="scope.row.status === '已结案'" type="text" size="small" style="margin-top: 0px;color: red">已结案</p>
<a v-if="scope.row.status !== '草稿'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
<a v-if="scope.row.status !== '草稿'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
<a v-if="scope.row.status === '进行中'" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
</template>
</el-table-column>
</el-table>
@ -134,19 +133,24 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog title="转正式料号" :visible.sync="formalPartNoFlag" width="639px" v-drag>
<el-dialog title="转正式料号" :visible.sync="formalPartNoFlag" width="421px" v-drag :close-on-click-modal="false">
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="客户编码" prop="customerNo" >
<el-input v-model="modalData.customerNo" readonly style="width: 110px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="客户名称" prop="customerDesc" >
<el-input v-model="modalData.customerDesc" readonly style="width: 260px;" class="red-text"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="项目编码" prop="projectNo" >
<el-input v-model="modalData.projectNo" readonly style="width: 110px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectDesc" >
<el-input v-model="modalData.projectDesc" readonly style="width: 170px;" class="red-text"></el-input>
<el-input v-model="modalData.projectDesc" readonly style="width: 160px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="客户编码" prop="customerNo" >
<el-input v-model="modalData.customerNo" readonly style="width: 110px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="客户名称" prop="customerDesc" >
<el-input v-model="modalData.customerDesc" readonly style="width: 170px;" class="red-text"></el-input>
<el-form-item label="BU" prop="bu" >
<el-input v-model="modalData.bu" readonly style="width: 86px;" class="red-text"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
@ -154,18 +158,17 @@
<el-input v-model="modalData.testPartNo" readonly style="width: 110px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="料号描述" prop="partDesc" >
<el-input v-model="modalData.partDesc" readonly style="width: 170px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="BU" prop="bu" >
<el-input v-model="modalData.bu" readonly style="width: 100px;" class="red-text"></el-input>
<el-input v-model="modalData.partDesc" readonly style="width: 260px;" class="red-text"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="ERP正式料号" prop="finalPartNo" :rules="rules.finalPartNo">
<el-input v-model="modalData.finalPartNo" style="width: 110px"></el-input>
<el-input v-model="modalData.finalPartNo"
@blur="getFinalPartDesc()"
style="width: 110px"></el-input>
</el-form-item>
<el-form-item label="ERP正式料号描述" prop="finalPartDesc" :rules="rules.finalPartDesc">
<el-input v-model="modalData.finalPartDesc" style="width: 170px"></el-input>
<el-form-item label="ERP正式料号描述" prop="finalPartDesc">
<el-input v-model="modalData.finalPartDesc" readonly style="width: 260px" class="red-text"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
@ -174,18 +177,18 @@
</el-footer>
</el-dialog>
<el-tabs style="margin-top: 0px; width: 100%; height: 250px;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">
<el-tabs style="margin-top: 0px; width: 100%; height: 100%;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">
<el-tab-pane label="打样记录" name="proofRecord" style="margin-left: -10px">
<proofRecord ref="proofRecord"></proofRecord>
</el-tab-pane>
<el-tab-pane label="转量产阶段文档" name="massProductionStage">
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="uploadOtherDocument()">上传其他文档</el-button>
<el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿'" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>
<el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿'" icon="el-icon-upload" style="margin-top: -5px" @click="uploadOtherDocument()">上传其他文档</el-button>
<el-table
:data="projectOtherDocumentList"
border
style="width: 100%;margin-top: 5px;"
:height="height + 128"
:height="this.height + 110"
ref="proofDocumentTable"
@row-click="projectOtherDocumentClickRow"
@current-change="changeCurrentRow1"
@ -227,12 +230,12 @@
</el-table>
</el-tab-pane>
<el-tab-pane label="所有文档" name="allDocument">
<el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="projectProductionValidationDocument()">选择生产确认文档</el-button>
<el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿'" icon="el-icon-upload" style="margin-top: -5px" @click="projectProductionValidationDocument()">选择生产确认文档</el-button>
<el-table
:data="projectAllDocumentList"
border
style="width: 100%;margin-top: 5px;"
:height="height + 128"
:height="this.height + 110"
ref="projectAllDocumentDocumentTable"
@row-click="projectAllDocumentClickRow"
v-loading="dataListLoading">
@ -263,12 +266,12 @@
<el-tab-pane label="生产文档确认进度" name="productionDocumentsConfirmProgress">
<el-row>
<el-col :span="8" class="left-section">
<div class="table-container" style="height: 214px;margin-top: -10px">
<div class="table-container" style="height: 100%;margin-top: -5px">
<p style="margin-top: -5px">文档清单</p>
<el-table :data="confirmProgressDocumentList"
border
style="width: 100%;margin-top: -10px;"
:height="this.height + 128">
style="width: 100%;margin-top: -5px;"
:height="this.height + 95">
<el-table-column header-align="center" align="center" width="50" prop="itemNo" label="序号"></el-table-column>
<el-table-column header-align="center" align="center" prop="documentType" label="文档类型"></el-table-column>
<el-table-column header-align="center" align="center" prop="fileName" label="文件名"></el-table-column>
@ -276,12 +279,12 @@
</div>
</el-col>
<el-col :span="15" class="right-section">
<div class="table-container" style="height: 214px;margin-top: -10px">
<div class="table-container" style="height: 100%;margin-top: -5px">
<p style="margin-top: -5px">推送人员清单</p>
<el-table :data="confirmProgressPusherList"
border
style="width: 100%;margin-top: -10px;"
:height="this.height + 128">
style="width: 100%;margin-top: -5px;"
:height="this.height + 95">
<el-table-column header-align="center" align="center" width="40" prop="itemNo" label="序号"></el-table-column>
<el-table-column header-align="center" align="center" width="70" prop="userDisplay" label="指定确认人"></el-table-column>
<el-table-column header-align="center" align="center" :formatter="formatDate" prop="wantedConfirmDate" label="要求确认日期"></el-table-column>
@ -298,8 +301,8 @@
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="viewDocumentFile(scope.row)">查看附件</a>
<a type="text" size="small" @click="confirmDocument(scope.row)">确认</a>
<a type="text" size="small" @click="viewDocumentFile(scope.row)">查看附件</a>
</template>
</el-table-column>
</el-table>
@ -536,13 +539,13 @@
</div>
</el-dialog>
<el-dialog title="确认" @close="closeUploadFileVisible" :visible.sync="confirmVisible" width="579px" style="margin-top: 0vh;height: 100%;" :close-on-click-modal="false">
<el-dialog title="确认" @close="closeUploadFileVisible" :visible.sync="confirmVisible" width="619px" style="margin-top: 0vh;height: 100%;" :close-on-click-modal="false">
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="项目编码" prop="projectNo" class="red-label">
<el-input v-model="modalData.projectNo" readonly style="width: 110px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="项目名称" prop="projectDesc" >
<el-input v-model="modalData.projectDesc" readonly style="width: 170px;" class="red-text"></el-input>
<el-input v-model="modalData.projectDesc" readonly style="width: 210px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="BU" prop="bu">
<el-input v-model="modalData.bu" readonly style="width: 110px;" class="red-text"></el-input>
@ -552,23 +555,29 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="项目料号" prop="testPartNo" >
<el-input v-model="modalData.testPartNo" readonly style="width: 110px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="料号描述" prop="partDesc" >
<el-input v-model="modalData.partDesc" readonly style="width: 210px;" class="red-text"></el-input>
</el-form-item>
<el-form-item label="指定确认人" prop="userDisplay">
<el-input v-model="confirmData.userDisplay" readonly style="width: 110px;"></el-input>
</el-form-item>
<el-form-item label="要求确认日期" prop="wantedConfirmDate">
<el-input v-model="confirmData.wantedConfirmDate" readonly style="width: 170px;" class="red-text"></el-input>
<el-input v-model="confirmData.wantedConfirmDate" readonly style="width: 110px;" class="red-text"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注" prop="remark">
<el-input v-model="confirmData.remark" style="width: 541px" type="textarea" :rows="1"></el-input>
<el-input v-model="confirmData.remark" style="width: 581px" type="textarea" :rows="1"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -15px;">
<el-form-item label=" ">
<a href="javascript:void(0);" @click="triggerUpload" type="text" size="small">点击选择文件</a>
<tr></tr>
<el-input v-model="this.fileName" readonly placeholder="文件名称" style="width: 541px"></el-input>
<el-input v-model="this.fileName" readonly placeholder="文件名称" style="width: 581px"></el-input>
<el-upload class="custom-upload" :file-list="fileList"
action="javascript:void(0);" ref="uploadFile"
:on-change="onChange" :on-close="closeFileUpdate"
@ -578,15 +587,15 @@
</el-form-item>
</el-form>
<el-table
:height="height + 120"
:height="this.height + 70"
:data="projectConfirmatorFileList"
border
style="width: 100%;margin-top: 17px;margin-left: 0px;">
style="width: 100%;margin-top: 25px;margin-left: 0px;">
<el-table-column
prop="fileName"
header-align="center"
align="center"
min-width="120"
min-width="180"
label="文件名">
</el-table-column>
<el-table-column
@ -610,7 +619,7 @@
</div>
</el-dialog>
<el-dialog title="查看附件" @close="closeViewDocumentFileVisible" :visible.sync="viewDocumentFileVisible" width="520px" style="margin-top: 0vh" :close-on-click-modal="false">
<el-dialog title="查看附件" @close="closeViewDocumentFileVisible" :visible.sync="viewDocumentFileVisible" width="770px" style="margin-top: 0vh" :close-on-click-modal="false">
<el-table
:height="height + 200"
:data="projectConfirmatorFileList"
@ -619,8 +628,8 @@
<el-table-column
prop="fileName"
header-align="center"
align="center"
min-width="120"
align="left"
min-width="250"
label="文件名">
</el-table-column>
<el-table-column
@ -701,16 +710,23 @@ import {
} from "../../../api/eam/eamProofing";
import {
checkConfirmationRecord,
checkProductionValidationDocument, deleteDocumentInformation,
checkProductionValidationDocument,
deleteDocumentInformation,
deleteProjectFile,
saveProductionValidationDocument,
saveProductionValidationDocumentConfirmator,
searchConfirmatorList,
searchConfirmProgressDocumentList,
searchConfirmProgressPusherList,
searchProjectConfirmatorFileList, sendMailHandle,
searchProjectConfirmatorFileList,
sendMailHandle,
updateProjectDocumentConfirm,
uploadProjectFile, warnSendMailHandle, confirmatorSendMailHandle, eamProjectPartSearch, eamProjectPartInfoEdit
uploadProjectFile,
warnSendMailHandle,
confirmatorSendMailHandle,
eamProjectPartSearch,
eamProjectPartInfoEdit,
getFinalPartDesc
} from "../../../api/eam/eamProject";
import row from "element-ui/packages/row";
import moment from 'moment';
@ -873,6 +889,8 @@ import {EventBus} from "../../../main";
confirmVisible: false,
confirmationPrompted: false, //
agencyMatters: false, //
finalPartFlag: false,
dataListIndex: 0,
modalData:{
flag:'',
id:'',
@ -1382,7 +1400,7 @@ import {EventBus} from "../../../main";
columnProp: 'closeDate',
headerAlign: "center",
align: "left",
columnLabel: '结案日期',
columnLabel: '转量产日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -2032,13 +2050,6 @@ import {EventBus} from "../../../main";
trigger: ['blur','change']
}
],
finalPartDesc:[
{
required: true,
message: ' ',
trigger: ['blur','change']
}
],
needDate:[
{
required: true,
@ -2111,7 +2122,7 @@ import {EventBus} from "../../../main";
status: '进行中',
},
{
status: '已结案',
status: '已量产',
}
],
userBuList: [],
@ -2126,6 +2137,9 @@ import {EventBus} from "../../../main";
EventBus.$on('updateProjectPartInfo', () => {
this.getDataList();
});
EventBus.$on('updateProjectPartDocumentInfo', () => {
this.getProofDocument()
});
},
@ -2283,14 +2297,14 @@ import {EventBus} from "../../../main";
item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
})
console.log(this.totalPage)
//
if (this.totalPage > 0) {
//
this.$refs.mainTable.setCurrentRow(this.dataList[0])
this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
// table
this.refreshCurrentTabTable()
this.proofingClickRow(this.dataList[0])
this.proofingClickRow(this.dataList[this.dataListIndex])
this.dataListIndex = 0
}
}
})
@ -2314,10 +2328,11 @@ import {EventBus} from "../../../main";
//
if (this.totalPage > 0) {
//
this.$refs.mainTable.setCurrentRow(this.dataList[0])
this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
// table
this.refreshCurrentTabTable()
this.proofingClickRow(this.dataList[0])
this.proofingClickRow(this.dataList[this.dataListIndex])
this.dataListIndex = 0
}
}
})
@ -2430,6 +2445,7 @@ import {EventBus} from "../../../main";
createBy: this.$store.state.user.name,
updateBy: this.$store.state.user.name,
}
this.getFinalPartDesc()
this.formalPartNoFlag = true
},
addProofRecord (row) {
@ -2532,6 +2548,11 @@ import {EventBus} from "../../../main";
}
this.newProjectDocument(inData)
EventBus.$emit('updateProjectInfo')
this.dataList.forEach((item) => {
if (item.projectPartId === row.projectPartId) {
this.dataListIndex = this.dataList.indexOf(item)
}
})
this.getDataList()
this.$message({
message: '操作成功',
@ -2558,9 +2579,9 @@ import {EventBus} from "../../../main";
});
}
if (row.status === '进行中') {
this.modalData.status = '已结案'
this.modalData.status = '已量产'
this.modalData.closeDate = new Date()
this.$confirm(`是否确认结案?`, '提示', {
this.$confirm(`是否确认转量产?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -2617,34 +2638,107 @@ import {EventBus} from "../../../main";
projectDocumentSave(inData).then(({data}) => {
//
if (data && data.code === 0) {
this.$message({
message: '新增成功',
type: 'success'
})
this.documentListVisible = false
//
this.refreshCurrentTabTable()
}
})
},
saveFormalPartNo (){
saveFormalPartNo(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.formalPartNoFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
getFinalPartDesc(){
return new Promise((resolve, reject) => {
let inData = {
site: this.modalData.site,
buNo: this.modalData.bu.split('_')[1],
finalPartNo: this.modalData.finalPartNo,
}
getFinalPartDesc(inData).then(({data}) => {
console.log(data)
if (data && data.code === 0) {
if (data.data !== null) {
this.modalData.finalPartDesc = data.data.finalPartDesc
this.finalPartFlag = false
} else {
this.modalData.finalPartDesc = ''
this.finalPartFlag = true
}
} else {
this.modalData.finalPartDesc = ''
}
resolve(); // Promise
}).catch(error => {
this.modalData.finalPartDesc = '';
reject(error); // Promise
});
});
},
async saveFormalPartNo() {
try {
await this.getFinalPartDesc();
} catch (error) {
// getFinalPartDesc
console.error("Error in getFinalPartDesc:", error);
this.$message({
message: '获取料号描述时发生错误,请重试',
type: 'error'
});
}
if (this.modalData.finalPartNo === '' || this.modalData.finalPartNo === null || this.modalData.finalPartNo === undefined) {
this.$message({
message: '请输入ERP正式料号',
type: 'warning'
})
return
}
if (this.finalPartFlag) {
this.$confirm('ERP正式料号不存在,是否继续保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
saveFormalPartNo(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.formalPartNoFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
}
})
})
} else {
saveFormalPartNo(this.modalData).then(({data}) => {
if (data && data.code === '0') {
this.getDataList()
this.formalPartNoFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},
closeClear () {
this.modalData.bu = ''
@ -2690,7 +2784,8 @@ import {EventBus} from "../../../main";
uploadFile () {
this.isEditable = false;
this.fileList = []
this.otherDocumentCurrentRow.proofingId= -1
this.proofingCurrentRow.proofingId= -1
this.proofingCurrentRow.proofingNo = '*'
this.uploadDialog = true
//
// this.$nextTick(() => {
@ -3098,75 +3193,95 @@ import {EventBus} from "../../../main";
})
},
saveProductionValidationDocument() {
let confirmatorPromises = this.projectAllDocumentConfirmatorList.map(item => {
let inData = {
site: this.proofingCurrentRow.site,
projectId: this.proofingCurrentRow.projectId,
projectNo: this.proofingCurrentRow.projectNo,
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
userid: item.userid,
itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
wantedConfirmDate: new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000),
createBy: this.$store.state.user.name
};
return saveProductionValidationDocumentConfirmator(inData);
});
Promise.all(confirmatorPromises)
.then(confirmatorResults => {
let allConfirmatorSuccess = confirmatorResults.every(result => result.data && result.data.code === 0);
if (allConfirmatorSuccess) {
if (this.selectedDocumentItems.length === 0) {
this.$message({
message: '请选择文档',
type: 'warning',
duration: 2000
})
return
}else {
this.$confirm('是否确认新增生产文档并向确认人员推送信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let confirmatorPromises = this.projectAllDocumentConfirmatorList.map(item => {
let inData = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
projectId: this.proofingCurrentRow.projectId,
projectNo: this.proofingCurrentRow.projectNo,
projectPartId: this.proofingCurrentRow.projectPartId,
testPartNo: this.proofingCurrentRow.testPartNo,
selectedDocumentItems: this.selectedDocumentItems,
}
let saveDocumentPromises = this.handleDocumentSave(inData);
saveDocumentPromises
.then(confirmDelete => {
if (confirmDelete === 'false') {
this.confirmationPrompted = false;
this.$message({
message: '已取消操作',
type: 'info'
});
return;
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
userid: item.userid,
itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
wantedConfirmDate: new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000),
createBy: this.$store.state.user.name
};
return saveProductionValidationDocumentConfirmator(inData);
});
Promise.all(confirmatorPromises)
.then(confirmatorResults => {
let allConfirmatorSuccess = confirmatorResults.every(result => result.data && result.data.code === 0);
if (allConfirmatorSuccess) {
let inData = {
site: this.proofingCurrentRow.site,
orderRef1: this.proofingCurrentRow.projectId,
orderRef2: this.proofingCurrentRow.projectPartId,
projectId: this.proofingCurrentRow.projectId,
projectNo: this.proofingCurrentRow.projectNo,
projectPartId: this.proofingCurrentRow.projectPartId,
testPartNo: this.proofingCurrentRow.testPartNo,
selectedDocumentItems: this.selectedDocumentItems,
}
let saveDocumentPromises = this.handleDocumentSave(inData);
saveDocumentPromises
.then(confirmDelete => {
if (confirmDelete === 'false') {
this.confirmationPrompted = false;
this.$message({
message: '已取消操作',
type: 'info'
});
return;
}
this.$message({
message: '新增成功',
type: 'success'
});
this.projectProductionValidationDocumentVisible = false;
this.confirmationPrompted = false;
this.confirmatorSendMailHandle(inData)
})
.catch(error => {
console.error('保存文档出错:', error);
this.$message({
message: '新增失败,请检查文档',
type: 'error'
});
});
} else {
this.$message({
message: '新增成功',
type: 'success'
});
this.projectProductionValidationDocumentVisible = false;
this.confirmationPrompted = false;
this.confirmatorSendMailHandle(inData)
})
.catch(error => {
console.error('保存文档出错:', error);
this.$message({
message: '新增失败,请检查文档',
type: 'error'
message: '已取消操作',
type: 'info'
});
}
})
.catch(error => {
console.error('保存确认人员出错:', error);
this.$message({
message: '新增失败,请检查确认人员',
type: 'error'
});
} else {
this.$message({
message: '新增失败,请检查确认人员',
type: 'error'
});
}
})
.catch(error => {
console.error('保存确认人员出错:', error);
}).catch(() => {
this.$message({
message: '新增失败,请检查确认人员',
type: 'error'
type: 'info',
message: '已取消操作'
});
});
}
},
handleDocumentSave(inData) {

Loading…
Cancel
Save