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.

6519 lines
258 KiB

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