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.

4701 lines
172 KiB

  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="'项目编码'">
  10. <el-input v-model="searchData.projectId" style="width: 120px"></el-input>
  11. </el-form-item>
  12. <el-form-item :label="'项目名称'">
  13. <el-input v-model="searchData.projectDesc" style="width: 120px"></el-input>
  14. </el-form-item>
  15. <el-form-item :label="'客户编码'">
  16. <el-input v-model="searchData.customerNo" style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item :label="'客户名称'">
  19. <el-input v-model="searchData.customerDesc" style="width: 120px"></el-input>
  20. </el-form-item>
  21. <el-form-item :label="'BU'">
  22. <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 130px">
  23. <el-option
  24. v-for = "i in userBuList"
  25. :key = "i.buNo"
  26. :label = "i.buDesc"
  27. :value = "i.buDesc">
  28. </el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item :label="'项目分类'">
  32. <el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
  33. <el-option
  34. v-for = "i in projectCategoryList"
  35. :key = "i.projectCategory"
  36. :label = "i.projectCategory"
  37. :value = "i.projectCategory">
  38. </el-option>
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item :label="'项目状态'">
  42. <el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 130px">
  43. <el-option
  44. v-for = "i in statusList"
  45. :key = "i.status"
  46. :label = "i.status"
  47. :value = "i.status">
  48. </el-option>
  49. </el-select>
  50. </el-form-item>
  51. <el-form-item :label="'立项日期:'">
  52. <el-date-picker
  53. style="width: 120px"
  54. v-model="searchData.startDate"
  55. type="date"
  56. value-format="yyyy-MM-dd"
  57. placeholder="选择日期">
  58. </el-date-picker>
  59. -
  60. <el-date-picker
  61. style="width: 120px"
  62. v-model="searchData.endDate"
  63. type="date"
  64. value-format="yyyy-MM-dd"
  65. placeholder="选择日期">
  66. </el-date-picker>
  67. </el-form-item>
  68. <!-- <el-form-item :label="'在用'">-->
  69. <!-- <el-select filterable v-model="searchData.active" style="width: 130px">-->
  70. <!-- <el-option label="全部" value=""></el-option>-->
  71. <!-- <el-option label="是" value="Y"></el-option>-->
  72. <!-- <el-option label="否" value="N"></el-option>-->
  73. <!-- </el-select>-->
  74. <!-- </el-form-item>-->
  75. <el-form-item :label="' '">
  76. <el-button v-if="!authSearch" @click="getDataList()">查询</el-button>
  77. <el-button v-if="!authSave" type="primary" @click="addModal()">新增</el-button>
  78. </el-form-item>
  79. </el-form>
  80. <el-table
  81. :height="height + 110"
  82. :data="dataList"
  83. ref="mainTable"
  84. highlight-current-row
  85. @row-click="proofingClickRow"
  86. @current-change="changeCurrentRow"
  87. border
  88. style="width: 100%;">
  89. <el-table-column
  90. v-for="(item,index) in columnList" :key="index"
  91. :sortable="item.columnSortable"
  92. :prop="item.columnProp"
  93. :header-align="item.headerAlign"
  94. :show-overflow-tooltip="item.showOverflowTooltip"
  95. :align="item.align"
  96. :fixed="item.fixed==''?false:item.fixed"
  97. :min-width="item.columnWidth"
  98. :label="item.columnLabel">
  99. <template slot-scope="scope">
  100. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  101. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  102. </template>
  103. </el-table-column>
  104. <el-table-column
  105. fixed="right"
  106. header-align="center"
  107. align="center"
  108. width="208"
  109. label="操作">
  110. <template slot-scope="scope">
  111. <a v-if="scope.row.status === '草稿'" type="text" size="small" @click="updateModalStatus(scope.row)">下达</a>
  112. <a v-if="scope.row.status === '进行中'" type="text" size="small" @click="addProofRecord(scope.row)">新增打样</a>
  113. <a v-if="scope.row.status === '进行中'" type="text" size="small" @click="changeFormalPartNo(scope.row)">转正式料号</a>
  114. <a v-if="scope.row.status === '进行中'" type="text" size="small" @click="updateModalStatus(scope.row)">结案</a>
  115. <a v-if="scope.row.status !== '已结案'" type="text" size="small" @click="updateModal(scope.row)">修改</a>
  116. <a type="text" size="small" @click="eamProjectInfoDelete(scope.row)">删除</a>
  117. </template>
  118. </el-table-column>
  119. </el-table>
  120. <el-pagination
  121. @size-change="sizeChangeHandle"
  122. @current-change="currentChangeHandle"
  123. :current-page="pageIndex"
  124. :page-sizes="[20, 50, 100, 200, 500]"
  125. :page-size="pageSize"
  126. :total="totalPage"
  127. layout="total, sizes, prev, pager, next, jumper">
  128. </el-pagination>
  129. <el-dialog title="项目" :close-on-click-modal="false" @close="closeClear" v-drag :visible.sync="modalFlag" width="600px">
  130. <!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
  131. <!-- <el-form-item label="是否在用" prop="active" :rules="rules.activeType">-->
  132. <!-- <el-select filterable v-model="modalData.active" style="width: 140px">-->
  133. <!-- <el-option label="是" value="Y"></el-option>-->
  134. <!-- <el-option label="否" value="N"></el-option>-->
  135. <!-- </el-select>-->
  136. <!-- </el-form-item>-->
  137. <!-- </el-form>-->
  138. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  139. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  140. <el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 110px">
  141. <el-option
  142. v-for = "i in userBuList"
  143. :key = "i.buNo"
  144. :label = "i.buNo"
  145. :value = "i.buNo">
  146. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  147. {{ i.buDesc }}
  148. </span>
  149. </el-option>
  150. </el-select>
  151. </el-form-item>
  152. <el-form-item label="项目编码" prop="projectId" :rules="rules.projectId">
  153. <el-input v-model="modalData.projectId" style="width: 110px"></el-input>
  154. </el-form-item>
  155. <el-form-item label="项目名称" prop="projectDesc" :rules="rules.projectDesc">
  156. <el-input v-model="modalData.projectDesc" style="width: 170px"></el-input>
  157. </el-form-item>
  158. <el-form-item label="区域" prop="cProjectRegion" :rules="rules.cProjectRegion">
  159. <el-select v-model="modalData.cProjectRegion" placeholder="请选择" clearable style="width: 110px">
  160. <el-option
  161. v-for = "i in cProjectRegionList"
  162. :key = "i.cProjectRegion"
  163. :label = "i.cProjectRegion"
  164. :value = "i.cProjectRegion">
  165. </el-option>
  166. </el-select>
  167. </el-form-item>
  168. </el-form>
  169. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  170. <el-form-item label="项目分类" prop="projectCategory" :rules="rules.projectCategory">
  171. <el-select v-model="modalData.projectCategory" placeholder="请选择" clearable style="width: 110px">
  172. <el-option
  173. v-for = "i in projectCategoryList"
  174. :key = "i.projectCategory"
  175. :label = "i.projectCategory"
  176. :value = "i.projectCategory">
  177. </el-option>
  178. </el-select>
  179. </el-form-item>
  180. <el-form-item prop="customerNo" :rules="rules.customerNo" >
  181. <span slot="label" style="" @click="getBaseList(509)"><a herf="#">客户编码</a></span>
  182. <el-input v-model="modalData.customerNo" disabled style="width: 110px"></el-input>
  183. </el-form-item>
  184. <el-form-item label="客户名称" prop="customerDesc" :rules="rules.customerDesc">
  185. <el-input v-model="modalData.customerDesc" disabled style="width: 170px"></el-input>
  186. </el-form-item>
  187. <el-form-item label="优先级" prop="priority" :rules="rules.priority">
  188. <el-select v-model="modalData.priority" placeholder="请选择" clearable style="width: 110px">
  189. <el-option
  190. v-for = "i in priorityList"
  191. :key = "i.priority"
  192. :label = "i.priority"
  193. :value = "i.priority">
  194. </el-option>
  195. </el-select>
  196. </el-form-item>
  197. </el-form>
  198. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  199. <el-form-item :label="'立项日期:'">
  200. <el-date-picker
  201. style="width: 110px"
  202. v-model="modalData.projectCreationDate"
  203. type="date"
  204. value-format="yyyy-MM-dd"
  205. placeholder="选择日期">
  206. </el-date-picker>
  207. </el-form-item>
  208. <el-form-item label="项目料号" prop="testPartNo" :rules="rules.testPartNo" >
  209. <el-input v-model="modalData.testPartNo" disabled style="width: 110px"></el-input>
  210. </el-form-item>
  211. <el-form-item label="料号描述" prop="partDesc" :rules="rules.partDesc" >
  212. <el-input v-model="modalData.partDesc" style="width: 170px"></el-input>
  213. </el-form-item>
  214. <el-form-item :label="'预计完成日期:'" :rules="rules.needDate">
  215. <el-date-picker
  216. style="width: 110px"
  217. v-model="modalData.needDate"
  218. type="date"
  219. value-format="yyyy-MM-dd"
  220. placeholder="选择日期">
  221. </el-date-picker>
  222. </el-form-item>
  223. <!-- <el-form-item label="文档类型ID" prop="documentTypeId" :rules="rules.documentTypeIdType">-->
  224. <!-- <el-input v-model="modalData.documentTypeId" style="width: 230px"></el-input>-->
  225. <!-- </el-form-item>-->
  226. </el-form>
  227. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  228. <!-- <el-form-item prop="projectManager" :rules="rules.projectManager">-->
  229. <!-- <el-input v-model="modalData.projectManager" disabled style="width: 110px"></el-input>-->
  230. <!-- </el-form-item>-->
  231. <el-form-item label="PM/Sales" prop="projectManagerName" :rules="rules.projectManagerName">
  232. <span slot="label" style="" @click="projectManagerFlag = true "><a herf="#">PM/Sales</a></span>
  233. <el-input v-model="modalData.projectManagerName" disabled style="width: 110px"></el-input>
  234. </el-form-item>
  235. <el-form-item label="PjM" prop="projectOwner" :rules="rules.projectOwner">
  236. <span slot="label" style="" @click="projectOwnerFlag = true"><a herf="#">PjM</a></span>
  237. <el-input v-model="modalData.projectOwnerName" disabled style="width: 110px"></el-input>
  238. </el-form-item>
  239. <el-form-item label="Engineer" prop="engineerName" :rules="rules.engineerName">
  240. <span slot="label" style="" @click="engineer6Flag = true"><a herf="#">Engineer</a></span>
  241. <el-input v-model="modalData.engineerName" disabled style="width: 170px"></el-input>
  242. </el-form-item>
  243. <!-- <el-form-item prop="cQualityEngineer2" :rules="rules.cQualityEngineer2">-->
  244. <!-- <el-input v-model="modalData.cQualityEngineer2" disabled style="width: 110px"></el-input>-->
  245. <!-- </el-form-item>-->
  246. <el-form-item label="IPQC-Lam/Pri/Etch/Slit" prop="cQualityEngineer1Name" :rules="rules.cQualityEngineer1Name">
  247. <span slot="label" style="" @click="engineerFlag = true"><a herf="#">IPQC-Lam/Pri/Etch/Slit</a></span>
  248. <el-input v-model="modalData.cQualityEngineer1Name" disabled style="width: 110px"></el-input>
  249. </el-form-item>
  250. <el-form-item label="IPQC-Converting" prop="cQualityEngineer2Name" :rules="rules.cQualityEngineer2Name">
  251. <span slot="label" style="" @click="IPQCFlag = true"><a herf="#">IPQC-Converting</a></span>
  252. <el-input v-model="modalData.cQualityEngineer2Name" disabled style="width: 110px"></el-input>
  253. </el-form-item>
  254. <el-form-item label="FQC" prop="cQualityEngineer3Name" :rules="rules.cQualityEngineer3Name">
  255. <span slot="label" style="" @click="FQCFlag = true"><a herf="#">FQC</a></span>
  256. <el-input v-model="modalData.cQualityEngineer3Name" disabled style="width: 110px"></el-input>
  257. </el-form-item>
  258. <el-form-item label="MFG" prop="cManufactureEngineerName" :rules="rules.cManufactureEngineerName">
  259. <span slot="label" style="" @click="MFGlag = true"><a herf="#">MFG</a></span>
  260. <el-input v-model="modalData.cManufactureEngineerName" disabled style="width: 170px"></el-input>
  261. </el-form-item>
  262. </el-form>
  263. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  264. <el-button type="primary" @click="saveData()">保存</el-button>
  265. <el-button @click="modalFlag = false">关闭</el-button>
  266. </el-footer>
  267. </el-dialog>
  268. <!--项目经理选择弹框-->
  269. <el-dialog title="PM/Sales" @close="closeProjectManagerInfoDialog" @open="openProjectManagerInfoDialog" :visible.sync="projectManagerFlag" width="559px" v-drag>
  270. <el-form inline="inline" label-position="top" :model="searchBusinessData" style="margin-left: 7px;margin-top: -5px;">
  271. <el-form-item label="用户账号">
  272. <el-input v-model="searchBusinessData.username" clearable style="width: 110px"></el-input>
  273. </el-form-item>
  274. <el-form-item label="用户名">
  275. <el-input v-model="searchBusinessData.userDisplay" clearable style="width: 110px"></el-input>
  276. </el-form-item>
  277. <el-form-item label="是否在用">
  278. <el-select filterable v-model="searchBusinessData.active" style="width: 140px">
  279. <el-option label="是" value="Y"></el-option>
  280. <el-option label="否" value="N"></el-option>
  281. </el-select>
  282. </el-form-item>
  283. <el-form-item label=" ">
  284. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList()">查询</el-button>
  285. </el-form-item>
  286. </el-form>
  287. <el-table
  288. :height="height + 110"
  289. :data="businessDataList"
  290. stripe
  291. highlight-current-row
  292. border
  293. @row-dblclick="projectManagerRowDblclick"
  294. @selection-change="selectionBusiness"
  295. style="width: 100%;">
  296. <el-table-column
  297. type="selection"
  298. width="55">
  299. </el-table-column>
  300. <el-table-column
  301. prop="username"
  302. header-align="center"
  303. align="center"
  304. label="用户账号">
  305. </el-table-column>
  306. <el-table-column
  307. prop="userDisplay"
  308. header-align="center"
  309. align="center"
  310. label="用户名">
  311. </el-table-column>
  312. <el-table-column
  313. prop="active"
  314. header-align="center"
  315. align="center"
  316. label="是否在用">
  317. </el-table-column>
  318. </el-table>
  319. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  320. <el-button type="primary" @click="saveSelectionInfo()">确定</el-button>
  321. <el-button @click="projectManagerFlag = false">关闭</el-button>
  322. </el-footer>
  323. </el-dialog>
  324. <!--PjM选择弹框-->
  325. <el-dialog title="PjM" @close="closeProjectOwnerInfoDialog" @open="openProjectOwnerInfoDialog" :visible.sync="projectOwnerFlag" width="559px" v-drag>
  326. <el-form inline="inline" label-position="top" :model="searchBusinessData1" style="margin-left: 7px;margin-top: -5px;">
  327. <el-form-item label="用户账号">
  328. <el-input v-model="searchBusinessData1.username" clearable style="width: 110px"></el-input>
  329. </el-form-item>
  330. <el-form-item label="用户名">
  331. <el-input v-model="searchBusinessData1.userDisplay" clearable style="width: 110px"></el-input>
  332. </el-form-item>
  333. <el-form-item label="是否在用">
  334. <el-select filterable v-model="searchBusinessData1.active" style="width: 140px">
  335. <el-option label="是" value="Y"></el-option>
  336. <el-option label="否" value="N"></el-option>
  337. </el-select>
  338. </el-form-item>
  339. <el-form-item label=" ">
  340. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList1()">查询</el-button>
  341. </el-form-item>
  342. </el-form>
  343. <el-table
  344. :height="height + 110"
  345. :data="businessDataList1"
  346. stripe
  347. highlight-current-row
  348. border
  349. @row-dblclick="projectOwnerRowDblclick"
  350. @selection-change="selectionBusiness"
  351. style="width: 100%;">
  352. <el-table-column
  353. type="selection"
  354. width="55">
  355. </el-table-column>
  356. <el-table-column
  357. prop="username"
  358. header-align="center"
  359. align="center"
  360. label="用户账号">
  361. </el-table-column>
  362. <el-table-column
  363. prop="userDisplay"
  364. header-align="center"
  365. align="center"
  366. label="用户名">
  367. </el-table-column>
  368. <el-table-column
  369. prop="active"
  370. header-align="center"
  371. align="center"
  372. label="是否在用">
  373. </el-table-column>
  374. </el-table>
  375. <el-footer style="height:40px;margin-top:
  376. 10px;text-align:center">
  377. <el-button type="primary" @click="saveSelectionInfo1()">确定</el-button>
  378. <el-button @click="projectOwnerFlag = false">关闭</el-button>
  379. </el-footer>
  380. </el-dialog>
  381. <!--工程师选择弹框-->
  382. <el-dialog title="Engineer" @close="closeEngineer6InfoDialog" @open="openEngineer6InfoDialog" :visible.sync="engineer6Flag" width="559px" v-drag>
  383. <el-form inline="inline" label-position="top" :model="searchBusinessData6" style="margin-left: 7px;margin-top: -5px;">
  384. <el-form-item label="用户账号">
  385. <el-input v-model="searchBusinessData6.username" clearable style="width: 110px"></el-input>
  386. </el-form-item>
  387. <el-form-item label="用户名">
  388. <el-input v-model="searchBusinessData6.userDisplay" clearable style="width: 110px"></el-input>
  389. </el-form-item>
  390. <el-form-item label="是否在用">
  391. <el-select filterable v-model="searchBusinessData6.active" style="width: 140px">
  392. <el-option label="是" value="Y"></el-option>
  393. <el-option label="否" value="N"></el-option>
  394. </el-select>
  395. </el-form-item>
  396. <el-form-item label=" ">
  397. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList6()">查询</el-button>
  398. </el-form-item>
  399. </el-form>
  400. <el-table
  401. :height="height + 110"
  402. :data="businessDataList6"
  403. stripe
  404. highlight-current-row
  405. border
  406. @row-dblclick="engineer6RowDblclick"
  407. @selection-change="selectionBusiness"
  408. style="width: 100%;">
  409. <el-table-column
  410. type="selection"
  411. width="55">
  412. </el-table-column>
  413. <el-table-column
  414. prop="username"
  415. header-align="center"
  416. align="center"
  417. label="用户账号">
  418. </el-table-column>
  419. <el-table-column
  420. prop="userDisplay"
  421. header-align="center"
  422. align="center"
  423. label="用户名">
  424. </el-table-column>
  425. <el-table-column
  426. prop="active"
  427. header-align="center"
  428. align="center"
  429. label="是否在用">
  430. </el-table-column>
  431. </el-table>
  432. <el-footer style="height:40px;margin-top:
  433. 10px;text-align:center">
  434. <el-button type="primary" @click="saveSelectionInfo6()">确定</el-button>
  435. <el-button @click="engineer6Flag = false">关闭</el-button>
  436. </el-footer>
  437. </el-dialog>
  438. <!--工程师选择弹框-->
  439. <el-dialog title="IPQC-Lam/Pri/Etch/Slit" @close="closeEngineerInfoDialog" @open="openEngineerInfoDialog" :visible.sync="engineerFlag" width="559px" v-drag>
  440. <el-form inline="inline" label-position="top" :model="searchBusinessData2" style="margin-left: 7px;margin-top: -5px;">
  441. <el-form-item label="用户账号">
  442. <el-input v-model="searchBusinessData2.username" clearable style="width: 110px"></el-input>
  443. </el-form-item>
  444. <el-form-item label="用户名">
  445. <el-input v-model="searchBusinessData2.userDisplay" clearable style="width: 110px"></el-input>
  446. </el-form-item>
  447. <el-form-item label="是否在用">
  448. <el-select filterable v-model="searchBusinessData2.active" style="width: 140px">
  449. <el-option label="是" value="Y"></el-option>
  450. <el-option label="否" value="N"></el-option>
  451. </el-select>
  452. </el-form-item>
  453. <el-form-item label=" ">
  454. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList2()">查询</el-button>
  455. </el-form-item>
  456. </el-form>
  457. <el-table
  458. :height="height + 110"
  459. :data="businessDataList2"
  460. stripe
  461. highlight-current-row
  462. border
  463. @row-dblclick="engineerRowDblclick"
  464. @selection-change="selectionBusiness"
  465. style="width: 100%;">
  466. <el-table-column
  467. type="selection"
  468. width="55">
  469. </el-table-column>
  470. <el-table-column
  471. prop="username"
  472. header-align="center"
  473. align="center"
  474. label="用户账号">
  475. </el-table-column>
  476. <el-table-column
  477. prop="userDisplay"
  478. header-align="center"
  479. align="center"
  480. label="用户名">
  481. </el-table-column>
  482. <el-table-column
  483. prop="active"
  484. header-align="center"
  485. align="center"
  486. label="是否在用">
  487. </el-table-column>
  488. </el-table>
  489. <el-footer style="height:40px;margin-top:
  490. 10px;text-align:center">
  491. <el-button type="primary" @click="saveSelectionInfo2()">确定</el-button>
  492. <el-button @click="engineerFlag = false">关闭</el-button>
  493. </el-footer>
  494. </el-dialog>
  495. <!--IPQC选择弹框-->
  496. <el-dialog title="IPQC-Converting" @close="closeIPQCInfoDialog" @open="openIPQCInfoDialog" :visible.sync="IPQCFlag" width="559px" v-drag>
  497. <el-form inline="inline" label-position="top" :model="searchBusinessData3" style="margin-left: 7px;margin-top: -5px;">
  498. <el-form-item label="用户账号">
  499. <el-input v-model="searchBusinessData3.username" clearable style="width: 110px"></el-input>
  500. </el-form-item>
  501. <el-form-item label="用户名">
  502. <el-input v-model="searchBusinessData3.userDisplay" clearable style="width: 110px"></el-input>
  503. </el-form-item>
  504. <el-form-item label="是否在用">
  505. <el-select filterable v-model="searchBusinessData3.active" style="width: 140px">
  506. <el-option label="是" value="Y"></el-option>
  507. <el-option label="否" value="N"></el-option>
  508. </el-select>
  509. </el-form-item>
  510. <el-form-item label=" ">
  511. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList3()">查询</el-button>
  512. </el-form-item>
  513. </el-form>
  514. <el-table
  515. :height="height + 110"
  516. :data="businessDataList3"
  517. stripe
  518. highlight-current-row
  519. border
  520. @row-dblclick="IPQCRowDblclick"
  521. @selection-change="selectionBusiness"
  522. style="width: 100%;">
  523. <el-table-column
  524. type="selection"
  525. width="55">
  526. </el-table-column>
  527. <el-table-column
  528. prop="username"
  529. header-align="center"
  530. align="center"
  531. label="用户账号">
  532. </el-table-column>
  533. <el-table-column
  534. prop="userDisplay"
  535. header-align="center"
  536. align="center"
  537. label="用户名">
  538. </el-table-column>
  539. <el-table-column
  540. prop="active"
  541. header-align="center"
  542. align="center"
  543. label="是否在用">
  544. </el-table-column>
  545. </el-table>
  546. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  547. <el-button type="primary" @click="saveSelectionInfo3()">确定</el-button>
  548. <el-button @click="IPQCFlag = false">关闭</el-button>
  549. </el-footer>
  550. </el-dialog>
  551. <!--FQC选择弹框-->
  552. <el-dialog title="FQC" @close="closeFQCInfoDialog" @open="openFQCInfoDialog" :visible.sync="FQCFlag" width="559px" v-drag>
  553. <el-form inline="inline" label-position="top" :model="searchBusinessData4" style="margin-left: 7px;margin-top: -5px;">
  554. <el-form-item label="用户账号">
  555. <el-input v-model="searchBusinessData4.username" clearable style="width: 110px"></el-input>
  556. </el-form-item>
  557. <el-form-item label="用户名">
  558. <el-input v-model="searchBusinessData4.userDisplay" clearable style="width: 110px"></el-input>
  559. </el-form-item>
  560. <el-form-item label="是否在用">
  561. <el-select filterable v-model="searchBusinessData4.active" style="width: 140px">
  562. <el-option label="是" value="Y"></el-option>
  563. <el-option label="否" value="N"></el-option>
  564. </el-select>
  565. </el-form-item>
  566. <el-form-item label=" ">
  567. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList4()">查询</el-button>
  568. </el-form-item>
  569. </el-form>
  570. <el-table
  571. :height="height + 110"
  572. :data="businessDataList4"
  573. stripe
  574. highlight-current-row
  575. border
  576. @row-dblclick="FQCRowDblclick"
  577. @selection-change="selectionBusiness"
  578. style="width: 100%;">
  579. <el-table-column
  580. type="selection"
  581. width="55">
  582. </el-table-column>
  583. <el-table-column
  584. prop="username"
  585. header-align="center"
  586. align="center"
  587. label="用户账号">
  588. </el-table-column>
  589. <el-table-column
  590. prop="userDisplay"
  591. header-align="center"
  592. align="center"
  593. label="用户名">
  594. </el-table-column>
  595. <el-table-column
  596. prop="active"
  597. header-align="center"
  598. align="center"
  599. label="是否在用">
  600. </el-table-column>
  601. </el-table>
  602. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  603. <el-button type="primary" @click="saveSelectionInfo4()">确定</el-button>
  604. <el-button @click="FQCFlag = false">关闭</el-button>
  605. </el-footer>
  606. </el-dialog>
  607. <!--MFG选择弹框-->
  608. <el-dialog title="MFG" @close="closeMFGInfoDialog" @open="openMFGInfoDialog" :visible.sync="MFGlag" width="559px" v-drag>
  609. <el-form inline="inline" label-position="top" :model="searchBusinessData5" style="margin-left: 7px;margin-top: -5px;">
  610. <el-form-item label="用户账号">
  611. <el-input v-model="searchBusinessData5.username" clearable style="width: 110px"></el-input>
  612. </el-form-item>
  613. <el-form-item label="用户名">
  614. <el-input v-model="searchBusinessData5.userDisplay" clearable style="width: 110px"></el-input>
  615. </el-form-item>
  616. <el-form-item label="是否在用">
  617. <el-select filterable v-model="searchBusinessData5.active" style="width: 140px">
  618. <el-option label="是" value="Y"></el-option>
  619. <el-option label="否" value="N"></el-option>
  620. </el-select>
  621. </el-form-item>
  622. <el-form-item label=" ">
  623. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList5()">查询</el-button>
  624. </el-form-item>
  625. </el-form>
  626. <el-table
  627. :height="height + 110"
  628. :data="businessDataList5"
  629. stripe
  630. highlight-current-row
  631. border
  632. @row-dblclick="MFGRowDblclick"
  633. @selection-change="selectionBusiness"
  634. style="width: 100%;">
  635. <el-table-column
  636. type="selection"
  637. width="55">
  638. </el-table-column>
  639. <el-table-column
  640. prop="username"
  641. header-align="center"
  642. align="center"
  643. label="用户账号">
  644. </el-table-column>
  645. <el-table-column
  646. prop="userDisplay"
  647. header-align="center"
  648. align="center"
  649. label="用户名">
  650. </el-table-column>
  651. <el-table-column
  652. prop="active"
  653. header-align="center"
  654. align="center"
  655. label="是否在用">
  656. </el-table-column>
  657. </el-table>
  658. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  659. <el-button type="primary" @click="saveSelectionInfo5()">确定</el-button>
  660. <el-button @click="MFGlag = false">关闭</el-button>
  661. </el-footer>
  662. </el-dialog>
  663. <el-dialog title="转正式料号" :visible.sync="formalPartNoFlag" width="639px" v-drag>
  664. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  665. <el-form-item label="项目编码" prop="projectId" >
  666. <el-input v-model="modalData.projectId" readonly style="width: 110px;" class="red-text"></el-input>
  667. </el-form-item>
  668. <el-form-item label="项目名称" prop="projectDesc" >
  669. <el-input v-model="modalData.projectDesc" readonly style="width: 170px;" class="red-text"></el-input>
  670. </el-form-item>
  671. <el-form-item label="客户编码" prop="customerNo" >
  672. <el-input v-model="modalData.customerNo" readonly style="width: 110px;" class="red-text"></el-input>
  673. </el-form-item>
  674. <el-form-item label="客户名称" prop="customerDesc" >
  675. <el-input v-model="modalData.customerDesc" readonly style="width: 170px;" class="red-text"></el-input>
  676. </el-form-item>
  677. </el-form>
  678. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  679. <el-form-item label="项目料号" prop="testPartNo" >
  680. <el-input v-model="modalData.testPartNo" readonly style="width: 110px;" class="red-text"></el-input>
  681. </el-form-item>
  682. <el-form-item label="料号描述" prop="partDesc" >
  683. <el-input v-model="modalData.partDesc" readonly style="width: 170px;" class="red-text"></el-input>
  684. </el-form-item>
  685. <el-form-item label="BU" prop="bu" >
  686. <el-input v-model="modalData.bu" readonly style="width: 100px;" class="red-text"></el-input>
  687. </el-form-item>
  688. </el-form>
  689. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  690. <el-form-item label="ERP正式料号" prop="finalPartNo" :rules="rules.finalPartNo">
  691. <el-input v-model="modalData.finalPartNo" style="width: 110px"></el-input>
  692. </el-form-item>
  693. <el-form-item label="ERP正式料号描述" prop="finalPartDesc" :rules="rules.finalPartDesc">
  694. <el-input v-model="modalData.finalPartDesc" style="width: 170px"></el-input>
  695. </el-form-item>
  696. </el-form>
  697. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  698. <el-button type="primary" @click="saveFormalPartNo()">保存</el-button>
  699. <el-button @click="formalPartNoFlag = false">关闭</el-button>
  700. </el-footer>
  701. </el-dialog>
  702. <el-tabs style="margin-top: 0px; width: 100%; height: 250px;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">
  703. <el-tab-pane label="打样记录" name="proofRecord" style="margin-left: -10px">
  704. <proofRecord ref="proofRecord"></proofRecord>
  705. </el-tab-pane>
  706. <el-tab-pane label="转量产阶段文档" name="massProductionStage">
  707. <el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="projectDocumentList()">文档清单定义</el-button>
  708. <el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="uploadOtherDocument()">上传其他文档</el-button>
  709. <el-table
  710. :data="projectOtherDocumentList"
  711. border
  712. style="width: 100%;margin-top: 5px;"
  713. :height="height + 128"
  714. ref="proofDocumentTable"
  715. @row-click="projectOtherDocumentClickRow"
  716. @current-change="changeCurrentRow1"
  717. :row-style="rowStyle"
  718. v-loading="dataListLoading">
  719. <el-table-column
  720. header-align="center"
  721. align="center"
  722. width="130"
  723. fixed="left"
  724. label="操作">
  725. <template slot-scope="scope">
  726. <a type="primary" v-if="scope.row.documentDefinitionListId !== '-1'" @click="uploadFile(scope.row)">上传文件</a>
  727. <a type="text" size="small" v-if="scope.row.documentDefinitionListId !== '-1'" @click="warnSendMail(scope.row)">提醒</a>
  728. <a type="text" size="small" v-if="shouldShowDelete(scope.row)" @click="massProductionDocumentDelete(scope.row)">删除</a>
  729. </template>
  730. </el-table-column>
  731. <el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
  732. <el-table-column label="文档类型" align="center">
  733. <template slot-scope="scope">
  734. {{ getCombinedDocumentType(scope.row) }}
  735. </template>
  736. </el-table-column>
  737. <el-table-column
  738. v-for="(item,index) in columnFileContentArray" :key="index"
  739. :sortable="item.columnSortable"
  740. :prop="item.columnProp"
  741. :header-align="item.headerAlign"
  742. :show-overflow-tooltip="item.showOverflowTooltip"
  743. :align="item.align"
  744. :fixed="item.fixed==''?false:item.fixed"
  745. :min-width="item.columnWidth"
  746. :label="item.columnLabel">
  747. <template slot-scope="scope">
  748. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  749. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  750. style="width: 100px; height: 80px"/></span>
  751. </template>
  752. </el-table-column>
  753. </el-table>
  754. </el-tab-pane>
  755. <el-tab-pane label="所有文档" name="allDocument">
  756. <el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="projectProductionValidationDocument()">选择生产确认文档</el-button>
  757. <el-table
  758. :data="projectAllDocumentList"
  759. border
  760. style="width: 100%;margin-top: 5px;"
  761. :height="height + 128"
  762. ref="projectAllDocumentDocumentTable"
  763. @row-click="projectAllDocumentClickRow"
  764. :row-style="rowStyle"
  765. v-loading="dataListLoading">
  766. <el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
  767. <el-table-column label="文档类型" align="center">
  768. <template slot-scope="scope">
  769. {{ getCombinedDocumentType(scope.row) }}
  770. </template>
  771. </el-table-column>
  772. <el-table-column
  773. v-for="(item,index) in columnProjectAllDocumentList" :key="index"
  774. :sortable="item.columnSortable"
  775. :prop="item.columnProp"
  776. :header-align="item.headerAlign"
  777. :show-overflow-tooltip="item.showOverflowTooltip"
  778. :align="item.align"
  779. :fixed="item.fixed==''?false:item.fixed"
  780. :min-width="item.columnWidth"
  781. :label="item.columnLabel">
  782. <template slot-scope="scope">
  783. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  784. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  785. style="width: 100px; height: 80px"/></span>
  786. </template>
  787. </el-table-column>
  788. </el-table>
  789. </el-tab-pane>
  790. <el-tab-pane label="生产文档确认进度" name="productionDocumentsConfirmProgress">
  791. <el-row>
  792. <el-col :span="8" class="left-section">
  793. <div class="table-container" style="height: 214px;margin-top: -10px">
  794. <p style="margin-top: -5px">文档清单</p>
  795. <el-table :data="confirmProgressDocumentList"
  796. border
  797. style="width: 100%;margin-top: -10px;"
  798. :height="this.height + 128">
  799. <el-table-column header-align="center" align="center" width="50" prop="itemNo" label="序号"></el-table-column>
  800. <el-table-column header-align="center" align="center" prop="documentType" label="文档类型"></el-table-column>
  801. <el-table-column header-align="center" align="center" prop="fileName" label="文件名"></el-table-column>
  802. </el-table>
  803. </div>
  804. </el-col>
  805. <el-col :span="15" class="right-section">
  806. <div class="table-container" style="height: 214px;margin-top: -10px">
  807. <p style="margin-top: -5px">推送人员清单</p>
  808. <el-table :data="confirmProgressPusherList"
  809. border
  810. style="width: 100%;margin-top: -10px;"
  811. :height="this.height + 128">
  812. <el-table-column header-align="center" align="center" width="40" prop="itemNo" label="序号"></el-table-column>
  813. <el-table-column header-align="center" align="center" width="70" prop="userDisplay" label="指定确认人"></el-table-column>
  814. <el-table-column header-align="center" align="center" :formatter="formatDate" prop="wantedConfirmDate" label="要求确认日期"></el-table-column>
  815. <el-table-column header-align="center" align="center" prop="confirmFlag" label="是否确认"></el-table-column>
  816. <el-table-column header-align="center" align="center" prop="confirmedBy" label="实际确认人"></el-table-column>
  817. <el-table-column header-align="center" align="center" prop="remark" label="备注"></el-table-column>
  818. <el-table-column header-align="center" align="center" prop="confirmedDate" label="实际确认时间"></el-table-column>
  819. <el-table-column header-align="center" align="center" prop="createDate" label="推送时间"></el-table-column>
  820. <el-table-column header-align="center" align="center" prop="createBy" label="推送人"></el-table-column>
  821. <el-table-column
  822. header-align="center"
  823. align="center"
  824. width="90"
  825. fixed="left"
  826. label="操作">
  827. <template slot-scope="scope">
  828. <a type="text" size="small" @click="viewDocumentFile(scope.row)">查看附件</a>
  829. <a type="text" size="small" @click="confirmDocument(scope.row)">确认</a>
  830. </template>
  831. </el-table-column>
  832. </el-table>
  833. </div>
  834. </el-col>
  835. </el-row>
  836. </el-tab-pane>
  837. </el-tabs>
  838. <el-dialog title="文档清单定义" @close="projectDocumentListVisibleFalse" :visible.sync="projectDocumentListVisible" width="561px" style="margin-top: 10vh" :close-on-click-modal="false">
  839. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  840. <el-form-item label="项目编码" prop="projectId" class="red-label">
  841. <el-input v-model="modalData.projectId" readonly style="width: 110px;" class="red-text"></el-input>
  842. </el-form-item>
  843. <el-form-item label="项目名称" prop="projectDesc" >
  844. <el-input v-model="modalData.projectDesc" readonly style="width: 170px;" class="red-text"></el-input>
  845. </el-form-item>
  846. <el-form-item label="BU" prop="bu">
  847. <el-input v-model="modalData.bu" readonly style="width: 110px;" class="red-text"></el-input>
  848. </el-form-item>
  849. </el-form>
  850. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  851. <el-form-item label="客户编码" prop="customerNo" >
  852. <el-input v-model="modalData.customerNo" readonly style="width: 110px;" class="red-text"></el-input>
  853. </el-form-item>
  854. <el-form-item label="客户名称" prop="customerDesc" >
  855. <el-input v-model="modalData.customerDesc" readonly style="width: 170px;" class="red-text"></el-input>
  856. </el-form-item>
  857. <el-form-item label="项目分类" prop="cProjectTypeDb">
  858. <el-input v-model="modalData.cProjectTypeDb" readonly style="width: 110px;" class="red-text"></el-input>
  859. </el-form-item>
  860. </el-form>
  861. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  862. <el-form-item label="项目料号" prop="testPartNo" :rules="rules.testPartNo" >
  863. <el-input v-model="modalData.testPartNo" readonly style="width: 110px;" class="red-text"></el-input>
  864. </el-form-item>
  865. <el-form-item label="料号描述" prop="partDesc" >
  866. <el-input v-model="modalData.partDesc" readonly style="width: 170px;" class="red-text"></el-input>
  867. </el-form-item>
  868. <el-form-item label="打样单号" prop="proofingNo">
  869. <el-input v-model="modalData.proofingNo" readonly style="width: 110px;" class="red-text"></el-input>
  870. </el-form-item>
  871. </el-form>
  872. <el-button type="primary" icon="el-icon-upload" style="margin-top: -5px" @click="addProjectDocumentTypeFlag = true">新增</el-button>
  873. <el-table
  874. height="200"
  875. :data="proofDocumentListDefinition"
  876. border
  877. style="width: 100%;">
  878. <el-table-column
  879. v-for="(item,index) in columnProjectDocumentManifestDefinitionList" :key="index"
  880. :sortable="item.columnSortable"
  881. :prop="item.columnProp"
  882. :header-align="item.headerAlign"
  883. :show-overflow-tooltip="item.showOverflowTooltip"
  884. :align="item.align"
  885. :fixed="item.fixed==''?false:item.fixed"
  886. :min-width="item.columnWidth"
  887. :label="item.columnLabel">
  888. <template slot-scope="scope">
  889. <span v-if="!item.columnHidden">{{ getColumnValue(scope.row, item) }}</span>
  890. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  891. </template>
  892. </el-table-column>
  893. <el-table-column
  894. fixed="right"
  895. header-align="center"
  896. align="center"
  897. width="100"
  898. label="操作">
  899. <template slot-scope="scope">
  900. <a v-if="!authDelete" type="text" size="small" @click="deleteProjectDocumentType(scope.row)">删除</a>
  901. </template>
  902. </el-table-column>
  903. </el-table>
  904. <div slot="footer" class="dialog-footer">
  905. <el-button @click="projectDocumentListVisible = false">关闭</el-button>
  906. </div>
  907. </el-dialog>
  908. <!-- 新增文档类型 -->
  909. <el-dialog title="新增文档类型" @close="closeAddProjectDocumentTypeFlag" @open="searchProjectDocumentTypeList" :visible.sync="addProjectDocumentTypeFlag" width="559px" v-drag :close-on-click-modal="false">
  910. <el-form inline="inline" label-position="top" :model="searchProjectDocumentTypeData" style="margin-left: 7px;margin-top: -5px;">
  911. <el-form-item label="文档类型ID">
  912. <el-input v-model="searchProjectDocumentTypeData.documentTypeId" clearable style="width: 110px"></el-input>
  913. </el-form-item>
  914. <el-form-item label="文档类型">
  915. <el-input v-model="searchProjectDocumentTypeData.documentType" clearable style="width: 110px"></el-input>
  916. </el-form-item>
  917. <el-form-item label="责任部门">
  918. <el-input v-model="searchProjectDocumentTypeData.responsibleDepartment" clearable style="width: 110px"></el-input>
  919. </el-form-item>
  920. <el-form-item label=" ">
  921. <el-button type="primary" style="padding: 3px 12px" @click="searchProjectDocumentTypeList()">查询</el-button>
  922. </el-form-item>
  923. </el-form>
  924. <el-table
  925. :height="200"
  926. :data="extraProjectDocumentList"
  927. stripe
  928. border
  929. @selection-change="selectionProjectDocument"
  930. style="width: 100%;">
  931. <el-table-column
  932. type="selection"
  933. width="55">
  934. </el-table-column>
  935. <el-table-column
  936. prop="documentTypeId"
  937. header-align="center"
  938. align="center"
  939. label="文档类型ID">
  940. </el-table-column>
  941. <el-table-column
  942. prop="documentType"
  943. header-align="center"
  944. align="center"
  945. label="文档类型">
  946. </el-table-column>
  947. <el-table-column
  948. prop="responsibleDepartment"
  949. header-align="center"
  950. align="center"
  951. label="责任部门">
  952. </el-table-column>
  953. </el-table>
  954. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  955. <el-button type="primary" @click="saveSelectionProjectDocumentType()">确定</el-button>
  956. <el-button @click="addProjectDocumentTypeFlag = false">关闭</el-button>
  957. </el-footer>
  958. </el-dialog>
  959. <el-dialog title="选择生产确认文档" :visible.sync="projectProductionValidationDocumentVisible" width="763px" style="margin-top: -5vh" :close-on-click-modal="false">
  960. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  961. <el-form-item label="项目编码" prop="projectId" class="red-label">
  962. <el-input v-model="modalData.projectId" readonly style="width: 110px;" class="red-text"></el-input>
  963. </el-form-item>
  964. <el-form-item label="项目名称" prop="projectDesc" >
  965. <el-input v-model="modalData.projectDesc" readonly style="width: 170px;" class="red-text"></el-input>
  966. </el-form-item>
  967. <el-form-item label="BU" prop="bu">
  968. <el-input v-model="modalData.bu" readonly style="width: 110px;" class="red-text"></el-input>
  969. </el-form-item>
  970. <el-form-item label="项目料号" prop="testPartNo" >
  971. <el-input v-model="modalData.testPartNo" readonly style="width: 110px;" class="red-text"></el-input>
  972. </el-form-item>
  973. <el-form-item label="料号描述" prop="partDesc" >
  974. <el-input v-model="modalData.partDesc" readonly style="width: 170px;" class="red-text"></el-input>
  975. </el-form-item>
  976. </el-form>
  977. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  978. <el-form-item label="客户编码" prop="customerNo" >
  979. <el-input v-model="modalData.customerNo" readonly style="width: 110px;" class="red-text"></el-input>
  980. </el-form-item>
  981. <el-form-item label="客户名称" prop="customerDesc" >
  982. <el-input v-model="modalData.customerDesc" readonly style="width: 170px;" class="red-text"></el-input>
  983. </el-form-item>
  984. <el-form-item label="项目分类" prop="cProjectTypeDb">
  985. <el-input v-model="modalData.cProjectTypeDb" readonly style="width: 110px;" class="red-text"></el-input>
  986. </el-form-item>
  987. <el-form-item label="要求最晚确认日期" prop="wantedConfirmDate" :rules="rules.wantedConfirmDate">
  988. <el-date-picker
  989. v-model="modalData.wantedConfirmDate"
  990. type="date"
  991. placeholder="选择日期"
  992. style="width: 110px;">
  993. </el-date-picker>
  994. </el-form-item>
  995. </el-form>
  996. <el-tabs v-model="activeName1" style="margin-top: 0px; width: 100%; height: 100%;" type="border-card" @tab-click="tabClick" class="customer-tab">
  997. <el-tab-pane label="文档选择" name="selectDocument" style="width: 104%">
  998. <el-table
  999. v-model="selectedDocumentItems"
  1000. :height="height + 250"
  1001. :data="projectAllDocumentList1"
  1002. border
  1003. style="width: 100%;margin-top: -13px;margin-left: -14px !important; margin-right: 0 !important;"
  1004. @selection-change="handleDocumentSelectionChange">
  1005. <el-table-column
  1006. type="selection"
  1007. header-align="center"
  1008. align="center"
  1009. width="50">
  1010. </el-table-column>
  1011. <el-table-column label="序号" type="index" align="center" :index="indexMethod"></el-table-column>
  1012. <el-table-column label="文档类型" align="center">
  1013. <template slot-scope="scope">
  1014. {{ getCombinedDocumentType(scope.row) }}
  1015. </template>
  1016. </el-table-column>
  1017. <el-table-column
  1018. v-for="(item,index) in columnProjectAllDocumentList" :key="index"
  1019. :sortable="item.columnSortable"
  1020. :prop="item.columnProp"
  1021. :header-align="item.headerAlign"
  1022. :show-overflow-tooltip="item.showOverflowTooltip"
  1023. :align="item.align"
  1024. :fixed="item.fixed==''?false:item.fixed"
  1025. :min-width="item.columnWidth"
  1026. :label="item.columnLabel">
  1027. <template slot-scope="scope">
  1028. <span v-if="!item.columnHidden">{{ getColumnValue(scope.row, item) }}</span>
  1029. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1030. </template>
  1031. </el-table-column>
  1032. </el-table>
  1033. </el-tab-pane>
  1034. <el-tab-pane label="确认人员清单" name="confirmatory" style="width: 104%">
  1035. <el-table
  1036. :height="height + 105"
  1037. :data="projectAllDocumentConfirmatorList"
  1038. border
  1039. style="width: 100%;margin-top: -13px;margin-left: -14px !important;">
  1040. <el-table-column
  1041. prop="username"
  1042. header-align="center"
  1043. align="center"
  1044. min-width="60"
  1045. label="用户账号">
  1046. </el-table-column>
  1047. <el-table-column
  1048. prop="userDisplay"
  1049. header-align="center"
  1050. align="center"
  1051. min-width="80"
  1052. label="用户名">
  1053. </el-table-column>
  1054. </el-table>
  1055. </el-tab-pane>
  1056. </el-tabs>
  1057. <div slot="footer" class="dialog-footer" style="margin-top: 6px">
  1058. <el-button type="primary" @click="saveProductionValidationDocument()">确定</el-button>
  1059. <el-button @click="closeProjectProductionValidationDocumentVisibleDialog">关闭</el-button>
  1060. </div>
  1061. </el-dialog>
  1062. <el-dialog title="确认" @close="closeUploadFileVisible" :visible.sync="confirmVisible" width="579px" style="margin-top: 0vh;height: 100%;" :close-on-click-modal="false">
  1063. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  1064. <el-form-item label="项目编码" prop="projectId" class="red-label">
  1065. <el-input v-model="modalData.projectId" readonly style="width: 110px;" class="red-text"></el-input>
  1066. </el-form-item>
  1067. <el-form-item label="项目名称" prop="projectDesc" >
  1068. <el-input v-model="modalData.projectDesc" readonly style="width: 170px;" class="red-text"></el-input>
  1069. </el-form-item>
  1070. <el-form-item label="BU" prop="bu">
  1071. <el-input v-model="modalData.bu" readonly style="width: 110px;" class="red-text"></el-input>
  1072. </el-form-item>
  1073. <el-form-item label="项目分类" prop="cProjectTypeDb">
  1074. <el-input v-model="modalData.cProjectTypeDb" readonly style="width: 110px;" class="red-text"></el-input>
  1075. </el-form-item>
  1076. </el-form>
  1077. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  1078. <el-form-item label="指定确认人" prop="userDisplay">
  1079. <el-input v-model="confirmData.userDisplay" readonly style="width: 110px;"></el-input>
  1080. </el-form-item>
  1081. <el-form-item label="要求确认日期" prop="wantedConfirmDate">
  1082. <el-input v-model="confirmData.wantedConfirmDate" readonly style="width: 170px;" class="red-text"></el-input>
  1083. </el-form-item>
  1084. </el-form>
  1085. <el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -5px;">
  1086. <el-form-item label="备注" prop="remark">
  1087. <el-input v-model="confirmData.remark" style="width: 541px" type="textarea" :rows="1"></el-input>
  1088. </el-form-item>
  1089. </el-form>
  1090. <el-form :inline="true" label-position="top" :model="confirmData" style="margin-left: 7px;margin-top: -15px;">
  1091. <el-form-item label=" ">
  1092. <a href="javascript:void(0);" @click="triggerUpload" type="text" size="small">点击选择文件</a>
  1093. <tr></tr>
  1094. <el-input v-model="this.fileName" readonly placeholder="文件名称" style="width: 541px"></el-input>
  1095. <el-upload class="custom-upload" :file-list="fileList"
  1096. action="javascript:void(0);" ref="uploadFile"
  1097. :on-change="onChange" :on-close="closeFileUpdate"
  1098. multiple :auto-upload="false"
  1099. style="text-align: left;margin-top: 0px;margin-left: 6px;display: none;">
  1100. </el-upload>
  1101. </el-form-item>
  1102. </el-form>
  1103. <el-table
  1104. :height="height + 120"
  1105. :data="projectConfirmatorFileList"
  1106. border
  1107. style="width: 100%;margin-top: 17px;margin-left: 0px;">
  1108. <el-table-column
  1109. prop="fileName"
  1110. header-align="center"
  1111. align="center"
  1112. min-width="120"
  1113. label="文件名">
  1114. </el-table-column>
  1115. <el-table-column
  1116. prop="createDate"
  1117. header-align="center"
  1118. align="center"
  1119. min-width="80"
  1120. label="上传时间">
  1121. </el-table-column>
  1122. <el-table-column
  1123. prop="createdBy"
  1124. header-align="center"
  1125. align="center"
  1126. min-width="60"
  1127. label="上传人">
  1128. </el-table-column>
  1129. </el-table>
  1130. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1131. <el-button type="primary" @click="saveUploadFile()">确定</el-button>
  1132. <el-button @click="closeUploadFileVisible()">关闭</el-button>
  1133. </div>
  1134. </el-dialog>
  1135. <el-dialog title="查看附件" @close="closeViewDocumentFileVisible" :visible.sync="viewDocumentFileVisible" width="520px" style="margin-top: 0vh" :close-on-click-modal="false">
  1136. <el-table
  1137. :height="height + 200"
  1138. :data="projectConfirmatorFileList"
  1139. border
  1140. style="width: 100%;margin-top: 0px;margin-left: 0px;">
  1141. <el-table-column
  1142. prop="fileName"
  1143. header-align="center"
  1144. align="center"
  1145. min-width="120"
  1146. label="文件名">
  1147. </el-table-column>
  1148. <el-table-column
  1149. prop="createDate"
  1150. header-align="center"
  1151. align="center"
  1152. min-width="80"
  1153. label="上传时间">
  1154. </el-table-column>
  1155. <el-table-column
  1156. prop="createdBy"
  1157. header-align="center"
  1158. align="center"
  1159. min-width="50"
  1160. label="上传人">
  1161. </el-table-column>
  1162. <el-table-column
  1163. header-align="center"
  1164. align="center"
  1165. width="100"
  1166. label="操作">
  1167. <template slot-scope="scope">
  1168. <a type="text" size="small" @click="viewFile(scope.row)">查看</a>
  1169. <a type="text" size="small" @click="downloadFile(scope.row)">下载</a>
  1170. <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
  1171. </template>
  1172. </el-table-column>
  1173. </el-table>
  1174. <div slot="footer" class="dialog-footer" style="margin-top: 0px">
  1175. <el-button @click="closeViewDocumentFileVisible()">关闭</el-button>
  1176. </div>
  1177. </el-dialog>
  1178. <upload-file-list-1 folder="projectOtherDocument" title="上传文档" :file-list.sync="fileList" :label="'文档类型ID:'" :no="otherDocumentCurrentRow.documentTypeId" :no-type="otherDocumentCurrentRow.documentType"
  1179. :proofing-id='proofingCurrentRow.proofingId' :bu="proofingCurrentRow.buNo" :site="proofingCurrentRow.site" :upload-dialog.sync="uploadDialog" :no-desc="otherDocumentCurrentRow.documentDesc" :id="otherDocumentCurrentRow.id"
  1180. :project-id="proofingCurrentRow.projectId" :project-desc="proofingCurrentRow.projectDesc" :document-type="proofingCurrentRow.documentType" :conclusion="'N/A'"
  1181. :customer-no="proofingCurrentRow.customerNo" :customer-desc="proofingCurrentRow.customerDesc" :test-part-no="proofingCurrentRow.testPartNo"
  1182. :part-desc="proofingCurrentRow.partDesc" :column-file-content-array="columnFileContentArray" :proof-document-list="projectOtherDocumentList"
  1183. path="/upload/test" :is-editable="isEditable" :is-mass-production-stage="isMassProductionStage"></upload-file-list-1>
  1184. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  1185. </div>
  1186. </template>
  1187. <script>
  1188. import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
  1189. import {
  1190. searchBusinessInfo,
  1191. searchBusinessInfo1,
  1192. searchBusinessInfo2,
  1193. searchBusinessInfo3,
  1194. searchBusinessInfo4,
  1195. searchBusinessInfo5,
  1196. searchBusinessInfo6
  1197. } from "@/api/factory/site.js"
  1198. import Chooselist from '@/views/modules/common/Chooselist_eam'
  1199. import {removeUserFavorite, saveUserFavorite, userFavoriteList} from '@/api/userFavorite.js'
  1200. import {getTableDefaultListLanguage, getTableUserListLanguage,} from "@/api/table.js";
  1201. import proofRecord from "./com_project_proof_record";
  1202. import {
  1203. eamProjectInfoDelete,
  1204. eamProjectInfoEdit,
  1205. eamProjectInfoSave,
  1206. eamProjectInfoSearch,
  1207. getTestPartNo,
  1208. saveFormalPartNo
  1209. } from "@/api/eam/eamProject.js";
  1210. import {getProjectOtherDocument} from "@/api/eam/eamProofing.js";
  1211. import UploadFileList1 from "../common/uploadFileList1.vue";
  1212. import {
  1213. deleteDocumentType, deleteProofDocument,
  1214. editProjectDocument,
  1215. getExtraDocumentList,
  1216. projectDocumentSave,
  1217. proofingDocumentNEW,
  1218. searchProjectAllDocument
  1219. } from "../../../api/eam/eamProofing";
  1220. import {
  1221. checkConfirmationRecord,
  1222. checkProductionValidationDocument, deleteDocumentInformation,
  1223. deleteProjectFile,
  1224. saveProductionValidationDocument,
  1225. saveProductionValidationDocumentConfirmator,
  1226. searchConfirmatorList,
  1227. searchConfirmProgressDocumentList,
  1228. searchConfirmProgressPusherList,
  1229. searchProjectConfirmatorFileList, sendMailHandle,
  1230. updateProjectDocumentConfirm,
  1231. uploadProjectFile, warnSendMailHandle, confirmatorSendMailHandle
  1232. } from "../../../api/eam/eamProject";
  1233. import row from "element-ui/packages/row";
  1234. import moment from 'moment';
  1235. import 'moment/locale/zh-cn';
  1236. import {downLoadObjectFile} from "../../../api/eam/eam_object_list";
  1237. import {EventBus} from "../../../main";
  1238. /*打样记录組件*/
  1239. export default {
  1240. computed: {
  1241. row() {
  1242. return row
  1243. }
  1244. },
  1245. components: {
  1246. UploadFileList1,
  1247. Chooselist,
  1248. proofRecord,
  1249. },
  1250. watch: {
  1251. searchData: {
  1252. deep: true,
  1253. handler: function (newV, oldV) {
  1254. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  1255. }
  1256. },
  1257. uploadDialog (newValue,oldValue) {
  1258. if (newValue === false) {
  1259. this.getProjectOtherDocument()
  1260. }
  1261. },
  1262. projectProductionValidationDocumentVisible(newVal) {
  1263. if (newVal) {
  1264. this.activeName1 = 'selectDocument';
  1265. }
  1266. }
  1267. },
  1268. data () {
  1269. return {
  1270. // 是否收藏
  1271. favorite: false,
  1272. // 导出 start
  1273. exportData: [],
  1274. exportName: "customerNo" + this.dayjs().format('YYYYMMDDHHmmss'),
  1275. exportHeader: ["customerNo"],
  1276. exportFooter: [],
  1277. exportList:[],
  1278. // 导出 end
  1279. tagNo:'',
  1280. fileName:'',
  1281. folder: 'projectConfirm',
  1282. searchData: {
  1283. site: this.$store.state.user.site,
  1284. userName: this.$store.state.user.name,
  1285. projectId: '',
  1286. projectDesc: '',
  1287. partDesc: '',
  1288. customerNo: '',
  1289. customerDesc: '',
  1290. buDesc: '',
  1291. projectCategory: '',
  1292. status: '',
  1293. startDate:'',
  1294. endDate:'',
  1295. projectCreationDate: new Date(),
  1296. projectCloseDate:'',
  1297. needDate:'',
  1298. // active: 'Y',
  1299. page: 1,
  1300. limit: 10,
  1301. },
  1302. height: 200,
  1303. pageIndex: 1,
  1304. pageSize: 20,
  1305. totalPage: 0,
  1306. businessDataList: [],
  1307. businessDataList1: [],
  1308. businessDataList2: [],
  1309. businessDataList3: [],
  1310. businessDataList4: [],
  1311. businessDataList5: [],
  1312. businessDataList6: [],
  1313. dataList: [],
  1314. dataListSelections: [],
  1315. //用于储存选中的行数据
  1316. selectedDocumentItems: [],
  1317. // ======== 复选数据集 ========
  1318. businessSelections: [],
  1319. // ======== 选中的当前行数据 ========
  1320. proofingCurrentRow: {},
  1321. otherDocumentCurrentRow: {},
  1322. projectAllDocumentCurrentRow: {},
  1323. fileList: [],
  1324. projectOtherDocumentList: [],
  1325. extraProjectDocumentList: [],
  1326. projectDocumentSelection: [],
  1327. projectAllDocumentList: [],
  1328. projectAllDocumentList1: [],
  1329. projectAllDocumentConfirmatorList: [],
  1330. proofDocumentListDefinition: [],
  1331. confirmProgressPusherList: [],
  1332. confirmProgressDocumentList: [],
  1333. projectConfirmatorFileList: [],
  1334. viewDocumentFileVisible: false,
  1335. searchProjectDocumentTypeData: {
  1336. site: this.$store.state.user.site,
  1337. projectId: '',
  1338. proofingNo: '*',
  1339. documentTypeId: '',
  1340. documentType: '',
  1341. documentDesc: '',
  1342. responsibleDepartment: '',
  1343. estimatedCompletionDays: '',
  1344. page: 1,
  1345. limit: 1000
  1346. },
  1347. dataListLoading: false,
  1348. modalFlag:false,
  1349. modalDisableFlag:false,
  1350. formalPartNoFlag:false,
  1351. projectManagerFlag:false,
  1352. projectOwnerFlag:false,
  1353. engineerFlag:false,
  1354. engineer6Flag:false,
  1355. IPQCFlag:false,
  1356. FQCFlag:false,
  1357. MFGlag:false,
  1358. uploadDialog:false,
  1359. isEditable: true,
  1360. isMassProductionStage: true,
  1361. projectDocumentListVisible: false,
  1362. addProjectDocumentTypeFlag: false,
  1363. projectProductionValidationDocumentVisible: false,
  1364. confirmVisible: false,
  1365. confirmationPrompted: false, // 是否已经进行过确认提示的标志
  1366. modalData:{
  1367. flag:'',
  1368. id:'',
  1369. bu: '',
  1370. buNo: '',
  1371. site: this.$store.state.user.site,
  1372. projectId: '',
  1373. oriProjectId: '',
  1374. projectDesc:'',
  1375. projectCloseDate:'',
  1376. proofingNo:'',
  1377. needDate:'',
  1378. customerNo:'',
  1379. finalCustomerId:'',
  1380. customerDesc:'',
  1381. projectCategory:'',
  1382. testPartNo:'',
  1383. partDesc:'',
  1384. priority:'',
  1385. projectManager:'',
  1386. projectManagerName:'',
  1387. projectOwner:'',
  1388. projectOwnerName:'',
  1389. cProjectRegion:'',
  1390. cProjectBuildDate:'',
  1391. cQualityEngineer1:'',
  1392. cQualityEngineer1Name:'',
  1393. cQualityEngineer2:'',
  1394. cQualityEngineer2Name:'',
  1395. cQualityEngineer3:'',
  1396. cQualityEngineer3Name:'',
  1397. cManufactureEngineer:'',
  1398. cManufactureEngineerName:'',
  1399. engineer:'',
  1400. engineerName:'',
  1401. //projectCreationDate为当前服务器的时间
  1402. projectCreationDate: new Date(),
  1403. finalPartNo:'',
  1404. finalPartDesc:'',
  1405. wantedConfirmDate: new Date(),
  1406. // active:'',
  1407. createBy: this.$store.state.user.name,
  1408. updateBy: this.$store.state.user.name,
  1409. },
  1410. searchBusinessData:{
  1411. site: this.$store.state.user.site,
  1412. username: '',
  1413. roleDesc: '',
  1414. userDisplay: '',
  1415. active: '',
  1416. page: 1,
  1417. limit: 10,
  1418. },
  1419. searchBusinessData1:{
  1420. site: this.$store.state.user.site,
  1421. username: '',
  1422. roleDesc: '',
  1423. userDisplay: '',
  1424. active: '',
  1425. page: 1,
  1426. limit: 10,
  1427. },
  1428. searchBusinessData2:{
  1429. site: this.$store.state.user.site,
  1430. username: '',
  1431. roleDesc: '',
  1432. userDisplay: '',
  1433. active: '',
  1434. page: 1,
  1435. limit: 10,
  1436. },
  1437. searchBusinessData3:{
  1438. site: this.$store.state.user.site,
  1439. username: '',
  1440. roleDesc: '',
  1441. userDisplay: '',
  1442. active: '',
  1443. page: 1,
  1444. limit: 10,
  1445. },
  1446. searchBusinessData4:{
  1447. site: this.$store.state.user.site,
  1448. username: '',
  1449. roleDesc: '',
  1450. userDisplay: '',
  1451. active: '',
  1452. page: 1,
  1453. limit: 10,
  1454. },
  1455. searchBusinessData5:{
  1456. site: this.$store.state.user.site,
  1457. username: '',
  1458. roleDesc: '',
  1459. userDisplay: '',
  1460. active: '',
  1461. page: 1,
  1462. limit: 10,
  1463. },
  1464. searchBusinessData6:{
  1465. site: this.$store.state.user.site,
  1466. username: '',
  1467. roleDesc: '',
  1468. userDisplay: '',
  1469. active: '',
  1470. page: 1,
  1471. limit: 10,
  1472. },
  1473. confirmData:{
  1474. site: '',
  1475. projectId: '',
  1476. orderRef1: '',
  1477. documentId: '',
  1478. documentType: '',
  1479. itemNo: '',
  1480. userid: '',
  1481. wantedConfirmDate: '',
  1482. confirmFlag: '',
  1483. confirmedBy: '',
  1484. remark: '',
  1485. confirmedDate: '',
  1486. createDate: '',
  1487. createBy: '',
  1488. page: 1,
  1489. limit: 1000
  1490. },
  1491. departmentList:[],
  1492. activeName: 'proofRecord',
  1493. activeName1: 'selectDocument',
  1494. // 日期限制
  1495. // pickerOptions: {
  1496. // disabledDate(time) {
  1497. // return time.getTime() > Date.now();
  1498. // },
  1499. // },
  1500. // 展示列集
  1501. columnList: [
  1502. {
  1503. userId: this.$store.state.user.name,
  1504. functionId: 101001013,
  1505. serialNumber: '101001013Table1BuDesc',
  1506. tableId: "101001013Table1",
  1507. tableName: "BU文档清单表",
  1508. columnProp: 'buDesc',
  1509. headerAlign: "center",
  1510. align: "center",
  1511. columnLabel: 'BU',
  1512. columnHidden: false,
  1513. columnImage: false,
  1514. columnSortable: false,
  1515. sortLv: 0,
  1516. status: true,
  1517. fixed: '',
  1518. columnWidth: 100,
  1519. },
  1520. {
  1521. userId: this.$store.state.user.name,
  1522. functionId: 101001014,
  1523. serialNumber: '101001014Table1ProjectId',
  1524. tableId: "101001014Table1",
  1525. tableName: "项目信息表",
  1526. columnProp: 'projectId',
  1527. headerAlign: "center",
  1528. align: "center",
  1529. columnLabel: '项目编码',
  1530. columnHidden: false,
  1531. columnImage: false,
  1532. columnSortable: false,
  1533. sortLv: 0,
  1534. status: true,
  1535. fixed: '',
  1536. columnWidth: 100,
  1537. },
  1538. {
  1539. userId: this.$store.state.user.name,
  1540. functionId: 101001014,
  1541. serialNumber: '101001014Table1ProjectDesc',
  1542. tableId: "101001014Table1",
  1543. tableName: "项目信息表",
  1544. columnProp: 'projectDesc',
  1545. headerAlign: "center",
  1546. align: "center",
  1547. columnLabel: '项目',
  1548. columnHidden: false,
  1549. columnImage: false,
  1550. columnSortable: false,
  1551. sortLv: 0,
  1552. status: true,
  1553. fixed: '',
  1554. columnWidth: 100,
  1555. },
  1556. {
  1557. userId: this.$store.state.user.name,
  1558. functionId: 101001014,
  1559. serialNumber: '101001014Table1TestPartNo',
  1560. tableId: "101001014Table1",
  1561. tableName: "项目信息表",
  1562. columnProp: 'testPartNo',
  1563. headerAlign: "center",
  1564. align: "center",
  1565. columnLabel: '料号',
  1566. columnHidden: false,
  1567. columnImage: false,
  1568. columnSortable: false,
  1569. sortLv: 0,
  1570. status: true,
  1571. fixed: '',
  1572. columnWidth: 100,
  1573. },
  1574. {
  1575. userId: this.$store.state.user.name,
  1576. functionId: 101001014,
  1577. serialNumber: '101001014Table1customerNo',
  1578. tableId: "101001014Table1",
  1579. tableName: "项目信息表",
  1580. columnProp: "customerNo",
  1581. headerAlign: "center",
  1582. align: "left",
  1583. columnLabel: "客户编码",
  1584. columnHidden: false,
  1585. columnImage: false,
  1586. columnSortable: false,
  1587. sortLv: 0,
  1588. status: true,
  1589. fixed: '',
  1590. columnWidth: 100
  1591. },
  1592. {
  1593. userId: this.$store.state.user.name,
  1594. functionId: 101001014,
  1595. serialNumber: '101001014Table1customerDesc',
  1596. tableId: "101001014Table1",
  1597. tableName: "项目信息表",
  1598. columnProp: "customerDesc",
  1599. headerAlign: "center",
  1600. align: "left",
  1601. columnLabel: "客户名称",
  1602. columnHidden: false,
  1603. columnImage: false,
  1604. columnSortable: false,
  1605. sortLv: 0,
  1606. status: true,
  1607. fixed: '',
  1608. columnWidth: 150
  1609. },
  1610. {
  1611. userId: this.$store.state.user.name,
  1612. functionId: 101001014,
  1613. serialNumber: '101001014Table1ProjectCreationDate',
  1614. tableId: "101001014Table1",
  1615. tableName: "项目信息表",
  1616. columnProp: "projectCreationDate",
  1617. headerAlign: "center",
  1618. align: "center",
  1619. columnLabel: "立项日期",
  1620. columnHidden: false,
  1621. columnImage: false,
  1622. columnSortable: false,
  1623. sortLv: 0,
  1624. status: true,
  1625. fixed: '',
  1626. columnWidth: 120
  1627. },
  1628. {
  1629. userId: this.$store.state.user.name,
  1630. functionId: 101001014,
  1631. serialNumber: '101001014Table1ProjectCategory',
  1632. tableId: "101001014Table1",
  1633. tableName: "项目信息表",
  1634. columnProp: 'projectCategory',
  1635. headerAlign: "center",
  1636. align: "left",
  1637. columnLabel: '项目分类',
  1638. columnHidden: false,
  1639. columnImage: false,
  1640. columnSortable: false,
  1641. sortLv: 0,
  1642. status: true,
  1643. fixed: '',
  1644. columnWidth: 120,
  1645. },
  1646. {
  1647. userId: this.$store.state.user.name,
  1648. functionId: 101001014,
  1649. serialNumber: '101001014Table1Priority',
  1650. tableId: "101001014Table1",
  1651. tableName: "项目信息表",
  1652. columnProp: 'priority',
  1653. headerAlign: "center",
  1654. align: "left",
  1655. columnLabel: '优先级',
  1656. columnHidden: false,
  1657. columnImage: false,
  1658. columnSortable: false,
  1659. sortLv: 0,
  1660. status: true,
  1661. fixed: '',
  1662. columnWidth: 80,
  1663. },
  1664. //区域
  1665. {
  1666. userId: this.$store.state.user.name,
  1667. functionId: 101001014,
  1668. serialNumber: '101001014Table1CProjectRegion',
  1669. tableId: "101001014Table1",
  1670. tableName: "项目信息表",
  1671. columnProp: 'cProjectRegion',
  1672. headerAlign: "center",
  1673. align: "left",
  1674. columnLabel: '区域',
  1675. columnHidden: false,
  1676. columnImage: false,
  1677. columnSortable: false,
  1678. sortLv: 0,
  1679. status: true,
  1680. fixed: '',
  1681. columnWidth: 120,
  1682. },
  1683. {
  1684. userId: this.$store.state.user.name,
  1685. functionId: 101001014,
  1686. serialNumber: '101001014Table1ProjectManager',
  1687. tableId: "101001014Table1",
  1688. tableName: "项目信息表",
  1689. columnProp: 'projectManagerName',
  1690. headerAlign: "center",
  1691. align: "left",
  1692. columnLabel: 'PM/Sales',
  1693. columnHidden: false,
  1694. columnImage: false,
  1695. columnSortable: false,
  1696. sortLv: 0,
  1697. status: true,
  1698. fixed: '',
  1699. columnWidth: 120,
  1700. },
  1701. {
  1702. userId: this.$store.state.user.name,
  1703. functionId: 101001014,
  1704. serialNumber: '101001014Table1ProjectOwner',
  1705. tableId: "101001014Table1",
  1706. tableName: "项目信息表",
  1707. columnProp: 'projectOwnerName',
  1708. headerAlign: "center",
  1709. align: "left",
  1710. columnLabel: 'PjM',
  1711. columnHidden: false,
  1712. columnImage: false,
  1713. columnSortable: false,
  1714. sortLv: 0,
  1715. status: true,
  1716. fixed: '',
  1717. columnWidth: 120,
  1718. },
  1719. {
  1720. userId: this.$store.state.user.name,
  1721. functionId: 101001014,
  1722. serialNumber: '101001014Table1Engineer',
  1723. tableId: "101001014Table1",
  1724. tableName: "项目信息表",
  1725. columnProp: 'engineerName',
  1726. headerAlign: "center",
  1727. align: "left",
  1728. columnLabel: 'Engineer',
  1729. columnHidden: false,
  1730. columnImage: false,
  1731. columnSortable: false,
  1732. sortLv: 0,
  1733. status: true,
  1734. fixed: '',
  1735. columnWidth: 120,
  1736. },
  1737. {
  1738. userId: this.$store.state.user.name,
  1739. functionId: 101001014,
  1740. serialNumber: '101001014Table1CQualityEngineer1',
  1741. tableId: "101001014Table1",
  1742. tableName: "项目信息表",
  1743. columnProp: 'cQualityEngineer1Name',
  1744. headerAlign: "center",
  1745. align: "left",
  1746. columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
  1747. columnHidden: false,
  1748. columnImage: false,
  1749. columnSortable: false,
  1750. sortLv: 0,
  1751. status: true,
  1752. fixed: '',
  1753. columnWidth: 120,
  1754. },
  1755. {
  1756. userId: this.$store.state.user.name,
  1757. functionId: 101001014,
  1758. serialNumber: '101001014Table1CQualityEngineer2',
  1759. tableId: "101001014Table1",
  1760. tableName: "项目信息表",
  1761. columnProp: 'cQualityEngineer2Name',
  1762. headerAlign: "center",
  1763. align: "left",
  1764. columnLabel: 'IPQC-Converting',
  1765. columnHidden: false,
  1766. columnImage: false,
  1767. columnSortable: false,
  1768. sortLv: 0,
  1769. status: true,
  1770. fixed: '',
  1771. columnWidth: 120,
  1772. },
  1773. {
  1774. userId: this.$store.state.user.name,
  1775. functionId: 101001014,
  1776. serialNumber: '101001014Table1CQualityEngineer3',
  1777. tableId: "101001014Table1",
  1778. tableName: "项目信息表",
  1779. columnProp: 'cQualityEngineer3Name',
  1780. headerAlign: "center",
  1781. align: "left",
  1782. columnLabel: 'FQC',
  1783. columnHidden: false,
  1784. columnImage: false,
  1785. columnSortable: false,
  1786. sortLv: 0,
  1787. status: true,
  1788. fixed: '',
  1789. columnWidth: 120,
  1790. },
  1791. {
  1792. userId: this.$store.state.user.name,
  1793. functionId: 101001014,
  1794. serialNumber: '101001014Table1CManufactureEngineer',
  1795. tableId: "101001014Table1",
  1796. tableName: "项目信息表",
  1797. columnProp: 'cManufactureEngineerName',
  1798. headerAlign: "center",
  1799. align: "left",
  1800. columnLabel: 'MFG',
  1801. columnHidden: false,
  1802. columnImage: false,
  1803. columnSortable: false,
  1804. sortLv: 0,
  1805. status: true,
  1806. fixed: '',
  1807. columnWidth: 120,
  1808. },
  1809. {
  1810. userId: this.$store.state.user.name,
  1811. functionId: 101001014,
  1812. serialNumber: '101001014Table1Status',
  1813. tableId: "101001014Table1",
  1814. tableName: "项目信息表",
  1815. columnProp: 'status',
  1816. headerAlign: "center",
  1817. align: "left",
  1818. columnLabel: '项目状态' ,
  1819. columnHidden: false,
  1820. columnImage: false,
  1821. columnSortable: false,
  1822. sortLv: 0,
  1823. status: true,
  1824. fixed: '',
  1825. columnWidth: 100,
  1826. },
  1827. {
  1828. userId: this.$store.state.user.name,
  1829. functionId: 101001014,
  1830. serialNumber: '101001014Table1NeedDate',
  1831. tableId: "101001014Table1",
  1832. tableName: "项目信息表",
  1833. columnProp: 'needDate',
  1834. headerAlign: "center",
  1835. align: "center",
  1836. columnLabel: '预计完成日期',
  1837. columnHidden: false,
  1838. columnImage: false,
  1839. columnSortable: false,
  1840. sortLv: 0,
  1841. status: true,
  1842. fixed: '',
  1843. columnWidth: 120,
  1844. },
  1845. {
  1846. userId: this.$store.state.user.name,
  1847. functionId: 101001014,
  1848. serialNumber: '101001014Table1ProjectCloseDate',
  1849. tableId: "101001014Table1",
  1850. tableName: "项目信息表",
  1851. columnProp: 'projectCloseDate',
  1852. headerAlign: "center",
  1853. align: "left",
  1854. columnLabel: '结案日期',
  1855. columnHidden: false,
  1856. columnImage: false,
  1857. columnSortable: false,
  1858. sortLv: 0,
  1859. status: true,
  1860. fixed: '',
  1861. columnWidth: 120,
  1862. },
  1863. {
  1864. userId: this.$store.state.user.name,
  1865. functionId: 101001014,
  1866. serialNumber: '101001014Table1FinalPartNo',
  1867. tableId: "101001014Table1",
  1868. tableName: "项目信息表",
  1869. columnProp: 'finalPartNo',
  1870. headerAlign: "center",
  1871. align: "left",
  1872. columnLabel: 'ERP正式料号',
  1873. columnHidden: false,
  1874. columnImage: false,
  1875. columnSortable: false,
  1876. sortLv: 0,
  1877. status: true,
  1878. fixed: '',
  1879. columnWidth: 120,
  1880. },
  1881. // {
  1882. // userId: this.$store.state.user.name,
  1883. // functionId: 101001014,
  1884. // serialNumber: '101001014Table1Active',
  1885. // tableId: "101001014Table1",
  1886. // tableName: "项目信息表",
  1887. // columnProp: 'active',
  1888. // headerAlign: "center",
  1889. // align: "center",
  1890. // columnLabel: '在用',
  1891. // columnHidden: false,
  1892. // columnImage: false,
  1893. // columnSortable: false,
  1894. // sortLv: 0,
  1895. // status: true,
  1896. // fixed: '',
  1897. // columnWidth: 120,
  1898. // },
  1899. {
  1900. userId: this.$store.state.user.name,
  1901. functionId: 101001014,
  1902. serialNumber: '101001014Table1CreateDate',
  1903. tableId: "101001014Table1",
  1904. tableName: "项目信息表",
  1905. columnProp: 'createDate',
  1906. headerAlign: "center",
  1907. align: "center",
  1908. columnLabel: '创建时间',
  1909. columnHidden: false,
  1910. columnImage: false,
  1911. columnSortable: false,
  1912. sortLv: 0,
  1913. status: true,
  1914. fixed: '',
  1915. columnWidth: 120,
  1916. },
  1917. {
  1918. userId: this.$store.state.user.name,
  1919. functionId: 101001014,
  1920. serialNumber: '101001014Table1CreateBy',
  1921. tableId: "101001014Table1",
  1922. tableName: "项目信息表",
  1923. columnProp: 'createBy',
  1924. headerAlign: "center",
  1925. align: "left",
  1926. columnLabel: '创建人',
  1927. columnHidden: false,
  1928. columnImage: false,
  1929. columnSortable: false,
  1930. sortLv: 0,
  1931. status: true,
  1932. fixed: '',
  1933. columnWidth: 120,
  1934. },
  1935. {
  1936. userId: this.$store.state.user.name,
  1937. functionId: 101001014,
  1938. serialNumber: '101001014Table1UpdateDate',
  1939. tableId: "101001014Table1",
  1940. tableName: "项目信息表",
  1941. columnProp: 'updateDate',
  1942. headerAlign: "center",
  1943. align: "center",
  1944. columnLabel: '更新时间',
  1945. columnHidden: false,
  1946. columnImage: false,
  1947. columnSortable: false,
  1948. sortLv: 0,
  1949. status: true,
  1950. fixed: '',
  1951. columnWidth: 120,
  1952. },
  1953. {
  1954. userId: this.$store.state.user.name,
  1955. functionId: 101001014,
  1956. serialNumber: '101001014Table1UpdateBy',
  1957. tableId: "101001014Table1",
  1958. tableName: "项目信息表",
  1959. columnProp: 'updateBy',
  1960. headerAlign: "center",
  1961. align: "left",
  1962. columnLabel: '更新人',
  1963. columnHidden: false,
  1964. columnImage: false,
  1965. columnSortable: false,
  1966. sortLv: 0,
  1967. status: true,
  1968. fixed: '',
  1969. columnWidth: 120,
  1970. },
  1971. ],
  1972. columnFileContentArray: [
  1973. {
  1974. userId: this.$store.state.user.name,
  1975. functionId: 101001014,
  1976. serialNumber: '101001014Table1FileName',
  1977. tableId: "101001014Table1",
  1978. tableName: "打样文档表",
  1979. columnProp: 'fileName',
  1980. headerAlign: "center",
  1981. align: "left",
  1982. columnLabel: '文件名',
  1983. columnHidden: false,
  1984. columnImage: false,
  1985. columnSortable: false,
  1986. sortLv: 0,
  1987. status: true,
  1988. fixed: '',
  1989. columnWidth: 180,
  1990. },
  1991. //是否上传
  1992. {
  1993. userId: this.$store.state.user.name,
  1994. functionId: 101001014,
  1995. serialNumber: '101001014Table1UploadedFlag',
  1996. tableId: "101001014Table1",
  1997. tableName: "打样文档表",
  1998. columnProp: 'uploadedFlag',
  1999. headerAlign: "center",
  2000. align: "center",
  2001. columnLabel: '是否上传',
  2002. columnHidden: false,
  2003. columnImage: false,
  2004. columnSortable: false,
  2005. sortLv: 0,
  2006. status: true,
  2007. fixed: '',
  2008. columnWidth: 70,
  2009. },
  2010. {
  2011. userId: this.$store.state.user.name,
  2012. functionId: 101001014,
  2013. serialNumber: '101001014Table1Conclusion',
  2014. tableId: "101001014Table1",
  2015. tableName: "打样文档表",
  2016. columnProp: 'conclusion',
  2017. headerAlign: "center",
  2018. align: "center",
  2019. columnLabel: '结论',
  2020. columnHidden: false,
  2021. columnImage: false,
  2022. columnSortable: false,
  2023. sortLv: 0,
  2024. status: true,
  2025. fixed: '',
  2026. columnWidth: 70,
  2027. },
  2028. {
  2029. userId: this.$store.state.user.name,
  2030. functionId: 101001014,
  2031. serialNumber: '101001014Table1DocumentGroupDesc',
  2032. tableId: "101001014Table1",
  2033. tableName: "打样文档表",
  2034. columnProp: 'documentGroupDesc',
  2035. headerAlign: "center",
  2036. align: "center",
  2037. columnLabel: '文档种类',
  2038. columnHidden: false,
  2039. columnImage: false,
  2040. columnSortable: false,
  2041. sortLv: 0,
  2042. status: true,
  2043. fixed: '',
  2044. columnWidth: 70,
  2045. },
  2046. {
  2047. userId: this.$store.state.user.name,
  2048. functionId: 103001,
  2049. serialNumber: '103001Table1CreateDate',
  2050. tableId: '103001Table1',
  2051. tableName: '打样文档表',
  2052. columnProp: 'createDate',
  2053. headerAlign: 'center',
  2054. align: 'center',
  2055. columnLabel: '创建时间',
  2056. columnHidden: false,
  2057. columnImage: false,
  2058. columnSortable: false,
  2059. sortLv: 0,
  2060. status: true,
  2061. fixed: '',
  2062. columnWidth: 120
  2063. },
  2064. {
  2065. userId: this.$store.state.user.name,
  2066. functionId: 103001,
  2067. serialNumber: '103001Table1CreateBy',
  2068. tableId: '103001Table1',
  2069. tableName: '打样文档表',
  2070. columnProp: 'createdBy',
  2071. headerAlign: 'center',
  2072. align: 'center',
  2073. columnLabel: '创建人',
  2074. columnHidden: false,
  2075. columnImage: false,
  2076. columnSortable: false,
  2077. sortLv: 0,
  2078. status: true,
  2079. fixed: '',
  2080. columnWidth: 80
  2081. }
  2082. ],
  2083. columnProjectDocumentManifestDefinitionList:[
  2084. {
  2085. userId: this.$store.state.user.name,
  2086. functionId: 101001013,
  2087. serialNumber: '101001013Table1DocumentTypeId',
  2088. tableId: "101001013Table1",
  2089. tableName: "BU文档清单表",
  2090. columnProp: 'documentTypeId',
  2091. headerAlign: "center",
  2092. align: "center",
  2093. columnLabel: '文档类型ID',
  2094. columnHidden: false,
  2095. columnImage: false,
  2096. columnSortable: false,
  2097. sortLv: 0,
  2098. status: true,
  2099. fixed: '',
  2100. columnWidth: 120,
  2101. },
  2102. {
  2103. userId: this.$store.state.user.name,
  2104. functionId: 101001013,
  2105. serialNumber: '101001013Table1DocumentType',
  2106. tableId: "101001013Table1",
  2107. tableName: "BU文档清单表",
  2108. columnProp: 'documentType',
  2109. headerAlign: "center",
  2110. align: "left",
  2111. columnLabel: '文档类型',
  2112. columnHidden: false,
  2113. columnImage: false,
  2114. columnSortable: false,
  2115. sortLv: 0,
  2116. status: true,
  2117. fixed: '',
  2118. columnWidth: 120,
  2119. },
  2120. {
  2121. userId: this.$store.state.user.name,
  2122. functionId: 101001013,
  2123. serialNumber: '101001013Table1ResponsibleDepartment',
  2124. tableId: "101001013Table1",
  2125. tableName: "BU文档清单表",
  2126. columnProp: 'responsibleDepartment',
  2127. headerAlign: "center",
  2128. align: "left",
  2129. columnLabel: '责任部门',
  2130. columnHidden: false,
  2131. columnImage: false,
  2132. columnSortable: false,
  2133. sortLv: 0,
  2134. status: true,
  2135. fixed: '',
  2136. columnWidth: 120,
  2137. },
  2138. {
  2139. userId: this.$store.state.user.name,
  2140. functionId: 101001013,
  2141. serialNumber: '101001013Table1EstimatedCompletionDays',
  2142. tableId: "101001013Table1",
  2143. tableName: "BU文档清单表",
  2144. columnProp: 'estimatedCompletionDays',
  2145. headerAlign: "center",
  2146. align: "left",
  2147. columnLabel: '预计完成天数',
  2148. columnHidden: false,
  2149. columnImage: false,
  2150. columnSortable: false,
  2151. sortLv: 0,
  2152. status: true,
  2153. fixed: '',
  2154. columnWidth: 80,
  2155. },
  2156. ],
  2157. columnProjectAllDocumentList: [
  2158. {
  2159. userId: this.$store.state.user.name,
  2160. functionId: 101001013,
  2161. serialNumber: '101001013Table1ProofingId',
  2162. tableId: "101001013Table1",
  2163. tableName: "BU文档清单表",
  2164. columnProp: 'proofingNo',
  2165. headerAlign: "center",
  2166. align: "center",
  2167. columnLabel: '打样单号',
  2168. columnHidden: false,
  2169. columnImage: false,
  2170. columnSortable: false,
  2171. sortLv: 0,
  2172. status: true,
  2173. fixed: '',
  2174. columnWidth: 80,
  2175. },
  2176. {
  2177. userId: this.$store.state.user.name,
  2178. functionId: 101001013,
  2179. serialNumber: '101001013Table1ProjectPhase',
  2180. tableId: "101001013Table1",
  2181. tableName: "BU文档清单表",
  2182. columnProp: 'projectPhase',
  2183. headerAlign: "center",
  2184. align: "center",
  2185. columnLabel: '项目阶段',
  2186. columnHidden: false,
  2187. columnImage: false,
  2188. columnSortable: false,
  2189. sortLv: 0,
  2190. status: true,
  2191. fixed: '',
  2192. columnWidth: 120,
  2193. },
  2194. {
  2195. userId: this.$store.state.user.name,
  2196. functionId: 101001014,
  2197. serialNumber: '101001014Table1FileName',
  2198. tableId: "101001014Table1",
  2199. tableName: "打样文档表",
  2200. columnProp: 'fileName',
  2201. headerAlign: "center",
  2202. align: "left",
  2203. columnLabel: '文件名',
  2204. columnHidden: false,
  2205. columnImage: false,
  2206. columnSortable: false,
  2207. sortLv: 0,
  2208. status: true,
  2209. fixed: '',
  2210. columnWidth: 180,
  2211. },
  2212. //是否上传
  2213. {
  2214. userId: this.$store.state.user.name,
  2215. functionId: 101001014,
  2216. serialNumber: '101001014Table1UploadedFlag',
  2217. tableId: "101001014Table1",
  2218. tableName: "打样文档表",
  2219. columnProp: 'uploadedFlag',
  2220. headerAlign: "center",
  2221. align: "center",
  2222. columnLabel: '是否上传',
  2223. columnHidden: false,
  2224. columnImage: false,
  2225. columnSortable: false,
  2226. sortLv: 0,
  2227. status: true,
  2228. fixed: '',
  2229. columnWidth: 70,
  2230. },
  2231. {
  2232. userId: this.$store.state.user.name,
  2233. functionId: 101001014,
  2234. serialNumber: '101001014Table1Conclusion',
  2235. tableId: "101001014Table1",
  2236. tableName: "打样文档表",
  2237. columnProp: 'conclusion',
  2238. headerAlign: "center",
  2239. align: "center",
  2240. columnLabel: '结论',
  2241. columnHidden: false,
  2242. columnImage: false,
  2243. columnSortable: false,
  2244. sortLv: 0,
  2245. status: true,
  2246. fixed: '',
  2247. columnWidth: 70,
  2248. },
  2249. {
  2250. userId: this.$store.state.user.name,
  2251. functionId: 101001014,
  2252. serialNumber: '101001014Table1DocumentGroupDesc',
  2253. tableId: "101001014Table1",
  2254. tableName: "打样文档表",
  2255. columnProp: 'documentGroupDesc',
  2256. headerAlign: "center",
  2257. align: "center",
  2258. columnLabel: '文档种类',
  2259. columnHidden: false,
  2260. columnImage: false,
  2261. columnSortable: false,
  2262. sortLv: 0,
  2263. status: true,
  2264. fixed: '',
  2265. columnWidth: 70,
  2266. },
  2267. {
  2268. userId: this.$store.state.user.name,
  2269. functionId: 103001,
  2270. serialNumber: '103001Table1CreateDate',
  2271. tableId: '103001Table1',
  2272. tableName: '打样文档表',
  2273. columnProp: 'createDate',
  2274. headerAlign: 'center',
  2275. align: 'center',
  2276. columnLabel: '创建时间',
  2277. columnHidden: false,
  2278. columnImage: false,
  2279. columnSortable: false,
  2280. sortLv: 0,
  2281. status: true,
  2282. fixed: '',
  2283. columnWidth: 130
  2284. },
  2285. {
  2286. userId: this.$store.state.user.name,
  2287. functionId: 103001,
  2288. serialNumber: '103001Table1CreateBy',
  2289. tableId: '103001Table1',
  2290. tableName: '打样文档表',
  2291. columnProp: 'createdBy',
  2292. headerAlign: 'center',
  2293. align: 'center',
  2294. columnLabel: '创建人',
  2295. columnHidden: false,
  2296. columnImage: false,
  2297. columnSortable: false,
  2298. sortLv: 0,
  2299. status: true,
  2300. fixed: '',
  2301. columnWidth: 80
  2302. }
  2303. ],
  2304. levelList: [],
  2305. rules:{
  2306. projectId:[
  2307. {
  2308. required: true,
  2309. message: ' ',
  2310. trigger: ['blur','change']
  2311. }
  2312. ],
  2313. projectDesc:[
  2314. {
  2315. required: true,
  2316. message: ' ',
  2317. trigger: ['blur','change']
  2318. }
  2319. ],
  2320. customerNo:[
  2321. {
  2322. required: true,
  2323. message: ' ',
  2324. trigger: ['blur','change']
  2325. }
  2326. ],
  2327. customerDesc:[
  2328. {
  2329. required: true,
  2330. message: ' ',
  2331. trigger: ['blur','change']
  2332. }
  2333. ],
  2334. testPartNo:[
  2335. {
  2336. required: true,
  2337. message: ' ',
  2338. trigger: ['blur','change']
  2339. }
  2340. ],
  2341. partDesc:[
  2342. {
  2343. required: true,
  2344. message: ' ',
  2345. trigger: ['blur','change']
  2346. }
  2347. ],
  2348. projectManager:[
  2349. {
  2350. required: true,
  2351. message: ' ',
  2352. trigger: ['blur','change']
  2353. }
  2354. ],
  2355. engineer:[
  2356. {
  2357. required: true,
  2358. message: ' ',
  2359. trigger: ['blur','change']
  2360. }
  2361. ],
  2362. projectOwner:[
  2363. {
  2364. required: true,
  2365. message: ' ',
  2366. trigger: ['blur','change']
  2367. }
  2368. ],
  2369. cProjectRegion:[
  2370. {
  2371. required: true,
  2372. message: ' ',
  2373. trigger: ['blur','change']
  2374. }
  2375. ],
  2376. cQualityEngineer1:[
  2377. {
  2378. required: true,
  2379. message: ' ',
  2380. trigger: ['blur','change']
  2381. }
  2382. ],
  2383. cQualityEngineer2:[
  2384. {
  2385. required: true,
  2386. message: ' ',
  2387. trigger: ['blur','change']
  2388. }
  2389. ],
  2390. cQualityEngineer3:[
  2391. {
  2392. required: true,
  2393. message: ' ',
  2394. trigger: ['blur','change']
  2395. }
  2396. ],
  2397. cManufactureEngineer:[
  2398. {
  2399. required: true,
  2400. message: ' ',
  2401. trigger: ['blur','change']
  2402. }
  2403. ],
  2404. projectManagerName:[
  2405. {
  2406. required: true,
  2407. message: ' ',
  2408. trigger: ['blur','change']
  2409. }
  2410. ],
  2411. engineerName:[
  2412. {
  2413. required: true,
  2414. message: ' ',
  2415. trigger: ['blur','change']
  2416. }
  2417. ],
  2418. cQualityEngineer1Name:[
  2419. {
  2420. required: true,
  2421. message: ' ',
  2422. trigger: ['blur','change']
  2423. }
  2424. ],
  2425. cQualityEngineer2Name:[
  2426. {
  2427. required: true,
  2428. message: ' ',
  2429. trigger: ['blur','change']
  2430. }
  2431. ],
  2432. cQualityEngineer3Name:[
  2433. {
  2434. required: true,
  2435. message: ' ',
  2436. trigger: ['blur','change']
  2437. }
  2438. ],
  2439. cManufactureEngineerName:[
  2440. {
  2441. required: true,
  2442. message: ' ',
  2443. trigger: ['blur','change']
  2444. }
  2445. ],
  2446. projectCategoryType:[
  2447. {
  2448. required: true,
  2449. message: ' ',
  2450. trigger: ['blur','change']
  2451. }
  2452. ],
  2453. documentTypeIdType:[
  2454. {
  2455. required: true,
  2456. message: ' ',
  2457. trigger: ['blur','change']
  2458. }
  2459. ],
  2460. documentTypeType:[
  2461. {
  2462. required: true,
  2463. message: ' ',
  2464. trigger: ['blur','change']
  2465. }
  2466. ],
  2467. responsibleDepartmentType:[
  2468. {
  2469. required: true,
  2470. message: ' ',
  2471. trigger: ['blur','change']
  2472. }
  2473. ],
  2474. estimatedCompletionDaysType:[
  2475. {
  2476. required: true,
  2477. message: ' ',
  2478. trigger: ['blur','change']
  2479. }
  2480. ],
  2481. activeType:[
  2482. {
  2483. required: true,
  2484. message: ' ',
  2485. trigger: ['blur','change']
  2486. }
  2487. ],
  2488. bu:[
  2489. {
  2490. required: true,
  2491. message: ' ',
  2492. trigger: ['blur','change']
  2493. }
  2494. ],
  2495. finalPartNo:[
  2496. {
  2497. required: true,
  2498. message: ' ',
  2499. trigger: ['blur','change']
  2500. }
  2501. ],
  2502. finalPartDesc:[
  2503. {
  2504. required: true,
  2505. message: ' ',
  2506. trigger: ['blur','change']
  2507. }
  2508. ],
  2509. needDate:[
  2510. {
  2511. required: true,
  2512. message: ' ',
  2513. trigger: ['blur','change']
  2514. }
  2515. ],
  2516. projectCreationDate:[
  2517. {
  2518. required: true,
  2519. message: ' ',
  2520. trigger: ['blur','change']
  2521. }
  2522. ],
  2523. wantedConfirmDate:[
  2524. {
  2525. required: true,
  2526. message: ' ',
  2527. trigger: ['blur','change']
  2528. }
  2529. ],
  2530. },
  2531. projectCategoryList: [
  2532. {
  2533. projectCategory: 'Low Risk',
  2534. },
  2535. {
  2536. projectCategory: 'High Risk',
  2537. },
  2538. {
  2539. projectCategory: 'Sustaining',
  2540. }
  2541. ],
  2542. cProjectRegionList: [
  2543. {
  2544. cProjectRegion: 'Global',
  2545. },
  2546. {
  2547. cProjectRegion: 'APAC',
  2548. },
  2549. {
  2550. cProjectRegion: 'CHINA',
  2551. },
  2552. {
  2553. cProjectRegion: 'EU',
  2554. },
  2555. {
  2556. cProjectRegion: 'US',
  2557. },
  2558. {
  2559. cProjectRegion: 'Mexico',
  2560. },
  2561. {
  2562. cProjectRegion: 'Other',
  2563. },
  2564. ],
  2565. priorityList: [
  2566. {
  2567. priority: 'Low',
  2568. },
  2569. {
  2570. priority: 'Risk',
  2571. },
  2572. ],
  2573. statusList: [
  2574. {
  2575. status: '草稿',
  2576. },
  2577. {
  2578. status: '进行中',
  2579. },
  2580. {
  2581. status: '已结案',
  2582. }
  2583. ],
  2584. userBuList: [],
  2585. menuId: this.$route.meta.menuId,
  2586. }
  2587. },
  2588. mounted () {
  2589. this.$nextTick(() => {
  2590. this.height = window.innerHeight - 558
  2591. })
  2592. EventBus.$on('updateProjectInfo', () => {
  2593. this.getDataList();
  2594. });
  2595. },
  2596. created () {
  2597. // 按钮控制
  2598. this.getButtonAuthData()
  2599. // 获取用户的 site 和 bu
  2600. this.getSiteAndBuByUserName()
  2601. // 校验用户是否收藏
  2602. this.favoriteIsOk()
  2603. // 动态列
  2604. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2605. if (!this.authSearch) {
  2606. // 获取数据列表
  2607. this.getDataList()
  2608. }
  2609. },
  2610. activated() {
  2611. if (this.$route.query.projectId) {
  2612. this.searchData.projectId = this.$route.query.projectId;
  2613. this.getDataList();
  2614. }
  2615. },
  2616. methods: {
  2617. // 获取用户的bu
  2618. getSiteAndBuByUserName () {
  2619. let tempData = {
  2620. username: this.$store.state.user.name,
  2621. }
  2622. getSiteAndBuByUserName(tempData).then(({data}) => {
  2623. if (data.code === 0) {
  2624. this.userBuList = data.rows
  2625. }
  2626. })
  2627. },
  2628. // 获取基础数据列表S
  2629. getBaseList (val,type) {
  2630. this.tagNo = val
  2631. this.$nextTick(() => {
  2632. let strVal = ''
  2633. if (val === 509 ) {
  2634. strVal = this.modalData.customerNo
  2635. this.$refs.baseList.init(val, strVal)
  2636. }
  2637. if (val === 301 ) {
  2638. strVal = this.modalData.projectManager
  2639. this.$refs.baseList.init(val, strVal)
  2640. }
  2641. })
  2642. },
  2643. /* 列表方法的回调 */
  2644. getBaseData (val) {
  2645. if (this.tagNo === 509) {
  2646. this.modalData.customerNo = val.customer_no
  2647. this.modalData.customerDesc = val.customer_desc
  2648. }
  2649. },
  2650. // 校验用户是否收藏
  2651. favoriteIsOk () {
  2652. let userFavorite = {
  2653. userId: this.$store.state.user.id,
  2654. languageCode: this.$i18n.locale
  2655. }
  2656. userFavoriteList(userFavorite).then(({data}) => {
  2657. for (let i = 0; i < data.list.length; i++) {
  2658. if (this.$route.meta.menuId === data.list[i].menuId) {
  2659. this.favorite = true
  2660. }
  2661. }
  2662. })
  2663. },
  2664. // 收藏 OR 取消收藏
  2665. favoriteFunction () {
  2666. let userFavorite = {
  2667. userId: this.$store.state.user.id,
  2668. functionId: this.$route.meta.menuId,
  2669. }
  2670. if (this.favorite) {
  2671. removeUserFavorite(userFavorite).then(({data}) => {
  2672. this.$message.success(data.msg)
  2673. this.favorite = false
  2674. })
  2675. } else {
  2676. // 收藏
  2677. saveUserFavorite(userFavorite).then(({data}) => {
  2678. this.$message.success(data.msg)
  2679. this.favorite = true
  2680. })
  2681. }
  2682. },
  2683. //导出excel
  2684. async createExportData () {
  2685. this.searchData.limit = -1
  2686. this.searchData.page = 1
  2687. await eamProjectInfoSearch(this.searchData).then(({data}) => {
  2688. this.exportList = data.page.list
  2689. })
  2690. return this.exportList
  2691. },
  2692. startDownload () {},
  2693. finishDownload () {},
  2694. fields () {
  2695. let json = "{"
  2696. this.columnList.forEach((item, index) => {
  2697. if (index == this.columnList.length - 1) {
  2698. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2699. } else {
  2700. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2701. }
  2702. })
  2703. json += "}"
  2704. let s = eval("(" + json + ")")
  2705. return s
  2706. },
  2707. // 获取数据列表
  2708. getDataList () {
  2709. this.searchData.limit = this.pageSize
  2710. this.searchData.page = this.pageIndex
  2711. eamProjectInfoSearch(this.searchData).then(({data}) => {
  2712. if (data.code === 0) {
  2713. this.dataList = data.page.list
  2714. this.pageIndex = data.page.currPage
  2715. this.pageSize = data.page.pageSize
  2716. this.totalPage = data.page.totalCount
  2717. // 遍历dataList
  2718. this.dataList.forEach((item) => {
  2719. item.projectManagerName = item.projectManager.split('-')[1]
  2720. item.projectOwnerName = item.projectOwner.split('-')[1]
  2721. item.engineerName = item.engineer.split('-')[1]
  2722. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  2723. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  2724. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  2725. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  2726. })
  2727. // 判断是否全部存在数据
  2728. if (this.totalPage > 0) {
  2729. // 设置选中行
  2730. this.$refs.mainTable.setCurrentRow(this.dataList[0])
  2731. // 加载当前的页签的table
  2732. this.refreshCurrentTabTable()
  2733. this.proofingClickRow(this.dataList[0])
  2734. }
  2735. }
  2736. })
  2737. },
  2738. // ======== 列表操作方法 ========
  2739. /**
  2740. * 单机选中物料信息
  2741. * @param row
  2742. */
  2743. proofingClickRow(row){
  2744. row.proofingId = '*'
  2745. this.proofingCurrentRow=JSON.parse(JSON.stringify(row));
  2746. },
  2747. /**
  2748. * 当前值发生变化的时候修改
  2749. * @param row
  2750. * @param oldRow
  2751. */
  2752. changeCurrentRow (row, oldRow) {
  2753. row.proofingId = '*'
  2754. // 判断是否是获取焦点的事件
  2755. if (row) {
  2756. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  2757. //刷新当前页表
  2758. this.refreshCurrentTabTable()
  2759. }
  2760. },
  2761. // 每页数
  2762. sizeChangeHandle (val) {
  2763. this.pageSize = val
  2764. this.pageIndex = 1
  2765. this.getDataList()
  2766. },
  2767. // 当前页
  2768. currentChangeHandle (val) {
  2769. this.pageIndex = val
  2770. this.getDataList()
  2771. },
  2772. // 多选
  2773. selectionChangeHandle (val) {
  2774. this.dataListSelections = val
  2775. },
  2776. addModal () {
  2777. //控制台打印打印this.generateNextPartNo()
  2778. this.modalData = {
  2779. flag: '1',
  2780. bu: this.userBuList[0].buNo,
  2781. site: this.$store.state.user.site,
  2782. customerNo:'',
  2783. customerDesc:'',
  2784. projectCategory:'',
  2785. testPartNo:'',
  2786. partDesc:'',
  2787. projectId: '',
  2788. projectDesc:'',
  2789. projectCloseDate:'',
  2790. needDate:'',
  2791. cProjectRegion: '',
  2792. projectManager:'',
  2793. ProjectOwner:'',
  2794. ProjectOwnerName:'',
  2795. projectManagerName:'',
  2796. engineer: '',
  2797. engineerName: '',
  2798. cQualityEngineer1:'',
  2799. cQualityEngineer1Name:'',
  2800. cQualityEngineer2:'',
  2801. cQualityEngineer2Name:'',
  2802. cQualityEngineer3:'',
  2803. cQualityEngineer3Name:'',
  2804. cManufactureEngineer: '',
  2805. cManufactureEngineerName: '',
  2806. projectCreationDate:new Date(),
  2807. createDate: '',
  2808. // active: 'Y',
  2809. createBy: this.$store.state.user.name,
  2810. updateBy: this.$store.state.user.name,
  2811. }
  2812. this.generateNextPartNo().then(testPartNo => {
  2813. this.modalData.testPartNo = testPartNo; // 在异步操作完成后再赋值
  2814. })
  2815. this.modalDisableFlag = false
  2816. this.modalFlag = true
  2817. },
  2818. generateNextPartNo() {
  2819. return new Promise((resolve, reject) => {
  2820. getTestPartNo().then(({ data }) => {
  2821. const stringData = String(data); // 显式转换为字符串
  2822. if (stringData === 'null' || stringData === 'undefined' || stringData === '' || stringData === '0') {
  2823. resolve('P00001');
  2824. } else {
  2825. const lastPartNo = parseInt(stringData.substring(1));
  2826. const nextPartNo = lastPartNo + 1;
  2827. let testPartNo;
  2828. if (nextPartNo < 10) {
  2829. testPartNo = 'P0000' + nextPartNo;
  2830. } else if (nextPartNo < 100) {
  2831. testPartNo = 'P000' + nextPartNo;
  2832. } else if (nextPartNo < 1000) {
  2833. testPartNo = 'P00' + nextPartNo;
  2834. } else if (nextPartNo < 10000) {
  2835. testPartNo = 'P0' + nextPartNo;
  2836. } else {
  2837. testPartNo = 'P' + nextPartNo;
  2838. }
  2839. resolve(testPartNo);
  2840. }
  2841. }).catch(error => {
  2842. reject('Failed to fetch testPartNo: ' + error);
  2843. });
  2844. });
  2845. },
  2846. changeFormalPartNo (row) {
  2847. this.modalData = {
  2848. flag: '2',
  2849. site: row.site,
  2850. bu: row.site + '_' + row.buNo,
  2851. customerNo: row.customerNo,
  2852. customerDesc: row.customerDesc,
  2853. projectCategory: row.projectCategory,
  2854. testPartNo: row.testPartNo,
  2855. partDesc: row.partDesc,
  2856. projectId: row.projectId,
  2857. projectDesc: row.projectDesc,
  2858. projectCloseDate: row.projectCloseDate,
  2859. needDate: row.needDate,
  2860. cProjectRegion: row.cProjectRegion,
  2861. projectManager: row.projectManager,
  2862. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  2863. projectOwner: row.projectOwner,
  2864. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  2865. engineer: row.engineer,
  2866. engineerName: row.engineer.split('-')[1], // 截取用户名
  2867. cQualityEngineer1: row.cQualityEngineer1,
  2868. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  2869. cQualityEngineer2: row.cQualityEngineer2,
  2870. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  2871. projectCreationDate: row.projectCreationDate,
  2872. cQualityEngineer3: row.cQualityEngineer3,
  2873. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  2874. cManufactureEngineer: row.cManufactureEngineer,
  2875. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  2876. finalPartNo: row.finalPartNo,
  2877. finalPartDesc: row.finalPartDesc,
  2878. // active: row.active,
  2879. createBy: this.$store.state.user.name,
  2880. updateBy: this.$store.state.user.name,
  2881. }
  2882. this.formalPartNoFlag = true
  2883. },
  2884. addProofRecord (row) {
  2885. let inData1={
  2886. site: row.site,
  2887. buNo: row.buNo,
  2888. projectId: row.projectId,
  2889. projectDesc: row.projectDesc,
  2890. customerNo: row.customerNo,
  2891. customerDesc: row.customerDesc,
  2892. bu: row.site + '_' + row.buNo,
  2893. testPartNo: row.testPartNo,
  2894. partDesc: row.partDesc,
  2895. projectCategory: row.projectCategory,
  2896. cProjectTypeDb: row.projectCategory,
  2897. proofingNo: '',
  2898. rrequiredDeliveryDate: '',
  2899. createDate: new Date(),
  2900. createBy: this.$store.state.user.name,
  2901. }
  2902. this.$refs.proofRecord.init1(inData1)
  2903. },
  2904. updateModal (row) {
  2905. this.modalData = {
  2906. flag: '2',
  2907. id: row.id,
  2908. site: row.site,
  2909. bu: row.site + '_' + row.buNo,
  2910. customerNo: row.customerNo,
  2911. customerDesc: row.customerDesc,
  2912. projectCategory: row.projectCategory,
  2913. testPartNo: row.testPartNo,
  2914. partDesc: row.partDesc,
  2915. projectId: row.projectId,
  2916. projectDesc: row.projectDesc,
  2917. priority: row.priority,
  2918. projectCloseDate: row.projectCloseDate,
  2919. needDate: row.needDate,
  2920. cProjectRegion: row.cProjectRegion,
  2921. projectManager: row.projectManager,
  2922. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  2923. projectOwner: row.projectOwner,
  2924. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  2925. engineer: row.engineer,
  2926. engineerName: row.engineer.split('-')[1], // 截取用户名
  2927. cQualityEngineer1: row.cQualityEngineer1,
  2928. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  2929. cQualityEngineer2: row.cQualityEngineer2,
  2930. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  2931. cQualityEngineer3: row.cQualityEngineer3,
  2932. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  2933. cManufactureEngineer: row.cManufactureEngineer,
  2934. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  2935. projectCreationDate: row.projectCreationDate,
  2936. status: row.status,
  2937. // active: row.active,
  2938. createBy: this.$store.state.user.name,
  2939. updateBy: this.$store.state.user.name,
  2940. }
  2941. this.modalDisableFlag = true
  2942. this.modalFlag = true
  2943. },
  2944. updateModalStatus (row) {
  2945. this.modalData = {
  2946. id: row.id,
  2947. site: row.site,
  2948. bu: row.site + '_' + row.buNo,
  2949. customerNo: row.customerNo,
  2950. customerDesc: row.customerDesc,
  2951. projectCategory: row.projectCategory,
  2952. testPartNo: row.testPartNo,
  2953. partDesc: row.partDesc,
  2954. projectId: row.projectId,
  2955. projectDesc: row.projectDesc,
  2956. priority: row.priority,
  2957. projectCloseDate: row.projectCloseDate,
  2958. needDate: row.needDate,
  2959. cProjectRegion: row.cProjectRegion,
  2960. projectManager: row.projectManager,
  2961. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  2962. projectOwner: row.projectOwner,
  2963. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  2964. engineer: row.engineer,
  2965. engineerName: row.engineer.split('-')[1], // 截取用户名
  2966. cQualityEngineer1: row.cQualityEngineer1,
  2967. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  2968. cQualityEngineer2: row.cQualityEngineer2,
  2969. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  2970. cQualityEngineer3: row.cQualityEngineer3,
  2971. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  2972. cManufactureEngineer: row.cManufactureEngineer,
  2973. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  2974. projectCreationDate: row.projectCreationDate,
  2975. status: row.status,
  2976. // active: row.active,
  2977. createBy: this.$store.state.user.name,
  2978. updateBy: this.$store.state.user.name,
  2979. }
  2980. if (row.projectOwner.split('-')[0] === this.$store.state.user.name) {
  2981. if (row.status === '草稿') {
  2982. this.modalData.status = '进行中'
  2983. this.$confirm(`是否确认下达该项目?`, '提示', {
  2984. confirmButtonText: '确定',
  2985. cancelButtonText: '取消',
  2986. type: 'warning'
  2987. }).then(() => {
  2988. eamProjectInfoEdit(this.modalData).then(({data}) => {
  2989. if (data && data.code === '0') {
  2990. this.getDataList()
  2991. this.$message({
  2992. message: '操作成功',
  2993. type: 'success',
  2994. duration: 1500,
  2995. onClose: () => {
  2996. }
  2997. })
  2998. this.sendMailHandle(row)
  2999. } else {
  3000. this.$alert(data.msg, '错误', {
  3001. confirmButtonText: '确定'
  3002. })
  3003. }
  3004. })
  3005. }).catch(() => {
  3006. })
  3007. }
  3008. } else {
  3009. this.$message({
  3010. message: '该项目只允许PjM人员进行下达!',
  3011. type: 'warning',
  3012. showClose: true, // 显示关闭按钮
  3013. duration: 2000 // 显示时间,单位是毫秒,这里设置为5秒钟
  3014. });
  3015. }
  3016. if (row.status === '进行中') {
  3017. this.modalData.status = '已结案'
  3018. this.modalData.projectCloseDate = new Date()
  3019. this.$confirm(`是否确认结案?`, '提示', {
  3020. confirmButtonText: '确定',
  3021. cancelButtonText: '取消',
  3022. type: 'warning'
  3023. }).then(() => {
  3024. eamProjectInfoEdit(this.modalData).then(({data}) => {
  3025. if (data && data.code === '0') {
  3026. this.getDataList()
  3027. this.$message({
  3028. message: '操作成功',
  3029. type: 'success',
  3030. duration: 1500,
  3031. onClose: () => {}
  3032. })
  3033. } else {
  3034. this.$alert(data.msg, '错误', {
  3035. confirmButtonText: '确定'
  3036. })
  3037. }
  3038. })
  3039. }).catch(() => {
  3040. })
  3041. }
  3042. },
  3043. // 删除
  3044. eamProjectInfoDelete (row) {
  3045. this.$confirm(`是否删除这个项目信息?`, '提示', {
  3046. confirmButtonText: '确定',
  3047. cancelButtonText: '取消',
  3048. type: 'warning'
  3049. }).then(() => {
  3050. eamProjectInfoDelete(row).then(({data}) => {
  3051. if (data && data.code === '0') {
  3052. this.getDataList()
  3053. this.$message({
  3054. message: '操作成功',
  3055. type: 'success',
  3056. duration: 1500,
  3057. onClose: () => {}
  3058. })
  3059. } else {
  3060. this.$alert(data.msg, '错误', {
  3061. confirmButtonText: '确定'
  3062. })
  3063. }
  3064. })
  3065. }).catch(() => {
  3066. })
  3067. },
  3068. getRowProjectInfo(){
  3069. let inData={
  3070. site: this.proofingCurrentRow.site,
  3071. projectId: this.proofingCurrentRow.projectId,
  3072. testPartNo: this.proofingCurrentRow.testPartNo,
  3073. // username:this.$store.state.user.name,
  3074. page: 1,
  3075. limit: 1000
  3076. }
  3077. this.$refs.proofRecord.init(inData)
  3078. },
  3079. saveData () {
  3080. this.modalData.oriProjectId = this.modalData.projectId
  3081. this.modalData.finalCustomerId = this.modalData.customerNo
  3082. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  3083. this.$message.warning('请输入项目编码!')
  3084. return
  3085. }
  3086. if (this.modalData.projectDesc === '' || this.modalData.projectDesc == null) {
  3087. this.$message.warning('请输入项目名称!')
  3088. return
  3089. }
  3090. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  3091. this.$message.warning('请输入客户编码!')
  3092. return
  3093. }
  3094. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  3095. this.$message.warning('请输入客户名称!')
  3096. return
  3097. }
  3098. //请选择立项日期
  3099. if (this.searchData.projectCreationDate === '' || this.searchData.projectCreationDate == null) {
  3100. this.$message.warning('请选择立项日期!')
  3101. return
  3102. }
  3103. if (this.modalData.needDate === '' || this.modalData.needDate == null) {
  3104. this.$message.warning('请选择预计完成日期!')
  3105. return
  3106. }
  3107. if (this.modalData.projectCategory === '' || this.modalData.projectCategory == null) {
  3108. this.$message.warning('请选择项目分类!')
  3109. return
  3110. }
  3111. if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
  3112. this.$message.warning('请输入项目料号!')
  3113. return
  3114. }
  3115. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  3116. this.$message.warning('请输入料号描述!')
  3117. return
  3118. }
  3119. if (this.modalData.bu === '' || this.modalData.bu == null) {
  3120. this.$message.warning('请选择BU!')
  3121. return
  3122. }
  3123. if (this.modalData.projectManager === '' || this.modalData.projectManager == null) {
  3124. this.$message.warning('请输入PM/Sales!')
  3125. return
  3126. }if (this.modalData.projectOwner === '' || this.modalData.projectOwner == null) {
  3127. this.$message.warning('请输入PjM!')
  3128. return
  3129. }
  3130. if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  3131. this.$message.warning('请输入Engineer!')
  3132. return
  3133. }
  3134. if (this.modalData.cQualityEngineer1 === '' || this.modalData.cQualityEngineer1 == null) {
  3135. this.$message.warning('请输入IPQC-Lam/Pri/Etch/Slit!')
  3136. return
  3137. }
  3138. if (this.modalData.cQualityEngineer2 === '' || this.modalData.cQualityEngineer2 == null) {
  3139. this.$message.warning('请输入IPQC-Converting!')
  3140. return
  3141. }
  3142. if (this.modalData.cQualityEngineer3 === '' || this.modalData.cQualityEngineer3 == null) {
  3143. this.$message.warning('请输入FQC!')
  3144. return
  3145. }
  3146. if (this.modalData.cManufactureEngineer === '' || this.modalData.cManufactureEngineer == null) {
  3147. this.$message.warning('请输入MFG!')
  3148. return
  3149. }
  3150. // if (this.modalData.active === '' || this.modalData.active == null) {
  3151. // this.$message.warning('选择是否在用!')
  3152. // return
  3153. // }
  3154. if (this.modalData.flag === '1') {
  3155. if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
  3156. this.$message.warning('预计完成日期不能小于当前日期!')
  3157. return
  3158. }
  3159. this.modalData.status = '草稿'
  3160. eamProjectInfoSave(this.modalData).then(({data}) => {
  3161. if (data && data.code === '0') {
  3162. this.getDataList()
  3163. this.modalFlag=false
  3164. this.$message({
  3165. message: '操作成功',
  3166. type: 'success',
  3167. duration: 1500,
  3168. onClose: () => {},
  3169. })
  3170. let inData={
  3171. site: this.modalData.site,
  3172. buNo: this.modalData.bu.split('_')[1],
  3173. projectId: this.modalData.projectId,
  3174. projectDesc: this.modalData.projectDesc,
  3175. customerNo: this.modalData.customerNo,
  3176. customerDesc: this.modalData.customerDesc,
  3177. bu: this.modalData.bu,
  3178. testPartNo: this.modalData.testPartNo,
  3179. partDesc: this.modalData.partDesc,
  3180. projectCategory: this.modalData.projectCategory,
  3181. cProjectTypeDb: this.modalData.projectCategory,
  3182. proofingNo: '',
  3183. rrequiredDeliveryDate: '',
  3184. createBy: this.$store.state.user.name,
  3185. }
  3186. this.newProjectDocument(inData)
  3187. } else {
  3188. this.$alert(data.msg, '错误', {
  3189. confirmButtonText: '确定'
  3190. })
  3191. }
  3192. })
  3193. } else {
  3194. if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
  3195. this.$message.warning('预计完成日期不能小于当前日期!')
  3196. return
  3197. }
  3198. eamProjectInfoEdit(this.modalData).then(({data}) => {
  3199. if (data && data.code === '0') {
  3200. this.getDataList()
  3201. this.modalFlag=false
  3202. this.$message({
  3203. message: '操作成功',
  3204. type: 'success',
  3205. duration: 1500,
  3206. onClose: () => {}
  3207. })
  3208. this.editProjectDocument(this.modalData)
  3209. } else {
  3210. this.$alert(data.msg, '错误', {
  3211. confirmButtonText: '确定'
  3212. })
  3213. }
  3214. })
  3215. }
  3216. },
  3217. editProjectDocument(modalData) {
  3218. modalData.buNo = modalData.bu.split('_')[1]
  3219. modalData.proofingNo = '*'
  3220. editProjectDocument(modalData).then(({data}) => {
  3221. //区分请求成功和失败的状况
  3222. if (data && data.code === 0) {
  3223. this.$message({
  3224. message: '编辑成功',
  3225. type: 'success'
  3226. })
  3227. //刷新表格
  3228. this.refreshCurrentTabTable()
  3229. }
  3230. })
  3231. },
  3232. newProjectDocument(inData) {
  3233. inData.buNo = inData.bu.split('_')[1]
  3234. inData.proofingNo = '*'
  3235. projectDocumentSave(inData).then(({data}) => {
  3236. //区分请求成功和失败的状况
  3237. if (data && data.code === 0) {
  3238. this.$message({
  3239. message: '新增成功',
  3240. type: 'success'
  3241. })
  3242. this.documentListVisible = false
  3243. //刷新表格
  3244. this.refreshCurrentTabTable()
  3245. }
  3246. })
  3247. },
  3248. searchBusinessInfoList1 () {
  3249. searchBusinessInfo1(this.searchBusinessData1).then(({data}) => {
  3250. if (data && data.code === 0){
  3251. this.businessDataList1 = data.rows;
  3252. }
  3253. })
  3254. },
  3255. searchBusinessInfoList () {
  3256. searchBusinessInfo(this.searchBusinessData).then(({data}) => {
  3257. if (data && data.code === 0){
  3258. this.businessDataList = data.rows;
  3259. }
  3260. })
  3261. },
  3262. searchBusinessInfoList2 () {
  3263. searchBusinessInfo2(this.searchBusinessData2).then(({data}) => {
  3264. if (data && data.code === 0){
  3265. this.businessDataList2 = data.rows;
  3266. }
  3267. })
  3268. },
  3269. searchBusinessInfoList3 () {
  3270. searchBusinessInfo3(this.searchBusinessData3).then(({data}) => {
  3271. if (data && data.code === 0){
  3272. this.businessDataList3 = data.rows;
  3273. }
  3274. })
  3275. },
  3276. searchBusinessInfoList4 () {
  3277. searchBusinessInfo4(this.searchBusinessData4).then(({data}) => {
  3278. if (data && data.code === 0){
  3279. this.businessDataList4 = data.rows;
  3280. }
  3281. })
  3282. },
  3283. searchBusinessInfoList5 () {
  3284. searchBusinessInfo5(this.searchBusinessData5).then(({data}) => {
  3285. if (data && data.code === 0){
  3286. this.businessDataList5 = data.rows;
  3287. }
  3288. })
  3289. },
  3290. searchBusinessInfoList6 () {
  3291. searchBusinessInfo6(this.searchBusinessData6).then(({data}) => {
  3292. if (data && data.code === 0){
  3293. this.businessDataList6 = data.rows;
  3294. }
  3295. })
  3296. },
  3297. saveFormalPartNo (){
  3298. saveFormalPartNo(this.modalData).then(({data}) => {
  3299. if (data && data.code === '0') {
  3300. this.getDataList()
  3301. this.formalPartNoFlag = false
  3302. this.$message({
  3303. message: '操作成功',
  3304. type: 'success',
  3305. duration: 1500,
  3306. onClose: () => {
  3307. }
  3308. })
  3309. } else {
  3310. this.$alert(data.msg, '错误', {
  3311. confirmButtonText: '确定'
  3312. })
  3313. }
  3314. })
  3315. },
  3316. // 打开项目经理
  3317. openProjectManagerInfoDialog () {
  3318. //请求
  3319. this.searchBusinessInfoList();
  3320. },
  3321. // 打开项目负责人
  3322. openProjectOwnerInfoDialog () {
  3323. //请求
  3324. this.searchBusinessInfoList1();
  3325. },
  3326. // 打开工程师
  3327. openEngineerInfoDialog () {
  3328. //请求
  3329. this.searchBusinessInfoList2();
  3330. },
  3331. // 打开IPQC
  3332. openIPQCInfoDialog () {
  3333. //请求
  3334. this.searchBusinessInfoList3();
  3335. },
  3336. // 打开FQC
  3337. openFQCInfoDialog () {
  3338. //请求
  3339. this.searchBusinessInfoList4();
  3340. },
  3341. // 打开MFG
  3342. openMFGInfoDialog () {
  3343. //请求
  3344. this.searchBusinessInfoList5();
  3345. },
  3346. openEngineer6InfoDialog () {
  3347. //请求
  3348. this.searchBusinessInfoList6();
  3349. },
  3350. // 关闭
  3351. closeProjectManagerInfoDialog () {
  3352. this.businessDataList = []
  3353. this.projectManagerFlag = false
  3354. },
  3355. closeProjectOwnerInfoDialog () {
  3356. this.businessDataList1 = []
  3357. this.projectOwnerFlag = false
  3358. },
  3359. //关闭
  3360. closeEngineerInfoDialog () {
  3361. this.businessDataList2 = []
  3362. this.engineerFlag = false
  3363. },
  3364. closeEngineer6InfoDialog () {
  3365. this.businessDataList6 = []
  3366. this.engineer6Flag = false
  3367. },
  3368. //关闭
  3369. closeIPQCInfoDialog () {
  3370. this.businessDataList3 = []
  3371. this.IPQCFlag = false
  3372. },
  3373. //关闭
  3374. closeFQCInfoDialog () {
  3375. this.businessDataList4 = []
  3376. this.FQCFlag = false
  3377. },
  3378. //关闭
  3379. closeMFGInfoDialog () {
  3380. this.businessDataList5 = []
  3381. this.MFGlag = false
  3382. },
  3383. projectManagerRowDblclick (row) {
  3384. this.modalData.projectManager = row.username + '-' + row.userDisplay
  3385. this.modalData.projectManagerName = row.projectManager.split('-')[1] // 截取用户名
  3386. this.projectManagerFlag = false
  3387. },
  3388. projectOwnerRowDblclick (row) {
  3389. this.modalData.projectOwner = row.username + '-' + row.userDisplay
  3390. this.modalData.projectOwnerName = row.projectOwner.split('-')[1] // 截取用户名
  3391. this.projectOwnerFlag = false
  3392. },
  3393. engineerRowDblclick (row) {
  3394. this.modalData.cQualityEngineer1 = row.username + '-' + row.userDisplay
  3395. this.modalData.cQualityEngineer1Name = row.cQualityEngineer1.split('-')[1] // 截取用户名
  3396. this.engineerFlag = false
  3397. },
  3398. engineer6RowDblclick (row) {
  3399. this.modalData.engineer = row.username + '-' + row.userDisplay
  3400. this.modalData.engineerName = row.engineer.split('-')[1] // 截取用户名
  3401. this.engineer6Flag = false
  3402. },
  3403. IPQCRowDblclick (row) {
  3404. this.modalData.cQualityEngineer2 = row.username + '-' + row.userDisplay
  3405. this.modalData.cQualityEngineer2Name = row.userDisplay
  3406. this.IPQCFlag = false
  3407. },
  3408. FQCRowDblclick (row) {
  3409. this.modalData.cQualityEngineer3 = row.username + '-' + row.userDisplay
  3410. this.modalData.cQualityEngineer3Name = row.userDisplay
  3411. this.FQCFlag = false
  3412. },
  3413. MFGRowDblclick (row) {
  3414. this.modalData.cManufactureEngineer = row.username + '-' + row.userDisplay
  3415. this.modalData.cManufactureEngineerName = row.userDisplay
  3416. this.MFGlag = false
  3417. },
  3418. selectionBusiness (val) {
  3419. this.businessSelections = val
  3420. this.$refs.selectDiv.init(this.businessSelections)
  3421. },
  3422. saveSelectionInfo () {
  3423. let str = ''
  3424. let strName = ''
  3425. this.businessSelections.forEach((item, index) => {
  3426. if (index === this.businessSelections.length - 1) {
  3427. str += item.username + '-' + item.userDisplay
  3428. strName += item.userDisplay
  3429. } else {
  3430. str += item.username + '-' + item.userDisplay + ','
  3431. strName += item.userDisplay + ','
  3432. }
  3433. })
  3434. this.modalData.projectManager = str
  3435. this.modalData.projectManagerName = strName
  3436. this.projectManagerFlag = false
  3437. },
  3438. saveSelectionInfo1 () {
  3439. let str = ''
  3440. let strName = ''
  3441. this.businessSelections.forEach((item, index) => {
  3442. if (index === this.businessSelections.length - 1) {
  3443. str += item.username + '-' + item.userDisplay
  3444. strName += item.userDisplay
  3445. } else {
  3446. str += item.username + '-' + item.userDisplay + ','
  3447. strName += item.userDisplay + ','
  3448. }
  3449. })
  3450. this.modalData.projectOwner = str
  3451. this.modalData.projectOwnerName = strName
  3452. this.projectOwnerFlag = false
  3453. },
  3454. saveSelectionInfo2 () {
  3455. let str = ''
  3456. let strName = ''
  3457. this.businessSelections.forEach((item, index) => {
  3458. if (index === this.businessSelections.length - 1) {
  3459. str += item.username + '-' + item.userDisplay
  3460. strName += item.userDisplay
  3461. } else {
  3462. str += item.username + '-' + item.userDisplay + ','
  3463. strName += item.userDisplay + ','
  3464. }
  3465. })
  3466. this.modalData.cQualityEngineer1 = str
  3467. this.modalData.cQualityEngineer1Name = strName
  3468. this.engineerFlag = false
  3469. },
  3470. saveSelectionInfo3 () {
  3471. let str = ''
  3472. let strName = ''
  3473. this.businessSelections.forEach((item, index) => {
  3474. if (index === this.businessSelections.length - 1) {
  3475. str += item.username + '-' + item.userDisplay
  3476. strName += item.userDisplay
  3477. } else {
  3478. str += item.username + '-' + item.userDisplay + ','
  3479. strName += item.userDisplay + ','
  3480. }
  3481. })
  3482. this.modalData.cQualityEngineer2 = str
  3483. this.modalData.cQualityEngineer2Name = strName
  3484. this.IPQCFlag = false
  3485. },
  3486. saveSelectionInfo4 () {
  3487. let str = ''
  3488. let strName = ''
  3489. this.businessSelections.forEach((item, index) => {
  3490. if (index === this.businessSelections.length - 1) {
  3491. str += item.username + '-' + item.userDisplay
  3492. strName += item.userDisplay
  3493. } else {
  3494. str += item.username + '-' + item.userDisplay + ','
  3495. strName += item.userDisplay + ','
  3496. }
  3497. })
  3498. this.modalData.cQualityEngineer3 = str
  3499. this.modalData.cQualityEngineer3Name = strName
  3500. this.FQCFlag = false
  3501. },
  3502. saveSelectionInfo5 () {
  3503. let str = ''
  3504. let strName = ''
  3505. this.businessSelections.forEach((item, index) => {
  3506. if (index === this.businessSelections.length - 1) {
  3507. str += item.username + '-' + item.userDisplay
  3508. strName += item.userDisplay
  3509. } else {
  3510. str += item.username + '-' + item.userDisplay + ','
  3511. strName += item.userDisplay + ','
  3512. }
  3513. })
  3514. this.modalData.cManufactureEngineer = str
  3515. this.modalData.cManufactureEngineerName = strName
  3516. this.MFGlag = false
  3517. },
  3518. saveSelectionInfo6 () {
  3519. let str = ''
  3520. let strName = ''
  3521. this.businessSelections.forEach((item, index) => {
  3522. if (index === this.businessSelections.length - 1) {
  3523. str += item.username + '-' + item.userDisplay
  3524. strName += item.userDisplay
  3525. } else {
  3526. str += item.username + '-' + item.userDisplay + ','
  3527. strName += item.userDisplay + ','
  3528. }
  3529. }
  3530. )
  3531. this.modalData.engineer = str
  3532. this.modalData.engineerName = strName
  3533. this.engineer6Flag = false
  3534. },
  3535. closeClear () {
  3536. this.modalData.bu = ''
  3537. this.modalData.projectId = ''
  3538. this.modalData.projectDesc = ''
  3539. this.modalData.projectCloseDate = ''
  3540. this.modalData.needDate = ''
  3541. this.modalData.customerNo = ''
  3542. this.modalData.customerDesc = ''
  3543. this.modalData.projectCategory = ''
  3544. this.modalData.testPartNo = ''
  3545. this.modalData.partDesc = ''
  3546. this.modalData.projectManager = ''
  3547. this.modalData.projectManagerName = ''
  3548. this.modalData.engineer = ''
  3549. this.modalData.engineerName = ''
  3550. this.modalData.cQualityEngineer1 = ''
  3551. this.modalData.cQualityEngineer1Name = ''
  3552. this.modalData.cQualityEngineer2 = ''
  3553. this.modalData.cQualityEngineer2Name = ''
  3554. this.modalData.projectCreationDate = new Date()
  3555. },
  3556. projectOtherDocumentClickRow (row) {
  3557. row.id = row.documentDefinitionListId
  3558. this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  3559. },
  3560. changeCurrentRow1 (row, oldRow) {
  3561. row.id = row.documentDefinitionListId
  3562. // 判断是否是获取焦点的事件
  3563. if (row) {
  3564. this.otherDocumentCurrentRow.bu = this.otherDocumentCurrentRow.site + "-" + this.otherDocumentCurrentRow.buNo
  3565. this.otherDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  3566. //刷新当前页表
  3567. this.refreshCurrentTabTable()
  3568. }
  3569. },
  3570. projectAllDocumentClickRow (row) {
  3571. this.projectAllDocumentCurrentRow = JSON.parse(JSON.stringify(row))
  3572. },
  3573. /**
  3574. * 上传文件
  3575. */
  3576. uploadFile () {
  3577. this.isEditable = false;
  3578. this.fileList = []
  3579. this.otherDocumentCurrentRow.proofingId= '*'
  3580. this.uploadDialog = true
  3581. //打开组件 去做新增业务
  3582. // this.$nextTick(() => {
  3583. // this.$refs.partUploadFile.init(currentData);
  3584. // })
  3585. },
  3586. uploadOtherDocument () {
  3587. this.isEditable = true;
  3588. this.fileList = []
  3589. this.otherDocumentCurrentRow = {
  3590. proofingId: '*',
  3591. documentTypeId: '', // 清空文档类型ID
  3592. id: '-1'
  3593. };
  3594. this.uploadDialog = true
  3595. //打开组件 去做新增业务
  3596. // this.$nextTick(() => {
  3597. // this.$refs.partUploadFile.init(currentData);
  3598. // })
  3599. },
  3600. massProductionDocumentDelete(row) {
  3601. let tempData = {
  3602. site: row.site,
  3603. username: this.$store.state.user.name,
  3604. buNo: row.buNo,
  3605. proofingNo: row.proofingNo,
  3606. projectId: row.projectId,
  3607. projectDesc: row.projectDesc,
  3608. customerId: row.customerNo,
  3609. customerDesc: row.customerDesc,
  3610. testPartNo: row.testPartNo,
  3611. partDesc: row.partDesc,
  3612. id: row.id,
  3613. fileName: row.fileName,
  3614. uploadedFlag: row.uploadedFlag,
  3615. cAdditionalInfo: row.cAdditionalInfo,
  3616. createBy: row.createdBy,
  3617. documentDefinitionListId: row.documentDefinitionListId,
  3618. documentType: row.documentType,
  3619. documentId: row.documentId,
  3620. }
  3621. if (tempData.createBy !== tempData.username) {
  3622. this.$message({
  3623. message: '只能删除自己创建的打样记录',
  3624. type: 'warning'
  3625. })
  3626. }else {
  3627. this.$confirm('是否删除该转量产阶段文档的文件?', '提示', {
  3628. confirmButtonText: '确定',
  3629. cancelButtonText: '取消',
  3630. type: 'warning'
  3631. }).then(() => {
  3632. deleteProofDocument(tempData).then(({data}) => {
  3633. if (data && data.code === 0) {
  3634. this.$message({
  3635. message: '删除成功',
  3636. type: 'success'
  3637. })
  3638. //刷新表格
  3639. this.getProjectOtherDocument()
  3640. this.getProofDocument()
  3641. }
  3642. // 否则提示后端返回的错误信息
  3643. else {
  3644. this.$message.warning(data.msg)
  3645. }
  3646. })
  3647. }).catch(() => {
  3648. this.$message({
  3649. type: 'info',
  3650. message: '已取消删除'
  3651. });
  3652. });
  3653. }
  3654. },
  3655. getProjectOtherDocument () {
  3656. let tempData = {
  3657. site: this.$store.state.user.site,
  3658. username: this.$store.state.user.name,
  3659. buNo: this.proofingCurrentRow.buNo,
  3660. proofingId: '*',
  3661. projectId: this.proofingCurrentRow.projectId,
  3662. projectDesc: this.proofingCurrentRow.projectDesc,
  3663. testPartNo: this.proofingCurrentRow.testPartNo,
  3664. partDesc: this.proofingCurrentRow.partDesc,
  3665. customerId: this.proofingCurrentRow.customerNo,
  3666. customerDesc: this.proofingCurrentRow.customerDesc,
  3667. page: 1,
  3668. limit: 1000
  3669. }
  3670. getProjectOtherDocument(tempData).then(({data}) => {
  3671. if (data && data.code === 0) {
  3672. this.projectOtherDocumentList = data.page.list
  3673. this.proofDocumentListDefinition = []
  3674. // 遍历proofDocumentList
  3675. for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
  3676. if (this.projectOtherDocumentList[i].documentTypeId !== 'N/A') {
  3677. this.proofDocumentListDefinition.push(this.projectOtherDocumentList[i])
  3678. }
  3679. }
  3680. for (let i = 0; i < this.projectOtherDocumentList.length; i++) {
  3681. this.projectOtherDocumentList[i].buNo = this.proofingCurrentRow.buNo
  3682. }
  3683. } else {
  3684. this.projectOtherDocumentList = []
  3685. }
  3686. })
  3687. },
  3688. getColumnValue(row, column) {
  3689. // 根据列的配置信息决定显示的值
  3690. if (column.columnProp === 'documentType') {
  3691. return this.getCombinedDocumentType(row);
  3692. }
  3693. else if (column.columnProp === 'documentDesc') {
  3694. return row.documentDesc; // 或者根据实际需求处理其他字段的显示
  3695. }
  3696. else {
  3697. return row[column.columnProp]; // 默认返回对应列的值
  3698. }
  3699. },
  3700. getCombinedDocumentType(row) {
  3701. // 根据您的需求,组合或拼接需要显示的字段
  3702. if (row.documentType === null || row.documentType === undefined) {
  3703. return row.documentDesc
  3704. }else {
  3705. return row.documentType
  3706. }
  3707. },
  3708. // 动态列开始 获取 用户保存的 格式列
  3709. async getTableUserColumn(tableId, columnId) {
  3710. let queryTableUser = {
  3711. userId: this.$store.state.user.name,
  3712. functionId: this.$route.meta.menuId,
  3713. tableId: tableId,
  3714. status: true,
  3715. languageCode: this.$i18n.locale
  3716. }
  3717. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  3718. if (data.rows.length > 0) {
  3719. //this.columnList1 = []
  3720. switch (columnId) {
  3721. case 1:
  3722. this.columnList = data.rows
  3723. break;
  3724. // case 2:
  3725. // this.detailColumnList = data.rows
  3726. // break;
  3727. // case 3:
  3728. // this.columnList2 = data.rows
  3729. // break;
  3730. // case 4:
  3731. // this.columnList3 = data.rows
  3732. // break;
  3733. }
  3734. } else {
  3735. this.getColumnList(tableId, columnId)
  3736. }
  3737. })
  3738. },
  3739. projectDocumentList () {
  3740. this.modalData = {
  3741. site: this.proofingCurrentRow.site,
  3742. buNo: this.proofingCurrentRow.buNo,
  3743. projectId: this.proofingCurrentRow.projectId,
  3744. projectDesc: this.proofingCurrentRow.projectDesc,
  3745. customerNo: this.proofingCurrentRow.customerNo,
  3746. customerDesc: this.proofingCurrentRow.customerDesc,
  3747. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  3748. testPartNo: this.proofingCurrentRow.testPartNo,
  3749. partDesc: this.proofingCurrentRow.partDesc,
  3750. projectCategory: this.proofingCurrentRow.projectCategory,
  3751. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  3752. proofingNo: '*',
  3753. rrequiredDeliveryDate: '',
  3754. createDate: new Date(),
  3755. createBy: this.$store.state.user.name,
  3756. limit: 1000,
  3757. page: 1
  3758. }
  3759. this.getProjectOtherDocument()
  3760. this.projectDocumentListVisible = true
  3761. },
  3762. projectDocumentListVisibleFalse() {
  3763. this.projectDocumentListVisible = false
  3764. this.proofDocumentListDefinition = []
  3765. },
  3766. deleteProjectDocumentType(row) {
  3767. this.$confirm('是否删除该文档清单?', '提示', {
  3768. confirmButtonText: '确定',
  3769. cancelButtonText: '取消',
  3770. type: 'warning'
  3771. }).then(() => {
  3772. deleteDocumentType(row).then(({data}) => {
  3773. if (data && data.code === 0) {
  3774. this.$message({
  3775. message: '删除成功',
  3776. type: 'success',
  3777. })
  3778. this.getProjectOtherDocument()
  3779. this.getProofDocument()
  3780. } else {
  3781. this.$message.warning(data.msg)
  3782. }
  3783. })
  3784. }).catch(() => {
  3785. this.$message({
  3786. type: 'info',
  3787. message: '已取消删除'
  3788. });
  3789. });
  3790. },
  3791. closeAddProjectDocumentTypeFlag() {
  3792. this.addProjectDocumentTypeFlag = false
  3793. this.searchProjectDocumentTypeData = {
  3794. site: this.$store.state.user.site,
  3795. projectId: '',
  3796. proofingNo: '*',
  3797. documentTypeId: '',
  3798. documentType: '',
  3799. responsibleDepartment: '',
  3800. estimatedCompletionDays: '',
  3801. page: 1,
  3802. limit: 1000
  3803. }
  3804. this.extraProjectDocumentList = []
  3805. },
  3806. filteredProjectAllDocumentList() {
  3807. this.projectAllDocumentList.map(item => {
  3808. item.id = item.documentDefinitionListId
  3809. })
  3810. return this.projectAllDocumentList.filter(item => item.uploadedFlag !== 'N')
  3811. },
  3812. searchProjectDocumentTypeList() {
  3813. this.searchProjectDocumentTypeData.proofingNo = '*'
  3814. this.searchProjectDocumentTypeData.projectId = this.modalData.projectId
  3815. getExtraDocumentList(this.searchProjectDocumentTypeData).then(({data}) => {
  3816. if (data && data.code === 0) {
  3817. this.extraProjectDocumentList = data.page.list
  3818. } else {
  3819. this.extraProjectDocumentList = []
  3820. }
  3821. })
  3822. },
  3823. selectionProjectDocument(val) {
  3824. this.projectDocumentSelection = val
  3825. },
  3826. saveSelectionProjectDocumentType() {
  3827. if (this.projectDocumentSelection.length === 0) {
  3828. this.$message({
  3829. message: '请选择文档类型',
  3830. type: 'error'
  3831. })
  3832. this.extraProjectDocumentList = []
  3833. return
  3834. }
  3835. this.projectDocumentSelection.forEach((item) => {
  3836. const inData = {
  3837. site: this.$store.state.user.site,
  3838. proofingNo: '*',
  3839. projectId: this.modalData.projectId,
  3840. documentTypeId: item.documentTypeId,
  3841. documentType: item.documentType,
  3842. responsibleDepartment: item.responsibleDepartment,
  3843. estimatedCompletionDays: item.estimatedCompletionDays,
  3844. createBy: this.$store.state.user.name,
  3845. }
  3846. proofingDocumentNEW(inData).then(({data}) => {
  3847. //区分请求成功和失败的状况
  3848. if (data && data.code === 0) {
  3849. this.$message({
  3850. message: '新增成功',
  3851. type: 'success'
  3852. })
  3853. this.addProjectDocumentTypeFlag = false
  3854. //刷新表格
  3855. this.getProjectOtherDocument()
  3856. this.refreshCurrentTabTable()
  3857. } else {
  3858. this.$message({
  3859. message: '新增失败',
  3860. type: 'error'
  3861. })
  3862. }
  3863. })
  3864. })
  3865. },
  3866. searchProjectAllDocumentList () {
  3867. let inData = {
  3868. site: this.$store.state.user.site,
  3869. username: this.$store.state.user.name,
  3870. buNo: this.proofingCurrentRow.buNo,
  3871. proofingNo: 'ALL',
  3872. projectId: this.proofingCurrentRow.projectId,
  3873. projectDesc: this.proofingCurrentRow.projectDesc,
  3874. testPartNo: this.proofingCurrentRow.testPartNo,
  3875. partDesc: this.proofingCurrentRow.partDesc,
  3876. customerId: this.proofingCurrentRow.customerNo,
  3877. customerDesc: this.proofingCurrentRow.customerDesc,
  3878. page: 1,
  3879. limit: 1000
  3880. }
  3881. searchProjectAllDocument(inData).then(({data}) => {
  3882. if (data && data.code === 0){
  3883. this.projectAllDocumentList = data.page.list;
  3884. }
  3885. })
  3886. },
  3887. projectProductionValidationDocument () {
  3888. this.modalData = {
  3889. site: this.proofingCurrentRow.site,
  3890. buNo: this.proofingCurrentRow.buNo,
  3891. projectId: this.proofingCurrentRow.projectId,
  3892. projectDesc: this.proofingCurrentRow.projectDesc,
  3893. customerNo: this.proofingCurrentRow.customerNo,
  3894. customerDesc: this.proofingCurrentRow.customerDesc,
  3895. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  3896. testPartNo: this.proofingCurrentRow.testPartNo,
  3897. partDesc: this.proofingCurrentRow.partDesc,
  3898. projectCategory: this.proofingCurrentRow.projectCategory,
  3899. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  3900. proofingNo: 'ALL',
  3901. requiredDeliveryDate: '',
  3902. wantedConfirmDate: new Date(),
  3903. createDate: new Date(),
  3904. createBy: this.$store.state.user.name,
  3905. limit: 1000,
  3906. page: 1
  3907. }
  3908. this.projectProductionValidationDocumentVisible = true
  3909. this.projectAllDocumentList1 = this.filteredProjectAllDocumentList()
  3910. },
  3911. handleDocumentSelectionChange(val) {
  3912. // 文档选择页签中选中数据发生变化时的处理
  3913. this.selectedDocumentItems = val;
  3914. },
  3915. searchConfirmatorList() {
  3916. let inData = {
  3917. site: this.proofingCurrentRow.site,
  3918. username: this.$store.state.user.name,
  3919. buNo: this.proofingCurrentRow.buNo,
  3920. proofingNo: 'ALL',
  3921. projectId: this.proofingCurrentRow.projectId,
  3922. projectDesc: this.proofingCurrentRow.projectDesc,
  3923. testPartNo: this.proofingCurrentRow.testPartNo,
  3924. partDesc: this.proofingCurrentRow.partDesc,
  3925. customerId: this.proofingCurrentRow.customerNo,
  3926. customerDesc: this.proofingCurrentRow.customerDesc,
  3927. page: 1,
  3928. limit: 1000
  3929. }
  3930. searchConfirmatorList(inData).then(({data}) => {
  3931. if (data && data.code === 0){
  3932. this.projectAllDocumentConfirmatorList = data.page.list;
  3933. }
  3934. })
  3935. },
  3936. saveProductionValidationDocument() {
  3937. let confirmatorPromises = this.projectAllDocumentConfirmatorList.map(item => {
  3938. let inData = {
  3939. site: this.proofingCurrentRow.site,
  3940. projectId: this.proofingCurrentRow.projectId,
  3941. orderRef1: this.proofingCurrentRow.projectId,
  3942. userid: item.userid,
  3943. itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
  3944. wantedConfirmDate: this.modalData.wantedConfirmDate,
  3945. createBy: this.$store.state.user.name
  3946. };
  3947. return saveProductionValidationDocumentConfirmator(inData);
  3948. });
  3949. Promise.all(confirmatorPromises)
  3950. .then(confirmatorResults => {
  3951. let allConfirmatorSuccess = confirmatorResults.every(result => result.data && result.data.code === 0);
  3952. if (allConfirmatorSuccess) {
  3953. let inData = {
  3954. site: this.proofingCurrentRow.site,
  3955. orderRef1: this.proofingCurrentRow.projectId,
  3956. projectId: this.proofingCurrentRow.projectId,
  3957. selectedDocumentItems: this.selectedDocumentItems,
  3958. }
  3959. let saveDocumentPromises = this.handleDocumentSave(inData);
  3960. saveDocumentPromises
  3961. .then(() => {
  3962. this.$message({
  3963. message: '新增成功',
  3964. type: 'success'
  3965. });
  3966. this.projectProductionValidationDocumentVisible = false;
  3967. this.confirmationPrompted = false;
  3968. this.confirmatorSendMailHandle(inData)
  3969. })
  3970. .catch(error => {
  3971. console.error('保存文档出错:', error);
  3972. this.$message({
  3973. message: '新增失败,请检查文档',
  3974. type: 'error'
  3975. });
  3976. });
  3977. } else {
  3978. this.$message({
  3979. message: '新增失败,请检查确认人员',
  3980. type: 'error'
  3981. });
  3982. }
  3983. })
  3984. .catch(error => {
  3985. console.error('保存确认人员出错:', error);
  3986. this.$message({
  3987. message: '新增失败,请检查确认人员',
  3988. type: 'error'
  3989. });
  3990. });
  3991. },
  3992. handleDocumentSave(inData) {
  3993. return new Promise((resolve, reject) => {
  3994. checkProductionValidationDocument(inData)
  3995. .then(({ data }) => {
  3996. if (data) {
  3997. // 存在生产确认记录,且尚未进行过确认提示
  3998. if (!this.confirmationPrompted) {
  3999. this.confirmationPrompted = true; // 标记已进行过确认提示
  4000. this.askForDeleteConfirmation()
  4001. .then(confirmDelete => {
  4002. if (confirmDelete === 'true') {
  4003. this.handleDeleteAndSave(inData)
  4004. .then(() => resolve())
  4005. .catch(() => reject());
  4006. } else {
  4007. resolve(); // 用户取消操作,直接结束
  4008. }
  4009. })
  4010. .catch(() => {
  4011. reject('对话框出错'); // 对话框出错处理
  4012. });
  4013. } else {
  4014. // 已经进行过一次确认提示,直接保存文档信息
  4015. this.handleDeleteAndSave(inData)
  4016. .then(() => resolve())
  4017. .catch(() => reject());
  4018. }
  4019. } else {
  4020. // 不存在生产确认记录,直接保存文档信息
  4021. this.handleDeleteAndSave(inData)
  4022. .then(() => resolve())
  4023. .catch(() => reject());
  4024. }
  4025. })
  4026. .catch(error => {
  4027. console.error('检查生产确认文档出错:', error);
  4028. reject('检查生产确认文档失败');
  4029. });
  4030. });
  4031. },
  4032. handleDeleteAndSave(inData) {
  4033. return new Promise((resolve, reject) => {
  4034. checkConfirmationRecord(inData)
  4035. .then(({ data }) => {
  4036. if (data) {
  4037. this.$confirm('该项目已经有人员进行了确认,是否删除重新推送确认信息?', '提示', {
  4038. confirmButtonText: '是',
  4039. cancelButtonText: '否',
  4040. type: 'warning'
  4041. })
  4042. .then(() => {
  4043. // 用户确认删除,执行删除操作
  4044. deleteDocumentInformation(inData)
  4045. .then(() => {
  4046. this.projectAllDocumentConfirmatorList.map(item => {
  4047. let inData1 = {
  4048. site: this.proofingCurrentRow.site,
  4049. orderRef1: this.proofingCurrentRow.projectId,
  4050. userid: item.userid,
  4051. itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
  4052. wantedConfirmDate: this.modalData.wantedConfirmDate,
  4053. createBy: this.$store.state.user.name
  4054. };
  4055. saveProductionValidationDocumentConfirmator(inData1);
  4056. });
  4057. this.saveDocumentInformation(inData)
  4058. .then(() => resolve())
  4059. .catch(() => reject());
  4060. })
  4061. .catch(() => reject('删除确认记录失败'));
  4062. })
  4063. .catch(() => {
  4064. reject('用户取消操作');
  4065. });
  4066. } else {
  4067. deleteDocumentInformation(inData)
  4068. .then(() => {
  4069. this.projectAllDocumentConfirmatorList.map(item => {
  4070. let inData1 = {
  4071. site: this.proofingCurrentRow.site,
  4072. orderRef1: this.proofingCurrentRow.projectId,
  4073. userid: item.userid,
  4074. itemNo: this.projectAllDocumentConfirmatorList.indexOf(item) + 1,
  4075. wantedConfirmDate: this.modalData.wantedConfirmDate,
  4076. createBy: this.$store.state.user.name
  4077. };
  4078. saveProductionValidationDocumentConfirmator(inData1);
  4079. });
  4080. this.saveDocumentInformation(inData)
  4081. .then(() => resolve())
  4082. .catch(() => reject());
  4083. })
  4084. .catch(() => reject('删除确认记录失败'));
  4085. }
  4086. })
  4087. .catch(() => {
  4088. reject('检查确认记录失败');
  4089. });
  4090. });
  4091. },
  4092. saveDocumentInformation(inData) {
  4093. return saveProductionValidationDocument(inData)
  4094. .then(response => {
  4095. if (response.data && response.data.code === 0) {
  4096. return Promise.resolve();
  4097. } else {
  4098. return Promise.reject('保存文档失败');
  4099. }
  4100. })
  4101. .catch(() => {
  4102. return Promise.reject('保存文档失败');
  4103. });
  4104. },
  4105. askForDeleteConfirmation() {
  4106. return new Promise((resolve, reject) => {
  4107. this.$confirm('该项目已存在生产确认记录,是否删除重新推送确认信息?', '提示', {
  4108. confirmButtonText: '是',
  4109. cancelButtonText: '否',
  4110. type: 'warning'
  4111. })
  4112. .then(() => {
  4113. resolve('true');
  4114. })
  4115. .catch(() => {
  4116. resolve('false');
  4117. });
  4118. });
  4119. },
  4120. getConfirmProgressDocumentList() {
  4121. let inData = {
  4122. site: this.proofingCurrentRow.site,
  4123. orderRef1: this.proofingCurrentRow.projectId,
  4124. page: 1,
  4125. limit: 1000
  4126. }
  4127. searchConfirmProgressDocumentList(inData).then(({data}) => {
  4128. if (data && data.code === 0){
  4129. this.confirmProgressDocumentList = data.page.list;
  4130. }
  4131. })
  4132. },
  4133. getConfirmProgressPusherList() {
  4134. let inData = {
  4135. site: this.proofingCurrentRow.site,
  4136. orderRef1: this.proofingCurrentRow.projectId,
  4137. page: 1,
  4138. limit: 1000
  4139. }
  4140. searchConfirmProgressPusherList(inData).then(({data}) => {
  4141. if (data && data.code === 0){
  4142. this.confirmProgressPusherList = data.page.list;
  4143. }
  4144. })
  4145. },
  4146. confirmDocument(row) {
  4147. // 将this.$store.state.user.id转为字符串
  4148. let userId = this.$store.state.user.id.toString()
  4149. if (row.userid !== userId) {
  4150. // 提示指定确认人为row.confirmedBy,是否继续
  4151. this.$confirm('指定确认人为' + row.userDisplay + ',是否继续确认?', '提示', {
  4152. confirmButtonText: '是',
  4153. cancelButtonText: '否',
  4154. type: 'warning'
  4155. })
  4156. .then(() => {
  4157. this.confirmData = {
  4158. site: row.site,
  4159. documentType: row.documentType,
  4160. orderRef1: row.orderRef1,
  4161. itemNo: row.itemNo,
  4162. userid: row.userid,
  4163. username: row.username,
  4164. userDisplay: row.userDisplay,
  4165. wantedConfirmDate: row.wantedConfirmDate,
  4166. confirmFlag: row.confirmFlag,
  4167. confirmedDate: new Date(),
  4168. createBy: row.createBy,
  4169. createDate: row.createDate,
  4170. confirmedBy: this.$store.state.user.userDisplay,
  4171. documentId: row.documentId,
  4172. remark: row.remark
  4173. }
  4174. this.modalData = {
  4175. site: this.proofingCurrentRow.site,
  4176. projectId: this.proofingCurrentRow.projectId,
  4177. projectDesc: this.proofingCurrentRow.projectDesc,
  4178. testPartNo: this.proofingCurrentRow.testPartNo,
  4179. partDesc: this.proofingCurrentRow.partDesc,
  4180. customerNo: this.proofingCurrentRow.customerNo,
  4181. customerDesc: this.proofingCurrentRow.customerDesc,
  4182. buNo: this.proofingCurrentRow.buNo,
  4183. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  4184. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  4185. }
  4186. this.getProjectConfirmatorFileList(row)
  4187. this.confirmVisible = true
  4188. })
  4189. .catch(() => {
  4190. this.$message({
  4191. type: 'info',
  4192. message: '已取消操作'
  4193. });
  4194. });
  4195. }else {
  4196. this.confirmData = {
  4197. site: row.site,
  4198. documentType: row.documentType,
  4199. orderRef1: row.orderRef1,
  4200. itemNo: row.itemNo,
  4201. userid: row.userid,
  4202. username: row.username,
  4203. userDisplay: row.userDisplay,
  4204. wantedConfirmDate: row.wantedConfirmDate,
  4205. confirmFlag: row.confirmFlag,
  4206. confirmedDate: new Date(),
  4207. createBy: row.createBy,
  4208. createDate: row.createDate,
  4209. confirmedBy: this.$store.state.user.name,
  4210. documentId: row.documentId,
  4211. remark: row.remark
  4212. }
  4213. this.modalData = {
  4214. site: this.proofingCurrentRow.site,
  4215. projectId: this.proofingCurrentRow.projectId,
  4216. projectDesc: this.proofingCurrentRow.projectDesc,
  4217. testPartNo: this.proofingCurrentRow.testPartNo,
  4218. partDesc: this.proofingCurrentRow.partDesc,
  4219. customerNo: this.proofingCurrentRow.customerNo,
  4220. customerDesc: this.proofingCurrentRow.customerDesc,
  4221. buNo: this.proofingCurrentRow.buNo,
  4222. bu: this.proofingCurrentRow.site + '_' + this.proofingCurrentRow.buNo,
  4223. cProjectTypeDb: this.proofingCurrentRow.projectCategory,
  4224. }
  4225. this.getProjectConfirmatorFileList(row)
  4226. this.confirmVisible = true
  4227. }
  4228. },
  4229. /*选择上传文件时*/
  4230. onChange(file,fileList){
  4231. const newFileName = file.name;
  4232. if (this.fileName) {
  4233. this.fileName += ', ' + newFileName;
  4234. } else {
  4235. this.fileName = newFileName;
  4236. }
  4237. this.fileList.push(file);
  4238. },
  4239. triggerUpload() {
  4240. this.$refs.uploadFile.$el.querySelector('input').click()
  4241. },
  4242. saveUploadFile(){
  4243. this.confirmData.confirmedDate = moment(this.confirmData.confirmedDate).utcOffset('+8').format('YYYY-MM-DD HH:mm:ss');
  4244. this.confirmData.confirmedBy = this.$store.state.user.userDisplay;
  4245. updateProjectDocumentConfirm(this.confirmData) .then(({data}) => {
  4246. if (data.code === 0) {
  4247. this.confirmVisible = false;
  4248. this.getConfirmProgressDocumentList();
  4249. this.getConfirmProgressPusherList();
  4250. }else {
  4251. this.$message.warning(data.msg);
  4252. }
  4253. })
  4254. let remark = this.confirmData.remark;
  4255. const formData = new FormData();
  4256. //片接文件
  4257. for (let i = 0; i < this.fileList.length; i++) {
  4258. formData.append("file",this.fileList[i].raw)
  4259. }
  4260. formData.append("folder", this.folder);
  4261. formData.append("orderRef1", this.confirmData.site);
  4262. formData.append("orderRef4", this.confirmData.orderRef1);
  4263. formData.append("orderRef2", this.confirmData.itemNo);
  4264. formData.append("orderRef3", this.confirmData.userid);
  4265. formData.append("remark", remark);
  4266. uploadProjectFile(formData).then(({data}) => {
  4267. if (data.code === 0) {
  4268. this.$message.success('操作成功');
  4269. //清空文件上传记录
  4270. this.$refs.uploadFile.clearFiles();
  4271. this.closeFileUpdate();
  4272. this.projectConfirmatorFileList = [];
  4273. }else {
  4274. this.$message.warning(data.msg);
  4275. }
  4276. })
  4277. },
  4278. closeFileUpdate() {
  4279. this.fileName = '';
  4280. this.uploadDialog = false;
  4281. //this.fileRemark = ''
  4282. this.$refs.uploadFile.clearFiles()
  4283. this.fileList = []
  4284. },
  4285. getProjectConfirmatorFileList (row) {
  4286. let inData = {
  4287. orderRef1: row.site,
  4288. orderRef3: row.userid,
  4289. orderRef2: row.itemNo,
  4290. orderRef4: row.orderRef1,
  4291. page: 1,
  4292. limit: 1000
  4293. }
  4294. searchProjectConfirmatorFileList(inData).then(({data}) => {
  4295. if (data && data.code === 0){
  4296. this.projectConfirmatorFileList = data.page.list;
  4297. }
  4298. })
  4299. },
  4300. closeUploadFileVisible(){
  4301. this.confirmVisible = false;
  4302. this.projectConfirmatorFileList = [];
  4303. this.fileList = [];
  4304. this.closeFileUpdate()
  4305. },
  4306. closeViewDocumentFileVisible(){
  4307. this.viewDocumentFileVisible = false;
  4308. this.projectConfirmatorFileList = [];
  4309. },
  4310. viewDocumentFile(row) {
  4311. this.confirmData = {
  4312. site: row.site,
  4313. documentType: row.documentType,
  4314. orderRef1: row.orderRef1,
  4315. itemNo: row.itemNo,
  4316. userid: row.userid,
  4317. username: row.username,
  4318. userDisplay: row.userDisplay,
  4319. wantedConfirmDate: row.wantedConfirmDate,
  4320. confirmFlag: row.confirmFlag,
  4321. confirmedDate: new Date(),
  4322. createBy: row.createBy,
  4323. createDate: row.createDate,
  4324. confirmedBy: this.$store.state.user.userDisplay,
  4325. documentId: row.documentId,
  4326. remark: row.remark
  4327. }
  4328. let inData = {
  4329. orderRef1: row.site,
  4330. orderRef2: row.itemNo,
  4331. orderRef3: row.userid,
  4332. orderRef4: row.orderRef1,
  4333. page: 1,
  4334. limit: 1000
  4335. }
  4336. searchProjectConfirmatorFileList(inData).then(({data}) => {
  4337. if (data && data.code === 0){
  4338. this.projectConfirmatorFileList = data.page.list;
  4339. }
  4340. })
  4341. this.viewDocumentFileVisible = true
  4342. },
  4343. deleteFile(row) {
  4344. if (this.confirmData.confirmedBy === this.$store.state.user.userDisplay) {
  4345. this.$confirm('是否删除该文件?', '提示', {
  4346. confirmButtonText: '确定',
  4347. cancelButtonText: '取消',
  4348. type: 'warning'
  4349. }).then(() => {
  4350. let inData = {
  4351. id: row.id,
  4352. orderRef1: row.orderRef1,
  4353. orderRef2: row.orderRef2,
  4354. orderRef3: row.orderRef3,
  4355. orderRef4: row.orderRef4,
  4356. createdBy: this.$store.state.user.name
  4357. }
  4358. deleteProjectFile(inData).then(({data}) => {
  4359. if (data && data.code === 0) {
  4360. this.$message({
  4361. message: '删除成功',
  4362. type: 'success'
  4363. })
  4364. this.getProjectConfirmatorFileList(this.confirmData)
  4365. } else {
  4366. this.$message({
  4367. message: '删除失败',
  4368. type: 'error'
  4369. })
  4370. }
  4371. })
  4372. }).catch(() => {
  4373. this.$message({
  4374. type: 'info',
  4375. message: '已取消删除'
  4376. });
  4377. });
  4378. } else {
  4379. this.$message({
  4380. message: '只有确认人员才能删除文件',
  4381. type: 'error'
  4382. })
  4383. }
  4384. },
  4385. shouldShowDelete(row) {
  4386. // 根据条件判断是否显示删除操作
  4387. if (row.projectPhase === 'SOP文档') {
  4388. return false
  4389. }else return row.documentId !== null;
  4390. },
  4391. // 查看文件
  4392. viewFile(row) {
  4393. // 预览文件
  4394. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  4395. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  4396. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  4397. let txt = ['txt']
  4398. let type = ''
  4399. let pdf = ['pdf']
  4400. if (image.includes(row.fileType.toLowerCase())) {
  4401. type = 'image/' + row.fileType
  4402. downLoadObjectFile(row).then(({data}) => {
  4403. const blob = new Blob([data], { type: type });
  4404. // 创建URL来生成预览
  4405. const fileURL = URL.createObjectURL(blob);
  4406. // 在新标签页中打开文件预览
  4407. const newTab = window.open(fileURL, '_blank')
  4408. })
  4409. }
  4410. else if (video.includes(row.fileType.toLowerCase())) {
  4411. type = 'video/' + row.fileType
  4412. downLoadObjectFile(row).then(({data}) => {
  4413. const blob = new Blob([data], { type: type });
  4414. // 创建URL来生成预览
  4415. const fileURL = URL.createObjectURL(blob);
  4416. // 在新标签页中打开文件预览
  4417. const newTab = window.open(fileURL, '_blank')
  4418. })
  4419. }
  4420. else if (txt.includes(row.fileType.toLowerCase())) {
  4421. type = 'text/plain'
  4422. downLoadObjectFile(row).then(({data}) => {
  4423. const blob = new Blob([data], { type: type });
  4424. // 创建URL来生成预览
  4425. const fileURL = URL.createObjectURL(blob);
  4426. // 在新标签页中打开文件预览
  4427. const newTab = window.open(fileURL, '_blank')
  4428. })
  4429. }
  4430. else if (office.includes(row.fileType.toLowerCase())) {
  4431. if (row.fileType.toLowerCase() === 'doc' || row.fileType.toLowerCase() === 'docx') {
  4432. type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
  4433. } else if (row.fileType.toLowerCase() === 'ppt' || row.fileType.toLowerCase() === 'pptx') {
  4434. type = 'application/vnd.openxmlformats-officedocument.presentationml.presentation'
  4435. } else {
  4436. type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  4437. }
  4438. downLoadObjectFile(row).then(({data}) => {
  4439. const blob = new Blob([data], { type: type });
  4440. // 创建URL来生成预览
  4441. const fileURL = URL.createObjectURL(blob);
  4442. // 在新标签页中打开文件预览
  4443. const newTab = window.open(fileURL, '_blank')
  4444. })
  4445. }
  4446. else if (pdf.includes(row.fileType.toLowerCase())) {
  4447. type = 'application/pdf'
  4448. downLoadObjectFile(row).then(({data}) => {
  4449. const blob = new Blob([data], { type: type });
  4450. // 创建URL来生成预览
  4451. const fileURL = URL.createObjectURL(blob);
  4452. // 在新标签页中打开文件预览
  4453. const newTab = window.open(fileURL, '_blank')
  4454. })
  4455. }
  4456. else {
  4457. this.$message({
  4458. message: '不支持的文件类型',
  4459. type: 'warning'
  4460. })
  4461. }
  4462. },
  4463. // 下载
  4464. downloadFile (row) {
  4465. downLoadObjectFile(row)
  4466. .then(({data}) => {
  4467. // 不限制文件下载类型
  4468. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  4469. // 下载文件名称
  4470. const fileName = row.fileName
  4471. // a标签下载
  4472. const linkNode = document.createElement('a')
  4473. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  4474. linkNode.style.display = 'none'
  4475. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  4476. document.body.appendChild(linkNode)
  4477. linkNode.click() // 模拟在按钮上的一次鼠标单击
  4478. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  4479. document.body.removeChild(linkNode)
  4480. })
  4481. },
  4482. closeProjectProductionValidationDocumentVisibleDialog() {
  4483. this.projectProductionValidationDocumentVisible = false;
  4484. this.activeName1 = 'selectDocument';
  4485. },
  4486. formatDate(row, column) {
  4487. // row 是当前行的数据对象
  4488. // column 是当前列的属性信息对象
  4489. const date = row[column.property];
  4490. if (date) {
  4491. const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
  4492. return s.replace(/\//g, '-')
  4493. } else {
  4494. return '';
  4495. }
  4496. },
  4497. indexMethod(index) {
  4498. return index + 1;
  4499. },
  4500. // 获取 tableDefault 列
  4501. async getColumnList (tableId, columnId) {
  4502. let queryTable= {
  4503. functionId: this.$route.meta.menuId,
  4504. tableId: tableId,
  4505. languageCode: this.$i18n.locale
  4506. }
  4507. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  4508. if (!data.rows.length == 0) {
  4509. switch (columnId) {
  4510. case 1:
  4511. this.columnList = data.rows
  4512. break;
  4513. // case 2:
  4514. // this.detailColumnList = data.rows
  4515. // break;
  4516. // case 3:
  4517. // this.columnList2 = data.rows
  4518. // break;
  4519. // case 4:
  4520. // this.columnList3 = data.rows
  4521. // break;
  4522. }
  4523. } else {
  4524. // this.showDefault = true.
  4525. }
  4526. })
  4527. },
  4528. // 列表表格选择替换
  4529. tabClick (tab, event) {
  4530. // 刷新列表数据
  4531. this.refreshCurrentTabTable()
  4532. },
  4533. refreshCurrentTabTable () {
  4534. if (this.activeName == 'proofRecord') {
  4535. this.getRowProjectInfo();
  4536. }
  4537. if (this.activeName == 'massProductionStage') {
  4538. this.getProjectOtherDocument();
  4539. }
  4540. if (this.activeName == 'allDocument'){
  4541. this.searchProjectAllDocumentList()
  4542. this.searchConfirmatorList()
  4543. }
  4544. if (this.activeName == 'productionDocumentsConfirmProgress'){
  4545. this.getConfirmProgressDocumentList()
  4546. this.getConfirmProgressPusherList()
  4547. }
  4548. },
  4549. //获取按钮的权限数据
  4550. getButtonAuthData () {
  4551. let searchFlag = this.isAuth(this.menuId+":search")
  4552. let saveFlag = this.isAuth(this.menuId+":save")
  4553. let updateFlag = this.isAuth(this.menuId+":update")
  4554. let deleteFlag = this.isAuth(this.menuId+":delete")
  4555. //处理页面的权限数据
  4556. this.authSearch = !searchFlag
  4557. this.authSave = !saveFlag
  4558. this.authUpdate = !updateFlag
  4559. this.authDelete = !deleteFlag
  4560. },
  4561. rowStyle ({row}) {
  4562. if (this.proofingCurrentRow.documentTypeId === row.documentTypeId) {
  4563. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  4564. }
  4565. },
  4566. sendMailHandle(row) {
  4567. sendMailHandle(row).then(({data}) => {
  4568. if (data && data.code === 0) {
  4569. this.$message({
  4570. message: '发送成功',
  4571. type: 'success'
  4572. })
  4573. } else {
  4574. this.$message.warning(data.msg)
  4575. }
  4576. })
  4577. },
  4578. warnSendMail(row) {
  4579. this.$confirm('确认发送提醒?', '提示', {
  4580. confirmButtonText: '确定',
  4581. cancelButtonText: '取消',
  4582. type: 'warning'
  4583. }).then(() => {
  4584. warnSendMailHandle(row).then(({data}) => {
  4585. if (data && data.code === 0) {
  4586. this.$message({
  4587. message: '发送成功',
  4588. type: 'success'
  4589. })
  4590. } else {
  4591. this.$message.warning(data.msg)
  4592. }
  4593. })
  4594. }).catch(() => {
  4595. this.$message({
  4596. type: 'info',
  4597. message: '已取消发送'
  4598. });
  4599. });
  4600. },
  4601. confirmatorSendMailHandle(inData) {
  4602. confirmatorSendMailHandle(inData).then(({data}) => {
  4603. if (data && data.code === 0) {
  4604. this.$message({
  4605. message: '发送成功',
  4606. type: 'success'
  4607. })
  4608. } else {
  4609. this.$message.warning(data.msg)
  4610. }
  4611. })
  4612. },
  4613. }
  4614. }
  4615. </script>
  4616. <style scoped lang="scss">
  4617. .el-tabs__nav {
  4618. margin-left: 0 !important;
  4619. }
  4620. .red-text /deep/ .el-input__inner {
  4621. color: red;
  4622. }
  4623. /deep/ .left-section {
  4624. flex: 1; /* 左边部分占据剩余空间 */
  4625. margin-right: 10px; /* 右边与左边之间的间隔 */
  4626. margin-left: -10px; /* 左边与父元素之间的间隔 */
  4627. }
  4628. /deep/ .right-section {
  4629. width: 66%; /* 右边部分宽度占满剩余空间 */
  4630. margin-right: 5px;
  4631. }
  4632. /deep/ .custom-upload .el-upload-dragger {
  4633. width: 150px;
  4634. height: 150px;
  4635. text-align: center;
  4636. position: relative;
  4637. overflow: hidden;
  4638. /* 添加其他样式 */
  4639. }
  4640. /deep/ .table-container {
  4641. border: 1px solid #e0e0e0;
  4642. border-radius: 4px;
  4643. padding: 10px;
  4644. margin-bottom: 10px;
  4645. }
  4646. </style>