|
|
|
@ -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) { |
|
|
|
|