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.

5322 lines
205 KiB

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