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.

6421 lines
250 KiB

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