You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6628 lines
264 KiB

1 year ago
7 months ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- <div>-->
  4. <!-- <span @click="favoriteFunction()">-->
  5. <!-- <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>-->
  6. <!-- </span>-->
  7. <!-- </div>-->
  8. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  9. <el-form-item :label="'BU'">
  10. <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
  11. <el-option
  12. v-for = "i in userBuList"
  13. :key = "i.buNo"
  14. :label = "i.buDesc"
  15. :value = "i.buDesc">
  16. </el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item :label="'项目编码'">
  20. <el-input v-model="searchData.projectNo" style="width: 120px"></el-input>
  21. </el-form-item>
  22. <el-form-item :label="'项目名称'">
  23. <el-input v-model="searchData.projectDesc" style="width: 120px"></el-input>
  24. </el-form-item>
  25. <el-form-item :label="'项目料号'">
  26. <el-input v-model="searchData.testPartNo" style="width: 120px"></el-input>
  27. </el-form-item>
  28. <el-form-item :label="'料号描述'">
  29. <el-input v-model="searchData.partDesc" style="width: 120px"></el-input>
  30. </el-form-item>
  31. <el-form-item :label="'客户编码'">
  32. <el-input v-model="searchData.customerNo" style="width: 120px"></el-input>
  33. </el-form-item>
  34. <el-form-item :label="'客户名称'">
  35. <el-input v-model="searchData.customerDesc" style="width: 120px"></el-input>
  36. </el-form-item>
  37. <el-form-item :label="'项目分类'">
  38. <el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
  39. <el-option
  40. v-for = "i in projectCategoryList"
  41. :key = "i.projectCategory"
  42. :label = "i.projectCategory"
  43. :value = "i.projectCategory">
  44. </el-option>
  45. </el-select>
  46. </el-form-item>
  47. <el-form-item :label="'项目状态'">
  48. <el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 130px">
  49. <el-option
  50. v-for = "i in statusList"
  51. :key = "i.status"
  52. :label = "i.status"
  53. :value = "i.status">
  54. </el-option>
  55. </el-select>
  56. </el-form-item>
  57. <el-form-item :label="'PM/Sales'">
  58. <el-select v-model="searchData.projectManager" placeholder="请选择" clearable style="width: 130px">
  59. <el-option
  60. v-for = "i in projectManagersList"
  61. :key = "i.projectManagerId"
  62. :label = "i.projectManagerName"
  63. :value = "i.projectManager">
  64. </el-option>
  65. </el-select>
  66. </el-form-item>
  67. <el-form-item :label="'PjM'">
  68. <el-select v-model="searchData.projectOwner" placeholder="请选择" clearable style="width: 130px">
  69. <el-option
  70. v-for = "i in projectOwnersList"
  71. :key = "i.projectOwnerId"
  72. :label = "i.projectOwnerName"
  73. :value = "i.projectOwner">
  74. </el-option>
  75. </el-select>
  76. </el-form-item>
  77. <el-form-item :label="'Engineer'">
  78. <el-select v-model="searchData.engineer" placeholder="请选择" clearable style="width: 130px">
  79. <el-option
  80. v-for = "i in engineersList"
  81. :key = "i.engineerId"
  82. :label = "i.engineerName"
  83. :value = "i.engineer">
  84. </el-option>
  85. </el-select>
  86. </el-form-item>
  87. <el-form-item :label="'区域'">
  88. <el-select clearable v-model="searchData.cProjectRegion" style="width: 120px">
  89. <el-option
  90. v-for = "i in cProjectRegionList"
  91. :key = "i.cProjectRegion"
  92. :label = "i.cProjectRegion"
  93. :value = "i.cProjectRegion">
  94. </el-option>
  95. </el-select>
  96. </el-form-item>
  97. <el-form-item :label="'ERP正式料号'">
  98. <el-select v-model="searchData.finalPartNo" placeholder="请选择" clearable style="width: 130px">
  99. <el-option
  100. v-for = "i in finalPartNosList"
  101. :key = "i.finalPartNoId"
  102. :label = "i.finalPartNo"
  103. :value = "i.finalPartNo">
  104. </el-option>
  105. </el-select>
  106. </el-form-item>
  107. <el-form-item :label="'转量产日期:'">
  108. <el-date-picker
  109. style="width: 120px"
  110. v-model="searchData.massProductionStartDate"
  111. type="date"
  112. value-format="yyyy-MM-dd"
  113. placeholder="选择日期">
  114. </el-date-picker>
  115. -
  116. <el-date-picker
  117. style="width: 120px"
  118. v-model="searchData.massProductionEndDate"
  119. type="date"
  120. value-format="yyyy-MM-dd"
  121. placeholder="选择日期">
  122. </el-date-picker>
  123. </el-form-item>
  124. <el-form-item :label="'立项日期:'">
  125. <el-date-picker
  126. style="width: 120px"
  127. v-model="searchData.startDate"
  128. type="date"
  129. value-format="yyyy-MM-dd"
  130. placeholder="选择日期">
  131. </el-date-picker>
  132. -
  133. <el-date-picker
  134. style="width: 120px"
  135. v-model="searchData.endDate"
  136. type="date"
  137. value-format="yyyy-MM-dd"
  138. placeholder="选择日期">
  139. </el-date-picker>
  140. </el-form-item>
  141. <!-- <el-form-item :label="'在用'">-->
  142. <!-- <el-select filterable v-model="searchData.active" style="width: 130px">-->
  143. <!-- <el-option label="全部" value=""></el-option>-->
  144. <!-- <el-option label="是" value="Y"></el-option>-->
  145. <!-- <el-option label="否" value="N"></el-option>-->
  146. <!-- </el-select>-->
  147. <!-- </el-form-item>-->
  148. <el-form-item :label="' '">
  149. <el-button @click="agencyMatter()">查询</el-button>
  150. <download-excel
  151. :fields="fields()"
  152. :data="exportData"
  153. type="xls"
  154. :name="exportName"
  155. :header="exportHeader"
  156. :footer="exportFooter"
  157. :fetch="createExportData"
  158. :before-generate="startDownload"
  159. :before-finish="finishDownload"
  160. worksheet="导出信息"
  161. class="el-button el-button--primary el-button--medium">
  162. {{ "导出" }}
  163. </download-excel>
  164. </el-form-item>
  165. </el-form>
  166. <el-table
  167. @header-dragend="handleColumnResize"
  168. :height="this.height + 350"
  169. :data="dataList"
  170. ref="mainTable"
  171. highlight-current-row
  172. @row-click="proofingClickRow"
  173. @current-change="changeCurrentRow"
  174. :row-class-name="tableRowClassName"
  175. :cell-style="getCellStyle"
  176. border
  177. style="width: 100%;">
  178. <el-table-column
  179. v-for="(item,index) in columnList" :key="index"
  180. :sortable="item.columnSortable"
  181. :prop="item.columnProp"
  182. :header-align="item.headerAlign"
  183. :show-overflow-tooltip="item.showOverflowTooltip"
  184. :align="item.align"
  185. :fixed="item.fixed==''?false:item.fixed"
  186. :min-width="item.columnWidth"
  187. :label="item.columnLabel">
  188. <template slot-scope="scope">
  189. <div v-if="item.columnProp === 'partType'">
  190. <span style="color: black">
  191. {{ scope.row[item.columnProp] }}
  192. </span>
  193. </div>
  194. <div v-else-if="item.columnProp === 'projectCategory'">
  195. <span :style="{ color: scope.row.projectCategory === 'High Risk' ? 'rgb(255, 62, 62)' : (scope.row.projectCategory === 'Sustaining' ? 'rgb(34, 254, 4)' : 'rgb(255,224,89)') , fontSize: '14px'}">
  196. {{ scope.row[item.columnProp] }}
  197. </span>
  198. </div>
  199. <div v-else>
  200. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  201. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  202. style="width: 100px; height: 80px"/></span>
  203. </div>
  204. </template>
  205. </el-table-column>
  206. <el-table-column
  207. v-if="this.$store.state.user.name === 'admin' || !this.authUpdate"
  208. fixed="right"
  209. header-align="center"
  210. align="center"
  211. width="220"
  212. label="操作">
  213. <template slot-scope="scope">
  214. <div v-if="scope.row.partType !== 'Active'">
  215. <a v-if="scope.row.status === '草稿' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">下达</a>
  216. <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">新增打样</a>
  217. <a style="color: gray; pointer-events: none;">详情</a>
  218. <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转正式料号</a>
  219. <a v-if="scope.row.status === '进行中' && scope.row.status !== '已量产'" style="color: gray; pointer-events: none;">转量产</a>
  220. </div>
  221. <div v-else-if="scope.row.status !== '已量产' && scope.row.status !== '正式量产'">
  222. <a v-if="scope.row.status === '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">下达</a>
  223. <a v-if="scope.row.status !== '草稿'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
  224. <a type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  225. <a v-if="scope.row.status !== '草稿' && scope.row.status !== '已量产'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
  226. <a v-if="scope.row.status === '进行中' || scope.row.status === '已量产'" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
  227. </div>
  228. <div v-else-if="scope.row.status === '已量产'">
  229. <a style="color: #0c4dbb" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
  230. <a style="color: #0c4dbb" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  231. <a style="color: #0c4dbb" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
  232. <a style="color: #0c4dbb" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
  233. <a style="color: #0c4dbb" type="text" size="small" @click="cancelModalStatus(scope.row)">撤销</a>
  234. </div>
  235. <div v-else>
  236. <a style="color: red" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
  237. <a style="color: red" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  238. <a style="color: red" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
  239. <a style="color: red" type="text" size="small" @click="updateModalStatus(scope.row)">转量产</a>
  240. </div>
  241. </template>
  242. </el-table-column>
  243. <el-table-column
  244. v-else
  245. fixed="right"
  246. header-align="center"
  247. align="center"
  248. width="70"
  249. label="操作">
  250. <template slot-scope="scope">
  251. <div v-if="scope.row.partType !== 'Active'">
  252. <a style="color: gray; pointer-events: none;">详情</a>
  253. </div>
  254. <div v-else-if="scope.row.status !== '已量产' && scope.row.status !== '正式量产'">
  255. <a type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  256. </div>
  257. <div v-else-if="scope.row.status === '已量产'">
  258. <a style="color: #0c4dbb" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  259. </div>
  260. <div v-else>
  261. <a style="color: red" type="text" size="small" @click="showProofDetailModal(scope.row)">详情</a>
  262. </div>
  263. </template>
  264. </el-table-column>
  265. </el-table>
  266. <el-pagination
  267. @size-change="sizeChangeHandle"
  268. @current-change="currentChangeHandle"
  269. :current-page="pageIndex"
  270. :page-sizes="[20, 50, 100, 200, 500]"
  271. :page-size="pageSize"
  272. :total="totalPage"
  273. layout="total, sizes, prev, pager, next, jumper">
  274. </el-pagination>
  275. <el-dialog title="转正式料号" :visible.sync="formalPartNoFlag" width="508px" v-drag :close-on-click-modal="false">
  276. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  277. <el-form-item label="客户编码" prop="customerNo" >
  278. <el-input v-model="modalData.customerNo" style="width: 151px;" disabled></el-input>
  279. </el-form-item>
  280. <el-form-item label="客户名称" style="margin-left: 15px" prop="customerDesc" >
  281. <el-input v-model="modalData.customerDesc" style="width: 291px;" disabled></el-input>
  282. </el-form-item>
  283. </el-form>
  284. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  285. <el-form-item label="项目编码" prop="projectNo" >
  286. <el-input v-model="modalData.projectNo" style="width: 151px;" disabled></el-input>
  287. </el-form-item>
  288. <el-form-item label="项目名称" style="margin-left: 15px" prop="projectDesc" >
  289. <el-input v-model="modalData.projectDesc" style="width: 175px;" disabled></el-input>
  290. </el-form-item>
  291. <el-form-item label="BU" prop="bu" >
  292. <el-input v-model="modalData.bu" style="width: 102px;" disabled></el-input>
  293. </el-form-item>
  294. </el-form>
  295. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  296. <el-form-item label="项目料号" prop="testPartNo" >
  297. <el-input v-model="modalData.testPartNo" style="width: 151px;" disabled></el-input>
  298. </el-form-item>
  299. <el-form-item label="料号描述" style="margin-left: 15px" prop="partDesc" >
  300. <el-input v-model="modalData.partDesc" style="width: 291px;" disabled></el-input>
  301. </el-form-item>
  302. </el-form>
  303. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  304. <el-form-item label="ERP正式料号" prop="finalPartNo" :rules="rules.finalPartNo">
  305. <el-input v-model="modalData.finalPartNo"
  306. @blur="getFinalPartDesc()"
  307. style="width: 151px"></el-input>
  308. </el-form-item>
  309. <el-form-item label="ERP正式料号描述" style="margin-left: 15px" prop="finalPartDesc">
  310. <el-input v-model="modalData.finalPartDesc" style="width: 291px" disabled></el-input>
  311. </el-form-item>
  312. </el-form>
  313. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  314. <el-button type="primary" @click="saveFormalPartNo()">保存</el-button>
  315. <el-button @click="formalPartNoFlag = false">关闭</el-button>
  316. </el-footer>
  317. </el-dialog>
  318. <!-- <el-tabs style="margin-top: 0px; width: 100%; height: 100%;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">-->
  319. <!-- <el-tab-pane label="打样记录" name="proofRecord" style="margin-left: -10px">-->
  320. <!-- <proofRecord ref="proofRecord"></proofRecord>-->
  321. <!-- </el-tab-pane>-->
  322. <!-- <el-tab-pane label="转量产阶段文档" name="massProductionStage">-->
  323. <!-- <el-button type="primary" v-if="!this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>-->
  324. <!-- <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿'" icon="el-icon-upload" style="margin-top: -5px" @click="uploadOtherDocument()">上传其他文档</el-button>-->
  325. <!-- <el-button type="primary" v-if="this.sendMassMailFlag === true && !this.authUpdate" style="margin-top: -5px" @click="sendMassMailHandle()">邮件提醒</el-button>-->
  326. <!-- <el-table-->
  327. <!-- :data="projectOtherDocumentList"-->
  328. <!-- border-->
  329. <!-- style="width: 100%;margin-top: 5px;"-->
  330. <!-- :height="this.height + 110"-->
  331. <!-- ref="proofDocumentTable"-->
  332. <!-- @row-click="projectOtherDocumentClickRow"-->
  333. <!-- @current-change="changeCurrentRow1"-->
  334. <!-- :row-class-name="tableRowClassName"-->
  335. <!-- v-loading="dataListLoading">-->
  336. <!-- <el-table-column-->
  337. <!-- v-if="this.authUpdate"-->
  338. <!-- header-align="center"-->
  339. <!-- align="center"-->
  340. <!-- width="140"-->
  341. <!-- fixed="left"-->
  342. <!-- label="操作">-->
  343. <!-- <template slot-scope="scope">-->
  344. <!-- <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>-->
  345. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  346. <!-- @click="copyFile(scope.row)">复制</a>-->
  347. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  348. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"-->
  349. <!-- @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  350. <!-- </template>-->
  351. <!-- </el-table-column>-->
  352. <!-- <el-table-column-->
  353. <!-- v-else-->
  354. <!-- header-align="center"-->
  355. <!-- align="center"-->
  356. <!-- width="150"-->
  357. <!-- fixed="left"-->
  358. <!-- label="操作">-->
  359. <!-- <template slot-scope="scope">-->
  360. <!-- <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>-->
  361. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  362. <!-- @click="copyFile(scope.row)">复制</a>-->
  363. <!-- <a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && !shouldShowDelete(scope.row)" @click="warnSendMail(scope.row)">提醒</a>-->
  364. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  365. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  366. <!-- </template>-->
  367. <!-- </el-table-column>-->
  368. <!-- <el-table-column label="序号" type="index" align="center" :index="indexMethod">-->
  369. <!-- <template slot-scope="scope">-->
  370. <!-- <span>-->
  371. <!-- {{ scope.$index + 1 }}-->
  372. <!-- </span>-->
  373. <!-- </template>-->
  374. <!-- </el-table-column>-->
  375. <!-- <el-table-column label="文档类型" align="left">-->
  376. <!-- <template slot-scope="scope">-->
  377. <!-- <span>-->
  378. <!-- {{ getCombinedDocumentType(scope.row) }}-->
  379. <!-- </span>-->
  380. <!-- </template>-->
  381. <!-- </el-table-column>-->
  382. <!-- <el-table-column-->
  383. <!-- v-for="(item,index) in columnFileContentArray" :key="index"-->
  384. <!-- :sortable="item.columnSortable"-->
  385. <!-- :prop="item.columnProp"-->
  386. <!-- :header-align="item.headerAlign"-->
  387. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  388. <!-- :align="item.align"-->
  389. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  390. <!-- :min-width="item.columnWidth"-->
  391. <!-- :label="item.columnLabel">-->
  392. <!-- <template slot-scope="scope">-->
  393. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  394. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  395. <!-- style="width: 100px; height: 80px"/></span>-->
  396. <!-- </template>-->
  397. <!-- </el-table-column>-->
  398. <!-- </el-table>-->
  399. <!-- </el-tab-pane>-->
  400. <!-- <el-tab-pane label="所有文档" name="allDocument">-->
  401. <!-- <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿' && !this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectProductionValidationDocument()">选择生产确认文档</el-button>-->
  402. <!-- <el-table-->
  403. <!-- :data="projectAllDocumentList"-->
  404. <!-- border-->
  405. <!-- style="width: 100%;margin-top: 5px;"-->
  406. <!-- :height="this.height + 50"-->
  407. <!-- ref="projectAllDocumentDocumentTable"-->
  408. <!-- @row-click="projectAllDocumentClickRow"-->
  409. <!-- v-loading="dataListLoading"-->
  410. <!-- :row-class-name="tableRowClassName">-->
  411. <!-- <el-table-column-->
  412. <!-- v-if="this.authUpdate"-->
  413. <!-- header-align="center"-->
  414. <!-- fixed="left"-->
  415. <!-- align="center"-->
  416. <!-- width="90"-->
  417. <!-- label="操作">-->
  418. <!-- <template slot-scope="scope">-->
  419. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  420. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  421. <!-- @click="copyFile(scope.row)">复制</a>-->
  422. <!-- <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>-->
  423. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"-->
  424. <!-- @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  425. <!-- </template>-->
  426. <!-- </el-table-column>-->
  427. <!-- <el-table-column-->
  428. <!-- v-else-->
  429. <!-- header-align="center"-->
  430. <!-- fixed="left"-->
  431. <!-- align="center"-->
  432. <!-- width="90"-->
  433. <!-- label="操作">-->
  434. <!-- <template slot-scope="scope">-->
  435. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  436. <!-- <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"-->
  437. <!-- @click="copyFile(scope.row)">复制</a>-->
  438. <!-- <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>-->
  439. <!-- <a type="text" size="small" v-if="shouldShowDelete(scope.row)"-->
  440. <!-- @click="massProductionDocumentDelete(scope.row)">删除</a>-->
  441. <!-- </template>-->
  442. <!-- </el-table-column>-->
  443. <!-- <el-table-column label="序号" type="index" align="center" :index="indexMethod">-->
  444. <!-- <template slot-scope="scope">-->
  445. <!-- <span>-->
  446. <!-- {{ scope.$index + 1 }}-->
  447. <!-- </span>-->
  448. <!-- </template>-->
  449. <!-- </el-table-column>-->
  450. <!-- <el-table-column label="文档类型" align="left">-->
  451. <!-- <template slot-scope="scope">-->
  452. <!-- <span>-->
  453. <!-- {{ getCombinedDocumentType(scope.row) }}-->
  454. <!-- </span>-->
  455. <!-- </template>-->
  456. <!-- </el-table-column>-->
  457. <!-- <el-table-column-->
  458. <!-- v-for="(item,index) in columnProjectAllDocumentList" :key="index"-->
  459. <!-- :sortable="item.columnSortable"-->
  460. <!-- :prop="item.columnProp"-->
  461. <!-- :header-align="item.headerAlign"-->
  462. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  463. <!-- :align="item.align"-->
  464. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  465. <!-- :min-width="item.columnWidth"-->
  466. <!-- :label="item.columnLabel">-->
  467. <!-- <template slot-scope="scope">-->
  468. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  469. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  470. <!-- style="width: 100px; height: 80px"/></span>-->
  471. <!-- </template>-->
  472. <!-- </el-table-column>-->
  473. <!-- </el-table>-->
  474. <!-- </el-tab-pane>-->
  475. <!-- <el-tab-pane label="生产文档确认进度" name="productionDocumentsConfirmProgress">-->
  476. <!-- <el-row>-->
  477. <!-- <el-col :span="8" class="left-section">-->
  478. <!-- <div class="table-container" style="height: 100%;margin-top: -5px">-->
  479. <!-- <p style="margin-top: -5px">文档清单</p>-->
  480. <!-- <el-table :data="confirmProgressDocumentList"-->
  481. <!-- border-->
  482. <!-- style="width: 100%;margin-top: -5px;"-->
  483. <!-- :height="this.height + 95">-->
  484. <!-- <el-table-column header-align="center" align="center" width="50" prop="itemNo" label="序号"></el-table-column>-->
  485. <!-- <el-table-column header-align="center" align="left" prop="documentType" label="文档类型"></el-table-column>-->
  486. <!-- <el-table-column header-align="center" align="left" prop="fileName" label="文件名"></el-table-column>-->
  487. <!-- <el-table-column-->
  488. <!-- header-align="center"-->
  489. <!-- align="center"-->
  490. <!-- width="90"-->
  491. <!-- fixed="right"-->
  492. <!-- label="操作">-->
  493. <!-- <template slot-scope="scope">-->
  494. <!-- <a type="text" size="small" @click="viewMassDocumentFile(scope.row)">查看附件</a>-->
  495. <!-- </template>-->
  496. <!-- </el-table-column>-->
  497. <!-- </el-table>-->
  498. <!-- </div>-->
  499. <!-- </el-col>-->
  500. <!-- <el-col :span="15" class="right-section">-->
  501. <!-- <div class="table-container" style="height: 100%;margin-top: -5px">-->
  502. <!-- <p style="margin-top: -5px">推送人员清单</p>-->
  503. <!-- <el-table :data="confirmProgressPusherList"-->
  504. <!-- border-->
  505. <!-- style="width: 100%;margin-top: -5px;"-->
  506. <!-- :height="this.height + 95">-->
  507. <!-- <el-table-column header-align="center" align="center" width="40" prop="itemNo" label="序号"></el-table-column>-->
  508. <!-- <el-table-column header-align="center" align="left" width="70" prop="userDisplay" label="指定确认人"></el-table-column>-->
  509. <!-- <el-table-column header-align="center" align="center" :formatter="formatDate" prop="wantedConfirmDate" label="要求确认日期"></el-table-column>-->
  510. <!-- <el-table-column header-align="center" align="center" prop="confirmFlag" label="是否确认"></el-table-column>-->
  511. <!-- <el-table-column header-align="center" align="left" prop="confirmedBy" label="实际确认人"></el-table-column>-->
  512. <!-- <el-table-column header-align="center" align="left" prop="remark" label="备注"></el-table-column>-->
  513. <!-- <el-table-column header-align="center" align="center" prop="confirmedDate" label="实际确认时间"></el-table-column>-->
  514. <!-- <el-table-column header-align="center" align="center" prop="createDate" label="推送时间"></el-table-column>-->
  515. <!-- <el-table-column header-align="center" align="left" prop="createBy" label="推送人"></el-table-column>-->
  516. <!-- <el-table-column-->
  517. <!-- header-align="center"-->
  518. <!-- align="center"-->
  519. <!-- width="90"-->
  520. <!-- fixed="left"-->
  521. <!-- label="操作">-->
  522. <!-- <template slot-scope="scope">-->
  523. <!-- <a type="text" size="small" @click="confirmDocument(scope.row)">确认</a>-->
  524. <!-- <a type="text" size="small" @click="viewDocumentFile(scope.row)">查看附件</a>-->
  525. <!-- </template>-->
  526. <!-- </el-table-column>-->
  527. <!-- </el-table>-->
  528. <!-- </div>-->
  529. <!-- </el-col>-->
  530. <!-- </el-row>-->
  531. <!-- </el-tab-pane>-->
  532. <!-- <el-tab-pane label="量产BOM" name="massProductionBOM">-->
  533. <!-- <el-table-->
  534. <!-- :data="projectPartBomList"-->
  535. <!-- row-key="levelCode"-->
  536. <!-- border-->
  537. <!-- style="width: 100%; margin-top: 5px;"-->
  538. <!-- :height="this.height + 50"-->
  539. <!-- ref="projectBomTable"-->
  540. <!-- v-loading="dataListLoading"-->
  541. <!-- :tree-props="{ children: 'children' }">-->
  542. <!-- &lt;!&ndash; 数据列 &ndash;&gt;-->
  543. <!-- <el-table-column-->
  544. <!-- label=""-->
  545. <!-- prop=""-->
  546. <!-- header-align="center"-->
  547. <!-- align="center"-->
  548. <!-- width="80">-->
  549. <!-- </el-table-column>-->
  550. <!-- <el-table-column-->
  551. <!-- v-for="(item, index) in columnProjectBomList"-->
  552. <!-- :key="index"-->
  553. <!-- :sortable="item.columnSortable"-->
  554. <!-- :prop="item.columnProp"-->
  555. <!-- :header-align="item.headerAlign"-->
  556. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  557. <!-- :align="item.align"-->
  558. <!-- :fixed="item.fixed === '' ? false : item.fixed"-->
  559. <!-- :min-width="item.columnWidth"-->
  560. <!-- :label="item.columnLabel">-->
  561. <!-- <template slot-scope="scope">-->
  562. <!-- <div v-if="item.columnProp === 'levelCode'">-->
  563. <!-- <span v-if="scope.row.levelCode === '1'">{{ '主BOM' }}</span>-->
  564. <!-- <span v-else>{{ scope.row.levelCode }}</span>-->
  565. <!-- </div>-->
  566. <!-- <div v-else>-->
  567. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  568. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  569. <!-- </div>-->
  570. <!-- </template>-->
  571. <!-- </el-table-column>-->
  572. <!-- </el-table>-->
  573. <!-- </el-tab-pane>-->
  574. <!-- <el-tab-pane label="产品工艺路线" name="Routing">-->
  575. <!-- <el-table-->
  576. <!-- :data="projectPartRoutingList"-->
  577. <!-- border-->
  578. <!-- style="width: 100%; margin-top: 5px;"-->
  579. <!-- :height="this.height + 50"-->
  580. <!-- ref="projectBomTable"-->
  581. <!-- v-loading="dataListLoading"-->
  582. <!-- >-->
  583. <!-- &lt;!&ndash; 数据列 &ndash;&gt;-->
  584. <!-- <el-table-column-->
  585. <!-- v-for="(item, index) in columnProjectRoutingList"-->
  586. <!-- :key="index"-->
  587. <!-- :sortable="item.columnSortable"-->
  588. <!-- :prop="item.columnProp"-->
  589. <!-- :header-align="item.headerAlign"-->
  590. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  591. <!-- :align="item.align"-->
  592. <!-- :fixed="item.fixed === '' ? false : item.fixed"-->
  593. <!-- :min-width="item.columnWidth"-->
  594. <!-- :label="item.columnLabel">-->
  595. <!-- <template slot-scope="scope">-->
  596. <!-- <div v-if="item.columnProp === 'levelCode'">-->
  597. <!-- <span v-if="scope.row.levelCode === '1'">{{ '1' }}</span>-->
  598. <!-- <span v-else>{{ scope.row.levelCode }}</span>-->
  599. <!-- </div>-->
  600. <!-- <div v-else>-->
  601. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  602. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  603. <!-- </div>-->
  604. <!-- </template>-->
  605. <!-- </el-table-column>-->
  606. <!-- </el-table>-->
  607. <!-- </el-tab-pane>-->
  608. <!-- </el-tabs>-->
  609. <el-dialog title="文档清单定义" @close="projectDocumentListVisibleFalse" :visible.sync="projectDocumentListVisible" width="768px" style="margin-top: 7px" :close-on-click-modal="false">
  610. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  611. <el-form-item prop="projectNo">
  612. <template #label>
  613. <span class="big-label">项目编码</span>
  614. </template>
  615. <el-input v-model="modalData.projectNo" disabled style="width: 151px;"></el-input>
  616. </el-form-item>
  617. <el-form-item prop="projectDesc" style="margin-left: 15px">
  618. <template #label>
  619. <span class="big-label">项目名称</span>
  620. </template>
  621. <el-input v-model="modalData.projectDesc" disabled style="width: 191px;"></el-input>
  622. </el-form-item>
  623. <el-form-item prop="bu" style="margin-left: 15px">
  624. <template #label>
  625. <span class="big-label">BU</span>
  626. </template>
  627. <el-input v-model="modalData.bu" disabled style="width: 151px;"></el-input>
  628. </el-form-item>
  629. </el-form>
  630. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  631. <el-form-item prop="customerNo">
  632. <template #label>
  633. <span class="big-label">客户编码</span>
  634. </template>
  635. <el-input v-model="modalData.customerNo" disabled style="width: 151px;"></el-input>
  636. </el-form-item>
  637. <el-form-item prop="customerDesc" style="margin-left: 15px">
  638. <template #label>
  639. <span class="big-label">客户名称</span>
  640. </template>
  641. <el-input v-model="modalData.customerDesc" disabled style="width: 191px;"></el-input>
  642. </el-form-item>
  643. <el-form-item prop="cProjectTypeDb" style="margin-left: 15px">
  644. <template #label>
  645. <span class="big-label">项目分类</span>
  646. </template>
  647. <el-input v-model="modalData.cProjectTypeDb" disabled style="width: 151px;"></el-input>
  648. </el-form-item>
  649. </el-form>
  650. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: 20px;">
  651. <el-form-item prop="testPartNo" :rules="rules.testPartNo">
  652. <template #label>
  653. <span class="big-label">项目料号</span>
  654. </template>
  655. <el-input v-model="modalData.testPartNo" disabled style="width: 151px;"></el-input>
  656. </el-form-item>
  657. <el-form-item prop="partDesc" style="margin-left: 15px">
  658. <template #label>
  659. <span class="big-label">料号描述</span>
  660. </template>
  661. <el-input v-model="modalData.partDesc" disabled style="width: 191px;"></el-input>
  662. </el-form-item>
  663. <el-form-item prop="proofingNo" style="margin-left: 15px">
  664. <template #label>
  665. <span class="big-label">打样单号</span>
  666. </template>
  667. <el-input v-model="modalData.proofingNo" disabled style="width: 151px;"></el-input>
  668. </el-form-item>
  669. </el-form>
  670. <el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addProjectDocumentTypeFlag = true">新增</el-button>
  671. <el-table
  672. :height="this.height + 50"
  673. :data="proofDocumentListDefinition"
  674. border
  675. style="width: 100%;">
  676. <el-table-column
  677. v-for="(item,index) in columnProjectDocumentManifestDefinitionList" :key="index"
  678. :sortable="item.columnSortable"
  679. :prop="item.columnProp"
  680. :header-align="item.headerAlign"
  681. :show-overflow-tooltip="item.showOverflowTooltip"
  682. :align="item.align"
  683. :fixed="item.fixed==''?false:item.fixed"
  684. :min-width="item.columnWidth"
  685. :label="item.columnLabel">
  686. <template slot-scope="scope">
  687. <span v-if="!item.columnHidden">{{ getColumnValue(scope.row, item) }}</span>
  688. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  689. </template>
  690. </el-table-column>
  691. <el-table-column
  692. header-align="center"
  693. align="center"
  694. width="100"
  695. label="操作">
  696. <template slot-scope="scope">
  697. <a v-if="!authDelete" type="text" size="small" @click="deleteProjectDocumentType(scope.row)">删除</a>
  698. </template>
  699. </el-table-column>
  700. </el-table>
  701. <el-footer style="height:40px;margin-top: 25px;text-align:center">
  702. <el-button @click="projectDocumentListVisible = false">关闭</el-button>
  703. </el-footer>
  704. </el-dialog>
  705. <!-- 新增文档类型 -->
  706. <el-dialog title="新增文档类型" @close="closeAddProjectDocumentTypeFlag" @open="searchProjectDocumentTypeList" :visible.sync="addProjectDocumentTypeFlag" width="768px" style="margin-top: 7px" v-drag :close-on-click-modal="false">
  707. <el-form inline="inline" label-position="top" :model="searchProjectDocumentTypeData" style="margin-left: 7px;margin-top: -5px;">
  708. <el-form-item label="文档类型ID">
  709. <el-input v-model="searchProjectDocumentTypeData.documentTypeId" clearable style="width: 151px"></el-input>
  710. </el-form-item>
  711. <el-form-item label="文档类型">
  712. <el-input v-model="searchProjectDocumentTypeData.documentType" clearable style="width: 151px"></el-input>
  713. </el-form-item>
  714. <el-form-item label="责任部门">
  715. <el-input v-model="searchProjectDocumentTypeData.responsibleDepartment" clearable style="width: 151px"></el-input>
  716. </el-form-item>
  717. <el-form-item label=" ">
  718. <el-button type="primary" style="padding: 3px 12px" @click="searchProjectDocumentTypeList()">查询</el-button>
  719. </el-form-item>
  720. </el-form>
  721. <el-table
  722. :height="this.height + 150"
  723. :data="extraProjectDocumentList"
  724. stripe
  725. border
  726. @selection-change="selectionProjectDocument"
  727. style="width: 100%;">
  728. <el-table-column
  729. header-align="center"
  730. type="selection"
  731. align="center"
  732. width="55">
  733. </el-table-column>
  734. <el-table-column
  735. prop="documentTypeId"
  736. header-align="center"
  737. align="center"
  738. width="100"
  739. label="文档类型ID">
  740. </el-table-column>
  741. <el-table-column
  742. prop="documentType"
  743. header-align="center"
  744. align="left"
  745. label="文档类型">
  746. </el-table-column>
  747. <el-table-column
  748. prop="responsibleDepartment"
  749. header-align="center"
  750. align="left"
  751. label="责任部门">
  752. </el-table-column>
  753. </el-table>
  754. <el-footer style="height:40px;margin-top: 25px;text-align:center">
  755. <el-button type="primary" @click="saveSelectionProjectDocumentType()">确定</el-button>
  756. <el-button @click="addProjectDocumentTypeFlag = false">关闭</el-button>
  757. </el-footer>
  758. </el-dialog>
  759. <el-dialog title="选择生产确认文档" :visible.sync="projectProductionValidationDocumentVisible" width="1050px" style="margin-top: -5vh" :close-on-click-modal="false">
  760. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  761. <el-form-item label="项目编码" prop="projectNo" class="red-label">
  762. <el-input v-model="modalData.projectNo" style="width: 110px;" disabled></el-input>
  763. </el-form-item>
  764. <el-form-item label="项目名称" prop="projectDesc" >
  765. <el-input v-model="modalData.projectDesc" style="width: 170px;" disabled></el-input>
  766. </el-form-item>
  767. <el-form-item label="BU" prop="bu">
  768. <el-input v-model="modalData.bu" style="width: 110px;" disabled></el-input>
  769. </el-form-item>
  770. <el-form-item label="项目料号" prop="testPartNo" >
  771. <el-input v-model="modalData.testPartNo" style="width: 110px;" disabled></el-input>
  772. </el-form-item>
  773. <el-form-item label="料号描述" prop="partDesc" >
  774. <el-input v-model="modalData.partDesc" style="width: 170px;" disabled></el-input>
  775. </el-form-item>
  776. </el-form>
  777. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  778. <el-form-item label="客户编码" prop="customerNo" >
  779. <el-input v-model="modalData.customerNo" style="width: 110px;" disabled></el-input>
  780. </el-form-item>
  781. <el-form-item label="客户名称" prop="customerDesc" >
  782. <el-input v-model="modalData.customerDesc" style="width: 170px;" disabled></el-input>
  783. </el-form-item>
  784. <el-form-item label="项目分类" prop="cProjectTypeDb">
  785. <el-input v-model="modalData.cProjectTypeDb" style="width: 110px;" disabled></el-input>
  786. </el-form-item>
  787. <el-form-item label="要求最晚确认日期" prop="wantedConfirmDate" :rules="rules.wantedConfirmDate">
  788. <el-date-picker
  789. v-model="modalData.wantedConfirmDate"
  790. type="date"
  791. placeholder="选择日期"
  792. style="width: 110px;">
  793. </el-date-picker>
  794. </el-form-item>
  795. </el-form>
  796. <el-tabs v-model="activeName1" style="margin-top: 0px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
  797. <el-tab-pane label="文档选择" name="selectDocument" style="width: 104%">
  798. <el-table
  799. v-model="selectedDocumentItems"
  800. :height="height + 250"
  801. :data="projectAllDocumentList1"
  802. border
  803. style="width: 100%;margin-top: -13px;margin-left: -14px !important; margin-right: 0 !important;"
  804. @selection-change="handleDocumentSelectionChange">
  805. <el-table-column
  806. type="selection"
  807. header-align="center"
  808. align="center"
  809. width="50">
  810. </el-table-column>
  811. <el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
  812. <el-table-column label="文档类型" align="center">
  813. <template slot-scope="scope">
  814. {{ getCombinedDocumentType(scope.row) }}
  815. </template>
  816. </el-table-column>
  817. <el-table-column
  818. v-for="(item,index) in columnProjectAllDocumentList" :key="index"
  819. :sortable="item.columnSortable"
  820. :prop="item.columnProp"
  821. :header-align="item.headerAlign"
  822. :show-overflow-tooltip="item.showOverflowTooltip"
  823. :align="item.align"
  824. :fixed="item.fixed==''?false:item.fixed"
  825. :min-width="item.columnWidth"
  826. :label="item.columnLabel">
  827. <template slot-scope="scope">
  828. <span v-if="!item.columnHidden">{{ getColumnValue(scope.row, item) }}</span>
  829. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  830. </template>
  831. </el-table-column>
  832. </el-table>
  833. </el-tab-pane>
  834. <el-tab-pane label="确认人员清单" name="confirmatory" style="width: 104%">
  835. <div style="font-size: 12px;margin-top: -15px">
  836. <el-form :inline="true" label-position="top" :model="confirmatoryData">
  837. <el-form-item :label="'用户账号'">
  838. <el-input v-model="confirmatoryData.username" clearable style="width: 120px"></el-input>
  839. </el-form-item>
  840. <el-form-item :label="'用户名称'">
  841. <el-input v-model="confirmatoryData.userDisplay" clearable style="width: 200px"></el-input>
  842. </el-form-item>
  843. <el-form-item :label="' '">
  844. <el-button type="primary" @click="searchConfirmatorList()">查询</el-button>
  845. </el-form-item>
  846. </el-form>
  847. </div>
  848. <el-container style="margin-top: -5px;margin-left: -10px">
  849. <el-main style="width: 400px; padding: 1px">
  850. <span style="font-size: 12px" >可选人员</span>
  851. <el-table
  852. :height="height + 200"
  853. :data="projectANotDocumentConfirmatorList"
  854. border
  855. ref="confirmatoryTable1"
  856. @row-click="confirmatoryClickRow1"
  857. @selection-change="selectionConfirmatory1"
  858. highlight-current-row
  859. style="width: 100%">
  860. <el-table-column
  861. type="selection"
  862. header-align="center"
  863. align="center"
  864. :selectable="selectFlag"
  865. width="50">
  866. </el-table-column>
  867. <el-table-column
  868. prop="username"
  869. header-align="center"
  870. align="center"
  871. min-width="80"
  872. label="用户账号">
  873. </el-table-column>
  874. <el-table-column
  875. prop="userDisplay"
  876. header-align="center"
  877. align="center"
  878. min-width="120"
  879. label="用户名称">
  880. </el-table-column>
  881. </el-table>
  882. </el-main>
  883. <el-main style="width: 111px;padding: 1px;margin-right: -20px">
  884. <div style="margin-top: 126px;margin-left: 7px">
  885. <el-button type="primary" @click="addConfirmatory()">添加>></el-button>
  886. </div>
  887. <div style="margin-top: 15px;margin-left: 7px">
  888. <el-button type="primary" @click="deleteConfirmatory()">删除<<</el-button>
  889. </div>
  890. </el-main>
  891. <el-main style="width: 400px;padding: 1px;margin-left: -90px">
  892. <span style="font-size: 12px" >确认人员</span>
  893. <el-table
  894. :height="height + 200"
  895. :data="projectAllDocumentConfirmatorList"
  896. border
  897. ref="confirmatoryTable2"
  898. @row-click="confirmatoryClickRow2"
  899. @selection-change="selectionConfirmatory2"
  900. highlight-current-row
  901. style="width: 96%">
  902. <el-table-column
  903. type="selection"
  904. header-align="center"
  905. align="center"
  906. :selectable="selectFlag"
  907. width="50">
  908. </el-table-column>
  909. <el-table-column
  910. prop="username"
  911. header-align="center"
  912. align="center"
  913. min-width="80"
  914. label="用户账号">
  915. </el-table-column>
  916. <el-table-column
  917. prop="userDisplay"
  918. header-align="center"
  919. align="center"
  920. min-width="120"
  921. label="用户名称">
  922. </el-table-column>
  923. </el-table>
  924. </el-main>
  925. </el-container>
  926. </el-tab-pane>
  927. </el-tabs>
  928. <div slot="footer" class="dialog-footer" style="margin-top: 6px">
  929. <el-button type="primary" @click="saveProductionValidationDocument()">确定</el-button>
  930. <el-button @click="closeProjectProductionValidationDocumentVisibleDialog">关闭</el-button>
  931. </div>
  932. </el-dialog>
  933. <el-dialog title="确认" @close="closeUploadFileVisible" :visible.sync="confirmVisible" width="619px" style="margin-top: 0vh;height: 100%;" :close-on-click-modal="false">
  934. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  935. <el-form-item label="项目编码" prop="projectNo" class="red-label">
  936. <el-input v-model="modalData.projectNo" style="width: 110px;" disabled></el-input>
  937. </el-form-item>
  938. <el-form-item label="项目名称" prop="projectDesc" >
  939. <el-input v-model="modalData.projectDesc" style="width: 210px;" disabled></el-input>
  940. </el-form-item>
  941. <el-form-item label="BU" prop="bu">
  942. <el-input v-model="modalData.bu" style="width: 110px;" disabled></el-input>
  943. </el-form-item>
  944. <el-form-item label="项目分类" prop="cProjectTypeDb">
  945. <el-input v-model="modalData.cProjectTypeDb" style="width: 110px;" disabled></el-input>
  946. </el-form-item>
  947. </el-form>
  948. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  949. <el-form-item label="项目料号" prop="testPartNo" >
  950. <el-input v-model="modalData.testPartNo" style="width: 110px;" disabled></el-input>
  951. </el-form-item>
  952. <el-form-item label="料号描述" prop="partDesc" >
  953. <el-input v-model="modalData.partDesc" style="width: 210px;" disabled></el-input>
  954. </el-form-item>
  955. <el-form-item label="指定确认人" prop="userDisplay">
  956. <el-input v-model="confirmData.userDisplay" disabled style="width: 110px;"></el-input>
  957. </el-form-item>
  958. <el-form-item label="要求确认日期" prop="wantedConfirmDate">
  959. <el-input v-model="confirmData.wantedConfirmDate" style="width: 110px;" disabled></el-input>
  960. </el-form-item>
  961. </el-form>
  962. <el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -5px;">
  963. <el-form-item label="备注" prop="remark">
  964. <el-input v-model="confirmData.remark" style="width: 581px" type="textarea" :rows="1"></el-input>
  965. </el-form-item>
  966. </el-form>
  967. <el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -15px;">
  968. <el-form-item label=" ">
  969. <a href="javascript:void(0);" @click="triggerUpload" type="text" size="small">点击选择文件</a>
  970. <tr></tr>
  971. <el-input v-model="this.fileName" readonly placeholder="文件名称" style="width: 581px"></el-input>
  972. <el-upload class="custom-upload" :file-list="fileList"
  973. action="javascript:void(0);" ref="uploadFile"
  974. :on-change="onChange" :on-close="closeFileUpdate"
  975. multiple :auto-upload="false"
  976. style="text-align: left;margin-top: 0px;margin-left: 6px;display: none;">
  977. </el-upload>
  978. </el-form-item>
  979. </el-form>
  980. <el-table
  981. :height="this.height + 70"
  982. :data="projectConfirmatorFileList"
  983. border
  984. style="width: 100%;margin-top: 25px;margin-left: 0px;">
  985. <el-table-column
  986. prop="fileName"
  987. header-align="center"
  988. align="center"
  989. min-width="180"
  990. label="文件名">
  991. </el-table-column>
  992. <el-table-column
  993. prop="createDate"
  994. header-align="center"
  995. align="center"
  996. min-width="80"
  997. label="上传时间">
  998. </el-table-column>
  999. <el-table-column
  1000. prop="createdBy"
  1001. header-align="center"
  1002. align="center"
  1003. min-width="60"
  1004. label="上传人">
  1005. </el-table-column>
  1006. </el-table>
  1007. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1008. <el-button type="primary" @click="saveUploadFile()">确定</el-button>
  1009. <el-button @click="closeUploadFileVisible()">关闭</el-button>
  1010. </div>
  1011. </el-dialog>
  1012. <el-dialog title="查看附件" @close="closeViewDocumentFileVisible" :visible.sync="viewDocumentFileVisible" width="770px" style="margin-top: 0vh" :close-on-click-modal="false">
  1013. <el-table
  1014. :height="height + 200"
  1015. :data="projectConfirmatorFileList"
  1016. border
  1017. style="width: 100%;margin-top: 0px;margin-left: 0px;">
  1018. <el-table-column
  1019. prop="fileName"
  1020. header-align="center"
  1021. align="left"
  1022. min-width="250"
  1023. label="文件名">
  1024. </el-table-column>
  1025. <el-table-column
  1026. prop="createDate"
  1027. header-align="center"
  1028. align="center"
  1029. min-width="80"
  1030. label="上传时间">
  1031. </el-table-column>
  1032. <el-table-column
  1033. prop="createdBy"
  1034. header-align="center"
  1035. align="center"
  1036. min-width="50"
  1037. label="上传人">
  1038. </el-table-column>
  1039. <el-table-column
  1040. header-align="center"
  1041. align="center"
  1042. width="100"
  1043. label="操作">
  1044. <template slot-scope="scope">
  1045. <a type="text" size="small" @click="viewFile(scope.row)">查看</a>
  1046. <a type="text" size="small" @click="downloadFile(scope.row)">下载</a>
  1047. <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
  1048. </template>
  1049. </el-table-column>
  1050. </el-table>
  1051. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1052. <el-button @click="closeViewDocumentFileVisible()">关闭</el-button>
  1053. </div>
  1054. </el-dialog>
  1055. <el-dialog title="查看附件" @close="closeViewMassDocumentFileVisible" :visible.sync="viewMassDocumentFileVisible" width="770px" style="margin-top: 0vh" :close-on-click-modal="false">
  1056. <el-table
  1057. :height="height + 200"
  1058. :data="projectConfirmatorFileList"
  1059. border
  1060. style="width: 100%;margin-top: 0px;margin-left: 0px;">
  1061. <el-table-column
  1062. prop="fileName"
  1063. header-align="center"
  1064. align="left"
  1065. min-width="250"
  1066. label="文件名">
  1067. </el-table-column>
  1068. <el-table-column
  1069. prop="createDate"
  1070. header-align="center"
  1071. align="center"
  1072. min-width="80"
  1073. label="上传时间">
  1074. </el-table-column>
  1075. <el-table-column
  1076. prop="createdBy"
  1077. header-align="center"
  1078. align="center"
  1079. min-width="50"
  1080. label="上传人">
  1081. </el-table-column>
  1082. <el-table-column
  1083. header-align="center"
  1084. align="center"
  1085. width="100"
  1086. label="操作">
  1087. <template slot-scope="scope">
  1088. <a type="text" size="small" @click="viewFile(scope.row)">查看</a>
  1089. <a type="text" size="small" @click="downloadFile(scope.row)">下载</a>
  1090. </template>
  1091. </el-table-column>
  1092. </el-table>
  1093. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1094. <el-button @click="closeViewMassDocumentFileVisible()">关闭</el-button>
  1095. </div>
  1096. </el-dialog>
  1097. <el-dialog title="新增打样" :visible.sync="visible" v-drag width="768px" style="margin-top: 7px" :close-on-click-modal="false">
  1098. <el-form :inline="true" label-position="top" :model="newProofingRecordData" style="margin-left: 7px;margin-top: -5px;">
  1099. <el-form-item prop="projectNo">
  1100. <template #label>
  1101. <span class="big-label">项目编码</span>
  1102. </template>
  1103. <el-input v-model="newProofingRecordData.projectNo" style="width: 189px;" disabled></el-input>
  1104. </el-form-item>
  1105. <el-form-item prop="projectDesc" style="margin-left: 15px">
  1106. <template #label>
  1107. <span class="big-label">项目名称</span>
  1108. </template>
  1109. <el-input v-model="newProofingRecordData.projectDesc" style="width: 330px;" disabled></el-input>
  1110. </el-form-item>
  1111. <el-form-item prop="bu" style="margin-left: 15px" :rules="rules.bu">
  1112. <template #label>
  1113. <span class="big-label">BU</span>
  1114. </template>
  1115. <el-select v-model="newProofingRecordData.bu" placeholder="请选择" style="width: 154px" disabled>
  1116. <el-option
  1117. v-for="i in userBuList"
  1118. :key="i.buNo"
  1119. :label="i.buDesc"
  1120. :value="i.buNo">
  1121. </el-option>
  1122. </el-select>
  1123. </el-form-item>
  1124. </el-form>
  1125. <el-form :inline="true" label-position="top" :model="newProofingRecordData" style="margin-left: 7px;margin-top: 20px;">
  1126. <el-form-item prop="customerNo">
  1127. <template #label>
  1128. <span class="big-label">客户编码</span>
  1129. </template>
  1130. <el-input v-model="newProofingRecordData.customerNo" style="width: 189px;" disabled></el-input>
  1131. </el-form-item>
  1132. <el-form-item prop="customerDesc" style="margin-left: 15px">
  1133. <template #label>
  1134. <span class="big-label">客户名称</span>
  1135. </template>
  1136. <el-input v-model="newProofingRecordData.customerDesc" style="width: 330px;" disabled></el-input>
  1137. </el-form-item>
  1138. </el-form>
  1139. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1140. <el-form-item prop="testPartNo" :rules="rules.testPartNo">
  1141. <template #label>
  1142. <span class="big-label">项目料号</span>
  1143. </template>
  1144. <el-input v-model="newProofingRecordData.testPartNo" style="width: 189px;" disabled></el-input>
  1145. </el-form-item>
  1146. <el-form-item prop="partDesc" style="margin-left: 15px">
  1147. <template #label>
  1148. <span class="big-label">料号描述</span>
  1149. </template>
  1150. <el-input v-model="newProofingRecordData.partDesc" style="width: 330px;" disabled></el-input>
  1151. </el-form-item>
  1152. </el-form>
  1153. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1154. <el-form-item prop="cProjectTypeDb">
  1155. <template #label>
  1156. <span class="big-label">项目分类</span>
  1157. </template>
  1158. <el-select v-model="newProofingRecordData.cProjectTypeDb" placeholder="请选择" clearable style="width: 189px">
  1159. <el-option
  1160. v-for="i in cProjectTypeDbList"
  1161. :key="i.cProjectTypeDb"
  1162. :label="i.cProjectTypeDb"
  1163. :value="i.cProjectTypeDb">
  1164. </el-option>
  1165. </el-select>
  1166. </el-form-item>
  1167. <el-form-item prop="projectPhase" style="margin-left: 15px" :rules="rules.projectPhase">
  1168. <template #label>
  1169. <span class="big-label">项目阶段</span>
  1170. </template>
  1171. <el-select v-model="newProofingRecordData.projectPhase" placeholder="请选择" clearable style="width: 150px">
  1172. <el-option
  1173. v-for="i in projectPhaseList"
  1174. :key="i.projectPhase"
  1175. :label="i.projectPhase"
  1176. :value="i.projectPhase">
  1177. </el-option>
  1178. </el-select>
  1179. </el-form-item>
  1180. <el-form-item prop="proofingNo" style="margin-left: 15px" :rules="rules.proofingNo">
  1181. <template #label>
  1182. <span class="big-label">打样单号</span>
  1183. </template>
  1184. <el-input v-model="newProofingRecordData.proofingNo" style="width: 151px;"></el-input>
  1185. </el-form-item>
  1186. <el-form-item prop="proofingNumber" style="margin-left: 15px" :rules="rules.proofingNo">
  1187. <template #label>
  1188. <span class="big-label">数量</span>
  1189. </template>
  1190. <el-input v-model="newProofingRecordData.proofingNumber" style="width: 154px"></el-input>
  1191. </el-form-item>
  1192. </el-form>
  1193. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1194. <el-form-item prop="" :rules="rules.planStartDate">
  1195. <template #label>
  1196. <span class="big-label">打样开始日期</span>
  1197. </template>
  1198. <el-date-picker
  1199. v-model="newProofingRecordData.planStartDate"
  1200. type="date"
  1201. placeholder="选择日期"
  1202. style="width: 189px;"
  1203. >
  1204. </el-date-picker>
  1205. </el-form-item>
  1206. <el-form-item prop="" style="margin-left: 15px" :rules="rules.requiredDeliveryDate">
  1207. <template #label>
  1208. <span class="big-label">预计完成日期</span>
  1209. </template>
  1210. <el-date-picker
  1211. v-model="newProofingRecordData.requiredDeliveryDate"
  1212. type="date"
  1213. placeholder="选择日期"
  1214. style="width: 150px;"
  1215. >
  1216. </el-date-picker>
  1217. </el-form-item>
  1218. <el-form-item prop="" style="margin-left: 15px">
  1219. <template #label>
  1220. <span class="big-label">实际完成日期</span>
  1221. </template>
  1222. <el-date-picker
  1223. v-model="newProofingRecordData.actualityDeliveryDate"
  1224. type="date"
  1225. placeholder="选择日期"
  1226. style="width: 151px;"
  1227. disabled>
  1228. </el-date-picker>
  1229. </el-form-item>
  1230. </el-form>
  1231. <el-form :inline="true" label-position="top" :model="newProofingRecordData" :rules="rules" style="margin-left: 7px;margin-top: 20px;">
  1232. <el-form-item prop="remark">
  1233. <template #label>
  1234. <span class="big-label">备注</span>
  1235. </template>
  1236. <el-input v-model="newProofingRecordData.remark" style="width: 731px" type="textarea" :rows="2"></el-input>
  1237. </el-form-item>
  1238. </el-form>
  1239. <el-footer style="height:40px;margin-top: 45px;text-align:center">
  1240. <el-button @click="visible = false"> </el-button>
  1241. <el-button type="primary" @click="newProofingRecord()"> </el-button>
  1242. </el-footer>
  1243. </el-dialog>
  1244. <!-- 模态框详情 -->
  1245. <el-dialog :visible.sync="dialogVisible" width="80%" style="margin-top: -15px">
  1246. <el-tabs style="margin-top: -2px; width: 100%; height: 100%;" v-model="activeModalTab" type="border-card" @tab-click="tabClick">
  1247. <el-tab-pane label="打样记录" name="proofRecord">
  1248. <!-- 注意这里使用了一个新的 ref用于模态框内部的 proofRecord 组件 -->
  1249. <proofRecord ref="proofRecordModal" :inModal="true"></proofRecord>
  1250. </el-tab-pane>
  1251. <el-tab-pane label="转量产阶段文档" name="massProductionStage">
  1252. <el-button type="primary" v-if="!this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>
  1253. <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿'" icon="el-icon-upload" style="margin-top: -5px" @click="uploadOtherDocument()">上传其他文档</el-button>
  1254. <el-button type="primary" v-if="this.sendMassMailFlag === true && !this.authUpdate" style="margin-top: -5px" @click="sendMassMailHandle()">邮件提醒</el-button>
  1255. <el-button type="primary" v-loading="this.downloadLoading" v-if="projectOtherDocumentList.length>0" style="margin-top: -3px;" @click="dowloadAllFile()">一键下载</el-button>
  1256. <el-table
  1257. :data="projectOtherDocumentList"
  1258. border
  1259. style="width: 100%;margin-top: 5px;"
  1260. :height="this.height + 250"
  1261. ref="proofDocumentTable"
  1262. @row-click="projectOtherDocumentClickRow"
  1263. @current-change="changeCurrentRow1"
  1264. :row-class-name="tableRowClassName"
  1265. v-loading="dataListLoading">
  1266. <el-table-column
  1267. v-if="this.authUpdate"
  1268. header-align="center"
  1269. align="center"
  1270. width="120"
  1271. fixed="left"
  1272. label="操作">
  1273. <template slot-scope="scope">
  1274. <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>
  1275. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1276. @click="copyFile(scope.row)">复制</a>
  1277. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1278. <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"
  1279. @click="massProductionDocumentDelete(scope.row)">删除</a>
  1280. </template>
  1281. </el-table-column>
  1282. <el-table-column
  1283. v-else
  1284. header-align="center"
  1285. align="center"
  1286. width="150"
  1287. fixed="left"
  1288. label="操作">
  1289. <template slot-scope="scope">
  1290. <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>
  1291. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1292. @click="copyFile(scope.row)">复制</a>
  1293. <a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && !shouldShowDelete(scope.row)" @click="warnSendMail(scope.row)">提醒</a>
  1294. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.projectPhase === 'SOP文档'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1295. <a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>
  1296. </template>
  1297. </el-table-column>
  1298. <el-table-column label="序号" type="index" align="center" :index="indexMethod">
  1299. <template slot-scope="scope">
  1300. <span>
  1301. {{ scope.$index + 1 }}
  1302. </span>
  1303. </template>
  1304. </el-table-column>
  1305. <el-table-column label="文档类型" align="left">
  1306. <template slot-scope="scope">
  1307. <span>
  1308. {{ getCombinedDocumentType(scope.row) }}
  1309. </span>
  1310. </template>
  1311. </el-table-column>
  1312. <el-table-column
  1313. v-for="(item,index) in columnFileContentArray" :key="index"
  1314. :sortable="item.columnSortable"
  1315. :prop="item.columnProp"
  1316. :header-align="item.headerAlign"
  1317. :show-overflow-tooltip="item.showOverflowTooltip"
  1318. :align="item.align"
  1319. :fixed="item.fixed==''?false:item.fixed"
  1320. :min-width="item.columnWidth"
  1321. :label="item.columnLabel">
  1322. <template slot-scope="scope">
  1323. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1324. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1325. style="width: 100px; height: 80px"/></span>
  1326. </template>
  1327. </el-table-column>
  1328. </el-table>
  1329. </el-tab-pane>
  1330. <el-tab-pane label="所有文档" name="allDocument">
  1331. <el-button type="primary" v-if="this.proofingCurrentRow.status !== '草稿' && !this.authUpdate" icon="el-icon-upload" style="margin-top: -5px" @click="projectProductionValidationDocument()">选择生产确认文档</el-button>
  1332. <el-button type="primary" v-loading="this.downloadLoading" v-if="projectAllDocumentList.length>0" style="margin-top: -3px;" @click="dowloadAllFile2()">一键下载</el-button>
  1333. <el-table
  1334. :data="projectAllDocumentList"
  1335. border
  1336. style="width: 100%;margin-top: 5px;"
  1337. :height="this.height + 250"
  1338. ref="projectAllDocumentDocumentTable"
  1339. @row-click="projectAllDocumentClickRow"
  1340. v-loading="dataListLoading"
  1341. :row-class-name="tableRowClassName">
  1342. <el-table-column
  1343. v-if="this.authUpdate"
  1344. header-align="center"
  1345. fixed="left"
  1346. align="center"
  1347. width="90"
  1348. label="操作">
  1349. <template slot-scope="scope">
  1350. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1351. <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>
  1352. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1353. @click="copyFile(scope.row)">复制</a>
  1354. <a type="text" size="small" v-if="shouldShowDelete(scope.row) && scope.row.createdBy === $store.state.user.name"
  1355. @click="massProductionDocumentDelete(scope.row)">删除</a>
  1356. </template>
  1357. </el-table-column>
  1358. <el-table-column
  1359. v-else
  1360. header-align="center"
  1361. fixed="left"
  1362. align="center"
  1363. width="90"
  1364. label="操作">
  1365. <template slot-scope="scope">
  1366. <a type="text" size="small" v-if="shouldShowDelete(scope.row) || scope.row.uploadedFlag === 'Y'" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1367. <a type="text" size="small" v-if="scope.row.uploadedFlag === 'N'" @click="uploadAllDocumentFile(scope.row)">上传文件</a>
  1368. <a type="primary" size="small" v-if="scope.row.documentDefinitionListId !== '-1' && scope.row.documentId === null"
  1369. @click="copyFile(scope.row)">复制</a>
  1370. <a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>
  1371. </template>
  1372. </el-table-column>
  1373. <el-table-column label="序号" type="index" align="center" :index="indexMethod">
  1374. <template slot-scope="scope">
  1375. <span>
  1376. {{ scope.$index + 1 }}
  1377. </span>
  1378. </template>
  1379. </el-table-column>
  1380. <el-table-column label="文档类型" align="left">
  1381. <template slot-scope="scope">
  1382. <span>
  1383. {{ getCombinedDocumentType(scope.row) }}
  1384. </span>
  1385. </template>
  1386. </el-table-column>
  1387. <el-table-column
  1388. v-for="(item,index) in columnProjectAllDocumentList" :key="index"
  1389. :sortable="item.columnSortable"
  1390. :prop="item.columnProp"
  1391. :header-align="item.headerAlign"
  1392. :show-overflow-tooltip="item.showOverflowTooltip"
  1393. :align="item.align"
  1394. :fixed="item.fixed==''?false:item.fixed"
  1395. :min-width="item.columnWidth"
  1396. :label="item.columnLabel">
  1397. <template slot-scope="scope">
  1398. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1399. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1400. style="width: 100px; height: 80px"/></span>
  1401. </template>
  1402. </el-table-column>
  1403. </el-table>
  1404. </el-tab-pane>
  1405. <el-tab-pane label="生产文档确认进度" name="productionDocumentsConfirmProgress">
  1406. <el-row>
  1407. <el-col :span="8" class="left-section">
  1408. <div class="table-container" style="height: 100%;margin-top: -5px">
  1409. <p style="margin-top: -5px">文档清单</p>
  1410. <el-table :data="confirmProgressDocumentList"
  1411. border
  1412. style="width: 100%;margin-top: -5px;"
  1413. :height="this.height + 95">
  1414. <el-table-column header-align="center" align="center" width="50" prop="itemNo" label="序号"></el-table-column>
  1415. <el-table-column header-align="center" align="left" prop="documentType" label="文档类型"></el-table-column>
  1416. <el-table-column header-align="center" align="left" prop="fileName" label="文件名"></el-table-column>
  1417. <el-table-column
  1418. header-align="center"
  1419. align="center"
  1420. width="90"
  1421. fixed="right"
  1422. label="操作">
  1423. <template slot-scope="scope">
  1424. <a type="text" size="small" @click="viewMassDocumentFile(scope.row)">查看附件</a>
  1425. </template>
  1426. </el-table-column>
  1427. </el-table>
  1428. </div>
  1429. </el-col>
  1430. <el-col :span="15" class="right-section">
  1431. <div class="table-container" style="height: 100%;margin-top: -5px">
  1432. <p style="margin-top: -5px">推送人员清单</p>
  1433. <el-table :data="confirmProgressPusherList"
  1434. border
  1435. style="width: 100%;margin-top: -5px;"
  1436. :height="this.height + 95">
  1437. <el-table-column header-align="center" align="center" width="40" prop="itemNo" label="序号"></el-table-column>
  1438. <el-table-column header-align="center" align="left" width="70" prop="userDisplay" label="指定确认人"></el-table-column>
  1439. <el-table-column header-align="center" align="center" :formatter="formatDate" prop="wantedConfirmDate" label="要求确认日期"></el-table-column>
  1440. <el-table-column header-align="center" align="center" prop="confirmFlag" label="是否确认"></el-table-column>
  1441. <el-table-column header-align="center" align="left" prop="confirmedBy" label="实际确认人"></el-table-column>
  1442. <el-table-column header-align="center" align="left" prop="remark" label="备注"></el-table-column>
  1443. <el-table-column header-align="center" align="center" prop="confirmedDate" label="实际确认时间"></el-table-column>
  1444. <el-table-column header-align="center" align="center" prop="createDate" label="推送时间"></el-table-column>
  1445. <el-table-column header-align="center" align="left" prop="createBy" label="推送人"></el-table-column>
  1446. <el-table-column
  1447. header-align="center"
  1448. align="center"
  1449. width="90"
  1450. fixed="left"
  1451. label="操作">
  1452. <template slot-scope="scope">
  1453. <a type="text" size="small" @click="confirmDocument(scope.row)">确认</a>
  1454. <a type="text" size="small" @click="viewDocumentFile(scope.row)">查看附件</a>
  1455. </template>
  1456. </el-table-column>
  1457. </el-table>
  1458. </div>
  1459. </el-col>
  1460. </el-row>
  1461. </el-tab-pane>
  1462. <el-tab-pane label="量产BOM" name="massProductionBOM">
  1463. <el-table
  1464. :data="projectPartBomList"
  1465. row-key="levelCode"
  1466. border
  1467. style="width: 100%; margin-top: 5px;"
  1468. :height="this.height + 250"
  1469. ref="projectBomTable"
  1470. v-loading="dataListLoading"
  1471. :tree-props="{ children: 'children' }">
  1472. <!-- 数据列 -->
  1473. <el-table-column
  1474. label=""
  1475. prop=""
  1476. header-align="center"
  1477. align="center"
  1478. width="80">
  1479. </el-table-column>
  1480. <el-table-column
  1481. v-for="(item, index) in columnProjectBomList"
  1482. :key="index"
  1483. :sortable="item.columnSortable"
  1484. :prop="item.columnProp"
  1485. :header-align="item.headerAlign"
  1486. :show-overflow-tooltip="item.showOverflowTooltip"
  1487. :align="item.align"
  1488. :fixed="item.fixed === '' ? false : item.fixed"
  1489. :min-width="item.columnWidth"
  1490. :label="item.columnLabel">
  1491. <template slot-scope="scope">
  1492. <div v-if="item.columnProp === 'levelCode'">
  1493. <span v-if="scope.row.levelCode === '1'">{{ '主BOM' }}</span>
  1494. <span v-else>{{ scope.row.levelCode }}</span>
  1495. </div>
  1496. <div v-else>
  1497. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1498. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1499. </div>
  1500. </template>
  1501. </el-table-column>
  1502. </el-table>
  1503. </el-tab-pane>
  1504. <el-tab-pane label="产品工艺路线" name="Routing">
  1505. <el-table
  1506. :data="projectPartRoutingList"
  1507. border
  1508. style="width: 100%; margin-top: 5px;"
  1509. :height="this.height + 250"
  1510. ref="projectBomTable"
  1511. v-loading="dataListLoading"
  1512. >
  1513. <!-- 数据列 -->
  1514. <el-table-column
  1515. v-for="(item, index) in columnProjectRoutingList"
  1516. :key="index"
  1517. :sortable="item.columnSortable"
  1518. :prop="item.columnProp"
  1519. :header-align="item.headerAlign"
  1520. :show-overflow-tooltip="item.showOverflowTooltip"
  1521. :align="item.align"
  1522. :fixed="item.fixed === '' ? false : item.fixed"
  1523. :min-width="item.columnWidth"
  1524. :label="item.columnLabel">
  1525. <template slot-scope="scope">
  1526. <div v-if="item.columnProp === 'levelCode'">
  1527. <span v-if="scope.row.levelCode === '1'">{{ '1' }}</span>
  1528. <span v-else>{{ scope.row.levelCode }}</span>
  1529. </div>
  1530. <div v-else>
  1531. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1532. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1533. </div>
  1534. </template>
  1535. </el-table-column>
  1536. </el-table>
  1537. </el-tab-pane>
  1538. </el-tabs>
  1539. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1540. <el-button @click="dialogVisible = false">关闭</el-button>
  1541. </div>
  1542. </el-dialog>
  1543. <!-- 复制文件模态框 -->
  1544. <el-dialog title="复制" @close="closeCopyDocumentFileFlag" @open="searchCopyDocumentFileList"
  1545. :visible.sync="copyDialog" width="1168px" style="margin-top: -15px" v-drag
  1546. :close-on-click-modal="false" append-to-body>
  1547. <el-form inline="inline" label-position="top" :model="copyModalData" style="margin-left: 7px;margin-top: -5px;">
  1548. <el-form-item label="项目编码">
  1549. <el-input v-model="copyModalData.projectNo" readonly style="width: 101px"></el-input>
  1550. </el-form-item>
  1551. <el-form-item label="项目名称">
  1552. <el-input v-model="copyModalData.projectDesc" readonly style="width: 181px"></el-input>
  1553. </el-form-item>
  1554. <el-form-item label="物料编码">
  1555. <el-input v-model="copyModalData.testPartNo" readonly style="width: 101px"></el-input>
  1556. </el-form-item>
  1557. <el-form-item label="物料描述">
  1558. <el-input v-model="copyModalData.partDesc" readonly style="width: 181px"></el-input>
  1559. </el-form-item>
  1560. <el-form-item label="打样单号">
  1561. <el-input v-model="copyModalData.proofingNo" readonly style="width: 101px"></el-input>
  1562. </el-form-item>
  1563. </el-form>
  1564. <el-form inline="inline" label-position="top" :model="copyModalData" style="margin-left: 7px;margin-top: -5px;">
  1565. <el-form-item label="文档类型ID">
  1566. <el-input v-model="copyModalData.documentTypeId" readonly style="width: 101px"></el-input>
  1567. </el-form-item>
  1568. <el-form-item label="文档类型">
  1569. <el-input v-model="copyModalData.documentType" readonly style="width: 181px"></el-input>
  1570. </el-form-item>
  1571. <el-form-item label="结论" :rules="rules.conclusion" v-if="copyModalData.proofingNo !== '*'">
  1572. <el-select v-model="copyModalData.conclusion" placeholder="请选择" clearable style="width: 101px">
  1573. <el-option label = "合格" value = "合格"></el-option>
  1574. <el-option label = "不合格" value = "不合格"></el-option>
  1575. <el-option label = "让步接受" value = "让步接受"></el-option>
  1576. <el-option label = "N/A" value = "N/A"></el-option>
  1577. </el-select>
  1578. </el-form-item>
  1579. </el-form>
  1580. <el-table
  1581. :height="this.height + 200"
  1582. :data="copyDocumentList"
  1583. border
  1584. @selection-change="selectionCopyDocument"
  1585. style="width: 100%;">
  1586. <el-table-column
  1587. type="selection"
  1588. align="center"
  1589. width="55">
  1590. </el-table-column>
  1591. <el-table-column
  1592. prop="testPartNo"
  1593. header-align="center"
  1594. align="left"
  1595. width="141"
  1596. label="物料编码">
  1597. </el-table-column>
  1598. <el-table-column
  1599. prop="partDesc"
  1600. header-align="center"
  1601. align="left"
  1602. width="191"
  1603. label="物料描述">
  1604. </el-table-column>
  1605. <el-table-column
  1606. prop="proofingNo"
  1607. header-align="center"
  1608. align="left"
  1609. label="打样单号">
  1610. </el-table-column>
  1611. <el-table-column
  1612. prop="documentTypeId"
  1613. header-align="center"
  1614. align="left"
  1615. label="文档类型ID">
  1616. </el-table-column>
  1617. <el-table-column
  1618. prop="documentType"
  1619. header-align="center"
  1620. align="left"
  1621. label="文档类型">
  1622. </el-table-column>
  1623. <el-table-column
  1624. prop="fileName"
  1625. header-align="center"
  1626. align="left"
  1627. width="191"
  1628. label="文档文件">
  1629. </el-table-column>
  1630. <el-table-column
  1631. prop="createDate"
  1632. header-align="center"
  1633. align="center"
  1634. label="上传时间">
  1635. </el-table-column>
  1636. <el-table-column
  1637. prop="createdBy"
  1638. header-align="center"
  1639. align="left"
  1640. label="上传人">
  1641. </el-table-column>
  1642. </el-table>
  1643. <el-footer style="height:40px;margin-top: 25px;text-align:center">
  1644. <el-button type="primary" @click="saveSelectionCopyDocumentType()">确定</el-button>
  1645. <el-button @click="copyDialog = false">关闭</el-button>
  1646. </el-footer>
  1647. </el-dialog>
  1648. <upload-file-list-1 folder="projectPMPDocumentFiles" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="otherDocumentCurrentRow.documentTypeId" :no-type="otherDocumentCurrentRow.documentType"
  1649. :proofing-id="proofingCurrentRow.proofingId" :proofing-no="proofingCurrentRow.proofingNo" :bu="proofingCurrentRow.buNo" :site="proofingCurrentRow.site" :upload-dialog.sync="uploadDialog" :no-desc="otherDocumentCurrentRow.documentDesc" :id="otherDocumentCurrentRow.id"
  1650. :project-id="proofingCurrentRow.projectId" :project-no="proofingCurrentRow.projectNo" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType" :conclusion="'N/A'"
  1651. :customer-no="proofingCurrentRow.customerNo" :customer-desc="proofingCurrentRow.customerDesc" :test-part-no="proofingCurrentRow.testPartNo" :project-part-id="proofingCurrentRow.projectPartId" :project-part-no="proofingCurrentRow.projectPartId"
  1652. :part-desc="proofingCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectOtherDocumentList"
  1653. path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-1>
  1654. <upload-file-list-2 :folder="this.folder" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="projectAllDocumentCurrentRow.documentTypeId" :no-type="projectAllDocumentCurrentRow.documentType"
  1655. :proofing-id="projectAllDocumentCurrentRow.proofingId" :proofing-no="projectAllDocumentCurrentRow.proofingNo" :bu="proofingCurrentRow.buNo" :site="proofingCurrentRow.site" :upload-dialog.sync="uploadDialog1" :no-desc="projectAllDocumentCurrentRow.documentDesc" :id="projectAllDocumentCurrentRow.id"
  1656. :project-id="proofingCurrentRow.projectId" :project-no="proofingCurrentRow.projectNo" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType" :conclusion="'N/A'"
  1657. :customer-no="proofingCurrentRow.customerNo" :customer-desc="proofingCurrentRow.customerDesc" :test-part-no="proofingCurrentRow.testPartNo" :project-part-id="proofingCurrentRow.projectPartId" :project-part-no="proofingCurrentRow.projectPartId"
  1658. :part-desc="proofingCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectPartDocumentList"
  1659. path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-2>
  1660. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  1661. </div>
  1662. </template>
  1663. <script>
  1664. import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
  1665. import {
  1666. searchBusinessInfo,
  1667. searchBusinessInfo1,
  1668. searchBusinessInfo2,
  1669. searchBusinessInfo3,
  1670. searchBusinessInfo4,
  1671. searchBusinessInfo5,
  1672. searchBusinessInfo6
  1673. } from "@/api/factory/site.js"
  1674. import Chooselist from '@/views/modules/common/Chooselist_eam'
  1675. import {removeUserFavorite, saveUserFavorite, userFavoriteList} from '@/api/userFavorite.js'
  1676. import {getTableDefaultListLanguage, getTableUserListLanguage,} from "@/api/table.js";
  1677. import proofRecord from "./com_project_proof_record";
  1678. import {
  1679. eamProjectInfoDelete,
  1680. eamProjectInfoEdit,
  1681. eamProjectInfoSave,
  1682. eamProjectInfoSearch,
  1683. saveFormalPartNo
  1684. } from "@/api/eam/eamProject.js";
  1685. import {getProjectOtherDocument} from "@/api/eam/eamProofing.js";
  1686. import UploadFileList1 from "../common/uploadFileList1.vue";
  1687. import UploadFileList2 from "../common/uploadFileList1.vue";
  1688. import {
  1689. copyDocumentFileToDoc,
  1690. deleteDocumentType, deleteProofDocument,
  1691. editProjectDocument, getCopyDocumentFileList,
  1692. getExtraDocumentList, getProofDocument,
  1693. projectDocumentSave,
  1694. proofingDocumentNEW, proofingDocumentSave, proofingInformationSave,
  1695. searchProjectAllDocument
  1696. } from "../../../api/eam/eamProofing";
  1697. import {
  1698. deleteAndSaveHandle,
  1699. saveHandle,
  1700. checkConfirmationRecord,
  1701. checkProductionValidationDocument,
  1702. deleteDocumentInformation,
  1703. deleteProjectFile,
  1704. saveProductionValidationDocument,
  1705. saveProductionValidationDocumentConfirmator,
  1706. searchConfirmatorList,
  1707. searchConfirmProgressDocumentList,
  1708. searchConfirmProgressPusherList,
  1709. searchProjectConfirmatorFileList,
  1710. sendMailHandle,
  1711. updateProjectDocumentConfirm,
  1712. uploadProjectFile,
  1713. warnSendMailHandle,
  1714. confirmatorSendMailHandle,
  1715. eamProjectPartSearch,
  1716. eamProjectPartInfoEdit,
  1717. eamProjectPartInfoCancelEdit,
  1718. getFinalPartDesc,
  1719. addConfirmatory,
  1720. deleteConfirmatory,
  1721. queryEamProjectPart,
  1722. searchMassProductionBomList,
  1723. searchRoutingList
  1724. } from "../../../api/eam/eamProject";
  1725. import row from "element-ui/packages/row";
  1726. import moment from 'moment';
  1727. import 'moment/locale/zh-cn';
  1728. import {downLoadObjectFile2} from "../../../api/eam/eam_object_list";
  1729. import {EventBus} from "../../../main";
  1730. import {arrayToTreeByLevelCode} from "../../../utils/arrayToTreeByLevelCode";
  1731. import {updateColumnSize} from "../../../api/table";
  1732. import {uploadFileList} from '@/api/base/baseFunction.js';
  1733. /*打样记录組件*/
  1734. export default {
  1735. computed: {
  1736. row() {
  1737. return row
  1738. },
  1739. projectOwnersList() {
  1740. return this.allPersonnelInfoList.filter(item => item.projectOwnerId !== undefined);
  1741. },
  1742. projectManagersList() {
  1743. return this.allPersonnelInfoList.filter(item => item.projectManagerId !== undefined);
  1744. },
  1745. engineersList() {
  1746. return this.allPersonnelInfoList.filter(item => item.engineerId !== undefined);
  1747. },
  1748. finalPartNosList() {
  1749. return this.allPersonnelInfoList.filter(item => item.finalPartNoId !== undefined);
  1750. },
  1751. },
  1752. components: {
  1753. UploadFileList1,
  1754. UploadFileList2,
  1755. Chooselist,
  1756. proofRecord,
  1757. },
  1758. watch: {
  1759. searchData: {
  1760. deep: true,
  1761. handler: function (newV, oldV) {
  1762. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  1763. }
  1764. },
  1765. projectProductionValidationDocumentVisible(newVal) {
  1766. if (newVal) {
  1767. this.activeName1 = 'selectDocument';
  1768. }
  1769. },
  1770. // 如果projectOtherDocumentList改变,遍历projectOtherDocumentList
  1771. projectOtherDocumentList: {
  1772. deep: true,
  1773. handler: function (newV, oldV) {
  1774. const sendMassMailFlags = [];
  1775. this.projectOtherDocumentList.forEach(item => {
  1776. if (item.uploadedFlag === 'N') {
  1777. sendMassMailFlags.push(item.uploadedFlag)
  1778. }
  1779. })
  1780. this.sendMassMailFlag = sendMassMailFlags.includes('N');
  1781. }
  1782. },
  1783. },
  1784. data () {
  1785. return {
  1786. // 是否收藏
  1787. favorite: false,
  1788. // 导出 start
  1789. exportData: [],
  1790. exportName: "项目物料" + this.dayjs().format('YYYYMMDDHHmmss'),
  1791. exportHeader: ["项目物料"],
  1792. exportFooter: [],
  1793. exportList:[],
  1794. authSearch: false,
  1795. authSave: false,
  1796. authUpdate: false,
  1797. authDelete: false,
  1798. dialogVisible: false, // 控制模态框显示
  1799. activeModalTab: 'proofRecord',
  1800. // 导出 end
  1801. tagNo:'',
  1802. fileName:'',
  1803. folder: '',
  1804. selectTypeFlag: [],
  1805. searchData: {
  1806. site: this.$store.state.user.site,
  1807. userName: this.$store.state.user.name,
  1808. projectId: '',
  1809. projectNo: '',
  1810. projectDesc: '',
  1811. testPartNo: '',
  1812. partDesc: '',
  1813. customerNo: '',
  1814. customerDesc: '',
  1815. buDesc: '',
  1816. projectCategory: '',
  1817. status: '',
  1818. startDate:'',
  1819. endDate:'',
  1820. projectCreationDate: new Date(),
  1821. projectCloseDate:'',
  1822. needDate:'',
  1823. projectManager: '',
  1824. projectOwner: '',
  1825. engineer: '',
  1826. cProjectRegion: '',
  1827. finalPartNo: '',
  1828. massProductionStartDate: '',
  1829. massProductionEndDate: '',
  1830. // active: 'Y',
  1831. page: 1,
  1832. limit: 10,
  1833. },
  1834. searchData1: {
  1835. site: this.$store.state.user.site,
  1836. userName: this.$store.state.user.name,
  1837. projectId: '',
  1838. projectNo: '',
  1839. projectDesc: '',
  1840. projectPartId: '',
  1841. testPartNo: '',
  1842. partDesc: '',
  1843. customerNo: '',
  1844. customerDesc: '',
  1845. buDesc: '',
  1846. projectCategory: '',
  1847. status: '',
  1848. startDate:'',
  1849. endDate:'',
  1850. projectCreationDate: new Date(),
  1851. projectCloseDate:'',
  1852. needDate:'',
  1853. // active: 'Y',
  1854. page: 1,
  1855. limit: 10,
  1856. },
  1857. height: 200,
  1858. pageIndex: 1,
  1859. pageSize: 20,
  1860. totalPage: 0,
  1861. businessDataList: [],
  1862. businessDataList1: [],
  1863. businessDataList2: [],
  1864. businessDataList3: [],
  1865. businessDataList4: [],
  1866. businessDataList5: [],
  1867. businessDataList6: [],
  1868. dataList: [],
  1869. dataListSelections: [],
  1870. roleDescList: [],
  1871. projectPartDocumentList: [],
  1872. allPersonnelInfoList: [],
  1873. allMFGList: [],
  1874. //用于储存选中的行数据
  1875. selectedDocumentItems: [],
  1876. // ======== 复选数据集 ========
  1877. businessSelections: [],
  1878. // ======== 选中的当前行数据 ========
  1879. proofingCurrentRow: {},
  1880. otherDocumentCurrentRow: {},
  1881. projectAllDocumentCurrentRow: {},
  1882. fileList: [],
  1883. downloadLoading: false,
  1884. projectOtherDocumentList: [],
  1885. extraProjectDocumentList: [],
  1886. projectDocumentSelection: [],
  1887. projectAllDocumentList: [],
  1888. projectAllDocumentList1: [],
  1889. confirmatoryList: [],
  1890. projectAllDocumentConfirmatorList: [],
  1891. projectANotDocumentConfirmatorList: [],
  1892. projectPartBomList: [],// 量产BOM原始平面数据数组
  1893. projectPartRoutingList: [],// 原始平面数据数组
  1894. confirmatorySelection1: [],
  1895. confirmatorySelection2: [],
  1896. proofDocumentListDefinition: [],
  1897. confirmProgressPusherList: [],
  1898. confirmProgressDocumentList: [],
  1899. projectConfirmatorFileList: [],
  1900. viewDocumentFileVisible: false,
  1901. viewMassDocumentFileVisible: false,
  1902. sendMassMailFlag: false,
  1903. searchProjectDocumentTypeData: {
  1904. site: this.$store.state.user.site,
  1905. projectId: '',
  1906. projectNo: '',
  1907. proofingNo: '*',
  1908. documentTypeId: '',
  1909. documentType: '',
  1910. documentDesc: '',
  1911. responsibleDepartment: '',
  1912. estimatedCompletionDays: '',
  1913. page: 1,
  1914. limit: 1000
  1915. },
  1916. dataListLoading: false,
  1917. modalFlag:false,
  1918. modalDisableFlag:false,
  1919. formalPartNoFlag:false,
  1920. projectManagerFlag:false,
  1921. projectOwnerFlag:false,
  1922. engineerFlag:false,
  1923. engineer6Flag:false,
  1924. IPQCFlag:false,
  1925. FQC1Flag:false,
  1926. MFGlag:false,
  1927. uploadDialog:false,
  1928. uploadDialog1:false,
  1929. isEditable: true,
  1930. isMassProductionStage: true,
  1931. projectDocumentListVisible: false,
  1932. addProjectDocumentTypeFlag: false,
  1933. projectProductionValidationDocumentVisible: false,
  1934. confirmVisible: false,
  1935. confirmationPrompted: false, // 是否已经进行过确认提示的标志
  1936. agencyMatters: false, // 是否代办事项
  1937. finalPartFlag: false,
  1938. visible: false, // 新增打样模态框
  1939. dataListIndex: 0,
  1940. modalData:{
  1941. flag:'',
  1942. id:'',
  1943. bu: '',
  1944. buNo: '',
  1945. site: this.$store.state.user.site,
  1946. projectId: '',
  1947. projectNo: '',
  1948. oriProjectId: '',
  1949. projectDesc:'',
  1950. projectCloseDate:'',
  1951. proofingNo:'',
  1952. needDate:'',
  1953. customerNo:'',
  1954. finalCustomerId:'',
  1955. customerDesc:'',
  1956. projectCategory:'',
  1957. testPartNo:'',
  1958. partDesc:'',
  1959. priority:'',
  1960. projectManager:'',
  1961. projectManagerName:'',
  1962. projectOwner:'',
  1963. projectOwnerName:'',
  1964. cProjectRegion:'',
  1965. cProjectBuildDate:'',
  1966. cQualityEngineer1:'',
  1967. cQualityEngineer1Name:'',
  1968. cQualityEngineer2:'',
  1969. cQualityEngineer2Name:'',
  1970. cQualityEngineer3:'',
  1971. cQualityEngineer3Name:'',
  1972. cQualityEngineer4:'',
  1973. cQualityEngineer4Name:'',
  1974. cQualityEngineer5:'',
  1975. cQualityEngineer5Name:'',
  1976. cQualityEngineer6:'',
  1977. cQualityEngineer6Name:'',
  1978. cManufactureEngineer:'',
  1979. cManufactureEngineerName:'',
  1980. docEngineer:'',
  1981. docEngineerName:'',
  1982. docEngineer2:'',
  1983. docEngineer2Name:'',
  1984. engineer:'',
  1985. engineerName:'',
  1986. ipqcHardTag:'',
  1987. ipqcHardTagName:'',
  1988. cQualityEngineer7:'',
  1989. cQualityEngineer7Name:'',
  1990. //projectCreationDate为当前服务器的时间
  1991. projectCreationDate: new Date(),
  1992. finalPartNo:'',
  1993. finalPartDesc:'',
  1994. wantedConfirmDate: new Date(),
  1995. // active:'',
  1996. createBy: this.$store.state.user.name,
  1997. updateBy: this.$store.state.user.name,
  1998. },
  1999. newProofingRecordData:{
  2000. site: this.$store.state.user.site,
  2001. projectId: '',
  2002. projectNo: '',
  2003. projectDesc: '',
  2004. bu: '',
  2005. buNo: '',
  2006. customerNo: '',
  2007. customerDesc: '',
  2008. testPartNo: '',
  2009. partDesc: '',
  2010. cProjectTypeDb: '',
  2011. projectPhase: '',
  2012. proofingNo: '',
  2013. proofingNumber: '',
  2014. planStartDate: '',
  2015. requiredDeliveryDate: '',
  2016. actualityDeliveryDate: '',
  2017. remark: '',
  2018. createBy: this.$store.state.user.name,
  2019. updateBy: this.$store.state.user.name,
  2020. },
  2021. searchBusinessData:{
  2022. site: this.$store.state.user.site,
  2023. username: '',
  2024. roleDesc: '',
  2025. userDisplay: '',
  2026. active: '',
  2027. page: 1,
  2028. limit: 10,
  2029. },
  2030. searchBusinessData1:{
  2031. site: this.$store.state.user.site,
  2032. username: '',
  2033. roleDesc: '',
  2034. userDisplay: '',
  2035. active: '',
  2036. page: 1,
  2037. limit: 10,
  2038. },
  2039. searchBusinessData2:{
  2040. site: this.$store.state.user.site,
  2041. username: '',
  2042. roleDesc: '',
  2043. userDisplay: '',
  2044. active: '',
  2045. page: 1,
  2046. limit: 10,
  2047. },
  2048. searchBusinessData3:{
  2049. site: this.$store.state.user.site,
  2050. username: '',
  2051. roleDesc: '',
  2052. userDisplay: '',
  2053. active: '',
  2054. page: 1,
  2055. limit: 10,
  2056. },
  2057. searchBusinessData4:{
  2058. site: this.$store.state.user.site,
  2059. username: '',
  2060. roleDesc: '',
  2061. userDisplay: '',
  2062. active: '',
  2063. page: 1,
  2064. limit: 10,
  2065. },
  2066. searchBusinessData5:{
  2067. site: this.$store.state.user.site,
  2068. username: '',
  2069. roleDesc: '',
  2070. userDisplay: '',
  2071. active: '',
  2072. page: 1,
  2073. limit: 10,
  2074. },
  2075. searchBusinessData6:{
  2076. site: this.$store.state.user.site,
  2077. username: '',
  2078. roleDesc: '',
  2079. userDisplay: '',
  2080. active: '',
  2081. page: 1,
  2082. limit: 10,
  2083. },
  2084. confirmData:{
  2085. site: '',
  2086. projectId: '',
  2087. projectNo: '',
  2088. orderRef1: '',
  2089. orderRef2: '',
  2090. documentId: '',
  2091. documentType: '',
  2092. itemNo: '',
  2093. userid: '',
  2094. wantedConfirmDate: '',
  2095. confirmFlag: '',
  2096. confirmedBy: '',
  2097. remark: '',
  2098. confirmedDate: '',
  2099. createDate: '',
  2100. createBy: '',
  2101. page: 1,
  2102. limit: 1000
  2103. },
  2104. confirmatoryData:{
  2105. username: '',
  2106. userDisplay: ''
  2107. },
  2108. copyModalData: {
  2109. site: this.$store.state.user.site,
  2110. username: this.$store.state.user.name,
  2111. projectId: '',
  2112. projectNo: '',
  2113. proofingId: '',
  2114. proofingNo: '',
  2115. documentTypeId: ''
  2116. },
  2117. documentCopySelection: [],
  2118. copyDocumentList: [],
  2119. copyDialog: false,
  2120. departmentList:[],
  2121. cProjectTypeDbList: [
  2122. {cProjectTypeDb: 'Sustaining'},
  2123. {cProjectTypeDb: 'Low Risk'},
  2124. {cProjectTypeDb: 'High Risk'},
  2125. ],
  2126. projectPhaseList: [
  2127. {projectPhase: 'Prototype'},
  2128. {projectPhase: 'Alpha'},
  2129. {projectPhase: 'Beta'},
  2130. {projectPhase: 'Pre-launch'},
  2131. ],
  2132. activeName: 'proofRecord',
  2133. activeName1: 'selectDocument',
  2134. // 日期限制
  2135. // pickerOptions: {
  2136. // disabledDate(time) {
  2137. // return time.getTime() > Date.now();
  2138. // },
  2139. // },
  2140. // 展示列集
  2141. columnList: [
  2142. {
  2143. userId: this.$store.state.user.name,
  2144. functionId: 401004,
  2145. serialNumber: '401004Table1BuDesc',
  2146. tableId: "401004Table1",
  2147. tableName: "项目物料表",
  2148. columnProp: 'buDesc',
  2149. headerAlign: "center",
  2150. align: "center",
  2151. columnLabel: 'BU',
  2152. columnHidden: false,
  2153. columnImage: false,
  2154. columnSortable: false,
  2155. sortLv: 0,
  2156. status: true,
  2157. fixed: '',
  2158. columnWidth: 100,
  2159. },
  2160. {
  2161. userId: this.$store.state.user.name,
  2162. functionId: 401004,
  2163. serialNumber: '401004Table1ProjectNo',
  2164. tableId: "401004Table1",
  2165. tableName: "项目物料表",
  2166. columnProp: 'projectNo',
  2167. headerAlign: "center",
  2168. align: "center",
  2169. columnLabel: '项目编码',
  2170. columnHidden: false,
  2171. columnImage: false,
  2172. columnSortable: false,
  2173. sortLv: 0,
  2174. status: true,
  2175. fixed: '',
  2176. columnWidth: 100,
  2177. },
  2178. {
  2179. userId: this.$store.state.user.name,
  2180. functionId: 401004,
  2181. serialNumber: '401004Table1ProjectDesc',
  2182. tableId: "401004Table1",
  2183. tableName: "项目物料表",
  2184. columnProp: 'projectDesc',
  2185. headerAlign: "center",
  2186. align: "center",
  2187. columnLabel: '项目名称',
  2188. columnHidden: false,
  2189. columnImage: false,
  2190. columnSortable: false,
  2191. sortLv: 0,
  2192. status: true,
  2193. fixed: '',
  2194. columnWidth: 100,
  2195. },
  2196. {
  2197. userId: this.$store.state.user.name,
  2198. functionId: 401004,
  2199. serialNumber: '401004Table1TestPartNo',
  2200. tableId: "401004Table1",
  2201. tableName: "项目物料表",
  2202. columnProp: 'testPartNo',
  2203. headerAlign: "center",
  2204. align: "center",
  2205. columnLabel: '项目料号',
  2206. columnHidden: false,
  2207. columnImage: false,
  2208. columnSortable: false,
  2209. sortLv: 0,
  2210. status: true,
  2211. fixed: '',
  2212. columnWidth: 100,
  2213. },
  2214. {
  2215. userId: this.$store.state.user.name,
  2216. functionId: 401004,
  2217. serialNumber: '401004Table1PartDesc',
  2218. tableId: "401004Table1",
  2219. tableName: "项目物料表",
  2220. columnProp: 'partDesc',
  2221. headerAlign: "center",
  2222. align: "center",
  2223. columnLabel: '料号描述',
  2224. columnHidden: false,
  2225. columnImage: false,
  2226. columnSortable: false,
  2227. sortLv: 0,
  2228. status: true,
  2229. fixed: '',
  2230. columnWidth: 100,
  2231. },
  2232. {
  2233. userId: this.$store.state.user.name,
  2234. functionId: 401004,
  2235. serialNumber: '401004Table1customerNo',
  2236. tableId: "401004Table1",
  2237. tableName: "项目物料表",
  2238. columnProp: "customerNo",
  2239. headerAlign: "center",
  2240. align: "left",
  2241. columnLabel: "客户编码",
  2242. columnHidden: false,
  2243. columnImage: false,
  2244. columnSortable: false,
  2245. sortLv: 0,
  2246. status: true,
  2247. fixed: '',
  2248. columnWidth: 100
  2249. },
  2250. {
  2251. userId: this.$store.state.user.name,
  2252. functionId: 401004,
  2253. serialNumber: '401004Table1customerDesc',
  2254. tableId: "401004Table1",
  2255. tableName: "项目物料表",
  2256. columnProp: "customerDesc",
  2257. headerAlign: "center",
  2258. align: "left",
  2259. columnLabel: "客户名称",
  2260. columnHidden: false,
  2261. columnImage: false,
  2262. columnSortable: false,
  2263. sortLv: 0,
  2264. status: true,
  2265. fixed: '',
  2266. columnWidth: 150
  2267. },
  2268. {
  2269. userId: this.$store.state.user.name,
  2270. functionId: 401004,
  2271. serialNumber: '401004Table1BuildDate',
  2272. tableId: "401004Table1",
  2273. tableName: "项目物料表",
  2274. columnProp: "buildDate",
  2275. headerAlign: "center",
  2276. align: "center",
  2277. columnLabel: "立项日期",
  2278. columnHidden: false,
  2279. columnImage: false,
  2280. columnSortable: false,
  2281. sortLv: 0,
  2282. status: true,
  2283. fixed: '',
  2284. columnWidth: 120
  2285. },
  2286. {
  2287. userId: this.$store.state.user.name,
  2288. functionId: 401004,
  2289. serialNumber: '401004Table1ProjectCategory',
  2290. tableId: "401004Table1",
  2291. tableName: "项目物料表",
  2292. columnProp: 'projectCategory',
  2293. headerAlign: "center",
  2294. align: "left",
  2295. columnLabel: '项目分类',
  2296. columnHidden: false,
  2297. columnImage: false,
  2298. columnSortable: false,
  2299. sortLv: 0,
  2300. status: true,
  2301. fixed: '',
  2302. columnWidth: 120,
  2303. },
  2304. {
  2305. userId: this.$store.state.user.name,
  2306. functionId: 401004,
  2307. serialNumber: '401004Table1Priority',
  2308. tableId: "401004Table1",
  2309. tableName: "项目物料表",
  2310. columnProp: 'priority',
  2311. headerAlign: "center",
  2312. align: "left",
  2313. columnLabel: '优先级',
  2314. columnHidden: false,
  2315. columnImage: false,
  2316. columnSortable: false,
  2317. sortLv: 0,
  2318. status: true,
  2319. fixed: '',
  2320. columnWidth: 80,
  2321. },
  2322. {
  2323. userId: this.$store.state.user.name,
  2324. functionId: 401004,
  2325. serialNumber: '401004Table1CProjectRegion',
  2326. tableId: "401004Table1",
  2327. tableName: "项目物料表",
  2328. columnProp: 'cProjectRegion',
  2329. headerAlign: "center",
  2330. align: "left",
  2331. columnLabel: '区域',
  2332. columnHidden: false,
  2333. columnImage: false,
  2334. columnSortable: false,
  2335. sortLv: 0,
  2336. status: true,
  2337. fixed: '',
  2338. columnWidth: 120,
  2339. },
  2340. {
  2341. userId: this.$store.state.user.name,
  2342. functionId: 401004,
  2343. serialNumber: '401004Table1ProjectManager',
  2344. tableId: "401004Table1",
  2345. tableName: "项目物料表",
  2346. columnProp: 'projectManagerName',
  2347. headerAlign: "center",
  2348. align: "left",
  2349. columnLabel: 'PM/Sales',
  2350. columnHidden: false,
  2351. columnImage: false,
  2352. columnSortable: false,
  2353. sortLv: 0,
  2354. status: true,
  2355. fixed: '',
  2356. columnWidth: 120,
  2357. },
  2358. {
  2359. userId: this.$store.state.user.name,
  2360. functionId: 401004,
  2361. serialNumber: '401004Table1ProjectOwner',
  2362. tableId: "401004Table1",
  2363. tableName: "项目物料表",
  2364. columnProp: 'projectOwnerName',
  2365. headerAlign: "center",
  2366. align: "left",
  2367. columnLabel: 'PjM',
  2368. columnHidden: false,
  2369. columnImage: false,
  2370. columnSortable: false,
  2371. sortLv: 0,
  2372. status: true,
  2373. fixed: '',
  2374. columnWidth: 120,
  2375. },
  2376. {
  2377. userId: this.$store.state.user.name,
  2378. functionId: 401004,
  2379. serialNumber: '401004Table1Engineer',
  2380. tableId: "401004Table1",
  2381. tableName: "项目物料表",
  2382. columnProp: 'engineerName',
  2383. headerAlign: "center",
  2384. align: "left",
  2385. columnLabel: 'Engineer',
  2386. columnHidden: false,
  2387. columnImage: false,
  2388. columnSortable: false,
  2389. sortLv: 0,
  2390. status: true,
  2391. fixed: '',
  2392. columnWidth: 120,
  2393. },
  2394. {
  2395. userId: this.$store.state.user.name,
  2396. functionId: 401004,
  2397. serialNumber: '401004Table1CQualityEngineer1',
  2398. tableId: "401004Table1",
  2399. tableName: "项目物料表",
  2400. columnProp: 'cQualityEngineer1Name',
  2401. headerAlign: "center",
  2402. align: "left",
  2403. columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
  2404. columnHidden: false,
  2405. columnImage: false,
  2406. columnSortable: false,
  2407. sortLv: 0,
  2408. status: true,
  2409. fixed: '',
  2410. columnWidth: 170,
  2411. },
  2412. {
  2413. userId: this.$store.state.user.name,
  2414. functionId: 401004,
  2415. serialNumber: '401004Table1CQualityEngineer2',
  2416. tableId: "401004Table1",
  2417. tableName: "项目物料表",
  2418. columnProp: 'cQualityEngineer2Name',
  2419. headerAlign: "center",
  2420. align: "left",
  2421. columnLabel: 'IPQC-Converting',
  2422. columnHidden: false,
  2423. columnImage: false,
  2424. columnSortable: false,
  2425. sortLv: 0,
  2426. status: true,
  2427. fixed: '',
  2428. columnWidth: 150,
  2429. },
  2430. {
  2431. userId: this.$store.state.user.name,
  2432. functionId: 401004,
  2433. serialNumber: '401004Table1CQualityEngineer3',
  2434. tableId: "401004Table1",
  2435. tableName: "项目物料表",
  2436. columnProp: 'cQualityEngineer3Name',
  2437. headerAlign: "center",
  2438. align: "left",
  2439. columnLabel: 'FQC1',
  2440. columnHidden: false,
  2441. columnImage: false,
  2442. columnSortable: false,
  2443. sortLv: 0,
  2444. status: true,
  2445. fixed: '',
  2446. columnWidth: 120,
  2447. },
  2448. {
  2449. userId: this.$store.state.user.name,
  2450. functionId: 401004,
  2451. serialNumber: '401004Table1CQualityEngineer5',
  2452. tableId: "401004Table1",
  2453. tableName: "项目信息物料表",
  2454. columnProp: 'cQualityEngineer5Name',
  2455. headerAlign: "center",
  2456. align: "left",
  2457. columnLabel: 'FQC2',
  2458. columnHidden: false,
  2459. columnImage: false,
  2460. columnSortable: false,
  2461. sortLv: 0,
  2462. status: true,
  2463. fixed: '',
  2464. columnWidth: 120,
  2465. },
  2466. {
  2467. userId: this.$store.state.user.name,
  2468. functionId: 401004,
  2469. serialNumber: '401004Table1CQualityEngineer6',
  2470. tableId: "401004Table1",
  2471. tableName: "项目信息物料表",
  2472. columnProp: 'cQualityEngineer6Name',
  2473. headerAlign: "center",
  2474. align: "left",
  2475. columnLabel: 'IQC',
  2476. columnHidden: false,
  2477. columnImage: false,
  2478. columnSortable: false,
  2479. sortLv: 0,
  2480. status: true,
  2481. fixed: '',
  2482. columnWidth: 120,
  2483. },
  2484. {
  2485. userId: this.$store.state.user.name,
  2486. functionId: 401004,
  2487. serialNumber: '401004Table1CManufactureEngineer',
  2488. tableId: "401004Table1",
  2489. tableName: "项目物料表",
  2490. columnProp: 'cManufactureEngineerName',
  2491. headerAlign: "center",
  2492. align: "left",
  2493. columnLabel: 'MFG',
  2494. columnHidden: false,
  2495. columnImage: false,
  2496. columnSortable: false,
  2497. sortLv: 0,
  2498. status: true,
  2499. fixed: '',
  2500. columnWidth: 120,
  2501. },
  2502. {
  2503. userId: this.$store.state.user.name,
  2504. functionId: 401004,
  2505. serialNumber: '401004Table1CQualityEngineer4',
  2506. tableId: "401004Table1",
  2507. tableName: "项目物料表",
  2508. columnProp: 'cQualityEngineer4Name',
  2509. headerAlign: "center",
  2510. align: "left",
  2511. columnLabel: 'SQE',
  2512. columnHidden: false,
  2513. columnImage: false,
  2514. columnSortable: false,
  2515. sortLv: 0,
  2516. status: true,
  2517. fixed: '',
  2518. columnWidth: 120,
  2519. },
  2520. {
  2521. userId: this.$store.state.user.name,
  2522. functionId: 401004,
  2523. serialNumber: '401004Table1DocEngineer',
  2524. tableId: "401004Table1",
  2525. tableName: "项目物料表",
  2526. columnProp: 'docEngineerName',
  2527. headerAlign: "center",
  2528. align: "left",
  2529. columnLabel: '文档工程师',
  2530. columnHidden: false,
  2531. columnImage: false,
  2532. columnSortable: false,
  2533. sortLv: 0,
  2534. status: true,
  2535. fixed: '',
  2536. columnWidth: 120,
  2537. },
  2538. {
  2539. userId: this.$store.state.user.name,
  2540. functionId: 401004,
  2541. serialNumber: '401004Table1DocEngineer2',
  2542. tableId: "401004Table1",
  2543. tableName: "项目物料表",
  2544. columnProp: 'docEngineer2Name',
  2545. headerAlign: "center",
  2546. align: "left",
  2547. columnLabel: '文档工程师2',
  2548. columnHidden: false,
  2549. columnImage: false,
  2550. columnSortable: false,
  2551. sortLv: 0,
  2552. status: true,
  2553. fixed: '',
  2554. columnWidth: 120,
  2555. },
  2556. {
  2557. userId: this.$store.state.user.name,
  2558. functionId: 401004,
  2559. serialNumber: '401004Table1IpqcHardTag',
  2560. tableId: "401004Table1",
  2561. tableName: "项目物料表",
  2562. columnProp: 'ipqcHardTagName',
  2563. headerAlign: "center",
  2564. align: "left",
  2565. columnLabel: 'IPQC-Hardtag',
  2566. columnHidden: false,
  2567. columnImage: false,
  2568. columnSortable: false,
  2569. sortLv: 0,
  2570. status: true,
  2571. fixed: '',
  2572. columnWidth: 120,
  2573. },
  2574. {
  2575. userId: this.$store.state.user.name,
  2576. functionId: 401004,
  2577. serialNumber: '401004Table1CQualityEngineer7',
  2578. tableId: "401004Table1",
  2579. tableName: "项目物料表",
  2580. columnProp: 'cQualityEngineer7Name',
  2581. headerAlign: "center",
  2582. align: "left",
  2583. columnLabel: '前道工程师',
  2584. columnHidden: false,
  2585. columnImage: false,
  2586. columnSortable: false,
  2587. sortLv: 0,
  2588. status: true,
  2589. fixed: '',
  2590. columnWidth: 120,
  2591. },
  2592. {
  2593. userId: this.$store.state.user.name,
  2594. functionId: 401004,
  2595. serialNumber: '401004Table1Status',
  2596. tableId: "401004Table1",
  2597. tableName: "项目物料表",
  2598. columnProp: 'status',
  2599. headerAlign: "center",
  2600. align: "left",
  2601. columnLabel: '项目状态' ,
  2602. columnHidden: false,
  2603. columnImage: false,
  2604. columnSortable: false,
  2605. sortLv: 0,
  2606. status: true,
  2607. fixed: '',
  2608. columnWidth: 100,
  2609. },
  2610. {
  2611. userId: this.$store.state.user.name,
  2612. functionId: 401004,
  2613. serialNumber: '401004Table2PartType',
  2614. tableId: "401004Table2",
  2615. tableName: "项目信息物料表",
  2616. columnProp: 'partType',
  2617. headerAlign: "center",
  2618. align: "center",
  2619. columnLabel: '料号状态' ,
  2620. columnHidden: false,
  2621. columnImage: false,
  2622. columnSortable: false,
  2623. sortLv: 0,
  2624. status: true,
  2625. fixed: '',
  2626. columnWidth: 100,
  2627. },
  2628. {
  2629. userId: this.$store.state.user.name,
  2630. functionId: 401004,
  2631. serialNumber: '401004Table1NeedDate',
  2632. tableId: "401004Table1",
  2633. tableName: "项目物料表",
  2634. columnProp: 'needDate',
  2635. headerAlign: "center",
  2636. align: "center",
  2637. columnLabel: '预计完成日期',
  2638. columnHidden: false,
  2639. columnImage: false,
  2640. columnSortable: false,
  2641. sortLv: 0,
  2642. status: true,
  2643. fixed: '',
  2644. columnWidth: 120,
  2645. },
  2646. {
  2647. userId: this.$store.state.user.name,
  2648. functionId: 401004,
  2649. serialNumber: '401004Table1closeDate',
  2650. tableId: "401004Table1",
  2651. tableName: "项目物料表",
  2652. columnProp: 'closeDate',
  2653. headerAlign: "center",
  2654. align: "left",
  2655. columnLabel: '转量产日期',
  2656. columnHidden: false,
  2657. columnImage: false,
  2658. columnSortable: false,
  2659. sortLv: 0,
  2660. status: true,
  2661. fixed: '',
  2662. columnWidth: 120,
  2663. },
  2664. {
  2665. userId: this.$store.state.user.name,
  2666. functionId: 401004,
  2667. serialNumber: '401004Table1FinalPartNo',
  2668. tableId: "401004Table1",
  2669. tableName: "项目物料表",
  2670. columnProp: 'finalPartNo',
  2671. headerAlign: "center",
  2672. align: "left",
  2673. columnLabel: 'ERP正式料号',
  2674. columnHidden: false,
  2675. columnImage: false,
  2676. columnSortable: false,
  2677. sortLv: 0,
  2678. status: true,
  2679. fixed: '',
  2680. columnWidth: 120,
  2681. },
  2682. {
  2683. userId: this.$store.state.user.name,
  2684. functionId: 401004,
  2685. serialNumber: '401004Table1Remark',
  2686. tableId: "401004Table1",
  2687. tableName: "项目物料表",
  2688. columnProp: 'remark',
  2689. headerAlign: "center",
  2690. align: "left",
  2691. columnLabel: '备注',
  2692. columnHidden: false,
  2693. columnImage: false,
  2694. columnSortable: false,
  2695. sortLv: 0,
  2696. status: true,
  2697. fixed: '',
  2698. columnWidth: 160,
  2699. },
  2700. {
  2701. userId: this.$store.state.user.name,
  2702. functionId: 401004,
  2703. serialNumber: '401004Table1CreateDate',
  2704. tableId: "401004Table1",
  2705. tableName: "项目物料表",
  2706. columnProp: 'createDate',
  2707. headerAlign: "center",
  2708. align: "center",
  2709. columnLabel: '创建时间',
  2710. columnHidden: false,
  2711. columnImage: false,
  2712. columnSortable: false,
  2713. sortLv: 0,
  2714. status: true,
  2715. fixed: '',
  2716. columnWidth: 130,
  2717. },
  2718. {
  2719. userId: this.$store.state.user.name,
  2720. functionId: 401004,
  2721. serialNumber: '401004Table1CreateBy',
  2722. tableId: "401004Table1",
  2723. tableName: "项目物料表",
  2724. columnProp: 'createBy',
  2725. headerAlign: "center",
  2726. align: "left",
  2727. columnLabel: '创建人',
  2728. columnHidden: false,
  2729. columnImage: false,
  2730. columnSortable: false,
  2731. sortLv: 0,
  2732. status: true,
  2733. fixed: '',
  2734. columnWidth: 120,
  2735. },
  2736. {
  2737. userId: this.$store.state.user.name,
  2738. functionId: 401004,
  2739. serialNumber: '401004Table1UpdateDate',
  2740. tableId: "401004Table1",
  2741. tableName: "项目物料表",
  2742. columnProp: 'updateDate',
  2743. headerAlign: "center",
  2744. align: "center",
  2745. columnLabel: '更新时间',
  2746. columnHidden: false,
  2747. columnImage: false,
  2748. columnSortable: false,
  2749. sortLv: 0,
  2750. status: true,
  2751. fixed: '',
  2752. columnWidth: 130,
  2753. },
  2754. {
  2755. userId: this.$store.state.user.name,
  2756. functionId: 401004,
  2757. serialNumber: '401004Table1UpdateBy',
  2758. tableId: "401004Table1",
  2759. tableName: "项目物料表",
  2760. columnProp: 'updateBy',
  2761. headerAlign: "center",
  2762. align: "left",
  2763. columnLabel: '更新人',
  2764. columnHidden: false,
  2765. columnImage: false,
  2766. columnSortable: false,
  2767. sortLv: 0,
  2768. status: true,
  2769. fixed: '',
  2770. columnWidth: 120,
  2771. },
  2772. ],
  2773. columnFileContentArray: [
  2774. {
  2775. userId: this.$store.state.user.name,
  2776. functionId: 401004,
  2777. serialNumber: '401004Table1FileName',
  2778. tableId: "401004Table1",
  2779. tableName: "打样文档表",
  2780. columnProp: 'fileName',
  2781. headerAlign: "center",
  2782. align: "left",
  2783. columnLabel: '文件名',
  2784. columnHidden: false,
  2785. columnImage: false,
  2786. columnSortable: false,
  2787. sortLv: 0,
  2788. status: true,
  2789. fixed: '',
  2790. columnWidth: 180,
  2791. },
  2792. //是否上传
  2793. {
  2794. userId: this.$store.state.user.name,
  2795. functionId: 401004,
  2796. serialNumber: '401004Table1UploadedFlag',
  2797. tableId: "401004Table1",
  2798. tableName: "打样文档表",
  2799. columnProp: 'uploadedFlag',
  2800. headerAlign: "center",
  2801. align: "center",
  2802. columnLabel: '是否上传',
  2803. columnHidden: false,
  2804. columnImage: false,
  2805. columnSortable: false,
  2806. sortLv: 0,
  2807. status: true,
  2808. fixed: '',
  2809. columnWidth: 70,
  2810. },
  2811. {
  2812. userId: this.$store.state.user.name,
  2813. functionId: 401004,
  2814. serialNumber: '401004Table1ProjectLeader',
  2815. tableId: "401004Table1",
  2816. tableName: "打样文档表",
  2817. columnProp: 'projectLeader',
  2818. headerAlign: "center",
  2819. align: "left",
  2820. columnLabel: '文档负责人',
  2821. columnHidden: false,
  2822. columnImage: false,
  2823. columnSortable: false,
  2824. sortLv: 0,
  2825. status: true,
  2826. fixed: '',
  2827. columnWidth: 70,
  2828. },
  2829. {
  2830. userId: this.$store.state.user.name,
  2831. functionId: 401004,
  2832. serialNumber: '401004Table1Conclusion',
  2833. tableId: "401004Table1",
  2834. tableName: "打样文档表",
  2835. columnProp: 'conclusion',
  2836. headerAlign: "center",
  2837. align: "center",
  2838. columnLabel: '结论',
  2839. columnHidden: false,
  2840. columnImage: false,
  2841. columnSortable: false,
  2842. sortLv: 0,
  2843. status: true,
  2844. fixed: '',
  2845. columnWidth: 70,
  2846. },
  2847. {
  2848. userId: this.$store.state.user.name,
  2849. functionId: 401004,
  2850. serialNumber: '401004Table1DocumentGroupDesc',
  2851. tableId: "401004Table1",
  2852. tableName: "打样文档表",
  2853. columnProp: 'documentGroupDesc',
  2854. headerAlign: "center",
  2855. align: "center",
  2856. columnLabel: '文档种类',
  2857. columnHidden: false,
  2858. columnImage: false,
  2859. columnSortable: false,
  2860. sortLv: 0,
  2861. status: true,
  2862. fixed: '',
  2863. columnWidth: 70,
  2864. },
  2865. {
  2866. userId: this.$store.state.user.name,
  2867. functionId: 103001,
  2868. serialNumber: '103001Table1CreateDate',
  2869. tableId: '103001Table1',
  2870. tableName: '打样文档表',
  2871. columnProp: 'createDate',
  2872. headerAlign: 'center',
  2873. align: 'center',
  2874. columnLabel: '上传时间',
  2875. columnHidden: false,
  2876. columnImage: false,
  2877. columnSortable: false,
  2878. sortLv: 0,
  2879. status: true,
  2880. fixed: '',
  2881. columnWidth: 130
  2882. },
  2883. {
  2884. userId: this.$store.state.user.name,
  2885. functionId: 103001,
  2886. serialNumber: '103001Table1CreateBy',
  2887. tableId: '103001Table1',
  2888. tableName: '打样文档表',
  2889. columnProp: 'createdBy',
  2890. headerAlign: 'center',
  2891. align: 'left',
  2892. columnLabel: '上传人',
  2893. columnHidden: false,
  2894. columnImage: false,
  2895. columnSortable: false,
  2896. sortLv: 0,
  2897. status: true,
  2898. fixed: '',
  2899. columnWidth: 80
  2900. }
  2901. ],
  2902. columnProjectDocumentManifestDefinitionList:[
  2903. {
  2904. userId: this.$store.state.user.name,
  2905. functionId: 401004,
  2906. serialNumber: '401004Table1DocumentTypeId',
  2907. tableId: "401004Table1",
  2908. tableName: "BU文档清单表",
  2909. columnProp: 'documentTypeId',
  2910. headerAlign: "center",
  2911. align: "center",
  2912. columnLabel: '文档类型ID',
  2913. columnHidden: false,
  2914. columnImage: false,
  2915. columnSortable: false,
  2916. sortLv: 0,
  2917. status: true,
  2918. fixed: '',
  2919. columnWidth: 120,
  2920. },
  2921. {
  2922. userId: this.$store.state.user.name,
  2923. functionId: 401004,
  2924. serialNumber: '401004Table1DocumentType',
  2925. tableId: "401004Table1",
  2926. tableName: "BU文档清单表",
  2927. columnProp: 'documentType',
  2928. headerAlign: "center",
  2929. align: "left",
  2930. columnLabel: '文档类型',
  2931. columnHidden: false,
  2932. columnImage: false,
  2933. columnSortable: false,
  2934. sortLv: 0,
  2935. status: true,
  2936. fixed: '',
  2937. columnWidth: 120,
  2938. },
  2939. {
  2940. userId: this.$store.state.user.name,
  2941. functionId: 401004,
  2942. serialNumber: '401004Table1ResponsibleDepartment',
  2943. tableId: "401004Table1",
  2944. tableName: "BU文档清单表",
  2945. columnProp: 'responsibleDepartment',
  2946. headerAlign: "center",
  2947. align: "left",
  2948. columnLabel: '责任部门',
  2949. columnHidden: false,
  2950. columnImage: false,
  2951. columnSortable: false,
  2952. sortLv: 0,
  2953. status: true,
  2954. fixed: '',
  2955. columnWidth: 120,
  2956. },
  2957. {
  2958. userId: this.$store.state.user.name,
  2959. functionId: 401004,
  2960. serialNumber: '401004Table1EstimatedCompletionDays',
  2961. tableId: "401004Table1",
  2962. tableName: "BU文档清单表",
  2963. columnProp: 'estimatedCompletionDays',
  2964. headerAlign: "center",
  2965. align: "right",
  2966. columnLabel: '预计完成天数',
  2967. columnHidden: false,
  2968. columnImage: false,
  2969. columnSortable: false,
  2970. sortLv: 0,
  2971. status: true,
  2972. fixed: '',
  2973. columnWidth: 80,
  2974. },
  2975. ],
  2976. columnProjectAllDocumentList: [
  2977. {
  2978. userId: this.$store.state.user.name,
  2979. functionId: 401004,
  2980. serialNumber: '401004Table1ProofingId',
  2981. tableId: "401004Table1",
  2982. tableName: "BU文档清单表",
  2983. columnProp: 'proofingNo',
  2984. headerAlign: "center",
  2985. align: "left",
  2986. columnLabel: '打样单号',
  2987. columnHidden: false,
  2988. columnImage: false,
  2989. columnSortable: false,
  2990. sortLv: 0,
  2991. status: true,
  2992. fixed: '',
  2993. columnWidth: 80,
  2994. },
  2995. {
  2996. userId: this.$store.state.user.name,
  2997. functionId: 401004,
  2998. serialNumber: '401004Table1ProjectPhase',
  2999. tableId: "401004Table1",
  3000. tableName: "BU文档清单表",
  3001. columnProp: 'projectPhase',
  3002. headerAlign: "center",
  3003. align: "center",
  3004. columnLabel: '项目阶段',
  3005. columnHidden: false,
  3006. columnImage: false,
  3007. columnSortable: false,
  3008. sortLv: 0,
  3009. status: true,
  3010. fixed: '',
  3011. columnWidth: 120,
  3012. },
  3013. {
  3014. userId: this.$store.state.user.name,
  3015. functionId: 401004,
  3016. serialNumber: '401004Table1FileName',
  3017. tableId: "401004Table1",
  3018. tableName: "打样文档表",
  3019. columnProp: 'fileName',
  3020. headerAlign: "center",
  3021. align: "left",
  3022. columnLabel: '文件名',
  3023. columnHidden: false,
  3024. columnImage: false,
  3025. columnSortable: false,
  3026. sortLv: 0,
  3027. status: true,
  3028. fixed: '',
  3029. columnWidth: 180,
  3030. },
  3031. {
  3032. userId: this.$store.state.user.name,
  3033. functionId: 401004,
  3034. serialNumber: '401004Table1UploadedFlag',
  3035. tableId: "401004Table1",
  3036. tableName: "打样文档表",
  3037. columnProp: 'uploadedFlag',
  3038. headerAlign: "center",
  3039. align: "center",
  3040. columnLabel: '是否上传',
  3041. columnHidden: false,
  3042. columnImage: false,
  3043. columnSortable: false,
  3044. sortLv: 0,
  3045. status: true,
  3046. fixed: '',
  3047. columnWidth: 70,
  3048. },
  3049. {
  3050. userId: this.$store.state.user.name,
  3051. functionId: 401004,
  3052. serialNumber: '401004Table1ProjectLeader',
  3053. tableId: "401004Table1",
  3054. tableName: "打样文档表",
  3055. columnProp: 'projectLeader',
  3056. headerAlign: "center",
  3057. align: "left",
  3058. columnLabel: '文档负责人',
  3059. columnHidden: false,
  3060. columnImage: false,
  3061. columnSortable: false,
  3062. sortLv: 0,
  3063. status: true,
  3064. fixed: '',
  3065. columnWidth: 70,
  3066. },
  3067. {
  3068. userId: this.$store.state.user.name,
  3069. functionId: 401004,
  3070. serialNumber: '401004Table1Conclusion',
  3071. tableId: "401004Table1",
  3072. tableName: "打样文档表",
  3073. columnProp: 'conclusion',
  3074. headerAlign: "center",
  3075. align: "center",
  3076. columnLabel: '结论',
  3077. columnHidden: false,
  3078. columnImage: false,
  3079. columnSortable: false,
  3080. sortLv: 0,
  3081. status: true,
  3082. fixed: '',
  3083. columnWidth: 70,
  3084. },
  3085. {
  3086. userId: this.$store.state.user.name,
  3087. functionId: 401004,
  3088. serialNumber: '401004Table1DocumentGroupDesc',
  3089. tableId: "401004Table1",
  3090. tableName: "打样文档表",
  3091. columnProp: 'documentGroupDesc',
  3092. headerAlign: "center",
  3093. align: "center",
  3094. columnLabel: '文档种类',
  3095. columnHidden: false,
  3096. columnImage: false,
  3097. columnSortable: false,
  3098. sortLv: 0,
  3099. status: true,
  3100. fixed: '',
  3101. columnWidth: 70,
  3102. },
  3103. {
  3104. userId: this.$store.state.user.name,
  3105. functionId: 103001,
  3106. serialNumber: '103001Table1CreateDate',
  3107. tableId: '103001Table1',
  3108. tableName: '打样文档表',
  3109. columnProp: 'createDate',
  3110. headerAlign: 'center',
  3111. align: 'center',
  3112. columnLabel: '上传时间',
  3113. columnHidden: false,
  3114. columnImage: false,
  3115. columnSortable: false,
  3116. sortLv: 0,
  3117. status: true,
  3118. fixed: '',
  3119. columnWidth: 130
  3120. },
  3121. {
  3122. userId: this.$store.state.user.name,
  3123. functionId: 103001,
  3124. serialNumber: '103001Table1CreateBy',
  3125. tableId: '103001Table1',
  3126. tableName: '打样文档表',
  3127. columnProp: 'createdBy',
  3128. headerAlign: 'center',
  3129. align: 'left',
  3130. columnLabel: '上传人',
  3131. columnHidden: false,
  3132. columnImage: false,
  3133. columnSortable: false,
  3134. sortLv: 0,
  3135. status: true,
  3136. fixed: '',
  3137. columnWidth: 80
  3138. }
  3139. ],
  3140. columnProjectBomList: [
  3141. {
  3142. userId: this.$store.state.user.name,
  3143. functionId: 401005,
  3144. serialNumber: '401005Table1LevelCode',
  3145. tableId: "401005Table1",
  3146. tableName: "项目物料表",
  3147. columnProp: 'levelCode',
  3148. headerAlign: "center",
  3149. align: "left",
  3150. columnLabel: 'BOM层级',
  3151. columnHidden: false,
  3152. columnImage: false,
  3153. columnSortable: false,
  3154. sortLv: 0,
  3155. status: true,
  3156. fixed: '',
  3157. columnWidth: 100,
  3158. },
  3159. {
  3160. userId: this.$store.state.user.name,
  3161. functionId: 401005,
  3162. serialNumber: '401005Table1PartNo2',
  3163. tableId: "401005Table1",
  3164. tableName: "项目物料BOM表",
  3165. columnProp: 'partNo2',
  3166. headerAlign: "center",
  3167. align: "left",
  3168. columnLabel: '物料编码',
  3169. columnHidden: false,
  3170. columnImage: false,
  3171. columnSortable: false,
  3172. sortLv: 0,
  3173. status: true,
  3174. fixed: '',
  3175. columnWidth: 145,
  3176. },
  3177. {
  3178. userId: this.$store.state.user.name,
  3179. functionId: 401005,
  3180. serialNumber: '401005Table1PartDesc2',
  3181. tableId: "401005Table1",
  3182. tableName: "项目物料BOM表",
  3183. columnProp: 'partDesc2',
  3184. headerAlign: "center",
  3185. align: "left",
  3186. columnLabel: '物料描述',
  3187. columnHidden: false,
  3188. columnImage: false,
  3189. columnSortable: false,
  3190. sortLv: 0,
  3191. status: true,
  3192. fixed: '',
  3193. columnWidth: 500,
  3194. },
  3195. {
  3196. userId: this.$store.state.user.name,
  3197. functionId: 401005,
  3198. serialNumber: '401005Table1QtyAssembly',
  3199. tableId: "401005Table1",
  3200. tableName: "项目物料BOM表",
  3201. columnProp: 'qtyAssembly',
  3202. headerAlign: "center",
  3203. align: "right",
  3204. columnLabel: '用量',
  3205. columnHidden: false,
  3206. columnImage: false,
  3207. columnSortable: false,
  3208. sortLv: 0,
  3209. status: true,
  3210. fixed: '',
  3211. columnWidth: 150,
  3212. },
  3213. {
  3214. userId: this.$store.state.user.name,
  3215. functionId: 401005,
  3216. serialNumber: '401005Table1ScrapFactor',
  3217. tableId: "401005Table1",
  3218. tableName: "项目物料表",
  3219. columnProp: 'scrapFactor',
  3220. headerAlign: "center",
  3221. align: "right",
  3222. columnLabel: '损耗',
  3223. columnHidden: false,
  3224. columnImage: false,
  3225. columnSortable: false,
  3226. sortLv: 0,
  3227. status: true,
  3228. fixed: '',
  3229. columnWidth: 150,
  3230. },
  3231. {
  3232. userId: this.$store.state.user.name,
  3233. functionId: 401005,
  3234. serialNumber: '401005Table1EffectiveDate',
  3235. tableId: "401005Table1",
  3236. tableName: "项目物料表",
  3237. columnProp: 'effectiveDate',
  3238. headerAlign: "center",
  3239. align: "center",
  3240. columnLabel: '生效日期',
  3241. columnHidden: false,
  3242. columnImage: false,
  3243. columnSortable: false,
  3244. sortLv: 0,
  3245. status: true,
  3246. fixed: '',
  3247. columnWidth: 120,
  3248. },
  3249. ],
  3250. columnProjectRoutingList: [
  3251. {
  3252. userId: this.$store.state.user.name,
  3253. functionId: 401005,
  3254. serialNumber: '401005Table1PartNo2',
  3255. tableId: "401005Table1",
  3256. tableName: "项目物料BOM表",
  3257. columnProp: 'partNo2',
  3258. headerAlign: "center",
  3259. align: "left",
  3260. columnLabel: '物料编码',
  3261. columnHidden: false,
  3262. columnImage: false,
  3263. columnSortable: false,
  3264. sortLv: 0,
  3265. status: true,
  3266. fixed: '',
  3267. columnWidth: 145,
  3268. },
  3269. {
  3270. userId: this.$store.state.user.name,
  3271. functionId: 401005,
  3272. serialNumber: '401005Table1WorkCenterNo',
  3273. tableId: "401005Table1",
  3274. tableName: "项目物料BOM表",
  3275. columnProp: 'workCenterNo',
  3276. headerAlign: "center",
  3277. align: "left",
  3278. columnLabel: '加工中心',
  3279. columnHidden: false,
  3280. columnImage: false,
  3281. columnSortable: false,
  3282. sortLv: 0,
  3283. status: true,
  3284. fixed: '',
  3285. columnWidth: 150,
  3286. },
  3287. {
  3288. userId: this.$store.state.user.name,
  3289. functionId: 401005,
  3290. serialNumber: '401005Table1ItemNo',
  3291. tableId: "401005Table1",
  3292. tableName: "项目物料表",
  3293. columnProp: 'itemNo',
  3294. headerAlign: "center",
  3295. align: "center",
  3296. columnLabel: '工序行号',
  3297. columnHidden: false,
  3298. columnImage: false,
  3299. columnSortable: false,
  3300. sortLv: 0,
  3301. status: true,
  3302. fixed: '',
  3303. columnWidth: 150,
  3304. },
  3305. {
  3306. userId: this.$store.state.user.name,
  3307. functionId: 401005,
  3308. serialNumber: '401005Table1RoutingItemNo',
  3309. tableId: "401005Table1",
  3310. tableName: "项目物料表",
  3311. columnProp: 'routingItemNo',
  3312. headerAlign: "center",
  3313. align: "left",
  3314. columnLabel: '标准工序代号',
  3315. columnHidden: false,
  3316. columnImage: false,
  3317. columnSortable: false,
  3318. sortLv: 0,
  3319. status: true,
  3320. fixed: '',
  3321. columnWidth: 150,
  3322. },
  3323. {
  3324. userId: this.$store.state.user.name,
  3325. functionId: 401005,
  3326. serialNumber: '401005Table1ItemDesc',
  3327. tableId: "401005Table1",
  3328. tableName: "项目物料表",
  3329. columnProp: 'itemDesc',
  3330. headerAlign: "center",
  3331. align: "left",
  3332. columnLabel: '工序名称',
  3333. columnHidden: false,
  3334. columnImage: false,
  3335. columnSortable: false,
  3336. sortLv: 0,
  3337. status: true,
  3338. fixed: '',
  3339. columnWidth: 150,
  3340. },
  3341. {
  3342. userId: this.$store.state.user.name,
  3343. functionId: 401005,
  3344. serialNumber: '401005Table1LaborTime',
  3345. tableId: "401005Table1",
  3346. tableName: "项目物料表",
  3347. columnProp: 'laborTime',
  3348. headerAlign: "center",
  3349. align: "right",
  3350. columnLabel: '工时',
  3351. columnHidden: false,
  3352. columnImage: false,
  3353. columnSortable: false,
  3354. sortLv: 0,
  3355. status: true,
  3356. fixed: '',
  3357. columnWidth: 150,
  3358. },
  3359. {
  3360. userId: this.$store.state.user.name,
  3361. functionId: 401005,
  3362. serialNumber: '401005Table1LaborResources',
  3363. tableId: "401005Table1",
  3364. tableName: "项目物料表",
  3365. columnProp: 'laborResources',
  3366. headerAlign: "center",
  3367. align: "right",
  3368. columnLabel: '人数',
  3369. columnHidden: false,
  3370. columnImage: false,
  3371. columnSortable: false,
  3372. sortLv: 0,
  3373. status: true,
  3374. fixed: '',
  3375. columnWidth: 150,
  3376. },
  3377. {
  3378. userId: this.$store.state.user.name,
  3379. functionId: 401005,
  3380. serialNumber: '401005Table1MachRunFactor',
  3381. tableId: "401005Table1",
  3382. tableName: "项目物料表",
  3383. columnProp: 'machRunFactor',
  3384. headerAlign: "center",
  3385. align: "right",
  3386. columnLabel: '单位工时',
  3387. columnHidden: false,
  3388. columnImage: false,
  3389. columnSortable: false,
  3390. sortLv: 0,
  3391. status: true,
  3392. fixed: '',
  3393. columnWidth: 150,
  3394. },
  3395. {
  3396. userId: this.$store.state.user.name,
  3397. functionId: 401005,
  3398. serialNumber: '401005Table1FactorUnit',
  3399. tableId: "401005Table1",
  3400. tableName: "项目物料表",
  3401. columnProp: 'factorUnit',
  3402. headerAlign: "center",
  3403. align: "center",
  3404. columnLabel: '单位',
  3405. columnHidden: false,
  3406. columnImage: false,
  3407. columnSortable: false,
  3408. sortLv: 0,
  3409. status: true,
  3410. fixed: '',
  3411. columnWidth: 150,
  3412. },
  3413. ],
  3414. levelList: [],
  3415. rules:{
  3416. projectNo:[
  3417. {
  3418. required: true,
  3419. message: ' ',
  3420. trigger: ['blur','change']
  3421. }
  3422. ],
  3423. projectDesc:[
  3424. {
  3425. required: true,
  3426. message: ' ',
  3427. trigger: ['blur','change']
  3428. }
  3429. ],
  3430. customerNo:[
  3431. {
  3432. required: true,
  3433. message: ' ',
  3434. trigger: ['blur','change']
  3435. }
  3436. ],
  3437. customerDesc:[
  3438. {
  3439. required: true,
  3440. message: ' ',
  3441. trigger: ['blur','change']
  3442. }
  3443. ],
  3444. testPartNo:[
  3445. {
  3446. required: true,
  3447. message: ' ',
  3448. trigger: ['blur','change']
  3449. }
  3450. ],
  3451. partDesc:[
  3452. {
  3453. required: true,
  3454. message: ' ',
  3455. trigger: ['blur','change']
  3456. }
  3457. ],
  3458. projectManager:[
  3459. {
  3460. required: true,
  3461. message: ' ',
  3462. trigger: ['blur','change']
  3463. }
  3464. ],
  3465. engineer:[
  3466. {
  3467. required: true,
  3468. message: ' ',
  3469. trigger: ['blur','change']
  3470. }
  3471. ],
  3472. projectOwner:[
  3473. {
  3474. required: true,
  3475. message: ' ',
  3476. trigger: ['blur','change']
  3477. }
  3478. ],
  3479. cProjectRegion:[
  3480. {
  3481. required: true,
  3482. message: ' ',
  3483. trigger: ['blur','change']
  3484. }
  3485. ],
  3486. cQualityEngineer1:[
  3487. {
  3488. required: true,
  3489. message: ' ',
  3490. trigger: ['blur','change']
  3491. }
  3492. ],
  3493. cQualityEngineer2:[
  3494. {
  3495. required: true,
  3496. message: ' ',
  3497. trigger: ['blur','change']
  3498. }
  3499. ],
  3500. cQualityEngineer3:[
  3501. {
  3502. required: true,
  3503. message: ' ',
  3504. trigger: ['blur','change']
  3505. }
  3506. ],
  3507. cQualityEngineer4:[
  3508. {
  3509. required: true,
  3510. message: ' ',
  3511. trigger: ['blur','change']
  3512. }
  3513. ],
  3514. cQualityEngineer5:[
  3515. {
  3516. required: true,
  3517. message: ' ',
  3518. trigger: ['blur','change']
  3519. }
  3520. ],
  3521. cQualityEngineer6:[
  3522. {
  3523. required: true,
  3524. message: ' ',
  3525. trigger: ['blur','change']
  3526. }
  3527. ],
  3528. cManufactureEngineer:[
  3529. {
  3530. required: true,
  3531. message: ' ',
  3532. trigger: ['blur','change']
  3533. }
  3534. ],
  3535. docEngineer:[
  3536. {
  3537. required: true,
  3538. message: ' ',
  3539. trigger: ['blur','change']
  3540. }
  3541. ],
  3542. docEngineerName:[
  3543. {
  3544. required: true,
  3545. message: ' ',
  3546. trigger: ['blur','change']
  3547. }
  3548. ],
  3549. projectManagerName:[
  3550. {
  3551. required: true,
  3552. message: ' ',
  3553. trigger: ['blur','change']
  3554. }
  3555. ],
  3556. engineerName:[
  3557. {
  3558. required: true,
  3559. message: ' ',
  3560. trigger: ['blur','change']
  3561. }
  3562. ],
  3563. cQualityEngineer1Name:[
  3564. {
  3565. required: true,
  3566. message: ' ',
  3567. trigger: ['blur','change']
  3568. }
  3569. ],
  3570. cQualityEngineer2Name:[
  3571. {
  3572. required: true,
  3573. message: ' ',
  3574. trigger: ['blur','change']
  3575. }
  3576. ],
  3577. cQualityEngineer3Name:[
  3578. {
  3579. required: true,
  3580. message: ' ',
  3581. trigger: ['blur','change']
  3582. }
  3583. ],
  3584. cQualityEngineer4Name:[
  3585. {
  3586. required: true,
  3587. message: ' ',
  3588. trigger: ['blur','change']
  3589. }
  3590. ],
  3591. cQualityEngineer5Name:[
  3592. {
  3593. required: true,
  3594. message: ' ',
  3595. trigger: ['blur','change']
  3596. }
  3597. ],
  3598. cQualityEngineer6Name:[
  3599. {
  3600. required: true,
  3601. message: ' ',
  3602. trigger: ['blur','change']
  3603. }
  3604. ],
  3605. cManufactureEngineerName:[
  3606. {
  3607. required: true,
  3608. message: ' ',
  3609. trigger: ['blur','change']
  3610. }
  3611. ],
  3612. projectCategoryType:[
  3613. {
  3614. required: true,
  3615. message: ' ',
  3616. trigger: ['blur','change']
  3617. }
  3618. ],
  3619. documentTypeIdType:[
  3620. {
  3621. required: true,
  3622. message: ' ',
  3623. trigger: ['blur','change']
  3624. }
  3625. ],
  3626. documentTypeType:[
  3627. {
  3628. required: true,
  3629. message: ' ',
  3630. trigger: ['blur','change']
  3631. }
  3632. ],
  3633. responsibleDepartmentType:[
  3634. {
  3635. required: true,
  3636. message: ' ',
  3637. trigger: ['blur','change']
  3638. }
  3639. ],
  3640. estimatedCompletionDaysType:[
  3641. {
  3642. required: true,
  3643. message: ' ',
  3644. trigger: ['blur','change']
  3645. }
  3646. ],
  3647. activeType:[
  3648. {
  3649. required: true,
  3650. message: ' ',
  3651. trigger: ['blur','change']
  3652. }
  3653. ],
  3654. bu:[
  3655. {
  3656. required: true,
  3657. message: ' ',
  3658. trigger: ['blur','change']
  3659. }
  3660. ],
  3661. finalPartNo:[
  3662. {
  3663. required: true,
  3664. message: ' ',
  3665. trigger: ['blur','change']
  3666. }
  3667. ],
  3668. needDate:[
  3669. {
  3670. required: true,
  3671. message: ' ',
  3672. trigger: ['blur','change']
  3673. }
  3674. ],
  3675. projectCreationDate:[
  3676. {
  3677. required: true,
  3678. message: ' ',
  3679. trigger: ['blur','change']
  3680. }
  3681. ],
  3682. wantedConfirmDate:[
  3683. {
  3684. required: true,
  3685. message: ' ',
  3686. trigger: ['blur','change']
  3687. }
  3688. ],
  3689. projectCategory: [
  3690. {
  3691. required: true,
  3692. message: ' ',
  3693. trigger: ['blur','change']
  3694. }
  3695. ],
  3696. projectPhase: [
  3697. {
  3698. required: true,
  3699. message: ' ',
  3700. trigger: ['blur','change']
  3701. }
  3702. ],
  3703. proofingNo: [
  3704. {
  3705. required: true,
  3706. message: ' ',
  3707. trigger: ['blur','change']
  3708. }
  3709. ],
  3710. planStartDate: [
  3711. {
  3712. required: true,
  3713. message: ' ',
  3714. trigger: ['blur','change']
  3715. }
  3716. ],
  3717. requiredDeliveryDate: [
  3718. {
  3719. required: true,
  3720. message: ' ',
  3721. trigger: ['blur','change']
  3722. }
  3723. ],
  3724. proofingNumber: [
  3725. {
  3726. required: true,
  3727. message: ' ',
  3728. trigger: ['blur','change']
  3729. }
  3730. ],
  3731. //请选择项目分类
  3732. cProjectTypeDb: [
  3733. {
  3734. required: true,
  3735. message: ' ',
  3736. trigger: ['blur','change']
  3737. }
  3738. ],
  3739. conclusion: [
  3740. {
  3741. required: true,
  3742. message: ' ',
  3743. trigger: ['blur','change']
  3744. }
  3745. ],
  3746. },
  3747. projectCategoryList: [
  3748. {
  3749. projectCategory: 'Low Risk',
  3750. },
  3751. {
  3752. projectCategory: 'High Risk',
  3753. },
  3754. {
  3755. projectCategory: 'Sustaining',
  3756. }
  3757. ],
  3758. cProjectRegionList: [
  3759. {
  3760. cProjectRegion: 'Global',
  3761. },
  3762. {
  3763. cProjectRegion: 'APAC',
  3764. },
  3765. {
  3766. cProjectRegion: 'CHINA',
  3767. },
  3768. {
  3769. cProjectRegion: 'EU',
  3770. },
  3771. {
  3772. cProjectRegion: 'US',
  3773. },
  3774. {
  3775. cProjectRegion: 'Mexico',
  3776. },
  3777. {
  3778. cProjectRegion: 'Other',
  3779. },
  3780. ],
  3781. priorityList: [
  3782. {
  3783. priority: 'Low',
  3784. },
  3785. {
  3786. priority: 'Risk',
  3787. },
  3788. ],
  3789. statusList: [
  3790. {
  3791. status: '草稿',
  3792. },
  3793. {
  3794. status: '进行中',
  3795. },
  3796. {
  3797. status: '已量产',
  3798. },
  3799. {
  3800. status: '正式量产',
  3801. }
  3802. ],
  3803. userBuList: [],
  3804. menuId: this.$route.meta.menuId,
  3805. }
  3806. },
  3807. mounted () {
  3808. this.$nextTick(() => {
  3809. this.height = window.innerHeight - 558
  3810. })
  3811. EventBus.$on('updateProjectPartInfo', () => {
  3812. this.getDataList();
  3813. });
  3814. EventBus.$on('updateProjectPartDocumentInfo', () => {
  3815. this.getProofDocument()
  3816. });
  3817. EventBus.$on('updateThisProjectPartDocumentInfo', () => {
  3818. this.searchProjectAllDocumentList()
  3819. });
  3820. EventBus.$on('getProjectOtherDocument', () => {
  3821. this.getProjectOtherDocument()
  3822. });
  3823. },
  3824. created () {
  3825. // 按钮控制
  3826. this.getButtonAuthData()
  3827. // 获取用户的 site 和 bu
  3828. this.getSiteAndBuByUserName()
  3829. // 校验用户是否收藏
  3830. this.favoriteIsOk()
  3831. // 动态列
  3832. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  3833. if (!this.authSearch) {
  3834. if (!this.agencyMatters){
  3835. if (this.$route.query.projectNo || this.$route.query.testPartNo) {
  3836. this.searchData1.projectNo = this.$route.query.projectNo;
  3837. this.searchData1.testPartNo = this.$route.query.testPartNo;
  3838. this.agencyMatters = true;
  3839. }
  3840. // 获取 URL 查询参数
  3841. const { projectPartId } = this.$route.query;
  3842. // 将查询参数赋值给 searchData
  3843. if (projectPartId){
  3844. this.searchData.projectPartId = projectPartId
  3845. }
  3846. // 获取数据列表
  3847. this.getDataList()
  3848. }
  3849. }
  3850. },
  3851. activated() {
  3852. if (this.$route.query.projectNo || this.$route.query.testPartNo) {
  3853. this.searchData1.projectNo = this.$route.query.projectNo;
  3854. this.searchData1.testPartNo = this.$route.query.testPartNo;
  3855. this.agencyMatters = true;
  3856. this.getDataList();
  3857. }
  3858. this.$store.commit("sift/commitSearchFunction",this.queryEamProjectPart)
  3859. },
  3860. methods: {
  3861. handleColumnResize(newWidth, oldWidth, column, event){
  3862. let inData= this.columnList.filter(item => item.columnProp === column.property)[0]
  3863. inData.columnWidth=newWidth
  3864. updateColumnSize(inData).then(({data}) => {
  3865. if (data.code === 0) {
  3866. console.log("栏位宽度保存成功!")
  3867. }
  3868. })
  3869. },
  3870. // 获取用户的bu
  3871. getSiteAndBuByUserName () {
  3872. let tempData = {
  3873. username: this.$store.state.user.name,
  3874. }
  3875. getSiteAndBuByUserName(tempData).then(({data}) => {
  3876. if (data.code === 0) {
  3877. this.userBuList = data.rows
  3878. }
  3879. })
  3880. },
  3881. // 获取基础数据列表S
  3882. getBaseList (val,type) {
  3883. this.tagNo = val
  3884. this.$nextTick(() => {
  3885. let strVal = ''
  3886. if (val === 509 ) {
  3887. strVal = this.modalData.customerNo
  3888. this.$refs.baseList.init(val, strVal)
  3889. }
  3890. if (val === 301 ) {
  3891. strVal = this.modalData.projectManager
  3892. this.$refs.baseList.init(val, strVal)
  3893. }
  3894. })
  3895. },
  3896. /* 列表方法的回调 */
  3897. getBaseData (val) {
  3898. if (this.tagNo === 509) {
  3899. this.modalData.customerNo = val.customer_no
  3900. this.modalData.customerDesc = val.customer_desc
  3901. }
  3902. },
  3903. // 校验用户是否收藏
  3904. favoriteIsOk () {
  3905. let userFavorite = {
  3906. userId: this.$store.state.user.id,
  3907. languageCode: this.$i18n.locale
  3908. }
  3909. userFavoriteList(userFavorite).then(({data}) => {
  3910. for (let i = 0; i < data.list.length; i++) {
  3911. if (this.$route.meta.menuId === data.list[i].menuId) {
  3912. this.favorite = true
  3913. }
  3914. }
  3915. })
  3916. },
  3917. // 收藏 OR 取消收藏
  3918. favoriteFunction () {
  3919. let userFavorite = {
  3920. userId: this.$store.state.user.id,
  3921. functionId: this.$route.meta.menuId,
  3922. }
  3923. if (this.favorite) {
  3924. removeUserFavorite(userFavorite).then(({data}) => {
  3925. this.$message.success(data.msg)
  3926. this.favorite = false
  3927. })
  3928. } else {
  3929. // 收藏
  3930. saveUserFavorite(userFavorite).then(({data}) => {
  3931. this.$message.success(data.msg)
  3932. this.favorite = true
  3933. })
  3934. }
  3935. },
  3936. //导出excel
  3937. async createExportData () {
  3938. this.searchData.limit = -1
  3939. this.searchData.page = 1
  3940. await eamProjectPartSearch(this.searchData).then(({data}) => {
  3941. this.exportList = data.page.list
  3942. this.exportList.forEach((item) => {
  3943. item.projectManagerName = item.projectManager.split('-')[1];
  3944. item.projectOwnerName = item.projectOwner.split('-')[1];
  3945. item.engineerName = item.engineer.split('-')[1];
  3946. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  3947. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  3948. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  3949. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  3950. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== '') {
  3951. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  3952. }
  3953. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== '') {
  3954. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  3955. }
  3956. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== '') {
  3957. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  3958. }
  3959. if (item.docEngineer !== null && item.docEngineer !== '') {
  3960. item.docEngineerName = item.docEngineer.split('-')[1];
  3961. }
  3962. if (item.docEngineer2 !== null && item.docEngineer2 !== '') {
  3963. item.docEngineer2Name = item.docEngineer2.split('-')[1];
  3964. }
  3965. if (item.ipqcHardTag !== null && item.ipqcHardTag !== '') {
  3966. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1];
  3967. }
  3968. if (item.projectManager !== null && item.projectManager !== '') {
  3969. item.projectManagerName = item.projectManager.split('-')[1];
  3970. }
  3971. });
  3972. for (let i = 0; i < this.exportList.length; i++) {
  3973. if (this.exportList[i].responsibleDepartment === 'R001') {
  3974. this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
  3975. } else if (this.exportList[i].responsibleDepartment === 'R002') {
  3976. this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
  3977. } else if (this.exportList[i].responsibleDepartment === 'R004') {
  3978. this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
  3979. } else if (this.exportList[i].responsibleDepartment === 'R005') {
  3980. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
  3981. } else if (this.exportList[i].responsibleDepartment === 'R007') {
  3982. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
  3983. } else if (this.exportList[i].responsibleDepartment === 'R008') {
  3984. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
  3985. } else if (this.exportList[i].responsibleDepartment === 'R009') {
  3986. this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
  3987. } else if (this.exportList[i].responsibleDepartment === 'R011') {
  3988. if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
  3989. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
  3990. }
  3991. } else if (this.exportList[i].responsibleDepartment === 'R012') {
  3992. if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
  3993. this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
  3994. }
  3995. } else if (this.exportList[i].responsibleDepartment === 'R017') {
  3996. if (this.exportList[i].docEngineer2 !== null && this.exportList[i].docEngineer2 !== '') {
  3997. this.exportList[i].projectLeader = this.exportList[i].docEngineer2.split("-")[1];
  3998. }
  3999. } else if (this.exportList[i].responsibleDepartment === 'R013') {
  4000. if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
  4001. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
  4002. }
  4003. } else if (this.exportList[i].responsibleDepartment === 'R014') {
  4004. if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
  4005. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
  4006. }
  4007. } else if (this.exportList[i].responsibleDepartment === 'R015') {
  4008. if (this.exportList[i].ipqcHardTag !== null && this.exportList[i].ipqcHardTag !== '') {
  4009. this.exportList[i].projectLeader = this.exportList[i].ipqcHardTag.split("-")[1];
  4010. }
  4011. } else if (this.exportList[i].responsibleDepartment === 'R016') {
  4012. if (this.exportList[i].cQualityEngineer7 !== null && this.exportList[i].cQualityEngineer7 !== '') {
  4013. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer7.split("-")[1];
  4014. }
  4015. }
  4016. }
  4017. })
  4018. return this.exportList
  4019. },
  4020. startDownload () {},
  4021. finishDownload () {},
  4022. fields () {
  4023. let json = "{"
  4024. this.columnList.forEach((item, index) => {
  4025. if (index == this.columnList.length - 1) {
  4026. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  4027. } else {
  4028. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  4029. }
  4030. })
  4031. json += "}"
  4032. let s = eval("(" + json + ")")
  4033. return s
  4034. },
  4035. agencyMatter(){
  4036. this.agencyMatters = false
  4037. this.getDataList()
  4038. },
  4039. // 获取数据列表
  4040. getDataList (params) {
  4041. this.selectTypeFlag = params
  4042. this.searchData.limit = this.pageSize
  4043. this.searchData.page = this.pageIndex
  4044. this.searchData1.limit = this.pageSize
  4045. this.searchData1.page = this.pageIndex
  4046. if (this.agencyMatters) {
  4047. eamProjectPartSearch(this.searchData1).then(({data}) => {
  4048. if (data.code === 0) {
  4049. this.dataList = data.page.list
  4050. this.pageIndex = data.page.currPage
  4051. this.pageSize = data.page.pageSize
  4052. this.totalPage = data.page.totalCount
  4053. // 遍历dataList
  4054. this.dataList.forEach((item) => {
  4055. item.projectManagerName = item.projectManager.split('-')[1]
  4056. item.projectOwnerName = item.projectOwner.split('-')[1]
  4057. item.engineerName = item.engineer.split('-')[1]
  4058. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  4059. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  4060. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  4061. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  4062. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  4063. }
  4064. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  4065. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  4066. }
  4067. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  4068. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  4069. }
  4070. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  4071. if (item.docEngineer != null && item.docEngineer !== ''){
  4072. item.docEngineerName = item.docEngineer.split('-')[1]
  4073. }
  4074. if (item.docEngineer2 != null && item.docEngineer2 !== ''){
  4075. item.docEngineer2Name = item.docEngineer2.split('-')[1]
  4076. }
  4077. if (item.ipqcHardTag != null && item.ipqcHardTag !== ''){
  4078. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1]
  4079. }
  4080. if (item.cQualityEngineer7 != null && item.cQualityEngineer7 !== ''){
  4081. item.cQualityEngineer7Name = item.cQualityEngineer7.split('-')[1]
  4082. }
  4083. })
  4084. // 判断是否全部存在数据
  4085. if (this.totalPage > 0) {
  4086. // 设置选中行
  4087. this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
  4088. this.proofingClickRow(this.dataList[this.dataListIndex])
  4089. this.dataListIndex = 0
  4090. }
  4091. }
  4092. })
  4093. } else {
  4094. eamProjectPartSearch(this.searchData).then(({data}) => {
  4095. if (data.code === 0) {
  4096. this.dataList = data.page.list
  4097. this.allPersonnelInfoList = data.rows
  4098. this.pageIndex = data.page.currPage
  4099. this.pageSize = data.page.pageSize
  4100. this.totalPage = data.page.totalCount
  4101. // 遍历dataList
  4102. this.dataList.forEach((item) => {
  4103. item.projectManagerName = item.projectManager.split('-')[1]
  4104. item.projectOwnerName = item.projectOwner.split('-')[1]
  4105. item.engineerName = item.engineer.split('-')[1]
  4106. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  4107. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  4108. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  4109. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  4110. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  4111. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  4112. }
  4113. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  4114. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  4115. }
  4116. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  4117. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  4118. }
  4119. if (item.docEngineer != null && item.docEngineer !== ''){
  4120. item.docEngineerName = item.docEngineer.split('-')[1]
  4121. }
  4122. if (item.docEngineer2 != null && item.docEngineer2 !== ''){
  4123. item.docEngineer2Name = item.docEngineer2.split('-')[1]
  4124. }
  4125. if (item.ipqcHardTag != null && item.ipqcHardTag !== ''){
  4126. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1]
  4127. }
  4128. if (item.cQualityEngineer7 != null && item.cQualityEngineer7 !== ''){
  4129. item.cQualityEngineer7Name = item.cQualityEngineer7.split('-')[1]
  4130. }
  4131. })
  4132. // 获取全部人员信息用于下拉框
  4133. this.getAllPersonnelList()
  4134. // 判断是否全部存在数据
  4135. if (this.totalPage > 0) {
  4136. // 设置选中行
  4137. this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
  4138. // 加载当前的页签的table
  4139. this.refreshCurrentTabTable()
  4140. this.proofingClickRow(this.dataList[this.dataListIndex])
  4141. this.dataListIndex = 0
  4142. }
  4143. }
  4144. })
  4145. }
  4146. },
  4147. queryEamProjectPart (params) {
  4148. this.selectTypeFlag = params
  4149. this.searchData.limit = this.pageSize
  4150. this.searchData.page = this.pageIndex
  4151. if (params !== null && params !== undefined) {
  4152. params.limit = this.pageSize
  4153. params.page = this.pageIndex
  4154. params.site = this.$store.state.user.site
  4155. params.userName = this.$store.state.user.name
  4156. } else {
  4157. params = this.searchData
  4158. }
  4159. queryEamProjectPart(params).then(({data}) => {
  4160. if (data.code === 0) {
  4161. this.dataList = data.page.list
  4162. this.pageIndex = data.page.currPage
  4163. this.pageSize = data.page.pageSize
  4164. this.totalPage = data.page.totalCount
  4165. // 遍历dataList
  4166. this.dataList.forEach((item) => {
  4167. item.projectManagerName = item.projectManager.split('-')[1]
  4168. item.projectOwnerName = item.projectOwner.split('-')[1]
  4169. item.engineerName = item.engineer.split('-')[1]
  4170. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  4171. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  4172. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  4173. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  4174. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  4175. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  4176. }
  4177. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  4178. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  4179. }
  4180. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  4181. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  4182. }
  4183. if (item.docEngineer != null && item.docEngineer !== ''){
  4184. item.docEngineerName = item.docEngineer.split('-')[1]
  4185. }
  4186. if (item.docEngineer2 != null && item.docEngineer2 !== ''){
  4187. item.docEngineer2Name = item.docEngineer2.split('-')[1]
  4188. }
  4189. if (item.ipqcHardTag != null && item.ipqcHardTag !== ''){
  4190. item.ipqcHardTagName = item.ipqcHardTag.split('-')[1]
  4191. }
  4192. if (item.cQualityEngineer7 != null && item.cQualityEngineer7 !== ''){
  4193. item.cQualityEngineer7Name = item.cQualityEngineer7.split('-')[1]
  4194. }
  4195. })
  4196. // 获取全部人员信息用于下拉框
  4197. this.getAllPersonnelList()
  4198. // 判断是否全部存在数据
  4199. if (this.totalPage > 0) {
  4200. // 设置选中行
  4201. this.$refs.mainTable.setCurrentRow(this.dataList[this.dataListIndex])
  4202. // 加载当前的页签的table
  4203. this.refreshCurrentTabTable()
  4204. this.proofingClickRow(this.dataList[this.dataListIndex])
  4205. this.dataListIndex = 0
  4206. }
  4207. }
  4208. })
  4209. },
  4210. getAllPersonnelList() {
  4211. let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList))
  4212. // 找出所有的同时过滤出唯一的 project owners, managers, and engineers
  4213. const allPersonnelList = [];
  4214. const projectOwnersMap = new Map();
  4215. const projectManagersMap = new Map();
  4216. const engineersMap = new Map();
  4217. const finalPartNosMap = new Map();
  4218. allPersonnelInfoDataList.forEach((item) => {
  4219. // Handle project owners
  4220. if (!projectOwnersMap.has(item.projectOwner)) {
  4221. const projectOwnerId = projectOwnersMap.size + 1; // Incrementing by +1
  4222. projectOwnersMap.set(item.projectOwner, {
  4223. projectOwnerId,
  4224. projectOwner: item.projectOwner,
  4225. projectOwnerName: item.projectOwner.split('-')[1]
  4226. });
  4227. allPersonnelList.push(projectOwnersMap.get(item.projectOwner));
  4228. }
  4229. // Handle project managers
  4230. if (!projectManagersMap.has(item.projectManager)) {
  4231. const projectManagerId = projectManagersMap.size + 1;
  4232. projectManagersMap.set(item.projectManager, {
  4233. projectManagerId,
  4234. projectManager: item.projectManager,
  4235. projectManagerName: item.projectManager.split('-')[1]
  4236. });
  4237. allPersonnelList.push(projectManagersMap.get(item.projectManager));
  4238. }
  4239. // Handle engineers
  4240. if (!engineersMap.has(item.engineer)) {
  4241. const engineerId = engineersMap.size + 1;
  4242. engineersMap.set(item.engineer, {
  4243. engineerId,
  4244. engineer: item.engineer,
  4245. engineerName: item.engineer.split('-')[1]
  4246. });
  4247. allPersonnelList.push(engineersMap.get(item.engineer));
  4248. }
  4249. // Handle finalPartNos
  4250. if (!finalPartNosMap.has(item.finalPartNo) && item.finalPartNo !== null) {
  4251. const finalPartNoId = finalPartNosMap.size + 1;
  4252. finalPartNosMap.set(item.finalPartNo, {
  4253. finalPartNoId,
  4254. finalPartNo: item.finalPartNo,
  4255. });
  4256. allPersonnelList.push(finalPartNosMap.get(item.finalPartNo));
  4257. }
  4258. // Handle cManufactureEngineer
  4259. if (item.cManufactureEngineer !== null || item.cManufactureEngineer !== ''){
  4260. if (!this.allMFGList.includes(item.cManufactureEngineer.split('-')[0])) {
  4261. this.allMFGList.push(item.cManufactureEngineer.split('-')[0]);
  4262. }
  4263. }
  4264. });
  4265. this.allPersonnelInfoList = allPersonnelList;
  4266. },
  4267. // ======== 列表操作方法 ========
  4268. /**
  4269. * 单机选中物料信息
  4270. * @param row
  4271. */
  4272. proofingClickRow(row){
  4273. row.proofingId = -1
  4274. this.proofingCurrentRow=JSON.parse(JSON.stringify(row));
  4275. },
  4276. /**
  4277. * 当前值发生变化的时候修改
  4278. * @param row
  4279. * @param oldRow
  4280. */
  4281. changeCurrentRow (row, oldRow) {
  4282. row.proofingId = -1
  4283. // 判断是否是获取焦点的事件
  4284. if (row) {
  4285. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  4286. }
  4287. },
  4288. // 每页数
  4289. sizeChangeHandle (val) {
  4290. this.pageSize = val
  4291. this.pageIndex = 1
  4292. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  4293. this.queryEamProjectPart(this.selectTypeFlag)
  4294. } else {
  4295. this.getDataList()
  4296. }
  4297. },
  4298. // 当前页
  4299. currentChangeHandle (val) {
  4300. this.pageIndex = val
  4301. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  4302. this.queryEamProjectPart(this.selectTypeFlag)
  4303. } else {
  4304. this.getDataList()
  4305. }
  4306. },
  4307. // 多选
  4308. selectionChangeHandle (val) {
  4309. this.dataListSelections = val
  4310. },
  4311. generateNextPartNo() {
  4312. return new Promise((resolve, reject) => {
  4313. getTestPartNo().then(({ data }) => {
  4314. const stringData = String(data); // 显式转换为字符串
  4315. if (stringData === 'null' || stringData === 'undefined' || stringData === '' || stringData === '0') {
  4316. resolve('P00001');
  4317. } else {
  4318. const lastPartNo = parseInt(stringData.substring(1));
  4319. const nextPartNo = lastPartNo + 1;
  4320. let testPartNo;
  4321. if (nextPartNo < 10) {
  4322. testPartNo = 'P0000' + nextPartNo;
  4323. } else if (nextPartNo < 100) {
  4324. testPartNo = 'P000' + nextPartNo;
  4325. } else if (nextPartNo < 1000) {
  4326. testPartNo = 'P00' + nextPartNo;
  4327. } else if (nextPartNo < 10000) {
  4328. testPartNo = 'P0' + nextPartNo;
  4329. } else {
  4330. testPartNo = 'P' + nextPartNo;
  4331. }
  4332. resolve(testPartNo);
  4333. }
  4334. }).catch(error => {
  4335. reject('Failed to fetch testPartNo: ' + error);
  4336. });
  4337. });
  4338. },
  4339. changeFormalPartNo (row) {
  4340. this.modalData = {
  4341. flag: '2',
  4342. site: row.site,
  4343. bu: row.site + '_' + row.buNo,
  4344. customerNo: row.customerNo,
  4345. customerDesc: row.customerDesc,
  4346. projectCategory: row.projectCategory,
  4347. projectPartId: row.projectPartId,
  4348. testPartNo: row.testPartNo,
  4349. partDesc: row.partDesc,
  4350. projectId: row.projectId,
  4351. projectNo: row.projectNo,
  4352. projectDesc: row.projectDesc,
  4353. projectCloseDate: row.projectCloseDate,
  4354. needDate: row.needDate,
  4355. cProjectRegion: row.cProjectRegion,
  4356. projectManager: row.projectManager,
  4357. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  4358. projectOwner: row.projectOwner,
  4359. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  4360. engineer: row.engineer,
  4361. engineerName: row.engineer.split('-')[1], // 截取用户名
  4362. cQualityEngineer1: row.cQualityEngineer1,
  4363. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  4364. cQualityEngineer2: row.cQualityEngineer2,
  4365. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  4366. projectCreationDate: row.projectCreationDate,
  4367. cQualityEngineer3: row.cQualityEngineer3,
  4368. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  4369. cQualityEngineer4: row.cQualityEngineer4,
  4370. cQualityEngineer5: row.cQualityEngineer5,
  4371. cQualityEngineer6: row.cQualityEngineer6,
  4372. cManufactureEngineer: row.cManufactureEngineer,
  4373. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  4374. docEngineer: row.docEngineer,
  4375. docEngineer2: row.docEngineer2,
  4376. ipqcHardTag: row.ipqcHardTag,
  4377. cQualityEngineer7: row.cQualityEngineer7,
  4378. finalPartNo: row.finalPartNo,
  4379. finalPartDesc: row.finalPartDesc,
  4380. // active: row.active,
  4381. createBy: this.$store.state.user.name,
  4382. updateBy: this.$store.state.user.name,
  4383. }
  4384. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== ''){
  4385. this.modalData.cQualityEngineer4Name= row.cQualityEngineer4.split('-')[1] // 截取用户名
  4386. }
  4387. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== ''){
  4388. this.modalData.cQualityEngineer5Name= row.cQualityEngineer5.split('-')[1] // 截取用户名
  4389. }
  4390. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== ''){
  4391. this.modalData.cQualityEngineer6Name= row.cQualityEngineer6.split('-')[1] // 截取用户名
  4392. }
  4393. if (row.docEngineer != null && row.docEngineer !== ''){
  4394. this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名
  4395. }
  4396. if (row.docEngineer2 != null && row.docEngineer2 !== ''){
  4397. this.modalData.docEngineer2Name= row.docEngineer2.split('-')[1] // 截取用户名
  4398. }
  4399. if (row.ipqcHardTag != null && row.ipqcHardTag !== ''){
  4400. this.modalData.ipqcHardTagName= row.ipqcHardTag.split('-')[1] // 截取用户名
  4401. }
  4402. if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== ''){
  4403. this.modalData.cQualityEngineer7Name= row.cQualityEngineer7.split('-')[1] // 截取用户名
  4404. }
  4405. this.getFinalPartDesc()
  4406. this.formalPartNoFlag = true
  4407. },
  4408. addProofRecord (row) {
  4409. this.newProofingRecordData = {
  4410. site: row.site,
  4411. buNo: row.buNo,
  4412. projectId: row.projectId,
  4413. projectNo: row.projectNo,
  4414. projectDesc: row.projectDesc,
  4415. customerNo: row.customerNo,
  4416. customerDesc: row.customerDesc,
  4417. bu: row.site + '_' + row.buNo,
  4418. projectPartId: row.projectPartId,
  4419. testPartNo: row.testPartNo,
  4420. partDesc: row.partDesc,
  4421. projectCategory: row.projectCategory,
  4422. cProjectTypeDb: row.projectCategory,
  4423. projectManager: row.projectManager,
  4424. projectOwner: row.projectOwner,
  4425. engineer: row.engineer,
  4426. cQualityEngineer1: row.cQualityEngineer1,
  4427. cQualityEngineer2: row.cQualityEngineer2,
  4428. cQualityEngineer3: row.cQualityEngineer3,
  4429. cQualityEngineer4: row.cQualityEngineer4,
  4430. cQualityEngineer5: row.cQualityEngineer5,
  4431. cQualityEngineer6: row.cQualityEngineer6,
  4432. cManufactureEngineer: row.cManufactureEngineer,
  4433. docEngineer: row.docEngineer,
  4434. docEngineer2: row.docEngineer2,
  4435. ipqcHardTag: row.ipqcHardTag,
  4436. cQualityEngineer7: row.cQualityEngineer7,
  4437. remark: '',
  4438. planStartDate : new Date(),
  4439. proofingNo: '',
  4440. proofingStatus: '草稿',
  4441. rrequiredDeliveryDate: '',
  4442. createDate: '',
  4443. createBy: this.$store.state.user.name,
  4444. }
  4445. this.visible = true
  4446. },
  4447. newProofingRecord() {
  4448. if (this.newProofingRecordData.cProjectTypeDb === '' || this.newProofingRecordData.cProjectTypeDb === null || this.newProofingRecordData.cProjectTypeDb === undefined) {
  4449. this.$message({
  4450. message: '项目分类不能为空',
  4451. type: 'warning'
  4452. })
  4453. return
  4454. }
  4455. if (this.newProofingRecordData.projectPhase === '' || this.newProofingRecordData.projectPhase === null || this.newProofingRecordData.projectPhase === undefined) {
  4456. this.$message({
  4457. message: '项目阶段不能为空',
  4458. type: 'warning'
  4459. })
  4460. return
  4461. }
  4462. if (this.newProofingRecordData.proofingNo === '' || this.newProofingRecordData.proofingNo === null || this.newProofingRecordData.proofingNo === undefined) {
  4463. this.$message({
  4464. message: '打样单号不能为空',
  4465. type: 'warning'
  4466. })
  4467. return
  4468. }
  4469. if (this.newProofingRecordData.proofingNumber === '' || this.newProofingRecordData.proofingNumber === null || this.newProofingRecordData.proofingNumber === undefined) {
  4470. this.$message({
  4471. message: '数量不能为空',
  4472. type: 'warning'
  4473. })
  4474. return
  4475. }
  4476. // 数量必须是大于等于0的正整数
  4477. if (!/^[1-9]\d*$/.test(this.newProofingRecordData.proofingNumber)) {
  4478. this.$alert('数量必需是大于等于0的正整数', '提示', {
  4479. confirmButtonText: '确定',
  4480. });
  4481. return
  4482. }
  4483. if (this.newProofingRecordData.planStartDate === '' || this.newProofingRecordData.planStartDate === null || this.newProofingRecordData.planStartDate === undefined) {
  4484. this.$message({
  4485. message: '打样开始日期不能为空',
  4486. type: 'warning'
  4487. })
  4488. return
  4489. }
  4490. if (this.newProofingRecordData.requiredDeliveryDate === '' || this.newProofingRecordData.requiredDeliveryDate === null || this.newProofingRecordData.requiredDeliveryDate === undefined) {
  4491. this.$message({
  4492. message: '预计完成日期不能为空',
  4493. type: 'warning'
  4494. })
  4495. return
  4496. }
  4497. proofingInformationSave(this.newProofingRecordData).then(({data}) => {
  4498. //区分请求成功和失败的状况
  4499. if (data && data.code === 0) {
  4500. this.newProofingDocument(data.proofingId).then(() => {
  4501. this.visible = false
  4502. //刷新表格
  4503. this.refreshCurrentTabTable()
  4504. })
  4505. } else {
  4506. this.$alert(data.msg, '错误', {
  4507. confirmButtonText: '确定'
  4508. })
  4509. }
  4510. })
  4511. },
  4512. newProofingDocument(proofingId) {
  4513. this.newProofingRecordData.proofingId = proofingId
  4514. return proofingDocumentSave(this.newProofingRecordData).then(({ data }) => {
  4515. if (data && data.code === 0) {
  4516. this.$message({
  4517. message: '新增成功',
  4518. type: 'success'
  4519. })
  4520. } else {
  4521. this.$alert(data.msg, '错误', {
  4522. confirmButtonText: '确定'
  4523. })
  4524. }
  4525. });
  4526. },
  4527. updateModalStatus (row) {
  4528. this.modalData = {
  4529. site: row.site,
  4530. bu: row.site + '_' + row.buNo,
  4531. buNo: row.buNo,
  4532. username: this.$store.state.user.name,
  4533. customerNo: row.customerNo,
  4534. customerDesc: row.customerDesc,
  4535. projectCategory: row.projectCategory,
  4536. projectPartId: row.projectPartId,
  4537. testPartNo: row.testPartNo,
  4538. partDesc: row.partDesc,
  4539. projectId: row.projectId,
  4540. projectNo: row.projectNo,
  4541. projectDesc: row.projectDesc,
  4542. priority: row.priority,
  4543. closeDate: row.closeDate,
  4544. needDate: row.needDate,
  4545. projectManager: row.projectManager,
  4546. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  4547. projectOwner: row.projectOwner,
  4548. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  4549. engineer: row.engineer,
  4550. engineerName: row.engineer.split('-')[1], // 截取用户名
  4551. cQualityEngineer1: row.cQualityEngineer1,
  4552. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  4553. cQualityEngineer2: row.cQualityEngineer2,
  4554. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  4555. cQualityEngineer3: row.cQualityEngineer3,
  4556. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  4557. cQualityEngineer4: row.cQualityEngineer4,
  4558. cQualityEngineer5: row.cQualityEngineer5,
  4559. cQualityEngineer6: row.cQualityEngineer6,
  4560. cManufactureEngineer: row.cManufactureEngineer,
  4561. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  4562. docEngineer: row.docEngineer,
  4563. docEngineer2: row.docEngineer2,
  4564. ipqcHardTag: row.ipqcHardTag,
  4565. cQualityEngineer7: row.cQualityEngineer7,
  4566. buildDate: row.buildDate,
  4567. status: row.status,
  4568. partType: row.partType,
  4569. // active: row.active,
  4570. createBy: this.$store.state.user.name,
  4571. updateBy: this.$store.state.user.name,
  4572. }
  4573. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== '') {
  4574. this.modalData.cQualityEngineer4Name = row.cQualityEngineer4.split('-')[1] // 截取用户名
  4575. }
  4576. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== '') {
  4577. this.modalData.cQualityEngineer5Name = row.cQualityEngineer5.split('-')[1] // 截取用户名
  4578. }
  4579. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== '') {
  4580. this.modalData.cQualityEngineer6Name = row.cQualityEngineer6.split('-')[1] // 截取用户名
  4581. }
  4582. if (row.docEngineer != null && row.docEngineer !== '') {
  4583. this.modalData.docEngineerName = row.docEngineer.split('-')[1] // 截取用户名
  4584. }
  4585. if (row.docEngineer2 != null && row.docEngineer2 !== '') {
  4586. this.modalData.docEngineer2Name = row.docEngineer2.split('-')[1] // 截取用户名
  4587. }
  4588. if (row.ipqcHardTag != null && row.ipqcHardTag !== '') {
  4589. this.modalData.ipqcHardTagName = row.ipqcHardTag.split('-')[1] // 截取用户名
  4590. }
  4591. if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== '') {
  4592. this.modalData.cQualityEngineer7Name = row.cQualityEngineer7.split('-')[1] // 截取用户名
  4593. }
  4594. if (row.status === '草稿') {
  4595. if (row.projectOwner.split('-')[0] === this.$store.state.user.name) {
  4596. this.modalData.status = '进行中'
  4597. this.$confirm(`是否确认下达该项目?`, '提示', {
  4598. confirmButtonText: '确定',
  4599. cancelButtonText: '取消',
  4600. type: 'warning'
  4601. }).then(() => {
  4602. eamProjectPartInfoEdit(this.modalData).then(({data}) => {
  4603. if (data && (data.code === 0 || data.code === '0')) {
  4604. sendMailHandle(this.modalData).then(({data}) => {
  4605. if (data && data.code === 0) {
  4606. this.$message({
  4607. message: '发送成功',
  4608. type: 'success'
  4609. })
  4610. } else {
  4611. this.$alert(data.msg, '错误', {
  4612. confirmButtonText: '确定'
  4613. })
  4614. }
  4615. })
  4616. EventBus.$emit('updateProjectInfo')
  4617. this.dataList.forEach((item) => {
  4618. if (item.projectPartId === row.projectPartId) {
  4619. this.dataListIndex = this.dataList.indexOf(item)
  4620. }
  4621. })
  4622. this.getDataList()
  4623. this.$message({
  4624. message: '操作成功',
  4625. type: 'success',
  4626. duration: 1500,
  4627. onClose: () => {
  4628. }
  4629. })
  4630. } else {
  4631. this.$alert(data.msg, '错误', {
  4632. confirmButtonText: '确定'
  4633. })
  4634. }
  4635. })
  4636. }).catch(() => {
  4637. })
  4638. } else {
  4639. this.$message({
  4640. message: '该项目只允许PjM人员进行下达!',
  4641. type: 'warning',
  4642. showClose: true, // 显示关闭按钮
  4643. duration: 2000 // 显示时间,单位是毫秒,这里设置为5秒钟
  4644. });
  4645. }
  4646. } else if (row.status === '进行中' || '已量产') {
  4647. if (row.status === '进行中') {
  4648. this.modalData.status2 = '进行中'
  4649. }
  4650. this.modalData.status = '已量产'
  4651. this.modalData.closeDate = new Date()
  4652. this.$confirm(`是否确认转量产?`, '提示', {
  4653. confirmButtonText: '确定',
  4654. cancelButtonText: '取消',
  4655. type: 'warning'
  4656. }).then(() => {
  4657. eamProjectPartInfoEdit(this.modalData).then(({data}) => {
  4658. if (data && ( data.code === 0 || data.code === '0')) {
  4659. this.getDataList()
  4660. EventBus.$emit('updateProjectInfo')
  4661. this.$message({
  4662. message: '操作成功',
  4663. type: 'success',
  4664. duration: 1500,
  4665. onClose: () => {}
  4666. })
  4667. } else {
  4668. this.$alert(data.msg, '错误', {
  4669. confirmButtonText: '确定'
  4670. })
  4671. }
  4672. })
  4673. }).catch(() => {
  4674. })
  4675. }
  4676. },
  4677. sendMassMailHandle () {
  4678. let inData = this.proofingCurrentRow
  4679. inData.proofingId = -1
  4680. sendMailHandle(inData).then(({data}) => {
  4681. if (data && data.code === 0) {
  4682. this.$message({
  4683. message: '发送成功',
  4684. type: 'success'
  4685. })
  4686. } else {
  4687. this.$alert(data.msg, '错误', {
  4688. confirmButtonText: '确定'
  4689. })
  4690. }
  4691. })
  4692. },
  4693. // 转量产 一键下载
  4694. async dowloadAllFile(){
  4695. this.downloadLoading = true
  4696. let oldList = this.projectOtherDocumentList
  4697. let list = oldList.filter(item => {
  4698. return this.shouldShowDelete(item) || item.projectPhase === 'SOP文档'
  4699. })
  4700. for (const item of list) {
  4701. await this.viewMassDocumentFile(item, true)
  4702. this.downloadFile(this.projectConfirmatorFileList[0])
  4703. await new Promise(resolve => setTimeout(resolve, 500))
  4704. }
  4705. this.downloadLoading = false
  4706. },
  4707. // 所有文档 一键下载
  4708. async dowloadAllFile2(){
  4709. this.downloadLoading = true
  4710. let oldList = this.projectAllDocumentList
  4711. let list = oldList.filter(item => {
  4712. return this.shouldShowDelete(item) || item.uploadedFlag === 'Y'
  4713. })
  4714. for (const item of list) {
  4715. await this.viewMassDocumentFile(item, true)
  4716. this.downloadFile(this.projectConfirmatorFileList[0])
  4717. await new Promise(resolve => setTimeout(resolve, 500))
  4718. }
  4719. this.downloadLoading = false
  4720. },
  4721. cancelModalStatus (row) {
  4722. this.modalData = {
  4723. site: row.site,
  4724. bu: row.site + '_' + row.buNo,
  4725. buNo: row.buNo,
  4726. username: this.$store.state.user.name,
  4727. customerNo: row.customerNo,
  4728. customerDesc: row.customerDesc,
  4729. projectCategory: row.projectCategory,
  4730. projectPartId: row.projectPartId,
  4731. testPartNo: row.testPartNo,
  4732. partDesc: row.partDesc,
  4733. projectId: row.projectId,
  4734. projectNo: row.projectNo,
  4735. projectDesc: row.projectDesc,
  4736. priority: row.priority,
  4737. closeDate: row.closeDate,
  4738. needDate: row.needDate,
  4739. projectManager: row.projectManager,
  4740. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  4741. projectOwner: row.projectOwner,
  4742. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  4743. engineer: row.engineer,
  4744. engineerName: row.engineer.split('-')[1], // 截取用户名
  4745. cQualityEngineer1: row.cQualityEngineer1,
  4746. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  4747. cQualityEngineer2: row.cQualityEngineer2,
  4748. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  4749. cQualityEngineer3: row.cQualityEngineer3,
  4750. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  4751. cQualityEngineer4: row.cQualityEngineer4,
  4752. cQualityEngineer5: row.cQualityEngineer5,
  4753. cQualityEngineer6: row.cQualityEngineer6,
  4754. cManufactureEngineer: row.cManufactureEngineer,
  4755. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  4756. docEngineer: row.docEngineer,
  4757. docEngineer2: row.docEngineer2,
  4758. ipqcHardTag: row.ipqcHardTag,
  4759. cQualityEngineer7: row.cQualityEngineer7,
  4760. buildDate: row.buildDate,
  4761. status: row.status,
  4762. partType: row.partType,
  4763. // active: row.active,
  4764. createBy: this.$store.state.user.name,
  4765. updateBy: this.$store.state.user.name,
  4766. }
  4767. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== '') {
  4768. this.modalData.cQualityEngineer4Name = row.cQualityEngineer4.split('-')[1] // 截取用户名
  4769. }
  4770. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== '') {
  4771. this.modalData.cQualityEngineer5Name = row.cQualityEngineer5.split('-')[1] // 截取用户名
  4772. }
  4773. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== '') {
  4774. this.modalData.cQualityEngineer6Name = row.cQualityEngineer6.split('-')[1] // 截取用户名
  4775. }
  4776. if (row.docEngineer != null && row.docEngineer !== '') {
  4777. this.modalData.docEngineerName = row.docEngineer.split('-')[1] // 截取用户名
  4778. }
  4779. if (row.docEngineer2 != null && row.docEngineer2 !== '') {
  4780. this.modalData.docEngineer2Name = row.docEngineer2.split('-')[1] // 截取用户名
  4781. }
  4782. if (row.ipqcHardTag != null && row.ipqcHardTag !== '') {
  4783. this.modalData.ipqcHardTagName = row.ipqcHardTag.split('-')[1] // 截取用户名
  4784. }
  4785. if (row.cQualityEngineer7 != null && row.cQualityEngineer7 !== '') {
  4786. this.modalData.cQualityEngineer7Name = row.cQualityEngineer7.split('-')[1] // 截取用户名
  4787. }
  4788. if (row.status === '已量产') {
  4789. this.modalData.status = '进行中'
  4790. this.modalData.closeDate = ''
  4791. this.$confirm(`是否确认撤销该项目?`, '提示', {
  4792. confirmButtonText: '确定',
  4793. cancelButtonText: '取消',
  4794. type: 'warning'
  4795. }).then(() => {
  4796. eamProjectPartInfoCancelEdit(this.modalData).then(({data}) => {
  4797. if (data && (data.code === 0 || data.code === '0')) {
  4798. EventBus.$emit('updateProjectInfo')
  4799. this.getDataList()
  4800. this.$message({
  4801. message: '操作成功',
  4802. type: 'success',
  4803. duration: 1500,
  4804. onClose: () => {
  4805. }
  4806. })
  4807. } else {
  4808. this.$alert(data.msg, '错误', {
  4809. confirmButtonText: '确定'
  4810. })
  4811. }
  4812. })
  4813. }).catch(() => {
  4814. })
  4815. }
  4816. },
  4817. getRowProjectInfo(){
  4818. this.$nextTick(() => {
  4819. let inData = {
  4820. site: this.proofingCurrentRow.site,
  4821. projectId: this.proofingCurrentRow.projectId,
  4822. projectNo: this.proofingCurrentRow.projectNo,
  4823. projectDesc: this.proofingCurrentRow.projectDesc,
  4824. projectPartId: this.proofingCurrentRow.projectPartId,
  4825. testPartNo: this.proofingCurrentRow.testPartNo,
  4826. partDesc: this.proofingCurrentRow.partDesc,
  4827. projectManager: this.proofingCurrentRow.projectManager,
  4828. projectOwner: this.proofingCurrentRow.projectOwner,
  4829. engineer: this.proofingCurrentRow.engineer,
  4830. cQualityEngineer1: this.proofingCurrentRow.cQualityEngineer1,
  4831. cQualityEngineer2: this.proofingCurrentRow.cQualityEngineer2,
  4832. cQualityEngineer3: this.proofingCurrentRow.cQualityEngineer3,
  4833. cQualityEngineer4: this.proofingCurrentRow.cQualityEngineer4,
  4834. cQualityEngineer5: this.proofingCurrentRow.cQualityEngineer5,
  4835. cQualityEngineer6: this.proofingCurrentRow.cQualityEngineer6,
  4836. cManufactureEngineer: this.proofingCurrentRow.cManufactureEngineer,
  4837. docEngineer: this.proofingCurrentRow.docEngineer,
  4838. docEngineer2: this.proofingCurrentRow.docEngineer2,
  4839. ipqcHardTag: this.proofingCurrentRow.ipqcHardTag,
  4840. cQualityEngineer7: this.proofingCurrentRow.cQualityEngineer7,
  4841. // username:this.$store.state.user.name,
  4842. page: 1,
  4843. limit: 1000
  4844. }
  4845. this.$refs.proofRecordModal.init(inData, this.authUpdate)
  4846. });
  4847. },
  4848. showProofDetailModal(row) {
  4849. this.activeModalTab = 'proofRecord'
  4850. // 保存当前行数据
  4851. this.proofingCurrentRow = row;
  4852. // 打开模态框
  4853. this.dialogVisible = true;
  4854. // 模态框打开后刷新 proofRecord 组件的数据
  4855. this.$nextTick(() => {
  4856. let inData={
  4857. site: this.proofingCurrentRow.site,
  4858. projectId: this.proofingCurrentRow.projectId,
  4859. projectNo: this.proofingCurrentRow.projectNo,
  4860. projectDesc: this.proofingCurrentRow.projectDesc,
  4861. projectPartId: this.proofingCurrentRow.projectPartId,
  4862. testPartNo: this.proofingCurrentRow.testPartNo,
  4863. partDesc: this.proofingCurrentRow.partDesc,
  4864. projectManager: this.proofingCurrentRow.projectManager,
  4865. projectOwner: this.proofingCurrentRow.projectOwner,
  4866. engineer: this.proofingCurrentRow.engineer,
  4867. cQualityEngineer1: this.proofingCurrentRow.cQualityEngineer1,
  4868. cQualityEngineer2: this.proofingCurrentRow.cQualityEngineer2,
  4869. cQualityEngineer3: this.proofingCurrentRow.cQualityEngineer3,
  4870. cQualityEngineer4: this.proofingCurrentRow.cQualityEngineer4,
  4871. cQualityEngineer5: this.proofingCurrentRow.cQualityEngineer5,
  4872. cQualityEngineer6: this.proofingCurrentRow.cQualityEngineer6,
  4873. cManufactureEngineer: this.proofingCurrentRow.cManufactureEngineer,
  4874. docEngineer: this.proofingCurrentRow.docEngineer,
  4875. docEngineer2: this.proofingCurrentRow.docEngineer2,
  4876. ipqcHardTag: this.proofingCurrentRow.ipqcHardTag,
  4877. cQualityEngineer7: this.proofingCurrentRow.cQualityEngineer7,
  4878. // username:this.$store.state.user.name,
  4879. page: 1,
  4880. limit: 1000
  4881. }
  4882. // 调用模态框内 proofRecord 组件的 init 方法刷新数据
  4883. this.$refs.proofRecordModal.init(inData,this.authUpdate);
  4884. });
  4885. },
  4886. getFinalPartDesc(){
  4887. return new Promise((resolve, reject) => {
  4888. let inData = {
  4889. site: this.modalData.site,
  4890. buNo: this.modalData.bu.split('_')[1],
  4891. finalPartNo: this.modalData.finalPartNo,
  4892. }
  4893. getFinalPartDesc(inData).then(({data}) => {
  4894. if (data && data.code === 0) {
  4895. if (data.data !== null) {
  4896. this.modalData.finalPartDesc = data.data.finalPartDesc
  4897. this.finalPartFlag = false
  4898. } else {
  4899. this.modalData.finalPartDesc = ''
  4900. this.finalPartFlag = true
  4901. }
  4902. } else {
  4903. this.modalData.finalPartDesc = ''
  4904. }
  4905. resolve(); // 在操作成功时解析Promise
  4906. }).catch(error => {
  4907. this.modalData.finalPartDesc = '';
  4908. reject(error); // 如果发生错误,拒绝Promise
  4909. });
  4910. });
  4911. },
  4912. async saveFormalPartNo() {
  4913. try {
  4914. await this.getFinalPartDesc();
  4915. } catch (error) {
  4916. // 处理getFinalPartDesc方法中的错误
  4917. console.error("Error in getFinalPartDesc:", error);
  4918. this.$message({
  4919. message: '获取料号描述时发生错误,请重试',
  4920. type: 'error'
  4921. });
  4922. }
  4923. if (this.modalData.finalPartNo === '' || this.modalData.finalPartNo === null || this.modalData.finalPartNo === undefined) {
  4924. this.$message({
  4925. message: '请输入ERP正式料号',
  4926. type: 'warning'
  4927. })
  4928. return
  4929. }
  4930. if (this.finalPartFlag) {
  4931. this.$confirm('ERP正式料号不存在,是否继续保存?', '提示', {
  4932. confirmButtonText: '确定',
  4933. cancelButtonText: '取消',
  4934. type: 'warning'
  4935. }).then(() => {
  4936. saveFormalPartNo(this.modalData).then(({data}) => {
  4937. if (data && data.code === '0') {
  4938. this.getDataList()
  4939. this.formalPartNoFlag = false
  4940. this.$message({
  4941. message: '操作成功',
  4942. type: 'success',
  4943. duration: 1500,
  4944. onClose: () => {
  4945. }
  4946. })
  4947. } else {
  4948. this.$alert(data.msg, '错误', {
  4949. confirmButtonText: '确定'
  4950. })
  4951. }
  4952. })
  4953. }).catch(() => {
  4954. this.$message({
  4955. type: 'info',
  4956. message: '已取消操作'
  4957. })
  4958. })
  4959. } else {
  4960. saveFormalPartNo(this.modalData).then(({data}) => {
  4961. if (data && data.code === '0') {
  4962. this.getDataList()
  4963. this.formalPartNoFlag = false
  4964. this.$message({
  4965. message: '操作成功',
  4966. type: 'success',
  4967. duration: 1500,
  4968. onClose: () => {
  4969. }
  4970. })
  4971. } else {
  4972. this.$alert(data.msg, '错误', {
  4973. confirmButtonText: '确定'
  4974. })
  4975. }
  4976. })
  4977. }
  4978. },
  4979. selectFlag () {
  4980. return true
  4981. },
  4982. closeClear () {
  4983. this.modalData.bu = ''
  4984. this.modalData.projectNo = ''
  4985. this.modalData.projectDesc = ''
  4986. this.modalData.projectCloseDate = ''
  4987. this.modalData.needDate = ''
  4988. this.modalData.customerNo = ''
  4989. this.modalData.customerDesc = ''
  4990. this.modalData.projectCategory = ''
  4991. this.modalData.testPartNo = ''
  4992. this.modalData.partDesc = ''
  4993. this.modalData.projectManager = ''
  4994. this.modalData.projectManagerName = ''
  4995. this.modalData.engineer = ''
  4996. this.modalData.engineerName = ''
  4997. this.modalData.cQualityEngineer1 = ''
  4998. this.modalData.cQualityEngineer1Name = ''
  4999. this.modalData.cQualityEngineer2 = ''
  5000. this.modalData.cQualityEngineer2Name = ''
  5001. this.modalData.projectCreationDate = new Date()
  5002. },
  5003. projectOtherDocumentClickRow (row) {
  5004. row.id = row.documentDefinitionListId
  5005. this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  5006. },
  5007. changeCurrentRow1 (row, oldRow) {
  5008. row.id = row.documentDefinitionListId
  5009. // 判断是否是获取焦点的事件
  5010. if (row) {
  5011. this.otherDocumentCurrentRow.bu = this.otherDocumentCurrentRow.site + "-" + this.otherDocumentCurrentRow.buNo
  5012. this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  5013. }
  5014. },
  5015. projectAllDocumentClickRow (row) {
  5016. row.id = row.documentDefinitionListId
  5017. this.projectAllDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  5018. },
  5019. /**
  5020. * 上传文件
  5021. */
  5022. uploadFile () {
  5023. this.isEditable = false;
  5024. this.fileList = []
  5025. this.proofingCurrentRow.proofingId= -1
  5026. this.proofingCurrentRow.proofingNo = '*'
  5027. this.uploadDialog = true
  5028. },
  5029. /**
  5030. * 上传文件
  5031. */
  5032. uploadAllDocumentFile (row) {
  5033. this.isEditable = false;
  5034. this.fileList = []
  5035. if (row.proofingId === -1 || row.proofingId === '-1' || row.proofingId === null || row.proofingId === undefined || row.proofingId === '') {
  5036. this.isMassProductionStage = true
  5037. this.folder = 'projectPMPDocumentFiles'
  5038. } else {
  5039. this.isMassProductionStage = false
  5040. this.folder = 'projectPPDocumentFiles'
  5041. }
  5042. this.getProofDocument(row)
  5043. this.uploadDialog1 = true
  5044. //打开组件 去做新增业务
  5045. // this.$nextTick(() => {
  5046. // this.$refs.partUploadFile.init(currentData);
  5047. // })
  5048. },
  5049. getProofDocument(row){
  5050. let inData = {}
  5051. if (row){
  5052. inData = {
  5053. site: this.$store.state.user.site,
  5054. buNo: this.proofingCurrentRow.buNo,
  5055. projectId: row.projectId,
  5056. projectPartId: this.proofingCurrentRow.projectPartId,
  5057. proofingId: row.proofingId,
  5058. userId: this.$store.state.user.id,
  5059. languageCode: this.$i18n.locale
  5060. }
  5061. } else {
  5062. inData = {
  5063. site: this.proofingCurrentRow.site,
  5064. buNo: this.proofingCurrentRow.buNo,
  5065. projectId: this.proofingCurrentRow.projectId,
  5066. projectNo: this.proofingCurrentRow.projectNo,
  5067. projectDesc: this.proofingCurrentRow.projectDesc,
  5068. projectPartId: this.proofingCurrentRow.projectPartId,
  5069. testPartNo: this.proofingCurrentRow.testPartNo,
  5070. partDesc: this.proofingCurrentRow.partDesc,
  5071. customerId: this.proofingCurrentRow.customerNo,
  5072. customerDesc: this.proofingCurrentRow.customerDesc,
  5073. page: 1,
  5074. limit: 1000
  5075. }
  5076. }
  5077. getProofDocument(inData).then(({data}) => {
  5078. if (row){
  5079. if (data && data.code === 0) {
  5080. this.projectPartDocumentList = data.page.list
  5081. for (let i = 0; i < this.projectPartDocumentList.length; i++) {
  5082. if (this.projectPartDocumentList[i].responsibleDepartment === 'PM/Sales'){
  5083. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.projectManager.split("-")[1]
  5084. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'PjM'){
  5085. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.projectOwner.split("-")[1]
  5086. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'Engineer'){
  5087. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.engineer.split("-")[1]
  5088. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'IPQC-Lam/Pri/Etch/Slit'){
  5089. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer1.split("-")[1]
  5090. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'IPQC-Converting'){
  5091. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer2.split("-")[1]
  5092. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'FQC1'){
  5093. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer3.split("-")[1]
  5094. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'MFQ'){
  5095. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cManufactureEngineer.split("-")[1]
  5096. }else if (this.projectPartDocumentList[i].responsibleDepartment === 'SQE') {
  5097. if (this.proofingCurrentRow.cQualityEngineer4 != null && this.proofingCurrentRow.cQualityEngineer4 !== '') {
  5098. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer4.split('-')[1] // 截取用户名
  5099. }
  5100. }
  5101. else if (this.projectPartDocumentList[i].responsibleDepartment === 'FQC2') {
  5102. if (this.proofingCurrentRow.cQualityEngineer5 != null && this.proofingCurrentRow.cQualityEngineer5 !== '') {
  5103. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer5.split('-')[1] // 截取用户名
  5104. }
  5105. }
  5106. else if (this.projectPartDocumentList[i].responsibleDepartment === 'IQC') {
  5107. if (this.proofingCurrentRow.cQualityEngineer6 != null && this.proofingCurrentRow.cQualityEngineer6 !== '') {
  5108. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer6.split('-')[1] // 截取用户名
  5109. }
  5110. }
  5111. else if(this.projectPartDocumentList[i].responsibleDepartment === 'DocEngineer'){
  5112. if (this.proofingCurrentRow.docEngineer != null && this.proofingCurrentRow.docEngineer !== ''){
  5113. this.projectPartDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer.split('-')[1] // 截取用户名
  5114. }
  5115. } else if(this.projectPartDocumentList[i].responsibleDepartment === 'DocEngineer2'){
  5116. if (this.proofingCurrentRow.docEngineer2 != null && this.proofingCurrentRow.docEngineer2 !== ''){
  5117. this.projectPartDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer2.split('-')[1] // 截取用户名
  5118. }
  5119. } else if (this.projectPartDocumentList[i].responsibleDepartment === 'IPQC-Hardtag') {
  5120. if (this.proofingCurrentRow.ipqcHardTag != null && this.proofingCurrentRow.ipqcHardTag !== '') {
  5121. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.ipqcHardTag.split('-')[1] // 截取用户名
  5122. }
  5123. } else if (this.projectPartDocumentList[i].responsibleDepartment === '前道工程师') {
  5124. if (this.proofingCurrentRow.cQualityEngineer7 != null && this.proofingCurrentRow.cQualityEngineer7 !== '') {
  5125. this.projectPartDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer7.split('-')[1] // 截取用户名
  5126. }
  5127. }
  5128. else {
  5129. this.projectPartDocumentList[i].projectLeader = ''
  5130. }
  5131. this.projectPartDocumentList[i].buNo = inData.buNo
  5132. }
  5133. }
  5134. } else {
  5135. if (data && data.code === 0) {
  5136. this.proofDocumentList = data.page.list
  5137. for (let i = 0; i < this.proofDocumentList.length; i++) {
  5138. this.proofDocumentList[i].buNo = this.proofingCurrentRow.buNo
  5139. }
  5140. } else {
  5141. this.proofDocumentList = []
  5142. }
  5143. }
  5144. })
  5145. },
  5146. uploadOtherDocument () {
  5147. this.isEditable = true;
  5148. this.fileList = []
  5149. this.otherDocumentCurrentRow = {
  5150. proofingId: -1,
  5151. documentTypeId: '', // 清空文档类型ID
  5152. id: '-1'
  5153. };
  5154. this.uploadDialog = true
  5155. //打开组件 去做新增业务
  5156. // this.$nextTick(() => {
  5157. // this.$refs.partUploadFile.init(currentData);
  5158. // })
  5159. },
  5160. massProductionDocumentDelete(row) {
  5161. let tempData = {
  5162. site: row.site,
  5163. username: this.$store.state.user.name,
  5164. buNo: row.buNo,
  5165. proofingId: row.proofingId,
  5166. proofingNo: row.proofingNo,
  5167. projectId: row.projectId,
  5168. projectNo: row.projectNo,
  5169. projectDesc: row.projectDesc,
  5170. customerId: row.customerNo,
  5171. customerDesc: row.customerDesc,
  5172. projectPartId: this.proofingCurrentRow.projectPartId,
  5173. testPartNo: this.proofingCurrentRow.testPartNo,
  5174. partDesc: row.partDesc,
  5175. id: row.id,
  5176. fileName: row.fileName,
  5177. uploadedFlag: row.uploadedFlag,
  5178. cAdditionalInfo: row.cAdditionalInfo,
  5179. createBy: row.createdBy,
  5180. documentDefinitionListId: row.documentDefinitionListId,
  5181. documentType: row.documentType,
  5182. documentId: row.documentId,
  5183. }
  5184. let name = '转量产阶段'
  5185. if (row.proofingId !== -1) {
  5186. name = '打样'
  5187. }
  5188. this.$confirm('是否删除该' + name +'文档的文件?', '提示', {
  5189. confirmButtonText: '确定',
  5190. cancelButtonText: '取消',
  5191. type: 'warning'
  5192. }).then(() => {
  5193. deleteProofDocument(tempData).then(({data}) => {
  5194. if (data && data.code === 0) {
  5195. this.$message({
  5196. message: '删除成功',
  5197. type: 'success'
  5198. })
  5199. //刷新表格
  5200. this.refreshCurrentTabTable()
  5201. }
  5202. // 否则提示后端返回的错误信息
  5203. else {
  5204. this.$alert(data.msg, '错误', {
  5205. confirmButtonText: '确定'
  5206. })
  5207. }
  5208. })
  5209. }).catch(() => {
  5210. this.$message({
  5211. type: 'info',
  5212. message: '已取消删除'
  5213. });
  5214. });
  5215. },
  5216. getProjectOtherDocument () {
  5217. let tempData = {
  5218. site: this.$store.state.user.site,
  5219. username: this.$store.state.user.name,
  5220. buNo: this.proofingCurrentRow.buNo,
  5221. proofingId: -1,
  5222. projectId: this.proofingCurrentRow.projectId,
  5223. projectNo: this.proofingCurrentRow.projectNo,
  5224. projectDesc: this.proofingCurrentRow.projectDesc,
  5225. projectPartId: this.proofingCurrentRow.projectPartId,
  5226. testPartNo: this.proofingCurrentRow.testPartNo,
  5227. partDesc: this.proofingCurrentRow.partDesc,
  5228. customerId: this.proofingCurrentRow.customerNo,
  5229. customerDesc: this.proofingCurrentRow.customerDesc,
  5230. page: 1,
  5231. limit: -1
  5232. }
  5233. getProjectOtherDocument(tempData).then(({data}) => {
  5234. if (data && data.code === 0) {
  5235. this.projectOtherDocumentList = data.page.list
  5236. this.proofDocumentListDefinition = []
  5237. // 遍历proofDocumentList
  5238. for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
  5239. this.projectOtherDocumentList[i].buNo = this.proofingCurrentRow.buNo
  5240. if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
  5241. this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
  5242. }
  5243. if (this.projectOtherDocumentList[i].responsibleDepartment === 'PM/Sales') {
  5244. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.projectManager.split("-")[1]
  5245. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'PjM') {
  5246. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.projectOwner.split("-")[1]
  5247. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'Engineer') {
  5248. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.engineer.split("-")[1]
  5249. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IPQC-Lam/Pri/Etch/Slit') {
  5250. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer1.split("-")[1]
  5251. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IPQC-Converting') {
  5252. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer2.split("-")[1]
  5253. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'FQC1') {
  5254. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer3.split("-")[1]
  5255. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'MFQ') {
  5256. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cManufactureEngineer.split("-")[1]
  5257. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'SQE') {
  5258. if (this.proofingCurrentRow.cQualityEngineer4 != null && this.proofingCurrentRow.cQualityEngineer4 !== '') {
  5259. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer4.split('-')[1] // 截取用户名
  5260. }
  5261. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'FQC2') {
  5262. if (this.proofingCurrentRow.cQualityEngineer5 != null && this.proofingCurrentRow.cQualityEngineer5 !== '') {
  5263. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer5.split('-')[1] // 截取用户名
  5264. }
  5265. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IQC') {
  5266. if (this.proofingCurrentRow.cQualityEngineer6 != null && this.proofingCurrentRow.cQualityEngineer6 !== '') {
  5267. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer6.split('-')[1] // 截取用户名
  5268. }
  5269. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'DocEngineer') {
  5270. if (this.proofingCurrentRow.docEngineer != null && this.proofingCurrentRow.docEngineer !== '') {
  5271. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.docEngineer.split('-')[1] // 截取用户名
  5272. }
  5273. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'DocEngineer2') {
  5274. if (this.proofingCurrentRow.docEngineer2 != null && this.proofingCurrentRow.docEngineer2 !== '') {
  5275. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.docEngineer2.split('-')[1] // 截取用户名
  5276. }
  5277. } else if (this.projectOtherDocumentList[i].responsibleDepartment === 'IPQC-Hardtag') {
  5278. if (this.proofingCurrentRow.ipqcHardTag != null && this.proofingCurrentRow.ipqcHardTag !== '') {
  5279. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.ipqcHardTag.split('-')[1] // 截取用户名
  5280. }
  5281. } else if (this.projectOtherDocumentList[i].responsibleDepartment === '前道工程师') {
  5282. if (this.proofingCurrentRow.cQualityEngineer7 != null && this.proofingCurrentRow.cQualityEngineer7 !== '') {
  5283. this.projectOtherDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer7.split('-')[1] // 截取用户名
  5284. }
  5285. }
  5286. else {
  5287. this.projectOtherDocumentList[i].projectLeader = ''
  5288. }
  5289. }
  5290. } else {
  5291. this.projectOtherDocumentList = []
  5292. }
  5293. })
  5294. },
  5295. getColumnValue(row, column) {
  5296. // 根据列的配置信息决定显示的值
  5297. if (column.columnProp === 'documentType') {
  5298. return this.getCombinedDocumentType(row);
  5299. }
  5300. else if (column.columnProp === 'documentDesc') {
  5301. return row.documentDesc; // 或者根据实际需求处理其他字段的显示
  5302. }
  5303. else {
  5304. return row[column.columnProp]; // 默认返回对应列的值
  5305. }
  5306. },
  5307. getCombinedDocumentType(row) {
  5308. // 根据您的需求,组合或拼接需要显示的字段
  5309. if (row.documentType === null || row.documentType === undefined) {
  5310. return row.documentDesc
  5311. }else {
  5312. return row.documentType
  5313. }
  5314. },
  5315. // 动态列开始 获取 用户保存的 格式列
  5316. async getTableUserColumn(tableId, columnId) {
  5317. let queryTableUser = {
  5318. userId: this.$store.state.user.name,
  5319. functionId: this.$route.meta.menuId,
  5320. tableId: tableId,
  5321. status: true,
  5322. languageCode: this.$i18n.locale
  5323. }
  5324. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  5325. if (data.rows.length > 0) {
  5326. //this.columnList1 = []
  5327. switch (columnId) {
  5328. case 1:
  5329. this.columnList = data.rows
  5330. break;
  5331. // case 2:
  5332. // this.detailColumnList = data.rows
  5333. // break;
  5334. // case 3:
  5335. // this.columnList2 = data.rows
  5336. // break;
  5337. // case 4:
  5338. // this.columnList3 = data.rows
  5339. // break;
  5340. }
  5341. } else {
  5342. this.getColumnList(tableId, columnId)
  5343. }
  5344. })
  5345. },
  5346. projectDocumentList () {
  5347. this.modalData = {
  5348. site: this.proofingCurrentRow.site,
  5349. buNo: this.proofingCurrentRow.buNo,
  5350. projectId: this.proofingCurrentRow.projectId,
  5351. projectNo: this.proofingCurrentRow.projectNo,
  5352. projectDesc: this.proofingCurrentRow.projectDesc,
  5353. customerNo: this.proofingCurrentRow.customerNo,
  5354. customerDesc: this.proofingCurrentRow.customerDesc,
  5355. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  5356. testPartNo: this.proofingCurrentRow.testPartNo,
  5357. partDesc: this.proofingCurrentRow.partDesc,
  5358. projectCategory: this.proofingCurrentRow.projectCategory,
  5359. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  5360. proofingNo: '*',
  5361. proofingId: -1,
  5362. rrequiredDeliveryDate: '',
  5363. createDate: new Date(),
  5364. createBy: this.$store.state.user.name,
  5365. limit: 1000,
  5366. page: 1
  5367. }
  5368. this.getProjectOtherDocument()
  5369. this.projectDocumentListVisible = true
  5370. },
  5371. projectDocumentListVisibleFalse() {
  5372. this.projectDocumentListVisible = false
  5373. this.proofDocumentListDefinition = []
  5374. },
  5375. deleteProjectDocumentType(row) {
  5376. this.$confirm('是否删除该文档清单?', '提示', {
  5377. confirmButtonText: '确定',
  5378. cancelButtonText: '取消',
  5379. type: 'warning'
  5380. }).then(() => {
  5381. deleteDocumentType(row).then(({data}) => {
  5382. if (data && data.code === 0) {
  5383. this.$message({
  5384. message: '删除成功',
  5385. type: 'success',
  5386. })
  5387. this.getProjectOtherDocument()
  5388. this.getProofDocument()
  5389. } else {
  5390. this.$alert(data.msg, '错误', {
  5391. confirmButtonText: '确定'
  5392. })
  5393. }
  5394. })
  5395. }).catch(() => {
  5396. this.$message({
  5397. type: 'info',
  5398. message: '已取消删除'
  5399. });
  5400. });
  5401. },
  5402. closeAddProjectDocumentTypeFlag() {
  5403. this.addProjectDocumentTypeFlag = false
  5404. this.searchProjectDocumentTypeData = {
  5405. site: this.$store.state.user.site,
  5406. projectNo: '',
  5407. proofingNo: '*',
  5408. documentTypeId: '',
  5409. documentType: '',
  5410. responsibleDepartment: '',
  5411. estimatedCompletionDays: '',
  5412. page: 1,
  5413. limit: 1000
  5414. }
  5415. this.extraProjectDocumentList = []
  5416. },
  5417. filteredProjectAllDocumentList() {
  5418. this.projectAllDocumentList.map(item => {
  5419. item.id = item.documentDefinitionListId
  5420. })
  5421. return this.projectAllDocumentList.filter(item => item.uploadedFlag !== 'N')
  5422. },
  5423. searchProjectDocumentTypeList() {
  5424. this.searchProjectDocumentTypeData.proofingNo = '*'
  5425. this.searchProjectDocumentTypeData.projectNo = this.modalData.projectNo
  5426. getExtraDocumentList(this.searchProjectDocumentTypeData).then(({data}) => {
  5427. if (data && data.code === 0) {
  5428. this.extraProjectDocumentList = data.page.list
  5429. } else {
  5430. this.extraProjectDocumentList = []
  5431. }
  5432. })
  5433. },
  5434. selectionProjectDocument(val) {
  5435. this.projectDocumentSelection = val
  5436. },
  5437. selectionCopyDocument(val) {
  5438. this.documentCopySelection = val;
  5439. },
  5440. saveSelectionProjectDocumentType() {
  5441. if (this.projectDocumentSelection.length === 0) {
  5442. this.$message({
  5443. message: '请选择文档类型',
  5444. type: 'error'
  5445. })
  5446. this.extraProjectDocumentList = []
  5447. return
  5448. }
  5449. this.projectDocumentSelection.forEach((item) => {
  5450. const inData = {
  5451. site: this.$store.state.user.site,
  5452. proofingId: -1,
  5453. proofingNo: '*',
  5454. projectId: this.proofingCurrentRow.projectId,
  5455. projectNo: this.modalData.projectNo,
  5456. projectPartId: this.proofingCurrentRow.projectPartId,
  5457. testPartNo: this.modalData.testPartNo,
  5458. documentTypeId: item.documentTypeId,
  5459. documentType: item.documentType,
  5460. responsibleDepartment: item.responsibleDepartment,
  5461. estimatedCompletionDays: item.estimatedCompletionDays,
  5462. createBy: this.$store.state.user.name,
  5463. }
  5464. proofingDocumentNEW(inData).then(({data}) => {
  5465. //区分请求成功和失败的状况
  5466. if (data && data.code === 0) {
  5467. this.$message({
  5468. message: '新增成功',
  5469. type: 'success'
  5470. })
  5471. this.addProjectDocumentTypeFlag = false
  5472. //刷新表格
  5473. this.refreshCurrentTabTable()
  5474. } else {
  5475. this.$message({
  5476. message: '新增失败',
  5477. type: 'error'
  5478. })
  5479. }
  5480. })
  5481. })
  5482. },
  5483. searchProjectAllDocumentList () {
  5484. let inData = {
  5485. site: this.$store.state.user.site,
  5486. username: this.$store.state.user.name,
  5487. buNo: this.proofingCurrentRow.buNo,
  5488. proofingId: -999,
  5489. projectId: this.proofingCurrentRow.projectId,
  5490. projectNo: this.proofingCurrentRow.projectNo,
  5491. projectDesc: this.proofingCurrentRow.projectDesc,
  5492. projectPartId: this.proofingCurrentRow.projectPartId,
  5493. testPartNo: this.proofingCurrentRow.testPartNo,
  5494. partDesc: this.proofingCurrentRow.partDesc,
  5495. customerId: this.proofingCurrentRow.customerNo,
  5496. customerDesc: this.proofingCurrentRow.customerDesc,
  5497. page: 1,
  5498. limit: 1000
  5499. }
  5500. searchProjectAllDocument(inData).then(({data}) => {
  5501. if (data && data.code === 0){
  5502. this.projectAllDocumentList = data.page.list;
  5503. for (let i = 0; i < this.projectAllDocumentList.length; i++) {
  5504. if (this.projectAllDocumentList[i].responsibleDepartment === 'PM/Sales'){
  5505. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.projectManager.split("-")[1]
  5506. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'PjM'){
  5507. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.projectOwner.split("-")[1]
  5508. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'Engineer'){
  5509. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.engineer.split("-")[1]
  5510. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'IPQC-Lam/Pri/Etch/Slit'){
  5511. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer1.split("-")[1]
  5512. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'IPQC-Converting'){
  5513. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer2.split("-")[1]
  5514. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'FQC1'){
  5515. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer3.split("-")[1]
  5516. } else if(this.projectAllDocumentList[i].responsibleDepartment === 'MFQ'){
  5517. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cManufactureEngineer.split("-")[1]
  5518. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'SQE') {
  5519. if (this.proofingCurrentRow.cQualityEngineer4 != null && this.proofingCurrentRow.cQualityEngineer4 !== '') {
  5520. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer4.split('-')[1] // 截取用户名
  5521. }
  5522. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'FQC2') {
  5523. if (this.proofingCurrentRow.cQualityEngineer5 != null && this.proofingCurrentRow.cQualityEngineer5 !== '') {
  5524. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer5.split('-')[1] // 截取用户名
  5525. }
  5526. }
  5527. else if (this.projectAllDocumentList[i].responsibleDepartment === 'IQC') {
  5528. if (this.proofingCurrentRow.cQualityEngineer6 != null && this.proofingCurrentRow.cQualityEngineer6 !== '') {
  5529. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer6.split('-')[1] // 截取用户名
  5530. }
  5531. }
  5532. else if (this.projectAllDocumentList[i].responsibleDepartment === 'DocEngineer'){
  5533. if (this.proofingCurrentRow.docEngineer != null && this.proofingCurrentRow.docEngineer !== ''){
  5534. this.projectAllDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer.split('-')[1] // 截取用户名
  5535. }
  5536. } else if (this.projectAllDocumentList[i].responsibleDepartment === 'DocEngineer2'){
  5537. if (this.proofingCurrentRow.docEngineer2 != null && this.proofingCurrentRow.docEngineer2 !== ''){
  5538. this.projectAllDocumentList[i].projectLeader= this.proofingCurrentRow.docEngineer2.split('-')[1] // 截取用户名
  5539. }
  5540. }
  5541. else if (this.projectAllDocumentList[i].responsibleDepartment === 'IPQC-Hardtag') {
  5542. if (this.proofingCurrentRow.ipqcHardTag != null && this.proofingCurrentRow.ipqcHardTag !== '') {
  5543. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.ipqcHardTag.split('-')[1] // 截取用户名
  5544. }
  5545. } else if (this.projectAllDocumentList[i].responsibleDepartment === '前道工程师') {
  5546. if (this.proofingCurrentRow.cQualityEngineer7 != null && this.proofingCurrentRow.cQualityEngineer7 !== '') {
  5547. this.projectAllDocumentList[i].projectLeader = this.proofingCurrentRow.cQualityEngineer7.split('-')[1] // 截取用户名
  5548. }
  5549. } else {
  5550. this.projectAllDocumentList[i].projectLeader = ''
  5551. }
  5552. }
  5553. }
  5554. })
  5555. },
  5556. projectProductionValidationDocument () {
  5557. this.modalData = {
  5558. site: this.proofingCurrentRow.site,
  5559. buNo: this.proofingCurrentRow.buNo,
  5560. projectId: this.proofingCurrentRow.projectId,
  5561. projectNo: this.proofingCurrentRow.projectNo,
  5562. projectDesc: this.proofingCurrentRow.projectDesc,
  5563. customerNo: this.proofingCurrentRow.customerNo,
  5564. customerDesc: this.proofingCurrentRow.customerDesc,
  5565. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  5566. testPartNo: this.proofingCurrentRow.testPartNo,
  5567. partDesc: this.proofingCurrentRow.partDesc,
  5568. projectCategory: this.proofingCurrentRow.projectCategory,
  5569. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  5570. proofingNo: 'ALL',
  5571. requiredDeliveryDate: '',
  5572. // new Date() GMT+8
  5573. wantedConfirmDate: new Date(),
  5574. createDate: new Date(),
  5575. createBy: this.$store.state.user.name,
  5576. limit: 1000,
  5577. page: 1
  5578. }
  5579. this.projectProductionValidationDocumentVisible = true
  5580. this.projectAllDocumentList1 = this.filteredProjectAllDocumentList()
  5581. },
  5582. handleDocumentSelectionChange(val) {
  5583. // 文档选择页签中选中数据发生变化时的处理
  5584. val.forEach(item => {
  5585. item.projectId = this.proofingCurrentRow.projectId
  5586. item.projectPartId = this.proofingCurrentRow.projectPartId
  5587. item.testPartNo = this.proofingCurrentRow.testPartNo
  5588. })
  5589. this.selectedDocumentItems = val;
  5590. },
  5591. searchConfirmatorList() {
  5592. let inData = {
  5593. site: this.proofingCurrentRow.site,
  5594. buNo: this.proofingCurrentRow.buNo,
  5595. username: this.confirmatoryData.username,
  5596. userDisplay: this.confirmatoryData.userDisplay,
  5597. proofingNo: 'ALL',
  5598. projectId: this.proofingCurrentRow.projectId,
  5599. projectNo: this.proofingCurrentRow.projectNo,
  5600. projectDesc: this.proofingCurrentRow.projectDesc,
  5601. testPartNo: this.proofingCurrentRow.testPartNo,
  5602. partDesc: this.proofingCurrentRow.partDesc,
  5603. customerId: this.proofingCurrentRow.customerNo,
  5604. customerDesc: this.proofingCurrentRow.customerDesc,
  5605. page: 1,
  5606. limit: 1000
  5607. }
  5608. searchConfirmatorList(inData).then(({data}) => {
  5609. if (data && data.code === 0){
  5610. this.projectAllDocumentConfirmatorList = data.page.list;
  5611. this.projectANotDocumentConfirmatorList = data.list;
  5612. }
  5613. })
  5614. },
  5615. //可选人员
  5616. confirmatoryClickRow1(row) {
  5617. this.$refs.confirmatoryTable1.toggleRowSelection(row);
  5618. },
  5619. //已选人员
  5620. confirmatoryClickRow2(row) {
  5621. this.$refs.confirmatoryTable2.toggleRowSelection(row);
  5622. },
  5623. selectionConfirmatory1(val) {
  5624. this.confirmatorySelection1 = val
  5625. },
  5626. selectionConfirmatory2(val) {
  5627. this.confirmatorySelection2 = val
  5628. },
  5629. addConfirmatory() {
  5630. if (this.confirmatorySelection1.length === 0) {
  5631. this.$message.warning('请选择可选用户!')
  5632. return
  5633. }
  5634. let inData = {
  5635. site: this.proofingCurrentRow.site,
  5636. buNo: this.proofingCurrentRow.buNo,
  5637. confirmatoryList: this.confirmatorySelection1,
  5638. createBy: this.$store.state.user.name
  5639. }
  5640. addConfirmatory(inData).then(({data}) => {
  5641. if (data && data.code === 0) {
  5642. this.searchConfirmatorList()
  5643. this.businessRoleSelections1 = []
  5644. } else {
  5645. this.$alert(data.msg, '错误', {
  5646. confirmButtonText: '确定'
  5647. })
  5648. }
  5649. })
  5650. },
  5651. deleteConfirmatory() {
  5652. if (this.confirmatorySelection2.length === 0) {
  5653. this.$message.warning('请选择已选用户!')
  5654. return
  5655. }
  5656. let inData = {
  5657. site: this.proofingCurrentRow.site,
  5658. buNo: this.proofingCurrentRow.buNo,
  5659. confirmatoryList: this.confirmatorySelection2,
  5660. createBy: this.$store.state.user.name
  5661. }
  5662. deleteConfirmatory(inData).then(({data}) => {
  5663. if (data && data.code === 0) {
  5664. this.searchConfirmatorList()
  5665. this.businessRoleSelections2 = []
  5666. } else {
  5667. this.$alert(data.msg, '错误', {
  5668. confirmButtonText: '确定'
  5669. })
  5670. }
  5671. })
  5672. },
  5673. saveProductionValidationDocument() {
  5674. if (this.selectedDocumentItems.length === 0) {
  5675. this.$message({
  5676. message: '请选择文档',
  5677. type: 'warning',
  5678. duration: 2000
  5679. })
  5680. return
  5681. }else {
  5682. this.$confirm('是否确认新增生产文档并向确认人员推送信息?', '提示', {
  5683. confirmButtonText: '确定',
  5684. cancelButtonText: '取消',
  5685. type: 'warning'
  5686. }).then(() => {
  5687. this.projectAllDocumentConfirmatorList.map(item => {
  5688. item.site = this.proofingCurrentRow.site;
  5689. item.projectId = this.proofingCurrentRow.projectId;
  5690. item.projectNo = this.proofingCurrentRow.projectNo;
  5691. item.orderRef1 = this.proofingCurrentRow.projectId;
  5692. item.orderRef2 = this.proofingCurrentRow.projectPartId;
  5693. item.projectPartId = this.proofingCurrentRow.projectPartId;
  5694. item.testPartNo = this.proofingCurrentRow.testPartNo;
  5695. item.partDesc = this.proofingCurrentRow.partDesc;
  5696. item.itemNo = this.projectAllDocumentConfirmatorList.indexOf(item) + 1;
  5697. item.wantedConfirmDate = new Date(this.modalData.wantedConfirmDate.getTime() + 8 * 60 * 60 * 1000);
  5698. item.createBy = this.$store.state.user.name;
  5699. item.selectedDocumentItems = this.selectedDocumentItems;
  5700. })
  5701. checkProductionValidationDocument(this.projectAllDocumentConfirmatorList)
  5702. .then(({ data }) => {
  5703. if (data) {
  5704. this.$confirm('该项目已存在生产确认记录或已经有人员进行了确认,是否删除重新推送确认信息?', '提示', {
  5705. confirmButtonText: '是',
  5706. cancelButtonText: '否',
  5707. type: 'warning'
  5708. }).then(() => {
  5709. deleteAndSaveHandle(this.projectAllDocumentConfirmatorList).then(({data}) => {
  5710. if (data && data.code === 0) {
  5711. this.$message({
  5712. message: '操作成功',
  5713. type: 'success'
  5714. })
  5715. this.confirmatorSendMailHandle(this.projectAllDocumentConfirmatorList.at(0))
  5716. this.projectProductionValidationDocumentVisible = false
  5717. } else {
  5718. this.$alert("操作失败,请检查确认人员和确认文档或联系管理员!(" + data.msg + ")", '错误', {
  5719. confirmButtonText: '确定'
  5720. })
  5721. }
  5722. })
  5723. }).catch(() => {
  5724. this.$message({
  5725. type: 'info',
  5726. message: '已取消操作'
  5727. });
  5728. });
  5729. } else {
  5730. saveHandle(this.projectAllDocumentConfirmatorList).then(({data}) => {
  5731. if (data && data.code === 0) {
  5732. this.$message({
  5733. message: '操作成功',
  5734. type: 'success'
  5735. })
  5736. this.confirmatorSendMailHandle(this.projectAllDocumentConfirmatorList.at(0))
  5737. this.projectProductionValidationDocumentVisible = false
  5738. } else {
  5739. this.$alert("操作失败,请检查确认人员和确认文档或联系管理员!(" + data.msg + ")", '错误', {
  5740. confirmButtonText: '确定'
  5741. })
  5742. }
  5743. })
  5744. }
  5745. });
  5746. }).catch(() => {
  5747. this.$message({
  5748. type: 'info',
  5749. message: '已取消操作'
  5750. });
  5751. });
  5752. }
  5753. },
  5754. getConfirmProgressDocumentList() {
  5755. let inData = {
  5756. site: this.proofingCurrentRow.site,
  5757. orderRef1: this.proofingCurrentRow.projectId,
  5758. orderRef2: this.proofingCurrentRow.projectPartId,
  5759. page: 1,
  5760. limit: 1000
  5761. }
  5762. searchConfirmProgressDocumentList(inData).then(({data}) => {
  5763. if (data && data.code === 0){
  5764. this.confirmProgressDocumentList = data.page.list;
  5765. }
  5766. })
  5767. },
  5768. getConfirmProgressPusherList() {
  5769. return new Promise((resolve, reject) => {
  5770. let inData = {
  5771. site: this.proofingCurrentRow.site,
  5772. orderRef1: this.proofingCurrentRow.projectId,
  5773. orderRef2: this.proofingCurrentRow.projectPartId,
  5774. page: 1,
  5775. limit: 1000
  5776. };
  5777. searchConfirmProgressPusherList(inData).then(({ data }) => {
  5778. if (data && data.code === 0) {
  5779. this.confirmProgressPusherList = data.page.list;
  5780. resolve(); // 成功时调用 resolve
  5781. } else {
  5782. reject(new Error(data.msg)); // 处理错误
  5783. }
  5784. }).catch(error => {
  5785. reject(error); // 处理请求错误
  5786. });
  5787. });
  5788. } ,
  5789. confirmDocument(row) {
  5790. // 将this.$store.state.user.id转为字符串
  5791. let userId = this.$store.state.user.id.toString()
  5792. if (row.userid !== userId) {
  5793. // 提示指定确认人为row.confirmedBy,是否继续
  5794. this.$confirm('指定确认人为' + row.userDisplay + ',是否继续确认?', '提示', {
  5795. confirmButtonText: '是',
  5796. cancelButtonText: '否',
  5797. type: 'warning'
  5798. })
  5799. .then(() => {
  5800. this.confirmData = {
  5801. site: row.site,
  5802. documentType: row.documentType,
  5803. orderRef1: row.orderRef1,
  5804. orderRef2: row.orderRef2,
  5805. itemNo: row.itemNo,
  5806. userid: row.userid,
  5807. username: row.username,
  5808. userDisplay: row.userDisplay,
  5809. wantedConfirmDate: row.wantedConfirmDate,
  5810. confirmFlag: row.confirmFlag,
  5811. confirmedDate: new Date(),
  5812. createBy: row.createBy,
  5813. createDate: row.createDate,
  5814. confirmedBy: this.$store.state.user.userDisplay,
  5815. documentId: row.documentId,
  5816. remark: row.remark
  5817. }
  5818. this.modalData = {
  5819. site: this.proofingCurrentRow.site,
  5820. projectId: this.proofingCurrentRow.projectId,
  5821. projectNo: this.proofingCurrentRow.projectNo,
  5822. projectDesc: this.proofingCurrentRow.projectDesc,
  5823. projectPartId: this.proofingCurrentRow.projectPartId,
  5824. testPartNo: this.proofingCurrentRow.testPartNo,
  5825. partDesc: this.proofingCurrentRow.partDesc,
  5826. customerNo: this.proofingCurrentRow.customerNo,
  5827. customerDesc: this.proofingCurrentRow.customerDesc,
  5828. buNo: this.proofingCurrentRow.buNo,
  5829. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  5830. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  5831. }
  5832. this.getProjectConfirmatorFileList(row)
  5833. this.confirmVisible = true
  5834. })
  5835. .catch(() => {
  5836. this.$message({
  5837. type: 'info',
  5838. message: '已取消操作'
  5839. });
  5840. });
  5841. }else {
  5842. this.confirmData = {
  5843. site: row.site,
  5844. documentType: row.documentType,
  5845. orderRef1: row.orderRef1,
  5846. orderRef2: row.orderRef2,
  5847. itemNo: row.itemNo,
  5848. userid: row.userid,
  5849. username: row.username,
  5850. userDisplay: row.userDisplay,
  5851. wantedConfirmDate: row.wantedConfirmDate,
  5852. confirmFlag: row.confirmFlag,
  5853. confirmedDate: new Date(),
  5854. createBy: row.createBy,
  5855. createDate: row.createDate,
  5856. confirmedBy: this.$store.state.user.name,
  5857. documentId: row.documentId,
  5858. remark: row.remark
  5859. }
  5860. this.modalData = {
  5861. site: this.proofingCurrentRow.site,
  5862. projectId: this.proofingCurrentRow.projectId,
  5863. projectNo: this.proofingCurrentRow.projectNo,
  5864. projectDesc: this.proofingCurrentRow.projectDesc,
  5865. projectPartId: this.proofingCurrentRow.projectPartId,
  5866. testPartNo: this.proofingCurrentRow.testPartNo,
  5867. partDesc: this.proofingCurrentRow.partDesc,
  5868. customerNo: this.proofingCurrentRow.customerNo,
  5869. customerDesc: this.proofingCurrentRow.customerDesc,
  5870. buNo: this.proofingCurrentRow.buNo,
  5871. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  5872. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  5873. }
  5874. this.getProjectConfirmatorFileList(row)
  5875. this.confirmVisible = true
  5876. }
  5877. },
  5878. /*选择上传文件时*/
  5879. onChange(file,fileList){
  5880. const newFileName = file.name;
  5881. if (this.fileName) {
  5882. this.fileName += ', ' + newFileName;
  5883. } else {
  5884. this.fileName = newFileName;
  5885. }
  5886. this.fileList.push(file);
  5887. },
  5888. triggerUpload() {
  5889. this.$refs.uploadFile.$el.querySelector('input').click()
  5890. },
  5891. saveUploadFile(){
  5892. this.confirmData.confirmedDate = moment(this.confirmData.confirmedDate).utcOffset('+8').format('YYYY-MM-DD HH:mm:ss');
  5893. this.confirmData.confirmedBy = this.$store.state.user.userDisplay;
  5894. updateProjectDocumentConfirm(this.confirmData) .then(({data}) => {
  5895. if (data.code === 0) {
  5896. this.confirmVisible = false;
  5897. this.getConfirmProgressDocumentList();
  5898. this.getConfirmProgressPusherList().then(() => {
  5899. // 判断 confirmProgressPusherList 中的 confirmFlag 是否全部为 Y
  5900. let flag = true;
  5901. for (let i = 0; i < this.confirmProgressPusherList.length; i++) {
  5902. if (this.confirmProgressPusherList[i].confirmFlag !== 'Y') {
  5903. flag = false;
  5904. break;
  5905. }
  5906. }
  5907. if (flag) {
  5908. this.proofingCurrentRow.status = '正式量产';
  5909. eamProjectPartInfoEdit(this.proofingCurrentRow).then(({ data }) => {
  5910. this.dataList.forEach((item) => {
  5911. if (item.projectPartId === this.proofingCurrentRow.projectPartId) {
  5912. this.dataListIndex = this.dataList.indexOf(item)
  5913. }
  5914. })
  5915. this.getDataList();
  5916. if (data.code !== 0) {
  5917. this.$alert(data.msg, '错误', {
  5918. confirmButtonText: '确定'
  5919. });
  5920. }
  5921. });
  5922. }
  5923. }).catch(error => {
  5924. this.$alert('获取确认进度推送列表失败', '错误', {
  5925. confirmButtonText: '确定'
  5926. });
  5927. });
  5928. EventBus.$emit('updateAgencyMatterForConfirm')
  5929. }else {
  5930. this.$alert(data.msg, '错误', {
  5931. confirmButtonText: '确定'
  5932. })
  5933. }
  5934. })
  5935. let remark = this.confirmData.remark;
  5936. const formData = new FormData();
  5937. //片接文件
  5938. for (let i = 0; i < this.fileList.length; i++) {
  5939. formData.append("file",this.fileList[i].raw)
  5940. }
  5941. formData.append("folder", 'projectPDConfirmFiles');
  5942. formData.append("orderRef1", this.confirmData.site);
  5943. formData.append("orderRef4", this.confirmData.orderRef1);
  5944. formData.append("orderRef2", this.confirmData.itemNo);
  5945. formData.append("orderRef3", this.confirmData.userid);
  5946. formData.append("orderRef5", this.confirmData.orderRef2);
  5947. formData.append("createdBy", this.$store.state.user.name);
  5948. formData.append("updatedBy", this.$store.state.user.name);
  5949. formData.append("remark", remark);
  5950. uploadProjectFile(formData).then(({data}) => {
  5951. if (data.code === 0) {
  5952. this.$message.success('操作成功');
  5953. //清空文件上传记录
  5954. this.$refs.uploadFile.clearFiles();
  5955. this.closeFileUpdate();
  5956. this.projectConfirmatorFileList = [];
  5957. }else {
  5958. this.$alert(data.msg, '错误', {
  5959. confirmButtonText: '确定'
  5960. })
  5961. }
  5962. })
  5963. },
  5964. closeFileUpdate() {
  5965. this.fileName = '';
  5966. this.uploadDialog = false;
  5967. //this.fileRemark = ''
  5968. this.$refs.uploadFile.clearFiles()
  5969. this.fileList = []
  5970. },
  5971. getProjectConfirmatorFileList (row) {
  5972. let inData = {
  5973. orderRef1: row.site,
  5974. orderRef3: row.userid,
  5975. orderRef2: row.itemNo,
  5976. orderRef4: row.orderRef1,
  5977. orderRef5: row.orderRef2,
  5978. page: 1,
  5979. limit: 1000
  5980. }
  5981. searchProjectConfirmatorFileList(inData).then(({data}) => {
  5982. if (data && data.code === 0){
  5983. this.projectConfirmatorFileList = data.page.list;
  5984. }
  5985. })
  5986. },
  5987. closeUploadFileVisible(){
  5988. this.confirmVisible = false;
  5989. this.projectConfirmatorFileList = [];
  5990. this.fileList = [];
  5991. this.closeFileUpdate()
  5992. },
  5993. closeViewDocumentFileVisible(){
  5994. this.viewDocumentFileVisible = false;
  5995. this.projectConfirmatorFileList = [];
  5996. },
  5997. closeViewMassDocumentFileVisible(){
  5998. this.viewMassDocumentFileVisible = false;
  5999. this.projectConfirmatorFileList = [];
  6000. },
  6001. viewDocumentFile(row) {
  6002. this.confirmData = {
  6003. site: row.site,
  6004. documentType: row.documentType,
  6005. orderRef1: row.orderRef1,
  6006. orderRef2: row.orderRef2,
  6007. itemNo: row.itemNo,
  6008. userid: row.userid,
  6009. username: row.username,
  6010. userDisplay: row.userDisplay,
  6011. wantedConfirmDate: row.wantedConfirmDate,
  6012. confirmFlag: row.confirmFlag,
  6013. confirmedDate: new Date(),
  6014. createBy: row.createBy,
  6015. createDate: row.createDate,
  6016. confirmedBy: this.$store.state.user.userDisplay,
  6017. documentId: row.documentId,
  6018. remark: row.remark
  6019. }
  6020. let inData = {
  6021. orderRef1: row.site,
  6022. orderRef2: row.itemNo,
  6023. orderRef3: row.userid,
  6024. orderRef4: row.orderRef1,
  6025. orderRef5: row.orderRef2,
  6026. id : row.documentId,
  6027. page: 1,
  6028. limit: 1000
  6029. }
  6030. searchProjectConfirmatorFileList(inData).then(({data}) => {
  6031. if (data && data.code === 0){
  6032. this.projectConfirmatorFileList = data.page.list;
  6033. }
  6034. })
  6035. this.viewDocumentFileVisible = true
  6036. },
  6037. async viewMassDocumentFile(row,flag) {
  6038. let inData = {
  6039. orderRef1: row.site,
  6040. orderRef2: row.proofingId,
  6041. orderRef3: row.documentDefinitionListId,
  6042. orderRef4: row.projectId,
  6043. orderRef5: this.proofingCurrentRow.projectPartId,
  6044. createdBy: row.createdBy,
  6045. id : row.documentId,
  6046. documentType: row.documentType,
  6047. fileName: row.fileName,
  6048. page: 1,
  6049. limit: 1000
  6050. }
  6051. await searchProjectConfirmatorFileList(inData).then(({data}) => {
  6052. if (data && data.code === 0){
  6053. this.projectConfirmatorFileList = data.page.list;
  6054. }
  6055. })
  6056. if (flag){
  6057. return
  6058. }
  6059. this.viewMassDocumentFileVisible = true
  6060. },
  6061. deleteFile(row) {
  6062. if (this.confirmData.confirmedBy === this.$store.state.user.userDisplay) {
  6063. this.$confirm('是否删除该文件?', '提示', {
  6064. confirmButtonText: '确定',
  6065. cancelButtonText: '取消',
  6066. type: 'warning'
  6067. }).then(() => {
  6068. let inData = {
  6069. id: row.id,
  6070. orderRef1: row.orderRef1,
  6071. orderRef2: row.orderRef2,
  6072. orderRef3: row.orderRef3,
  6073. orderRef4: row.orderRef4,
  6074. orderRef5: row.orderRef5,
  6075. createdBy: this.$store.state.user.name
  6076. }
  6077. deleteProjectFile(inData).then(({data}) => {
  6078. if (data && data.code === 0) {
  6079. this.$message({
  6080. message: '删除成功',
  6081. type: 'success'
  6082. })
  6083. this.getProjectConfirmatorFileList(this.confirmData)
  6084. } else {
  6085. this.$message({
  6086. message: '删除失败',
  6087. type: 'error'
  6088. })
  6089. }
  6090. })
  6091. }).catch(() => {
  6092. this.$message({
  6093. type: 'info',
  6094. message: '已取消删除'
  6095. });
  6096. });
  6097. } else {
  6098. this.$message({
  6099. message: '只有确认人员才能删除文件',
  6100. type: 'error'
  6101. })
  6102. }
  6103. },
  6104. shouldShowDelete(row) {
  6105. // 根据条件判断是否显示删除操作
  6106. if (row.projectPhase === 'SOP文档') {
  6107. return false
  6108. }else return row.documentId !== null;
  6109. },
  6110. // 查看文件
  6111. viewFile(row) {
  6112. // 预览文件
  6113. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  6114. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  6115. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  6116. let txt = ['txt']
  6117. let type = ''
  6118. let pdf = ['pdf']
  6119. if (image.includes(row.fileType.toLowerCase())) {
  6120. type = 'image/' + row.fileType
  6121. downLoadObjectFile2(row).then(({data}) => {
  6122. const blob = new Blob([data], { type: type });
  6123. // 创建URL来生成预览
  6124. const fileURL = URL.createObjectURL(blob);
  6125. // 在新标签页中打开文件预览
  6126. const newTab = window.open(fileURL, '_blank')
  6127. })
  6128. }
  6129. else if (video.includes(row.fileType.toLowerCase())) {
  6130. type = 'video/' + row.fileType
  6131. downLoadObjectFile2(row).then(({data}) => {
  6132. const blob = new Blob([data], { type: type });
  6133. // 创建URL来生成预览
  6134. const fileURL = URL.createObjectURL(blob);
  6135. // 在新标签页中打开文件预览
  6136. const newTab = window.open(fileURL, '_blank')
  6137. })
  6138. }
  6139. else if (txt.includes(row.fileType.toLowerCase())) {
  6140. type = 'text/plain'
  6141. downLoadObjectFile2(row).then(({data}) => {
  6142. const blob = new Blob([data], { type: type });
  6143. // 创建URL来生成预览
  6144. const fileURL = URL.createObjectURL(blob);
  6145. // 在新标签页中打开文件预览
  6146. const newTab = window.open(fileURL, '_blank')
  6147. })
  6148. }
  6149. else if (office.includes(row.fileType.toLowerCase())) {
  6150. if (row.fileType.toLowerCase() === 'doc' || row.fileType.toLowerCase() === 'docx') {
  6151. type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
  6152. } else if (row.fileType.toLowerCase() === 'ppt' || row.fileType.toLowerCase() === 'pptx') {
  6153. type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
  6154. } else {
  6155. type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  6156. }
  6157. downLoadObjectFile2(row).then(({data}) => {
  6158. // 不限制文件下载类型
  6159. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  6160. // 下载文件名称
  6161. const fileName = row.fileName
  6162. // a标签下载
  6163. const linkNode = document.createElement('a')
  6164. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  6165. linkNode.style.display = 'none'
  6166. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  6167. document.body.appendChild(linkNode)
  6168. linkNode.click() // 模拟在按钮上的一次鼠标单击
  6169. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  6170. document.body.removeChild(linkNode)
  6171. })
  6172. }
  6173. else if (pdf.includes(row.fileType.toLowerCase())) {
  6174. type = 'application/pdf'
  6175. downLoadObjectFile2(row).then(({data}) => {
  6176. const blob = new Blob([data], { type: type });
  6177. // 创建URL来生成预览
  6178. const fileURL = URL.createObjectURL(blob);
  6179. // 在新标签页中打开文件预览
  6180. const newTab = window.open(fileURL, '_blank')
  6181. })
  6182. }
  6183. else {
  6184. this.$message({
  6185. message: '不支持的文件类型',
  6186. type: 'warning'
  6187. })
  6188. }
  6189. },
  6190. // 下载
  6191. downloadFile (row) {
  6192. downLoadObjectFile2(row)
  6193. .then(({data}) => {
  6194. // 不限制文件下载类型
  6195. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  6196. // 下载文件名称
  6197. const fileName = row.fileName
  6198. // a标签下载
  6199. const linkNode = document.createElement('a')
  6200. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  6201. linkNode.style.display = 'none'
  6202. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  6203. document.body.appendChild(linkNode)
  6204. linkNode.click() // 模拟在按钮上的一次鼠标单击
  6205. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  6206. document.body.removeChild(linkNode)
  6207. })
  6208. },
  6209. closeProjectProductionValidationDocumentVisibleDialog() {
  6210. this.confirmatoryData = {};
  6211. this.projectAllDocumentConfirmatorList = [];
  6212. this.projectANotDocumentConfirmatorList = [];
  6213. this.projectProductionValidationDocumentVisible = false;
  6214. this.activeName1 = 'selectDocument';
  6215. },
  6216. formatDate(row, column) {
  6217. // row 是当前行的数据对象
  6218. // column 是当前列的属性信息对象
  6219. const date = row[column.property];
  6220. if (date) {
  6221. const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
  6222. return s.replace(/\//g, '-')
  6223. } else {
  6224. return '';
  6225. }
  6226. },
  6227. indexMethod(index) {
  6228. return index + 1;
  6229. },
  6230. // 获取 tableDefault 列
  6231. async getColumnList (tableId, columnId) {
  6232. let queryTable= {
  6233. functionId: this.$route.meta.menuId,
  6234. tableId: tableId,
  6235. languageCode: this.$i18n.locale
  6236. }
  6237. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  6238. if (!data.rows.length == 0) {
  6239. switch (columnId) {
  6240. case 1:
  6241. this.columnList = data.rows
  6242. break;
  6243. // case 2:
  6244. // this.detailColumnList = data.rows
  6245. // break;
  6246. // case 3:
  6247. // this.columnList2 = data.rows
  6248. // break;
  6249. // case 4:
  6250. // this.columnList3 = data.rows
  6251. // break;
  6252. }
  6253. } else {
  6254. // this.showDefault = true.
  6255. }
  6256. })
  6257. },
  6258. async fetchBomList() {
  6259. let inData = {
  6260. site: this.proofingCurrentRow.site,
  6261. buNo: this.proofingCurrentRow.buNo,
  6262. projectId: this.proofingCurrentRow.projectId,
  6263. projectNo: this.proofingCurrentRow.projectNo,
  6264. projectDesc: this.proofingCurrentRow.projectDesc,
  6265. projectPartId: this.proofingCurrentRow.projectPartId,
  6266. testPartNo: this.proofingCurrentRow.testPartNo,
  6267. partDesc: this.proofingCurrentRow.partDesc,
  6268. page: 1,
  6269. limit: 1000
  6270. }
  6271. return searchMassProductionBomList(inData).then(({data}) => {
  6272. if (data && data.code === 0){
  6273. return data.list
  6274. }
  6275. })
  6276. },
  6277. fetchRoutingList() {
  6278. let inData = {
  6279. site: this.proofingCurrentRow.site,
  6280. buNo: this.proofingCurrentRow.buNo,
  6281. projectId: this.proofingCurrentRow.projectId,
  6282. projectNo: this.proofingCurrentRow.projectNo,
  6283. projectDesc: this.proofingCurrentRow.projectDesc,
  6284. projectPartId: this.proofingCurrentRow.projectPartId,
  6285. testPartNo: this.proofingCurrentRow.testPartNo,
  6286. partNo:this.proofingCurrentRow.finalPartNo,
  6287. partDesc: this.proofingCurrentRow.partDesc,
  6288. page: 1,
  6289. limit: 1000
  6290. }
  6291. searchRoutingList(inData).then(({data}) => {
  6292. if (data && data.code === 0){
  6293. this.dataListLoading = false;
  6294. this.projectPartRoutingList = data.list
  6295. }
  6296. })
  6297. },
  6298. copyFile (row) {
  6299. this.copyModalData = {
  6300. ...row,
  6301. projectNo: this.proofingCurrentRow.projectNo,
  6302. projectDesc: this.proofingCurrentRow.projectDesc,
  6303. projectPartId: this.proofingCurrentRow.projectPartId,
  6304. testPartNo: this.proofingCurrentRow.testPartNo,
  6305. partDesc: this.proofingCurrentRow.partDesc,
  6306. };
  6307. this.copyDialog = true
  6308. },
  6309. searchCopyDocumentFileList() {
  6310. getCopyDocumentFileList(this.copyModalData).then(({data}) => {
  6311. if (data && data.code === 0) {
  6312. this.copyDocumentList = data.list
  6313. } else {
  6314. this.copyDocumentList = []
  6315. }
  6316. })
  6317. },
  6318. saveSelectionCopyDocumentType() {
  6319. if (this.documentCopySelection.length === 0) {
  6320. this.$message({
  6321. message: '请选择文档',
  6322. type: 'error'
  6323. })
  6324. return
  6325. }
  6326. if (this.copyModalData.proofingNo === '*'){
  6327. this.copyModalData.conclusion = 'N/A'
  6328. }
  6329. if (this.copyModalData.conclusion === '' || this.copyModalData.conclusion === null ||
  6330. this.copyModalData.conclusion === undefined) {
  6331. this.$message({
  6332. message: '结论不能为空',
  6333. type: 'warning'
  6334. })
  6335. return
  6336. }
  6337. const inDataList = this.documentCopySelection.map(item => ({
  6338. ossId: item.ossId,
  6339. orderRef1: this.$store.state.user.site,
  6340. orderRef2: this.copyModalData.proofingId.toString(),
  6341. orderRef3: this.copyModalData.documentDefinitionListId,
  6342. orderRef4: this.copyModalData.projectId.toString(),
  6343. orderRef5: this.copyModalData.projectPartId.toString(),
  6344. documentDesc: this.copyModalData.documentTypeId,
  6345. cAdditionalInfo: this.copyModalData.documentType,
  6346. conclusion: this.copyModalData.conclusion,
  6347. createBy: this.$store.state.user.name,
  6348. folder: (this.copyModalData.proofingId === -1)
  6349. ? 'projectPMPDocumentFiles'
  6350. : 'projectPPDocumentFiles'
  6351. }));
  6352. uploadFileList('/upload/testList',inDataList).then(({data}) => {
  6353. //区分请求成功和失败的状况
  6354. if (data && data.code === 0) {
  6355. this.$message({
  6356. message: '复制成功',
  6357. type: 'success'
  6358. })
  6359. this.getProofDocument()
  6360. this.copyDialog = false
  6361. //刷新表格
  6362. this.refreshCurrentTabTable()
  6363. } else {
  6364. this.$message({
  6365. message: '复制失败',
  6366. type: 'error'
  6367. })
  6368. }
  6369. })
  6370. },
  6371. closeCopyDocumentFileFlag() {
  6372. this.copyDialog = false
  6373. this.copyModalData = {}
  6374. this.copyDocumentList = []
  6375. },
  6376. // 列表表格选择替换
  6377. tabClick (tab, event) {
  6378. // 刷新列表数据
  6379. this.refreshCurrentTabTable()
  6380. },
  6381. async refreshCurrentTabTable () {
  6382. if (this.activeModalTab === 'proofRecord') {
  6383. this.getRowProjectInfo();
  6384. }
  6385. if (this.activeModalTab === 'massProductionStage') {
  6386. this.getProjectOtherDocument();
  6387. }
  6388. if (this.activeModalTab === 'allDocument') {
  6389. this.getRowProjectInfo();
  6390. this.getProjectOtherDocument();
  6391. this.searchProjectAllDocumentList()
  6392. this.searchConfirmatorList()
  6393. }
  6394. if (this.activeModalTab === 'productionDocumentsConfirmProgress') {
  6395. this.getConfirmProgressDocumentList()
  6396. this.getConfirmProgressPusherList()
  6397. }
  6398. if (this.activeModalTab === 'massProductionBOM' && this.proofingCurrentRow.finalPartNo
  6399. !== '' &&
  6400. this.proofingCurrentRow.finalPartNo !== null){
  6401. this.dataListLoading = true;
  6402. try {
  6403. // 从后端获取数据
  6404. const flatData = await this.fetchBomList();
  6405. // 将平铺数据转换为树形结构
  6406. this.projectPartBomList = arrayToTreeByLevelCode(flatData, "levelCode", "children");
  6407. // 打印结果
  6408. console.log(JSON.stringify(this.projectPartBomList, null, 2));
  6409. } finally {
  6410. this.dataListLoading = false;
  6411. }
  6412. } else {
  6413. this.projectPartBomList = []
  6414. }
  6415. if (this.activeModalTab === 'Routing' &&
  6416. this.proofingCurrentRow.finalPartNo !== '' &&
  6417. this.proofingCurrentRow.finalPartNo !== null){
  6418. this.dataListLoading = true;
  6419. this.fetchRoutingList()
  6420. } else {
  6421. this.projectPartRoutingList = []
  6422. }
  6423. },
  6424. //获取按钮的权限数据
  6425. getButtonAuthData () {
  6426. let searchFlag = this.isAuth(this.menuId+":search")
  6427. let saveFlag = this.isAuth(this.menuId+":save")
  6428. let updateFlag = this.isAuth(this.menuId+":update")
  6429. let deleteFlag = this.isAuth(this.menuId+":delete")
  6430. //处理页面的权限数据
  6431. this.authSearch = !searchFlag
  6432. this.authSave = !saveFlag
  6433. this.authUpdate = !updateFlag
  6434. this.authDelete = !deleteFlag
  6435. },
  6436. warnSendMail(row) {
  6437. row.projectPartId = this.proofingCurrentRow.projectPartId
  6438. row.testPartNo = this.proofingCurrentRow.testPartNo
  6439. row.partDesc = this.proofingCurrentRow.partDesc
  6440. row.needDate = this.proofingCurrentRow.needDate
  6441. this.$confirm('确认发送提醒?', '提示', {
  6442. confirmButtonText: '确定',
  6443. cancelButtonText: '取消',
  6444. type: 'warning'
  6445. }).then(() => {
  6446. warnSendMailHandle(row).then(({data}) => {
  6447. if (data && data.code === 0) {
  6448. this.$message({
  6449. message: '发送成功',
  6450. type: 'success'
  6451. })
  6452. } else {
  6453. this.$alert(data.msg, '错误', {
  6454. confirmButtonText: '确定'
  6455. })
  6456. }
  6457. })
  6458. }).catch(() => {
  6459. this.$message({
  6460. type: 'info',
  6461. message: '已取消发送'
  6462. });
  6463. });
  6464. },
  6465. confirmatorSendMailHandle(inData) {
  6466. confirmatorSendMailHandle(inData).then(({data}) => {
  6467. if (data && data.code === 0) {
  6468. this.$message({
  6469. message: '发送成功',
  6470. type: 'success'
  6471. })
  6472. } else {
  6473. this.$alert(data.msg, '错误', {
  6474. confirmButtonText: '确定'
  6475. })
  6476. }
  6477. })
  6478. },
  6479. tableRowClassName ({row, rowIndex}) {
  6480. if (row.status === '正式量产') {
  6481. return 'row-production'
  6482. } else if (row.uploadedFlag === 'Y') {
  6483. return 'row-production2'
  6484. }
  6485. return ''
  6486. },
  6487. getCellStyle({ row, column, rowIndex, columnIndex }) {
  6488. // 检查当前列是否是 "partType"
  6489. if (column.property === 'partType') {
  6490. return {
  6491. backgroundColor: row.partType === 'Active' ? 'rgb(141, 255, 115)' : 'rgb(188, 204, 194)',
  6492. };
  6493. }
  6494. return {};
  6495. },
  6496. }
  6497. }
  6498. </script>
  6499. <style>
  6500. .row-production {
  6501. background-color: rgb(185, 244, 250) !important;
  6502. }
  6503. .row-production2 {
  6504. background-color: rgb(253, 240, 225) !important;
  6505. }
  6506. .el-tabs__nav {
  6507. margin-left: 0 !important;
  6508. }
  6509. .red-text /deep/ .el-input__inner {
  6510. color: red;
  6511. }
  6512. /deep/ .left-section {
  6513. flex: 1; /* 左边部分占据剩余空间 */
  6514. margin-right: 10px; /* 右边与左边之间的间隔 */
  6515. margin-left: -10px; /* 左边与父元素之间的间隔 */
  6516. }
  6517. /deep/ .right-section {
  6518. width: 66%; /* 右边部分宽度占满剩余空间 */
  6519. margin-right: 5px;
  6520. }
  6521. /deep/ .custom-upload .el-upload-dragger {
  6522. width: 150px;
  6523. height: 150px;
  6524. text-align: center;
  6525. position: relative;
  6526. overflow: hidden;
  6527. /* 添加其他样式 */
  6528. }
  6529. /deep/ .table-container {
  6530. border: 1px solid #e0e0e0;
  6531. border-radius: 4px;
  6532. padding: 10px;
  6533. margin-bottom: 10px;
  6534. }
  6535. .big-label {
  6536. font-size: medium; /* 调整字号 */
  6537. }
  6538. </style>
  6539. <style lang="scss" scoped>
  6540. .el-table /deep/ .cell{
  6541. height: auto;
  6542. line-height: 1.5;
  6543. }
  6544. </style>
  6545. ```