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.

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