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.

5299 lines
204 KiB

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