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.

5574 lines
212 KiB

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