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.

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