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.

3966 lines
144 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.customerNo" style="width: 120px"></el-input>
  27. </el-form-item>
  28. <el-form-item :label="'客户名称'">
  29. <el-input v-model="searchData.customerDesc" style="width: 120px"></el-input>
  30. </el-form-item>
  31. <el-form-item :label="'项目分类'">
  32. <el-select v-model="searchData.projectCategory" placeholder="请选择" clearable style="width: 130px">
  33. <el-option
  34. v-for = "i in projectCategoryList"
  35. :key = "i.projectCategory"
  36. :label = "i.projectCategory"
  37. :value = "i.projectCategory">
  38. </el-option>
  39. </el-select>
  40. </el-form-item>
  41. <!-- <el-form-item :label="'项目状态'">-->
  42. <!-- <el-select v-model="searchData.status" placeholder="请选择" clearable style="width: 130px">-->
  43. <!-- <el-option-->
  44. <!-- v-for = "i in statusList"-->
  45. <!-- :key = "i.status"-->
  46. <!-- :label = "i.status"-->
  47. <!-- :value = "i.status">-->
  48. <!-- </el-option>-->
  49. <!-- </el-select>-->
  50. <!-- </el-form-item>-->
  51. <el-form-item :label="'PM/Sales'">
  52. <el-select v-model="searchData.projectManager" placeholder="请选择" clearable style="width: 130px">
  53. <el-option
  54. v-for = "i in projectManagersList"
  55. :key = "i.projectManagerId"
  56. :label = "i.projectManagerName"
  57. :value = "i.projectManager">
  58. </el-option>
  59. </el-select>
  60. </el-form-item>
  61. <el-form-item :label="'PjM'">
  62. <el-select v-model="searchData.projectOwner" placeholder="请选择" clearable style="width: 130px">
  63. <el-option
  64. v-for = "i in projectOwnersList"
  65. :key = "i.projectOwnerId"
  66. :label = "i.projectOwnerName"
  67. :value = "i.projectOwner">
  68. </el-option>
  69. </el-select>
  70. </el-form-item>
  71. <el-form-item :label="'Engineer'">
  72. <el-select v-model="searchData.engineer" placeholder="请选择" clearable style="width: 130px">
  73. <el-option
  74. v-for = "i in engineersList"
  75. :key = "i.engineerId"
  76. :label = "i.engineerName"
  77. :value = "i.engineer">
  78. </el-option>
  79. </el-select>
  80. </el-form-item>
  81. <el-form-item :label="'区域'">
  82. <el-select clearable v-model="searchData.cProjectRegion" style="width: 120px">
  83. <el-option
  84. v-for = "i in cProjectRegionList"
  85. :key = "i.cProjectRegion"
  86. :label = "i.cProjectRegion"
  87. :value = "i.cProjectRegion">
  88. </el-option>
  89. </el-select>
  90. </el-form-item>
  91. <el-form-item :label="'立项日期:'">
  92. <el-date-picker
  93. style="width: 120px"
  94. v-model="searchData.startDate"
  95. type="date"
  96. value-format="yyyy-MM-dd"
  97. placeholder="选择日期">
  98. </el-date-picker>
  99. -
  100. <el-date-picker
  101. style="width: 120px"
  102. v-model="searchData.endDate"
  103. type="date"
  104. value-format="yyyy-MM-dd"
  105. placeholder="选择日期">
  106. </el-date-picker>
  107. </el-form-item>
  108. <el-form-item :label="' '">
  109. <el-button @click="agencyMatter()">查询</el-button>
  110. <el-button type="primary" @click="addModal()">新增</el-button>
  111. <download-excel
  112. :fields="fields()"
  113. :data="exportData"
  114. type="xls"
  115. :name="exportName"
  116. :header="exportHeader"
  117. :footer="exportFooter"
  118. :fetch="createExportData"
  119. :before-generate="startDownload"
  120. :before-finish="finishDownload"
  121. worksheet="导出信息"
  122. class="el-button el-button--primary el-button--medium">
  123. {{ "导出" }}
  124. </download-excel>
  125. </el-form-item>
  126. </el-form>
  127. <el-table
  128. :height="this.height + 100"
  129. :data="dataList"
  130. ref="mainTable"
  131. highlight-current-row
  132. @row-click="projectPartClickRow"
  133. @current-change="changeCurrentRow"
  134. border
  135. style="width: 100%;">
  136. <el-table-column
  137. v-for="(item,index) in columnList" :key="index"
  138. :sortable="item.columnSortable"
  139. :prop="item.columnProp"
  140. :header-align="item.headerAlign"
  141. :show-overflow-tooltip="item.showOverflowTooltip"
  142. :align="item.align"
  143. :fixed="item.fixed==''?false:item.fixed"
  144. :min-width="item.columnWidth"
  145. :label="item.columnLabel">
  146. <template slot-scope="scope">
  147. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  148. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  149. </template>
  150. </el-table-column>
  151. <el-table-column
  152. fixed="right"
  153. header-align="center"
  154. align="center"
  155. width="208"
  156. label="操作">
  157. <template slot-scope="scope">
  158. <a type="text" size="small" @click="addProjectPartModal(scope.row)">新增产品</a>
  159. <a v-if="scope.row.status !== '已量产'" type="text" size="small" @click="updateModal(scope.row)">修改</a>
  160. <a type="text" size="small" @click="eamProjectInfoDelete(scope.row)">删除</a>
  161. </template>
  162. </el-table-column>
  163. </el-table>
  164. <el-pagination
  165. @size-change="sizeChangeHandle"
  166. @current-change="currentChangeHandle"
  167. :current-page="pageIndex"
  168. :page-sizes="[20, 50, 100, 200, 500]"
  169. :page-size="pageSize"
  170. :total="totalPage"
  171. layout="total, sizes, prev, pager, next, jumper">
  172. </el-pagination>
  173. <el-dialog title="项目" :close-on-click-modal="false" @close="closeClear" v-drag :visible.sync="modalFlag" width="600px">
  174. <!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
  175. <!-- <el-form-item label="是否在用" prop="active" :rules="rules.activeType">-->
  176. <!-- <el-select filterable v-model="modalData.active" style="width: 140px">-->
  177. <!-- <el-option label="是" value="Y"></el-option>-->
  178. <!-- <el-option label="否" value="N"></el-option>-->
  179. <!-- </el-select>-->
  180. <!-- </el-form-item>-->
  181. <!-- </el-form>-->
  182. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  183. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  184. <el-select v-model="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 110px">
  185. <el-option
  186. v-for = "i in userBuList"
  187. :key = "i.buNo"
  188. :label = "i.buDesc"
  189. :value = "i.buNo">
  190. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  191. {{ i.buDesc }}
  192. </span>
  193. </el-option>
  194. </el-select>
  195. </el-form-item>
  196. <el-form-item label="项目编码" prop="projectNo" :rules="rules.projectNo">
  197. <el-input v-model="modalData.projectNo" :disabled="modalPartDisableFlag" style="width: 110px"></el-input>
  198. </el-form-item>
  199. <el-form-item label="项目名称" prop="projectDesc" v-if="!modalPartDisableFlag" :rules="rules.projectDesc">
  200. <el-input v-model="modalData.projectDesc" :disabled="modalPartDisableFlag" style="width: 170px"></el-input>
  201. </el-form-item>
  202. <el-form-item label="项目名称" prop="projectDesc" v-if="modalPartDisableFlag" :rules="rules.projectDesc">
  203. <el-input v-model="modalData.projectDesc" :disabled="modalPartDisableFlag" style="width: 294px"></el-input>
  204. </el-form-item>
  205. <el-form-item label="区域" prop="cProjectRegion" v-if="!modalPartDisableFlag" :rules="rules.cProjectRegion">
  206. <el-select v-model="modalData.cProjectRegion" placeholder="请选择" :disabled="modalPartDisableFlag" clearable style="width: 110px">
  207. <el-option
  208. v-for = "i in cProjectRegionList"
  209. :key = "i.cProjectRegion"
  210. :label = "i.cProjectRegion"
  211. :value = "i.cProjectRegion">
  212. </el-option>
  213. </el-select>
  214. </el-form-item>
  215. </el-form>
  216. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  217. <el-form-item prop="customerNo">
  218. <span slot="label" style="">
  219. <a herf="#" @click="getBaseList(509)">客户编码</a>
  220. <a herf="#" @click="newCustomer">新客户</a>
  221. </span>
  222. <el-input v-model="modalData.customerNo" @blur="customerNoBlur" style="width: 110px"></el-input>
  223. </el-form-item>
  224. <el-form-item label="客户名称" prop="customerDesc">
  225. <el-input v-model="modalData.customerDesc" disabled style="width: 293px"></el-input>
  226. </el-form-item>
  227. <el-form-item label="优先级" prop="priority" :rules="rules.priority">
  228. <el-select v-model="modalData.priority" placeholder="请选择" clearable style="width: 110px">
  229. <el-option
  230. v-for = "i in priorityList"
  231. :key = "i.priority"
  232. :label = "i.priority"
  233. :value = "i.priority">
  234. </el-option>
  235. </el-select>
  236. </el-form-item>
  237. </el-form>
  238. <el-form :inline="true" v-if="this.modalData.flag !== '1' && this.modalData.flag !== '2'" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  239. <el-form-item label="项目料号" prop="testPartNo" :rules="rules.testPartNo" >
  240. <el-input v-model="modalData.testPartNo" style="width: 110px"></el-input>
  241. </el-form-item>
  242. <el-form-item label="料号描述" prop="partDesc" :rules="rules.partDesc" >
  243. <el-input v-model="modalData.partDesc" style="width: 293px"></el-input>
  244. </el-form-item>
  245. <el-form-item label="料号状态" prop="partType" :rules="rules.partType">
  246. <el-select v-model="modalData.partType" clearable style="width: 110px">
  247. <el-option label = "Active" value = "Active"></el-option>
  248. <el-option label = "On hold" value = "On hold"></el-option>
  249. <el-option label = "Cancel" value = "Cancel"></el-option>
  250. <el-option label = "EOL" value = "EOL"></el-option>
  251. </el-select>
  252. </el-form-item>
  253. </el-form>
  254. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  255. <el-form-item prop="cQualityEngineer6Name" :rules="rules.cQualityEngineer6Name">
  256. <span slot="label" style="">
  257. <a herf="#" @click="getBaseList(2008)">IQC</a>
  258. </span>
  259. <el-input v-model="modalData.cQualityEngineer6Name" disabled style="width: 110px"></el-input>
  260. </el-form-item>
  261. <el-form-item :label="'立项日期:'">
  262. <el-date-picker
  263. style="width: 110px"
  264. v-model="modalData.projectCreationDate"
  265. type="date"
  266. value-format="yyyy-MM-dd"
  267. placeholder="选择日期">
  268. </el-date-picker>
  269. </el-form-item>
  270. <el-form-item label="项目分类" prop="projectCategory" :rules="rules.projectCategory">
  271. <el-select v-model="modalData.projectCategory" placeholder="请选择" clearable style="width: 170px">
  272. <el-option
  273. v-for = "i in projectCategoryList"
  274. :key = "i.projectCategory"
  275. :label = "i.projectCategory"
  276. :value = "i.projectCategory">
  277. </el-option>
  278. </el-select>
  279. </el-form-item>
  280. <el-form-item :label="'预计完成日期:'" :rules="rules.needDate">
  281. <el-date-picker
  282. style="width: 110px"
  283. v-model="modalData.needDate"
  284. type="date"
  285. value-format="yyyy-MM-dd"
  286. placeholder="选择日期">
  287. </el-date-picker>
  288. </el-form-item>
  289. <!-- <el-form-item label="文档类型ID" prop="documentTypeId" :rules="rules.documentTypeIdType">-->
  290. <!-- <el-input v-model="modalData.documentTypeId" style="width: 230px"></el-input>-->
  291. <!-- </el-form-item>-->
  292. </el-form>
  293. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  294. <!-- <el-form-item prop="projectManager" :rules="rules.projectManager">-->
  295. <!-- <el-input v-model="modalData.projectManager" disabled style="width: 110px"></el-input>-->
  296. <!-- </el-form-item>-->
  297. <el-form-item label="PM/Sales" prop="projectManagerName" :rules="rules.projectManagerName">
  298. <span slot="label" style="" @click="projectManagerFlag = true "><a herf="#">PM/Sales</a></span>
  299. <el-input v-model="modalData.projectManagerName" disabled style="width: 110px"></el-input>
  300. </el-form-item>
  301. <el-form-item label="PjM" prop="projectOwner" :rules="rules.projectOwner">
  302. <span slot="label" style="" @click="projectOwnerFlag = true"><a herf="#">PjM</a></span>
  303. <el-input v-model="modalData.projectOwnerName" disabled style="width: 110px"></el-input>
  304. </el-form-item>
  305. <el-form-item label="FQC1" prop="cQualityEngineer3Name" :rules="rules.cQualityEngineer3Name">
  306. <span slot="label" style="" @click="FQC1Flag = true"><a herf="#">FQC1</a></span>
  307. <el-input v-model="modalData.cQualityEngineer3Name" disabled style="width: 78px"></el-input>
  308. </el-form-item>
  309. <el-form-item prop="cQualityEngineer5Name" :rules="rules.cQualityEngineer5Name">
  310. <span slot="label" style="">
  311. <a herf="#" @click="getBaseList(2007)">FQC2</a>
  312. </span>
  313. <el-input v-model="modalData.cQualityEngineer5Name" disabled style="width: 78px"></el-input>
  314. </el-form-item>
  315. <!-- <el-form-item prop="cQualityEngineer2" :rules="rules.cQualityEngineer2">-->
  316. <!-- <el-input v-model="modalData.cQualityEngineer2" disabled style="width: 110px"></el-input>-->
  317. <!-- </el-form-item>-->
  318. <el-form-item label="IPQC-Lam/Pri/Etch/Slit" prop="cQualityEngineer1Name" :rules="rules.cQualityEngineer1Name">
  319. <span slot="label" style="" @click="engineerFlag = true"><a herf="#">IPQC-Lam/Pri/Etch/Slit</a></span>
  320. <el-input v-model="modalData.cQualityEngineer1Name" disabled style="width: 110px"></el-input>
  321. </el-form-item>
  322. <el-form-item label="IPQC-Converting" prop="cQualityEngineer2Name" :rules="rules.cQualityEngineer2Name">
  323. <span slot="label" style="" @click="IPQCFlag = true"><a herf="#">IPQC-Converting</a></span>
  324. <el-input v-model="modalData.cQualityEngineer2Name" disabled style="width: 110px"></el-input>
  325. </el-form-item>
  326. <el-form-item label="Engineer" prop="engineerName" :rules="rules.engineerName">
  327. <span slot="label" style="" @click="engineer6Flag = true"><a herf="#">Engineer</a></span>
  328. <el-input v-model="modalData.engineerName" disabled style="width: 110px"></el-input>
  329. </el-form-item>
  330. <el-form-item label="MFG" prop="cManufactureEngineerName" :rules="rules.cManufactureEngineerName">
  331. <span slot="label" style="" @click="MFGlag = true"><a herf="#">MFG</a></span>
  332. <el-input v-model="modalData.cManufactureEngineerName" disabled style="width: 79px"></el-input>
  333. </el-form-item>
  334. <el-form-item prop="cQualityEngineer4Name" :rules="rules.cQualityEngineer4Name">
  335. <span slot="label" style="">
  336. <a herf="#" @click="getBaseList(2006)">SQE</a>
  337. </span>
  338. <el-input v-model="modalData.cQualityEngineer4Name" disabled style="width: 79px"></el-input>
  339. </el-form-item>
  340. <el-form-item label="文档工程师" prop="docEngineerName" :rules="rules.docEngineerName">
  341. <span slot="label" style="" @click="docEngineerFlag = true"><a herf="#">文档工程师</a></span>
  342. <el-input v-model="modalData.docEngineerName" disabled style="width: 110px"></el-input>
  343. </el-form-item>
  344. </el-form>
  345. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  346. <el-button type="primary" @click="saveData()">保存</el-button>
  347. <el-button @click="modalFlag = false">关闭</el-button>
  348. </el-footer>
  349. </el-dialog>
  350. <!--新客户客户名称输入弹框-->
  351. <el-dialog title="新客户" :close-on-click-modal="false" @close="closeNewCustomer" v-drag :visible.sync="newCustomerFlag" width="348px">
  352. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  353. <el-form-item label="客户名称" prop="customerDesc" :rules="rules.customerDesc">
  354. <el-input v-model="modalData.customerDesc" style="width: 313px"></el-input>
  355. </el-form-item>
  356. </el-form>
  357. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  358. <el-button type="primary" @click="saveNewCustomer()">保存</el-button>
  359. <el-button @click="newCustomerFlag = false">关闭</el-button>
  360. </el-footer>
  361. </el-dialog>
  362. <!--项目经理选择弹框-->
  363. <el-dialog title="PM/Sales" @close="closeProjectManagerInfoDialog" @open="openProjectManagerInfoDialog" :visible.sync="projectManagerFlag" width="559px" v-drag>
  364. <el-form inline="inline" label-position="top" :model="searchBusinessData" style="margin-left: 7px;margin-top: -5px;">
  365. <el-form-item label="用户账号">
  366. <el-input v-model="searchBusinessData.username" clearable style="width: 110px"></el-input>
  367. </el-form-item>
  368. <el-form-item label="用户名">
  369. <el-input v-model="searchBusinessData.userDisplay" clearable style="width: 110px"></el-input>
  370. </el-form-item>
  371. <el-form-item label="是否在用">
  372. <el-select filterable v-model="searchBusinessData.active" style="width: 140px">
  373. <el-option label="是" value="Y"></el-option>
  374. <el-option label="否" value="N"></el-option>
  375. </el-select>
  376. </el-form-item>
  377. <el-form-item label=" ">
  378. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList()">查询</el-button>
  379. </el-form-item>
  380. </el-form>
  381. <el-table
  382. :height="height + 110"
  383. :data="businessDataList"
  384. stripe
  385. highlight-current-row
  386. border
  387. @row-dblclick="projectManagerRowDblclick"
  388. style="width: 100%;">
  389. <el-table-column
  390. prop="username"
  391. header-align="center"
  392. align="center"
  393. label="用户账号">
  394. </el-table-column>
  395. <el-table-column
  396. prop="userDisplay"
  397. header-align="center"
  398. align="center"
  399. label="用户名">
  400. </el-table-column>
  401. <el-table-column
  402. prop="active"
  403. header-align="center"
  404. align="center"
  405. label="是否在用">
  406. </el-table-column>
  407. </el-table>
  408. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  409. <el-button @click="projectManagerFlag = false">关闭</el-button>
  410. </el-footer>
  411. </el-dialog>
  412. <!--PjM选择弹框-->
  413. <el-dialog title="PjM" @close="closeProjectOwnerInfoDialog" @open="openProjectOwnerInfoDialog" :visible.sync="projectOwnerFlag" width="559px" v-drag>
  414. <el-form inline="inline" label-position="top" :model="searchBusinessData1" style="margin-left: 7px;margin-top: -5px;">
  415. <el-form-item label="用户账号">
  416. <el-input v-model="searchBusinessData1.username" clearable style="width: 110px"></el-input>
  417. </el-form-item>
  418. <el-form-item label="用户名">
  419. <el-input v-model="searchBusinessData1.userDisplay" clearable style="width: 110px"></el-input>
  420. </el-form-item>
  421. <el-form-item label="是否在用">
  422. <el-select filterable v-model="searchBusinessData1.active" style="width: 140px">
  423. <el-option label="是" value="Y"></el-option>
  424. <el-option label="否" value="N"></el-option>
  425. </el-select>
  426. </el-form-item>
  427. <el-form-item label=" ">
  428. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList1()">查询</el-button>
  429. </el-form-item>
  430. </el-form>
  431. <el-table
  432. :height="height + 110"
  433. :data="businessDataList1"
  434. stripe
  435. highlight-current-row
  436. border
  437. @row-dblclick="projectOwnerRowDblclick"
  438. style="width: 100%;">
  439. <el-table-column
  440. prop="username"
  441. header-align="center"
  442. align="center"
  443. label="用户账号">
  444. </el-table-column>
  445. <el-table-column
  446. prop="userDisplay"
  447. header-align="center"
  448. align="center"
  449. label="用户名">
  450. </el-table-column>
  451. <el-table-column
  452. prop="active"
  453. header-align="center"
  454. align="center"
  455. label="是否在用">
  456. </el-table-column>
  457. </el-table>
  458. <el-footer style="height:40px;margin-top:
  459. 10px;text-align:center">
  460. <el-button @click="projectOwnerFlag = false">关闭</el-button>
  461. </el-footer>
  462. </el-dialog>
  463. <!--工程师选择弹框-->
  464. <el-dialog title="Engineer" @close="closeEngineer6InfoDialog" @open="openEngineer6InfoDialog" :visible.sync="engineer6Flag" width="559px" v-drag>
  465. <el-form inline="inline" label-position="top" :model="searchBusinessData6" style="margin-left: 7px;margin-top: -5px;">
  466. <el-form-item label="用户账号">
  467. <el-input v-model="searchBusinessData6.username" clearable style="width: 110px"></el-input>
  468. </el-form-item>
  469. <el-form-item label="用户名">
  470. <el-input v-model="searchBusinessData6.userDisplay" clearable style="width: 110px"></el-input>
  471. </el-form-item>
  472. <el-form-item label="是否在用">
  473. <el-select filterable v-model="searchBusinessData6.active" style="width: 140px">
  474. <el-option label="是" value="Y"></el-option>
  475. <el-option label="否" value="N"></el-option>
  476. </el-select>
  477. </el-form-item>
  478. <el-form-item label=" ">
  479. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList6()">查询</el-button>
  480. </el-form-item>
  481. </el-form>
  482. <el-table
  483. :height="height + 110"
  484. :data="businessDataList6"
  485. stripe
  486. highlight-current-row
  487. border
  488. @row-dblclick="engineer6RowDblclick"
  489. style="width: 100%;">
  490. <el-table-column
  491. prop="username"
  492. header-align="center"
  493. align="center"
  494. label="用户账号">
  495. </el-table-column>
  496. <el-table-column
  497. prop="userDisplay"
  498. header-align="center"
  499. align="center"
  500. label="用户名">
  501. </el-table-column>
  502. <el-table-column
  503. prop="active"
  504. header-align="center"
  505. align="center"
  506. label="是否在用">
  507. </el-table-column>
  508. </el-table>
  509. <el-footer style="height:40px;margin-top:
  510. 10px;text-align:center">
  511. <el-button @click="engineer6Flag = false">关闭</el-button>
  512. </el-footer>
  513. </el-dialog>
  514. <!--工程师选择弹框-->
  515. <el-dialog title="IPQC-Lam/Pri/Etch/Slit" @close="closeEngineerInfoDialog" @open="openEngineerInfoDialog" :visible.sync="engineerFlag" width="559px" v-drag>
  516. <el-form inline="inline" label-position="top" :model="searchBusinessData2" style="margin-left: 7px;margin-top: -5px;">
  517. <el-form-item label="用户账号">
  518. <el-input v-model="searchBusinessData2.username" clearable style="width: 110px"></el-input>
  519. </el-form-item>
  520. <el-form-item label="用户名">
  521. <el-input v-model="searchBusinessData2.userDisplay" clearable style="width: 110px"></el-input>
  522. </el-form-item>
  523. <el-form-item label="是否在用">
  524. <el-select filterable v-model="searchBusinessData2.active" style="width: 140px">
  525. <el-option label="是" value="Y"></el-option>
  526. <el-option label="否" value="N"></el-option>
  527. </el-select>
  528. </el-form-item>
  529. <el-form-item label=" ">
  530. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList2()">查询</el-button>
  531. </el-form-item>
  532. </el-form>
  533. <el-table
  534. :height="height + 110"
  535. :data="businessDataList2"
  536. stripe
  537. highlight-current-row
  538. border
  539. @row-dblclick="engineerRowDblclick"
  540. style="width: 100%;">
  541. <el-table-column
  542. prop="username"
  543. header-align="center"
  544. align="center"
  545. label="用户账号">
  546. </el-table-column>
  547. <el-table-column
  548. prop="userDisplay"
  549. header-align="center"
  550. align="center"
  551. label="用户名">
  552. </el-table-column>
  553. <el-table-column
  554. prop="active"
  555. header-align="center"
  556. align="center"
  557. label="是否在用">
  558. </el-table-column>
  559. </el-table>
  560. <el-footer style="height:40px;margin-top:
  561. 10px;text-align:center">
  562. <el-button @click="engineerFlag = false">关闭</el-button>
  563. </el-footer>
  564. </el-dialog>
  565. <!--IPQC选择弹框-->
  566. <el-dialog title="IPQC-Converting" @close="closeIPQCInfoDialog" @open="openIPQCInfoDialog" :visible.sync="IPQCFlag" width="559px" v-drag>
  567. <el-form inline="inline" label-position="top" :model="searchBusinessData3" style="margin-left: 7px;margin-top: -5px;">
  568. <el-form-item label="用户账号">
  569. <el-input v-model="searchBusinessData3.username" clearable style="width: 110px"></el-input>
  570. </el-form-item>
  571. <el-form-item label="用户名">
  572. <el-input v-model="searchBusinessData3.userDisplay" clearable style="width: 110px"></el-input>
  573. </el-form-item>
  574. <el-form-item label="是否在用">
  575. <el-select filterable v-model="searchBusinessData3.active" style="width: 140px">
  576. <el-option label="是" value="Y"></el-option>
  577. <el-option label="否" value="N"></el-option>
  578. </el-select>
  579. </el-form-item>
  580. <el-form-item label=" ">
  581. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList3()">查询</el-button>
  582. </el-form-item>
  583. </el-form>
  584. <el-table
  585. :height="height + 110"
  586. :data="businessDataList3"
  587. stripe
  588. highlight-current-row
  589. border
  590. @row-dblclick="IPQCRowDblclick"
  591. style="width: 100%;">
  592. <el-table-column
  593. prop="username"
  594. header-align="center"
  595. align="center"
  596. label="用户账号">
  597. </el-table-column>
  598. <el-table-column
  599. prop="userDisplay"
  600. header-align="center"
  601. align="center"
  602. label="用户名">
  603. </el-table-column>
  604. <el-table-column
  605. prop="active"
  606. header-align="center"
  607. align="center"
  608. label="是否在用">
  609. </el-table-column>
  610. </el-table>
  611. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  612. <el-button @click="IPQCFlag = false">关闭</el-button>
  613. </el-footer>
  614. </el-dialog>
  615. <!--FQC1选择弹框-->
  616. <el-dialog title="FQC1" @close="closeFQC1InfoDialog" @open="openFQC1InfoDialog" :visible.sync="FQC1Flag" width="559px" v-drag>
  617. <el-form inline="inline" label-position="top" :model="searchBusinessData4" style="margin-left: 7px;margin-top: -5px;">
  618. <el-form-item label="用户账号">
  619. <el-input v-model="searchBusinessData4.username" clearable style="width: 110px"></el-input>
  620. </el-form-item>
  621. <el-form-item label="用户名">
  622. <el-input v-model="searchBusinessData4.userDisplay" clearable style="width: 110px"></el-input>
  623. </el-form-item>
  624. <el-form-item label="是否在用">
  625. <el-select filterable v-model="searchBusinessData4.active" style="width: 140px">
  626. <el-option label="是" value="Y"></el-option>
  627. <el-option label="否" value="N"></el-option>
  628. </el-select>
  629. </el-form-item>
  630. <el-form-item label=" ">
  631. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList4()">查询</el-button>
  632. </el-form-item>
  633. </el-form>
  634. <el-table
  635. :height="height + 110"
  636. :data="businessDataList4"
  637. stripe
  638. highlight-current-row
  639. border
  640. @row-dblclick="FQC1RowDblclick"
  641. style="width: 100%;">
  642. <el-table-column
  643. prop="username"
  644. header-align="center"
  645. align="center"
  646. label="用户账号">
  647. </el-table-column>
  648. <el-table-column
  649. prop="userDisplay"
  650. header-align="center"
  651. align="center"
  652. label="用户名">
  653. </el-table-column>
  654. <el-table-column
  655. prop="active"
  656. header-align="center"
  657. align="center"
  658. label="是否在用">
  659. </el-table-column>
  660. </el-table>
  661. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  662. <el-button @click="FQC1Flag = false">关闭</el-button>
  663. </el-footer>
  664. </el-dialog>
  665. <!--MFG选择弹框-->
  666. <el-dialog title="MFG" @close="closeMFGInfoDialog" @open="openMFGInfoDialog" :visible.sync="MFGlag" width="559px" v-drag>
  667. <el-form inline="inline" label-position="top" :model="searchBusinessData5" style="margin-left: 7px;margin-top: -5px;">
  668. <el-form-item label="用户账号">
  669. <el-input v-model="searchBusinessData5.username" clearable style="width: 110px"></el-input>
  670. </el-form-item>
  671. <el-form-item label="用户名">
  672. <el-input v-model="searchBusinessData5.userDisplay" clearable style="width: 110px"></el-input>
  673. </el-form-item>
  674. <el-form-item label="是否在用">
  675. <el-select filterable v-model="searchBusinessData5.active" style="width: 140px">
  676. <el-option label="是" value="Y"></el-option>
  677. <el-option label="否" value="N"></el-option>
  678. </el-select>
  679. </el-form-item>
  680. <el-form-item label=" ">
  681. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList5()">查询</el-button>
  682. </el-form-item>
  683. </el-form>
  684. <el-table
  685. :height="height + 110"
  686. :data="businessDataList5"
  687. stripe
  688. highlight-current-row
  689. border
  690. @row-dblclick="MFGRowDblclick"
  691. style="width: 100%;">
  692. <el-table-column
  693. prop="username"
  694. header-align="center"
  695. align="center"
  696. label="用户账号">
  697. </el-table-column>
  698. <el-table-column
  699. prop="userDisplay"
  700. header-align="center"
  701. align="center"
  702. label="用户名">
  703. </el-table-column>
  704. <el-table-column
  705. prop="active"
  706. header-align="center"
  707. align="center"
  708. label="是否在用">
  709. </el-table-column>
  710. </el-table>
  711. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  712. <el-button @click="MFGlag = false">关闭</el-button>
  713. </el-footer>
  714. </el-dialog>
  715. <!--文档工程师选择弹框-->
  716. <el-dialog title="文档工程师" @close="closeDocEngineerInfoDialog" @open="openDocEngineerInfoDialog" :visible.sync="docEngineerFlag" width="559px" v-drag>
  717. <el-form inline="inline" label-position="top" :model="searchBusinessData7" style="margin-left: 7px;margin-top: -5px;">
  718. <el-form-item label="用户账号">
  719. <el-input v-model="searchBusinessData7.username" clearable style="width: 110px"></el-input>
  720. </el-form-item>
  721. <el-form-item label="用户名">
  722. <el-input v-model="searchBusinessData7.userDisplay" clearable style="width: 110px"></el-input>
  723. </el-form-item>
  724. <el-form-item label="是否在用">
  725. <el-select filterable v-model="searchBusinessData7.active" style="width: 140px">
  726. <el-option label="是" value="Y"></el-option>
  727. <el-option label="否" value="N"></el-option>
  728. </el-select>
  729. </el-form-item>
  730. <el-form-item label=" ">
  731. <el-button type="primary" style="padding: 3px 12px" @click="searchBusinessInfoList7()">查询</el-button>
  732. </el-form-item>
  733. </el-form>
  734. <el-table
  735. :height="height + 110"
  736. :data="businessDataList7"
  737. stripe
  738. highlight-current-row
  739. border
  740. @row-dblclick="docEngineerRowDblclick"
  741. style="width: 100%;">
  742. <el-table-column
  743. prop="username"
  744. header-align="center"
  745. align="center"
  746. label="用户账号">
  747. </el-table-column>
  748. <el-table-column
  749. prop="userDisplay"
  750. header-align="center"
  751. align="center"
  752. label="用户名">
  753. </el-table-column>
  754. <el-table-column
  755. prop="active"
  756. header-align="center"
  757. align="center"
  758. label="是否在用">
  759. </el-table-column>
  760. </el-table>
  761. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  762. <el-button @click="docEngineerFlag = false">关闭</el-button>
  763. </el-footer>
  764. </el-dialog>
  765. <el-tabs style="height:100%; margin-top: 0px; width: 100%;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">
  766. <el-tab-pane label="项目物料" name="projectPart">
  767. <el-table
  768. :data="projectPartList"
  769. border
  770. style="width: 100%;margin-top: 5px;"
  771. :height="this.height + 128"
  772. ref="projectPartTable"
  773. :row-style="rowStyle"
  774. v-loading="dataListLoading">
  775. <el-table-column
  776. header-align="center"
  777. align="center"
  778. width="130"
  779. fixed="left"
  780. label="操作">
  781. <template slot-scope="scope">
  782. <a type="text" size="small" v-if="scope.row.testPartNo !== 'P000000'" @click="updatePartModal(scope.row)">编辑</a>
  783. <a type="text" size="small" @click="toMes(scope.row)">详情</a>
  784. <a type="text" size="small" @click="deletePartModal(scope.row)">删除</a>
  785. </template>
  786. </el-table-column>
  787. <el-table-column
  788. v-for="(item,index) in columnPartList" :key="index"
  789. :sortable="item.columnSortable"
  790. :prop="item.columnProp"
  791. :header-align="item.headerAlign"
  792. :show-overflow-tooltip="item.showOverflowTooltip"
  793. :align="item.align"
  794. :fixed="item.fixed==''?false:item.fixed"
  795. :min-width="item.columnWidth"
  796. :label="item.columnLabel">
  797. <template slot-scope="scope">
  798. <div v-if="item.columnProp === 'partType'">
  799. <span :style="{ color: scope.row.partType === 'Active' ? 'green' : 'Gray' , fontSize: '14px'}">
  800. {{ scope.row[item.columnProp] }}
  801. </span>
  802. </div>
  803. <div v-else>
  804. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  805. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  806. style="width: 100px; height: 80px"/></span>
  807. </div>
  808. </template>
  809. </el-table-column>
  810. </el-table>
  811. </el-tab-pane>
  812. </el-tabs>
  813. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  814. </div>
  815. </template>
  816. <script>
  817. import {getSiteAndBuByUserName} from "@/api/eam/eam.js"
  818. import {
  819. searchBusinessInfo,
  820. searchBusinessInfo1,
  821. searchBusinessInfo2,
  822. searchBusinessInfo3,
  823. searchBusinessInfo4,
  824. searchBusinessInfo5,
  825. searchBusinessInfo6
  826. } from "@/api/factory/site.js"
  827. import Chooselist from '@/views/modules/common/Chooselist_eam'
  828. import {removeUserFavorite, saveUserFavorite, userFavoriteList} from '@/api/userFavorite.js'
  829. import {getTableDefaultListLanguage, getTableUserListLanguage,} from "@/api/table.js";
  830. import {
  831. eamProjectInfoDelete,
  832. eamProjectInfoEdit,
  833. eamProjectInfoSave,
  834. eamProjectInfoSearch,
  835. } from "@/api/eam/eamProject.js";
  836. import {
  837. eamProjectPartInfoDelete,
  838. eamProjectPartInfoEdit,
  839. eamProjectPartInfoSave,
  840. eamProjectPartSearch, getCustomerNo, queryEamProjectInfo, saveNewCustomer
  841. } from "../../../api/eam/eamProject";
  842. import row from "element-ui/packages/row";
  843. import 'moment/locale/zh-cn';
  844. import {EventBus} from "../../../main";
  845. import {queryCustomerList} from "../../../api/customer/customer";
  846. import {searchBusinessInfo7} from "../../../api/factory/site";
  847. /*打样记录組件*/
  848. export default {
  849. computed: {
  850. row() {
  851. return row
  852. },
  853. projectOwnersList() {
  854. return this.allPersonnelInfoList.filter(item => item.projectOwnerId !== undefined);
  855. },
  856. projectManagersList() {
  857. return this.allPersonnelInfoList.filter(item => item.projectManagerId !== undefined);
  858. },
  859. engineersList() {
  860. return this.allPersonnelInfoList.filter(item => item.engineerId !== undefined);
  861. },
  862. },
  863. components: {
  864. Chooselist,
  865. },
  866. watch: {
  867. searchData: {
  868. deep: true,
  869. handler: function (newV, oldV) {
  870. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  871. }
  872. },
  873. },
  874. data () {
  875. return {
  876. // 是否收藏
  877. favorite: false,
  878. // 导出 start
  879. exportData: [],
  880. exportName: "项目信息" + this.dayjs().format('YYYYMMDDHHmmss'),
  881. exportHeader: ["项目信息"],
  882. exportFooter: [],
  883. exportList:[],
  884. // 导出 end
  885. tagNo:'',
  886. fileName:'',
  887. folder: 'projectConfirm',
  888. searchData: {
  889. site: this.$store.state.user.site,
  890. userName: this.$store.state.user.name,
  891. projectId: '',
  892. projectNo: '',
  893. projectDesc: '',
  894. partDesc: '',
  895. customerNo: '',
  896. customerDesc: '',
  897. buDesc: '',
  898. projectCategory: '',
  899. status: '',
  900. projectManager: '',
  901. projectOwner: '',
  902. engineer: '',
  903. startDate:'',
  904. endDate:'',
  905. projectCreationDate: new Date(),
  906. projectCloseDate:'',
  907. needDate:'',
  908. cProjectRegion: '',
  909. // active: 'Y',
  910. page: 1,
  911. limit: 10,
  912. },
  913. height: 200,
  914. pageIndex: 1,
  915. pageSize: 20,
  916. totalPage: 0,
  917. businessDataList: [],
  918. businessDataList1: [],
  919. businessDataList2: [],
  920. businessDataList3: [],
  921. businessDataList4: [],
  922. businessDataList5: [],
  923. businessDataList6: [],
  924. businessDataList7: [],
  925. dataList: [],
  926. selectTypeFlag: [],
  927. projectPartList: [],
  928. allPersonnelInfoList: [],
  929. // ======== 选中的当前行数据 ========
  930. projectPart: {},
  931. fileList: [],
  932. dataListLoading: false,
  933. modalFlag:false,
  934. modalDisableFlag:false,
  935. modalPartDisableFlag:false,
  936. projectManagerFlag:false,
  937. projectOwnerFlag:false,
  938. engineerFlag:false,
  939. engineer6Flag:false,
  940. IPQCFlag:false,
  941. FQC1Flag:false,
  942. MFGlag:false,
  943. docEngineerFlag:false,
  944. newCustomerFlag:false,
  945. modalData:{
  946. flag:'',
  947. bu: '',
  948. buNo: '',
  949. buDesc: '',
  950. site: this.$store.state.user.site,
  951. projectId: '',
  952. projectNo: '',
  953. projectPartId: '',
  954. oriProjectId: '',
  955. projectDesc:'',
  956. projectCloseDate:'',
  957. proofingNo:'',
  958. needDate:'',
  959. customerNo:'',
  960. finalCustomerId:'',
  961. customerDesc:'',
  962. projectCategory:'',
  963. testPartNo:'',
  964. partDesc:'',
  965. priority:'',
  966. projectManager:'',
  967. projectManagerName:'',
  968. projectOwner:'',
  969. projectOwnerName:'',
  970. cProjectRegion:'',
  971. cProjectBuildDate:'',
  972. cQualityEngineer1:'',
  973. cQualityEngineer1Name:'',
  974. cQualityEngineer2:'',
  975. cQualityEngineer2Name:'',
  976. cQualityEngineer3:'',
  977. cQualityEngineer3Name:'',
  978. cQualityEngineer4:'',
  979. cQualityEngineer4Name:'',
  980. cQualityEngineer5:'',
  981. cQualityEngineer5Name:'',
  982. cQualityEngineer6:'',
  983. cQualityEngineer6Name:'',
  984. cManufactureEngineer:'',
  985. cManufactureEngineerName:'',
  986. docEngineer:'',
  987. docEngineerName:'',
  988. engineer:'',
  989. engineerName:'',
  990. //projectCreationDate为当前服务器的时间
  991. projectCreationDate: new Date(),
  992. finalPartNo:'',
  993. finalPartDesc:'',
  994. partType:'',
  995. wantedConfirmDate: new Date(),
  996. // active:'',
  997. createBy: this.$store.state.user.name,
  998. updateBy: this.$store.state.user.name,
  999. },
  1000. searchBusinessData:{
  1001. site: this.$store.state.user.site,
  1002. username: '',
  1003. roleDesc: '',
  1004. userDisplay: '',
  1005. active: '',
  1006. page: 1,
  1007. limit: 10,
  1008. },
  1009. searchBusinessData1:{
  1010. site: this.$store.state.user.site,
  1011. username: '',
  1012. roleDesc: '',
  1013. userDisplay: '',
  1014. active: '',
  1015. page: 1,
  1016. limit: 10,
  1017. },
  1018. searchBusinessData2:{
  1019. site: this.$store.state.user.site,
  1020. username: '',
  1021. roleDesc: '',
  1022. userDisplay: '',
  1023. active: '',
  1024. page: 1,
  1025. limit: 10,
  1026. },
  1027. searchBusinessData3:{
  1028. site: this.$store.state.user.site,
  1029. username: '',
  1030. roleDesc: '',
  1031. userDisplay: '',
  1032. active: '',
  1033. page: 1,
  1034. limit: 10,
  1035. },
  1036. searchBusinessData4:{
  1037. site: this.$store.state.user.site,
  1038. username: '',
  1039. roleDesc: '',
  1040. userDisplay: '',
  1041. active: '',
  1042. page: 1,
  1043. limit: 10,
  1044. },
  1045. searchBusinessData5:{
  1046. site: this.$store.state.user.site,
  1047. username: '',
  1048. roleDesc: '',
  1049. userDisplay: '',
  1050. active: '',
  1051. page: 1,
  1052. limit: 10,
  1053. },
  1054. searchBusinessData6:{
  1055. site: this.$store.state.user.site,
  1056. username: '',
  1057. roleDesc: '',
  1058. userDisplay: '',
  1059. active: '',
  1060. page: 1,
  1061. limit: 10,
  1062. },
  1063. searchBusinessData7:{
  1064. site: this.$store.state.user.site,
  1065. username: '',
  1066. roleDesc: '',
  1067. userDisplay: '',
  1068. active: '',
  1069. page: 1,
  1070. limit: 10,
  1071. },
  1072. activeName: 'projectPart',
  1073. // 展示列集
  1074. columnList: [
  1075. {
  1076. userId: this.$store.state.user.name,
  1077. functionId: 401003,
  1078. serialNumber: '401003Table1BuDesc',
  1079. tableId: "401003Table1",
  1080. tableName: "BU文档清单表",
  1081. columnProp: 'buDesc',
  1082. headerAlign: "center",
  1083. align: "center",
  1084. columnLabel: 'BU',
  1085. columnHidden: false,
  1086. columnImage: false,
  1087. columnSortable: false,
  1088. sortLv: 0,
  1089. status: true,
  1090. fixed: '',
  1091. columnWidth: 100,
  1092. },
  1093. {
  1094. userId: this.$store.state.user.name,
  1095. functionId: 401003,
  1096. serialNumber: '401003Table1ProjectId',
  1097. tableId: "401003Table1",
  1098. tableName: "项目信息表",
  1099. columnProp: 'projectNo',
  1100. headerAlign: "center",
  1101. align: "center",
  1102. columnLabel: '项目编码',
  1103. columnHidden: false,
  1104. columnImage: false,
  1105. columnSortable: false,
  1106. sortLv: 0,
  1107. status: true,
  1108. fixed: '',
  1109. columnWidth: 100,
  1110. },
  1111. {
  1112. userId: this.$store.state.user.name,
  1113. functionId: 401003,
  1114. serialNumber: '401003Table1ProjectDesc',
  1115. tableId: "401003Table1",
  1116. tableName: "项目信息表",
  1117. columnProp: 'projectDesc',
  1118. headerAlign: "center",
  1119. align: "center",
  1120. columnLabel: '项目名称',
  1121. columnHidden: false,
  1122. columnImage: false,
  1123. columnSortable: false,
  1124. sortLv: 0,
  1125. status: true,
  1126. fixed: '',
  1127. columnWidth: 100,
  1128. },
  1129. {
  1130. userId: this.$store.state.user.name,
  1131. functionId: 401003,
  1132. serialNumber: '401003Table1customerNo',
  1133. tableId: "401003Table1",
  1134. tableName: "项目信息表",
  1135. columnProp: "customerNo",
  1136. headerAlign: "center",
  1137. align: "left",
  1138. columnLabel: "客户编码",
  1139. columnHidden: false,
  1140. columnImage: false,
  1141. columnSortable: false,
  1142. sortLv: 0,
  1143. status: true,
  1144. fixed: '',
  1145. columnWidth: 100
  1146. },
  1147. {
  1148. userId: this.$store.state.user.name,
  1149. functionId: 401003,
  1150. serialNumber: '401003Table1customerDesc',
  1151. tableId: "401003Table1",
  1152. tableName: "项目信息表",
  1153. columnProp: "customerDesc",
  1154. headerAlign: "center",
  1155. align: "left",
  1156. columnLabel: "客户名称",
  1157. columnHidden: false,
  1158. columnImage: false,
  1159. columnSortable: false,
  1160. sortLv: 0,
  1161. status: true,
  1162. fixed: '',
  1163. columnWidth: 150
  1164. },
  1165. {
  1166. userId: this.$store.state.user.name,
  1167. functionId: 401003,
  1168. serialNumber: '401003Table1ProjectCreationDate',
  1169. tableId: "401003Table1",
  1170. tableName: "项目信息表",
  1171. columnProp: "projectCreationDate",
  1172. headerAlign: "center",
  1173. align: "center",
  1174. columnLabel: "立项日期",
  1175. columnHidden: false,
  1176. columnImage: false,
  1177. columnSortable: false,
  1178. sortLv: 0,
  1179. status: true,
  1180. fixed: '',
  1181. columnWidth: 120
  1182. },
  1183. {
  1184. userId: this.$store.state.user.name,
  1185. functionId: 401003,
  1186. serialNumber: '401003Table1ProjectCategory',
  1187. tableId: "401003Table1",
  1188. tableName: "项目信息表",
  1189. columnProp: 'projectCategory',
  1190. headerAlign: "center",
  1191. align: "left",
  1192. columnLabel: '项目分类',
  1193. columnHidden: false,
  1194. columnImage: false,
  1195. columnSortable: false,
  1196. sortLv: 0,
  1197. status: true,
  1198. fixed: '',
  1199. columnWidth: 120,
  1200. },
  1201. {
  1202. userId: this.$store.state.user.name,
  1203. functionId: 401003,
  1204. serialNumber: '401003Table1Priority',
  1205. tableId: "401003Table1",
  1206. tableName: "项目信息表",
  1207. columnProp: 'priority',
  1208. headerAlign: "center",
  1209. align: "left",
  1210. columnLabel: '优先级',
  1211. columnHidden: false,
  1212. columnImage: false,
  1213. columnSortable: false,
  1214. sortLv: 0,
  1215. status: true,
  1216. fixed: '',
  1217. columnWidth: 80,
  1218. },
  1219. {
  1220. userId: this.$store.state.user.name,
  1221. functionId: 401003,
  1222. serialNumber: '401003Table1CProjectRegion',
  1223. tableId: "401003Table1",
  1224. tableName: "项目信息表",
  1225. columnProp: 'cProjectRegion',
  1226. headerAlign: "center",
  1227. align: "left",
  1228. columnLabel: '区域',
  1229. columnHidden: false,
  1230. columnImage: false,
  1231. columnSortable: false,
  1232. sortLv: 0,
  1233. status: true,
  1234. fixed: '',
  1235. columnWidth: 120,
  1236. },
  1237. {
  1238. userId: this.$store.state.user.name,
  1239. functionId: 401003,
  1240. serialNumber: '401003Table1ProjectManager',
  1241. tableId: "401003Table1",
  1242. tableName: "项目信息表",
  1243. columnProp: 'projectManagerName',
  1244. headerAlign: "center",
  1245. align: "left",
  1246. columnLabel: 'PM/Sales',
  1247. columnHidden: false,
  1248. columnImage: false,
  1249. columnSortable: false,
  1250. sortLv: 0,
  1251. status: true,
  1252. fixed: '',
  1253. columnWidth: 120,
  1254. },
  1255. {
  1256. userId: this.$store.state.user.name,
  1257. functionId: 401003,
  1258. serialNumber: '401003Table1ProjectOwner',
  1259. tableId: "401003Table1",
  1260. tableName: "项目信息表",
  1261. columnProp: 'projectOwnerName',
  1262. headerAlign: "center",
  1263. align: "left",
  1264. columnLabel: 'PjM',
  1265. columnHidden: false,
  1266. columnImage: false,
  1267. columnSortable: false,
  1268. sortLv: 0,
  1269. status: true,
  1270. fixed: '',
  1271. columnWidth: 120,
  1272. },
  1273. {
  1274. userId: this.$store.state.user.name,
  1275. functionId: 401003,
  1276. serialNumber: '401003Table1Engineer',
  1277. tableId: "401003Table1",
  1278. tableName: "项目信息表",
  1279. columnProp: 'engineerName',
  1280. headerAlign: "center",
  1281. align: "left",
  1282. columnLabel: 'Engineer',
  1283. columnHidden: false,
  1284. columnImage: false,
  1285. columnSortable: false,
  1286. sortLv: 0,
  1287. status: true,
  1288. fixed: '',
  1289. columnWidth: 120,
  1290. },
  1291. {
  1292. userId: this.$store.state.user.name,
  1293. functionId: 401003,
  1294. serialNumber: '401003Table1CQualityEngineer1',
  1295. tableId: "401003Table1",
  1296. tableName: "项目信息表",
  1297. columnProp: 'cQualityEngineer1Name',
  1298. headerAlign: "center",
  1299. align: "left",
  1300. columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
  1301. columnHidden: false,
  1302. columnImage: false,
  1303. columnSortable: false,
  1304. sortLv: 0,
  1305. status: true,
  1306. fixed: '',
  1307. columnWidth: 120,
  1308. },
  1309. {
  1310. userId: this.$store.state.user.name,
  1311. functionId: 401003,
  1312. serialNumber: '401003Table1CQualityEngineer2',
  1313. tableId: "401003Table1",
  1314. tableName: "项目信息表",
  1315. columnProp: 'cQualityEngineer2Name',
  1316. headerAlign: "center",
  1317. align: "left",
  1318. columnLabel: 'IPQC-Converting',
  1319. columnHidden: false,
  1320. columnImage: false,
  1321. columnSortable: false,
  1322. sortLv: 0,
  1323. status: true,
  1324. fixed: '',
  1325. columnWidth: 120,
  1326. },
  1327. {
  1328. userId: this.$store.state.user.name,
  1329. functionId: 401003,
  1330. serialNumber: '401003Table1CQualityEngineer3',
  1331. tableId: "401003Table1",
  1332. tableName: "项目信息表",
  1333. columnProp: 'cQualityEngineer3Name',
  1334. headerAlign: "center",
  1335. align: "left",
  1336. columnLabel: 'FQC1',
  1337. columnHidden: false,
  1338. columnImage: false,
  1339. columnSortable: false,
  1340. sortLv: 0,
  1341. status: true,
  1342. fixed: '',
  1343. columnWidth: 120,
  1344. },
  1345. {
  1346. userId: this.$store.state.user.name,
  1347. functionId: 401003,
  1348. serialNumber: '401003Table1CQualityEngineer5',
  1349. tableId: "401003Table1",
  1350. tableName: "项目信息表",
  1351. columnProp: 'cQualityEngineer5Name',
  1352. headerAlign: "center",
  1353. align: "left",
  1354. columnLabel: 'FQC2',
  1355. columnHidden: false,
  1356. columnImage: false,
  1357. columnSortable: false,
  1358. sortLv: 0,
  1359. status: true,
  1360. fixed: '',
  1361. columnWidth: 120,
  1362. },
  1363. {
  1364. userId: this.$store.state.user.name,
  1365. functionId: 401003,
  1366. serialNumber: '401003Table1CQualityEngineer6',
  1367. tableId: "401003Table1",
  1368. tableName: "项目信息表",
  1369. columnProp: 'cQualityEngineer6Name',
  1370. headerAlign: "center",
  1371. align: "left",
  1372. columnLabel: 'IQC',
  1373. columnHidden: false,
  1374. columnImage: false,
  1375. columnSortable: false,
  1376. sortLv: 0,
  1377. status: true,
  1378. fixed: '',
  1379. columnWidth: 120,
  1380. },
  1381. {
  1382. userId: this.$store.state.user.name,
  1383. functionId: 401003,
  1384. serialNumber: '401003Table1CManufactureEngineer',
  1385. tableId: "401003Table1",
  1386. tableName: "项目信息表",
  1387. columnProp: 'cManufactureEngineerName',
  1388. headerAlign: "center",
  1389. align: "left",
  1390. columnLabel: 'MFG',
  1391. columnHidden: false,
  1392. columnImage: false,
  1393. columnSortable: false,
  1394. sortLv: 0,
  1395. status: true,
  1396. fixed: '',
  1397. columnWidth: 120,
  1398. },
  1399. {
  1400. userId: this.$store.state.user.name,
  1401. functionId: 401003,
  1402. serialNumber: '401003Table1CQualityEngineer4',
  1403. tableId: "401003Table1",
  1404. tableName: "项目信息表",
  1405. columnProp: 'cQualityEngineer4Name',
  1406. headerAlign: "center",
  1407. align: "left",
  1408. columnLabel: 'SQE',
  1409. columnHidden: false,
  1410. columnImage: false,
  1411. columnSortable: false,
  1412. sortLv: 0,
  1413. status: true,
  1414. fixed: '',
  1415. columnWidth: 120,
  1416. },
  1417. {
  1418. userId: this.$store.state.user.name,
  1419. functionId: 401003,
  1420. serialNumber: '401003Table1DocEngineer',
  1421. tableId: "401003Table1",
  1422. tableName: "项目信息表",
  1423. columnProp: 'docEngineerName',
  1424. headerAlign: "center",
  1425. align: "left",
  1426. columnLabel: '文档工程师',
  1427. columnHidden: false,
  1428. columnImage: false,
  1429. columnSortable: false,
  1430. sortLv: 0,
  1431. status: true,
  1432. fixed: '',
  1433. columnWidth: 120,
  1434. },
  1435. {
  1436. userId: this.$store.state.user.name,
  1437. functionId: 401003,
  1438. serialNumber: '401003Table1Status',
  1439. tableId: "401003Table1",
  1440. tableName: "项目信息表",
  1441. columnProp: 'status',
  1442. headerAlign: "center",
  1443. align: "left",
  1444. columnLabel: '项目状态' ,
  1445. columnHidden: false,
  1446. columnImage: false,
  1447. columnSortable: false,
  1448. sortLv: 0,
  1449. status: true,
  1450. fixed: '',
  1451. columnWidth: 100,
  1452. },
  1453. {
  1454. userId: this.$store.state.user.name,
  1455. functionId: 401003,
  1456. serialNumber: '401003Table1NeedDate',
  1457. tableId: "401003Table1",
  1458. tableName: "项目信息表",
  1459. columnProp: 'needDate',
  1460. headerAlign: "center",
  1461. align: "center",
  1462. columnLabel: '预计完成日期',
  1463. columnHidden: false,
  1464. columnImage: false,
  1465. columnSortable: false,
  1466. sortLv: 0,
  1467. status: true,
  1468. fixed: '',
  1469. columnWidth: 120,
  1470. },
  1471. {
  1472. userId: this.$store.state.user.name,
  1473. functionId: 401003,
  1474. serialNumber: '401003Table1ProjectCloseDate',
  1475. tableId: "401003Table1",
  1476. tableName: "项目信息表",
  1477. columnProp: 'projectCloseDate',
  1478. headerAlign: "center",
  1479. align: "left",
  1480. columnLabel: '结案日期',
  1481. columnHidden: false,
  1482. columnImage: false,
  1483. columnSortable: false,
  1484. sortLv: 0,
  1485. status: true,
  1486. fixed: '',
  1487. columnWidth: 120,
  1488. },
  1489. {
  1490. userId: this.$store.state.user.name,
  1491. functionId: 401003,
  1492. serialNumber: '401003Table1CreateDate',
  1493. tableId: "401003Table1",
  1494. tableName: "项目信息表",
  1495. columnProp: 'createDate',
  1496. headerAlign: "center",
  1497. align: "center",
  1498. columnLabel: '创建时间',
  1499. columnHidden: false,
  1500. columnImage: false,
  1501. columnSortable: false,
  1502. sortLv: 0,
  1503. status: true,
  1504. fixed: '',
  1505. columnWidth: 120,
  1506. },
  1507. {
  1508. userId: this.$store.state.user.name,
  1509. functionId: 401003,
  1510. serialNumber: '401003Table1CreateBy',
  1511. tableId: "401003Table1",
  1512. tableName: "项目信息表",
  1513. columnProp: 'createBy',
  1514. headerAlign: "center",
  1515. align: "left",
  1516. columnLabel: '创建人',
  1517. columnHidden: false,
  1518. columnImage: false,
  1519. columnSortable: false,
  1520. sortLv: 0,
  1521. status: true,
  1522. fixed: '',
  1523. columnWidth: 120,
  1524. },
  1525. {
  1526. userId: this.$store.state.user.name,
  1527. functionId: 401003,
  1528. serialNumber: '401003Table1UpdateDate',
  1529. tableId: "401003Table1",
  1530. tableName: "项目信息表",
  1531. columnProp: 'updateDate',
  1532. headerAlign: "center",
  1533. align: "center",
  1534. columnLabel: '更新时间',
  1535. columnHidden: false,
  1536. columnImage: false,
  1537. columnSortable: false,
  1538. sortLv: 0,
  1539. status: true,
  1540. fixed: '',
  1541. columnWidth: 120,
  1542. },
  1543. {
  1544. userId: this.$store.state.user.name,
  1545. functionId: 401003,
  1546. serialNumber: '401003Table1UpdateBy',
  1547. tableId: "401003Table1",
  1548. tableName: "项目信息表",
  1549. columnProp: 'updateBy',
  1550. headerAlign: "center",
  1551. align: "left",
  1552. columnLabel: '更新人',
  1553. columnHidden: false,
  1554. columnImage: false,
  1555. columnSortable: false,
  1556. sortLv: 0,
  1557. status: true,
  1558. fixed: '',
  1559. columnWidth: 120,
  1560. },
  1561. ],
  1562. columnPartList: [
  1563. {
  1564. userId: this.$store.state.user.name,
  1565. functionId: 401003,
  1566. serialNumber: '401003Table2TestPartNo',
  1567. tableId: "401003Table2",
  1568. tableName: "项目信息物料表",
  1569. columnProp: 'testPartNo',
  1570. headerAlign: "center",
  1571. align: "center",
  1572. columnLabel: '项目料号',
  1573. columnHidden: false,
  1574. columnImage: false,
  1575. columnSortable: false,
  1576. sortLv: 0,
  1577. status: true,
  1578. fixed: '',
  1579. columnWidth: 100,
  1580. },
  1581. {
  1582. userId: this.$store.state.user.name,
  1583. functionId: 401003,
  1584. serialNumber: '401003Table2PartDesc',
  1585. tableId: "401003Table2",
  1586. tableName: "项目信息物料表",
  1587. columnProp: 'partDesc',
  1588. headerAlign: "center",
  1589. align: "center",
  1590. columnLabel: '料号描述',
  1591. columnHidden: false,
  1592. columnImage: false,
  1593. columnSortable: false,
  1594. sortLv: 0,
  1595. status: true,
  1596. fixed: '',
  1597. columnWidth: 100,
  1598. },
  1599. {
  1600. userId: this.$store.state.user.name,
  1601. functionId: 401003,
  1602. serialNumber: '401003Table2BuildDate',
  1603. tableId: "401003Table2",
  1604. tableName: "项目信息物料表",
  1605. columnProp: "buildDate",
  1606. headerAlign: "center",
  1607. align: "center",
  1608. columnLabel: "立项日期",
  1609. columnHidden: false,
  1610. columnImage: false,
  1611. columnSortable: false,
  1612. sortLv: 0,
  1613. status: true,
  1614. fixed: '',
  1615. columnWidth: 120
  1616. },
  1617. {
  1618. userId: this.$store.state.user.name,
  1619. functionId: 401003,
  1620. serialNumber: '401003Table2ProjectCategory',
  1621. tableId: "401003Table2",
  1622. tableName: "项目信息物料表",
  1623. columnProp: 'projectCategory',
  1624. headerAlign: "center",
  1625. align: "left",
  1626. columnLabel: '项目分类',
  1627. columnHidden: false,
  1628. columnImage: false,
  1629. columnSortable: false,
  1630. sortLv: 0,
  1631. status: true,
  1632. fixed: '',
  1633. columnWidth: 120,
  1634. },
  1635. {
  1636. userId: this.$store.state.user.name,
  1637. functionId: 401003,
  1638. serialNumber: '401003Table2Priority',
  1639. tableId: "401003Table2",
  1640. tableName: "项目信息物料表",
  1641. columnProp: 'priority',
  1642. headerAlign: "center",
  1643. align: "left",
  1644. columnLabel: '优先级',
  1645. columnHidden: false,
  1646. columnImage: false,
  1647. columnSortable: false,
  1648. sortLv: 0,
  1649. status: true,
  1650. fixed: '',
  1651. columnWidth: 80,
  1652. },
  1653. {
  1654. userId: this.$store.state.user.name,
  1655. functionId: 401003,
  1656. serialNumber: '401003Table2ProjectManager',
  1657. tableId: "401003Table2",
  1658. tableName: "项目信息物料表",
  1659. columnProp: 'projectManagerName',
  1660. headerAlign: "center",
  1661. align: "left",
  1662. columnLabel: 'PM/Sales',
  1663. columnHidden: false,
  1664. columnImage: false,
  1665. columnSortable: false,
  1666. sortLv: 0,
  1667. status: true,
  1668. fixed: '',
  1669. columnWidth: 120,
  1670. },
  1671. {
  1672. userId: this.$store.state.user.name,
  1673. functionId: 401003,
  1674. serialNumber: '401003Table2ProjectOwner',
  1675. tableId: "401003Table2",
  1676. tableName: "项目信息物料表",
  1677. columnProp: 'projectOwnerName',
  1678. headerAlign: "center",
  1679. align: "left",
  1680. columnLabel: 'PjM',
  1681. columnHidden: false,
  1682. columnImage: false,
  1683. columnSortable: false,
  1684. sortLv: 0,
  1685. status: true,
  1686. fixed: '',
  1687. columnWidth: 120,
  1688. },
  1689. {
  1690. userId: this.$store.state.user.name,
  1691. functionId: 401003,
  1692. serialNumber: '401003Table2Engineer',
  1693. tableId: "401003Table2",
  1694. tableName: "项目信息物料表",
  1695. columnProp: 'engineerName',
  1696. headerAlign: "center",
  1697. align: "left",
  1698. columnLabel: 'Engineer',
  1699. columnHidden: false,
  1700. columnImage: false,
  1701. columnSortable: false,
  1702. sortLv: 0,
  1703. status: true,
  1704. fixed: '',
  1705. columnWidth: 120,
  1706. },
  1707. {
  1708. userId: this.$store.state.user.name,
  1709. functionId: 401003,
  1710. serialNumber: '401003Table2CQualityEngineer1',
  1711. tableId: "401003Table2",
  1712. tableName: "项目信息物料表",
  1713. columnProp: 'cQualityEngineer1Name',
  1714. headerAlign: "center",
  1715. align: "left",
  1716. columnLabel: 'IPQC-Lam/Pri/Etch/Slit',
  1717. columnHidden: false,
  1718. columnImage: false,
  1719. columnSortable: false,
  1720. sortLv: 0,
  1721. status: true,
  1722. fixed: '',
  1723. columnWidth: 120,
  1724. },
  1725. {
  1726. userId: this.$store.state.user.name,
  1727. functionId: 401003,
  1728. serialNumber: '401003Table2CQualityEngineer2',
  1729. tableId: "401003Table2",
  1730. tableName: "项目信息物料表",
  1731. columnProp: 'cQualityEngineer2Name',
  1732. headerAlign: "center",
  1733. align: "left",
  1734. columnLabel: 'IPQC-Converting',
  1735. columnHidden: false,
  1736. columnImage: false,
  1737. columnSortable: false,
  1738. sortLv: 0,
  1739. status: true,
  1740. fixed: '',
  1741. columnWidth: 120,
  1742. },
  1743. {
  1744. userId: this.$store.state.user.name,
  1745. functionId: 401003,
  1746. serialNumber: '401003Table2CQualityEngineer3',
  1747. tableId: "401003Table2",
  1748. tableName: "项目信息物料表",
  1749. columnProp: 'cQualityEngineer3Name',
  1750. headerAlign: "center",
  1751. align: "left",
  1752. columnLabel: 'FQC1',
  1753. columnHidden: false,
  1754. columnImage: false,
  1755. columnSortable: false,
  1756. sortLv: 0,
  1757. status: true,
  1758. fixed: '',
  1759. columnWidth: 120,
  1760. },
  1761. {
  1762. userId: this.$store.state.user.name,
  1763. functionId: 401003,
  1764. serialNumber: '401003Table2CQualityEngineer5',
  1765. tableId: "401003Table2",
  1766. tableName: "项目信息物料表",
  1767. columnProp: 'cQualityEngineer5Name',
  1768. headerAlign: "center",
  1769. align: "left",
  1770. columnLabel: 'FQC2',
  1771. columnHidden: false,
  1772. columnImage: false,
  1773. columnSortable: false,
  1774. sortLv: 0,
  1775. status: true,
  1776. fixed: '',
  1777. columnWidth: 120,
  1778. },
  1779. {
  1780. userId: this.$store.state.user.name,
  1781. functionId: 401003,
  1782. serialNumber: '401003Table2CQualityEngineer6',
  1783. tableId: "401003Table2",
  1784. tableName: "项目信息物料表",
  1785. columnProp: 'cQualityEngineer6Name',
  1786. headerAlign: "center",
  1787. align: "left",
  1788. columnLabel: 'IQC',
  1789. columnHidden: false,
  1790. columnImage: false,
  1791. columnSortable: false,
  1792. sortLv: 0,
  1793. status: true,
  1794. fixed: '',
  1795. columnWidth: 120,
  1796. },
  1797. {
  1798. userId: this.$store.state.user.name,
  1799. functionId: 401003,
  1800. serialNumber: '401003Table2CManufactureEngineer',
  1801. tableId: "401003Table2",
  1802. tableName: "项目信息物料表",
  1803. columnProp: 'cManufactureEngineerName',
  1804. headerAlign: "center",
  1805. align: "left",
  1806. columnLabel: 'MFG',
  1807. columnHidden: false,
  1808. columnImage: false,
  1809. columnSortable: false,
  1810. sortLv: 0,
  1811. status: true,
  1812. fixed: '',
  1813. columnWidth: 120,
  1814. },
  1815. {
  1816. userId: this.$store.state.user.name,
  1817. functionId: 401003,
  1818. serialNumber: '401003Table2CQualityEngineer4',
  1819. tableId: "401003Table2",
  1820. tableName: "项目信息物料表",
  1821. columnProp: 'cQualityEngineer4Name',
  1822. headerAlign: "center",
  1823. align: "left",
  1824. columnLabel: 'SQE',
  1825. columnHidden: false,
  1826. columnImage: false,
  1827. columnSortable: false,
  1828. sortLv: 0,
  1829. status: true,
  1830. fixed: '',
  1831. columnWidth: 120,
  1832. },
  1833. {
  1834. userId: this.$store.state.user.name,
  1835. functionId: 401003,
  1836. serialNumber: '401003Table2DocEngineer',
  1837. tableId: "401003Table2",
  1838. tableName: "项目信息物料表",
  1839. columnProp: 'docEngineerName',
  1840. headerAlign: "center",
  1841. align: "left",
  1842. columnLabel: '文档工程师',
  1843. columnHidden: false,
  1844. columnImage: false,
  1845. columnSortable: false,
  1846. sortLv: 0,
  1847. status: true,
  1848. fixed: '',
  1849. columnWidth: 120,
  1850. },
  1851. {
  1852. userId: this.$store.state.user.name,
  1853. functionId: 401003,
  1854. serialNumber: '401003Table2Status',
  1855. tableId: "401003Table2",
  1856. tableName: "项目信息物料表",
  1857. columnProp: 'status',
  1858. headerAlign: "center",
  1859. align: "left",
  1860. columnLabel: '项目状态' ,
  1861. columnHidden: false,
  1862. columnImage: false,
  1863. columnSortable: false,
  1864. sortLv: 0,
  1865. status: true,
  1866. fixed: '',
  1867. columnWidth: 100,
  1868. },
  1869. {
  1870. userId: this.$store.state.user.name,
  1871. functionId: 401003,
  1872. serialNumber: '401003Table2PartType',
  1873. tableId: "401003Table2",
  1874. tableName: "项目信息物料表",
  1875. columnProp: 'partType',
  1876. headerAlign: "center",
  1877. align: "center",
  1878. columnLabel: '料号状态' ,
  1879. columnHidden: false,
  1880. columnImage: false,
  1881. columnSortable: false,
  1882. sortLv: 0,
  1883. status: true,
  1884. fixed: '',
  1885. columnWidth: 100,
  1886. },
  1887. {
  1888. userId: this.$store.state.user.name,
  1889. functionId: 401003,
  1890. serialNumber: '401003Table2NeedDate',
  1891. tableId: "401003Table2",
  1892. tableName: "项目信息物料表",
  1893. columnProp: 'needDate',
  1894. headerAlign: "center",
  1895. align: "center",
  1896. columnLabel: '预计完成日期',
  1897. columnHidden: false,
  1898. columnImage: false,
  1899. columnSortable: false,
  1900. sortLv: 0,
  1901. status: true,
  1902. fixed: '',
  1903. columnWidth: 120,
  1904. },
  1905. {
  1906. userId: this.$store.state.user.name,
  1907. functionId: 401003,
  1908. serialNumber: '401003Table2CloseDate',
  1909. tableId: "401003Table2",
  1910. tableName: "项目信息物料表",
  1911. columnProp: 'closeDate',
  1912. headerAlign: "center",
  1913. align: "left",
  1914. columnLabel: '结案日期',
  1915. columnHidden: false,
  1916. columnImage: false,
  1917. columnSortable: false,
  1918. sortLv: 0,
  1919. status: true,
  1920. fixed: '',
  1921. columnWidth: 120,
  1922. },
  1923. {
  1924. userId: this.$store.state.user.name,
  1925. functionId: 401003,
  1926. serialNumber: '401003Table2FinalPartNo',
  1927. tableId: "401003Table2",
  1928. tableName: "项目信息物料表",
  1929. columnProp: 'finalPartNo',
  1930. headerAlign: "center",
  1931. align: "left",
  1932. columnLabel: 'ERP正式料号',
  1933. columnHidden: false,
  1934. columnImage: false,
  1935. columnSortable: false,
  1936. sortLv: 0,
  1937. status: true,
  1938. fixed: '',
  1939. columnWidth: 120,
  1940. },
  1941. {
  1942. userId: this.$store.state.user.name,
  1943. functionId: 401003,
  1944. serialNumber: '401003Table2CreateDate',
  1945. tableId: "401003Table2",
  1946. tableName: "项目信息物料表",
  1947. columnProp: 'createDate',
  1948. headerAlign: "center",
  1949. align: "center",
  1950. columnLabel: '创建时间',
  1951. columnHidden: false,
  1952. columnImage: false,
  1953. columnSortable: false,
  1954. sortLv: 0,
  1955. status: true,
  1956. fixed: '',
  1957. columnWidth: 120,
  1958. },
  1959. {
  1960. userId: this.$store.state.user.name,
  1961. functionId: 401003,
  1962. serialNumber: '401003Table2CreateBy',
  1963. tableId: "401003Table2",
  1964. tableName: "项目信息物料表",
  1965. columnProp: 'createBy',
  1966. headerAlign: "center",
  1967. align: "left",
  1968. columnLabel: '创建人',
  1969. columnHidden: false,
  1970. columnImage: false,
  1971. columnSortable: false,
  1972. sortLv: 0,
  1973. status: true,
  1974. fixed: '',
  1975. columnWidth: 120,
  1976. },
  1977. {
  1978. userId: this.$store.state.user.name,
  1979. functionId: 401003,
  1980. serialNumber: '401003Table2UpdateDate',
  1981. tableId: "401003Table2",
  1982. tableName: "项目信息物料表",
  1983. columnProp: 'updateDate',
  1984. headerAlign: "center",
  1985. align: "center",
  1986. columnLabel: '更新时间',
  1987. columnHidden: false,
  1988. columnImage: false,
  1989. columnSortable: false,
  1990. sortLv: 0,
  1991. status: true,
  1992. fixed: '',
  1993. columnWidth: 120,
  1994. },
  1995. {
  1996. userId: this.$store.state.user.name,
  1997. functionId: 401003,
  1998. serialNumber: '401003Table2UpdateBy',
  1999. tableId: "401003Table2",
  2000. tableName: "项目信息物料表",
  2001. columnProp: 'updateBy',
  2002. headerAlign: "center",
  2003. align: "left",
  2004. columnLabel: '更新人',
  2005. columnHidden: false,
  2006. columnImage: false,
  2007. columnSortable: false,
  2008. sortLv: 0,
  2009. status: true,
  2010. fixed: '',
  2011. columnWidth: 120,
  2012. },
  2013. ],
  2014. rules:{
  2015. projectNo:[
  2016. {
  2017. required: true,
  2018. message: ' ',
  2019. trigger: ['blur','change']
  2020. }
  2021. ],
  2022. projectDesc:[
  2023. {
  2024. required: true,
  2025. message: ' ',
  2026. trigger: ['blur','change']
  2027. }
  2028. ],
  2029. testPartNo:[
  2030. {
  2031. required: true,
  2032. message: ' ',
  2033. trigger: ['blur','change']
  2034. }
  2035. ],
  2036. partDesc:[
  2037. {
  2038. required: true,
  2039. message: ' ',
  2040. trigger: ['blur','change']
  2041. }
  2042. ],
  2043. partType:[
  2044. {
  2045. required: true,
  2046. message: ' ',
  2047. trigger: ['blur','change']
  2048. }
  2049. ],
  2050. projectManager:[
  2051. {
  2052. required: true,
  2053. message: ' ',
  2054. trigger: ['blur','change']
  2055. }
  2056. ],
  2057. engineer:[
  2058. {
  2059. required: true,
  2060. message: ' ',
  2061. trigger: ['blur','change']
  2062. }
  2063. ],
  2064. projectOwner:[
  2065. {
  2066. required: true,
  2067. message: ' ',
  2068. trigger: ['blur','change']
  2069. }
  2070. ],
  2071. cProjectRegion:[
  2072. {
  2073. required: true,
  2074. message: ' ',
  2075. trigger: ['blur','change']
  2076. }
  2077. ],
  2078. cQualityEngineer1:[
  2079. {
  2080. required: true,
  2081. message: ' ',
  2082. trigger: ['blur','change']
  2083. }
  2084. ],
  2085. cQualityEngineer2:[
  2086. {
  2087. required: true,
  2088. message: ' ',
  2089. trigger: ['blur','change']
  2090. }
  2091. ],
  2092. cQualityEngineer3:[
  2093. {
  2094. required: true,
  2095. message: ' ',
  2096. trigger: ['blur','change']
  2097. }
  2098. ],
  2099. cQualityEngineer4:[
  2100. {
  2101. required: true,
  2102. message: ' ',
  2103. trigger: ['blur','change']
  2104. }
  2105. ],
  2106. cQualityEngineer4Name:[
  2107. {
  2108. required: true,
  2109. message: ' ',
  2110. trigger: ['blur','change']
  2111. }
  2112. ],
  2113. cQualityEngineer5:[
  2114. {
  2115. required: true,
  2116. message: ' ',
  2117. trigger: ['blur','change']
  2118. }
  2119. ],
  2120. cQualityEngineer5Name:[
  2121. {
  2122. required: true,
  2123. message: ' ',
  2124. trigger: ['blur','change']
  2125. }
  2126. ],
  2127. cQualityEngineer6:[
  2128. {
  2129. required: true,
  2130. message: ' ',
  2131. trigger: ['blur','change']
  2132. }
  2133. ],
  2134. cQualityEngineer6Name:[
  2135. {
  2136. required: true,
  2137. message: ' ',
  2138. trigger: ['blur','change']
  2139. }
  2140. ],
  2141. cManufactureEngineer:[
  2142. {
  2143. required: true,
  2144. message: ' ',
  2145. trigger: ['blur','change']
  2146. }
  2147. ],
  2148. docEngineer:[
  2149. {
  2150. required: true,
  2151. message: ' ',
  2152. trigger: ['blur','change']
  2153. }
  2154. ],
  2155. docEngineerName:[
  2156. {
  2157. required: true,
  2158. message: ' ',
  2159. trigger: ['blur','change']
  2160. }
  2161. ],
  2162. projectManagerName:[
  2163. {
  2164. required: true,
  2165. message: ' ',
  2166. trigger: ['blur','change']
  2167. }
  2168. ],
  2169. engineerName:[
  2170. {
  2171. required: true,
  2172. message: ' ',
  2173. trigger: ['blur','change']
  2174. }
  2175. ],
  2176. cQualityEngineer1Name:[
  2177. {
  2178. required: true,
  2179. message: ' ',
  2180. trigger: ['blur','change']
  2181. }
  2182. ],
  2183. cQualityEngineer2Name:[
  2184. {
  2185. required: true,
  2186. message: ' ',
  2187. trigger: ['blur','change']
  2188. }
  2189. ],
  2190. cQualityEngineer3Name:[
  2191. {
  2192. required: true,
  2193. message: ' ',
  2194. trigger: ['blur','change']
  2195. }
  2196. ],
  2197. cManufactureEngineerName:[
  2198. {
  2199. required: true,
  2200. message: ' ',
  2201. trigger: ['blur','change']
  2202. }
  2203. ],
  2204. projectCategoryType:[
  2205. {
  2206. required: true,
  2207. message: ' ',
  2208. trigger: ['blur','change']
  2209. }
  2210. ],
  2211. documentTypeIdType:[
  2212. {
  2213. required: true,
  2214. message: ' ',
  2215. trigger: ['blur','change']
  2216. }
  2217. ],
  2218. documentTypeType:[
  2219. {
  2220. required: true,
  2221. message: ' ',
  2222. trigger: ['blur','change']
  2223. }
  2224. ],
  2225. responsibleDepartmentType:[
  2226. {
  2227. required: true,
  2228. message: ' ',
  2229. trigger: ['blur','change']
  2230. }
  2231. ],
  2232. estimatedCompletionDaysType:[
  2233. {
  2234. required: true,
  2235. message: ' ',
  2236. trigger: ['blur','change']
  2237. }
  2238. ],
  2239. activeType:[
  2240. {
  2241. required: true,
  2242. message: ' ',
  2243. trigger: ['blur','change']
  2244. }
  2245. ],
  2246. bu:[
  2247. {
  2248. required: true,
  2249. message: ' ',
  2250. trigger: ['blur','change']
  2251. }
  2252. ],
  2253. finalPartNo:[
  2254. {
  2255. required: true,
  2256. message: ' ',
  2257. trigger: ['blur','change']
  2258. }
  2259. ],
  2260. finalPartDesc:[
  2261. {
  2262. required: true,
  2263. message: ' ',
  2264. trigger: ['blur','change']
  2265. }
  2266. ],
  2267. needDate:[
  2268. {
  2269. required: true,
  2270. message: ' ',
  2271. trigger: ['blur','change']
  2272. }
  2273. ],
  2274. projectCreationDate:[
  2275. {
  2276. required: true,
  2277. message: ' ',
  2278. trigger: ['blur','change']
  2279. }
  2280. ],
  2281. wantedConfirmDate:[
  2282. {
  2283. required: true,
  2284. message: ' ',
  2285. trigger: ['blur','change']
  2286. }
  2287. ],
  2288. },
  2289. projectCategoryList: [
  2290. {
  2291. projectCategory: 'Low Risk',
  2292. },
  2293. {
  2294. projectCategory: 'High Risk',
  2295. },
  2296. {
  2297. projectCategory: 'Sustaining',
  2298. }
  2299. ],
  2300. cProjectRegionList: [
  2301. {
  2302. cProjectRegion: 'Global',
  2303. },
  2304. {
  2305. cProjectRegion: 'APAC',
  2306. },
  2307. {
  2308. cProjectRegion: 'CHINA',
  2309. },
  2310. {
  2311. cProjectRegion: 'EU',
  2312. },
  2313. {
  2314. cProjectRegion: 'US',
  2315. },
  2316. {
  2317. cProjectRegion: 'Mexico',
  2318. },
  2319. {
  2320. cProjectRegion: 'Other',
  2321. },
  2322. ],
  2323. priorityList: [
  2324. {
  2325. priority: 'Low',
  2326. },
  2327. {
  2328. priority: 'Middle',
  2329. },
  2330. {
  2331. priority: 'High',
  2332. },
  2333. ],
  2334. statusList: [
  2335. {
  2336. status: '草稿',
  2337. },
  2338. {
  2339. status: '进行中',
  2340. },
  2341. {
  2342. status: '已量产',
  2343. }
  2344. ],
  2345. userBuList: [],
  2346. menuId: this.$route.meta.menuId,
  2347. }
  2348. },
  2349. mounted () {
  2350. this.$nextTick(() => {
  2351. this.height = window.innerHeight - 558
  2352. })
  2353. EventBus.$on('updateProjectInfo', () => {
  2354. this.getDataList();
  2355. });
  2356. },
  2357. activated() {
  2358. this.$store.commit("sift/commitSearchFunction",this.queryDataList)
  2359. },
  2360. created () {
  2361. // 按钮控制
  2362. this.getButtonAuthData()
  2363. // 获取用户的 site 和 bu
  2364. this.getSiteAndBuByUserName()
  2365. // 校验用户是否收藏
  2366. this.favoriteIsOk()
  2367. // 动态列
  2368. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2369. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2370. if (!this.authSearch) {
  2371. if (!this.agencyMatters){
  2372. // 获取数据列表
  2373. this.getDataList()
  2374. }
  2375. }
  2376. },
  2377. methods: {
  2378. // 获取用户的bu
  2379. getSiteAndBuByUserName () {
  2380. let tempData = {
  2381. username: this.$store.state.user.name,
  2382. }
  2383. getSiteAndBuByUserName(tempData).then(({data}) => {
  2384. if (data.code === 0) {
  2385. this.userBuList = data.rows
  2386. }
  2387. })
  2388. },
  2389. // 获取基础数据列表S
  2390. getBaseList (val,type) {
  2391. this.tagNo = val
  2392. this.$nextTick(() => {
  2393. let strVal = ''
  2394. let conSql = ''
  2395. if (val === 509 ) {
  2396. strVal = this.modalData.customerNo ? this.modalData.customerNo : ''
  2397. }
  2398. else if (val === 2006 ) {
  2399. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2400. }
  2401. else if (val === 2007 ) {
  2402. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2403. }
  2404. else if (val === 2008 ) {
  2405. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2406. }
  2407. this.$refs.baseList.init(val, strVal,conSql)
  2408. })
  2409. },
  2410. /* 列表方法的回调 */
  2411. getBaseData (val) {
  2412. if (this.tagNo === 509) {
  2413. this.modalData.customerNo = val.customer_no
  2414. this.modalData.customerDesc = val.customer_desc
  2415. }
  2416. else if (this.tagNo === 2006) {
  2417. this.modalData.cQualityEngineer4 = val.username + '-' + val.user_display
  2418. this.modalData.cQualityEngineer4Name = this.modalData.cQualityEngineer4.split('-')[1]
  2419. }
  2420. else if (this.tagNo === 2007) {
  2421. this.modalData.cQualityEngineer5 = val.username + '-' + val.user_display
  2422. this.modalData.cQualityEngineer5Name = this.modalData.cQualityEngineer5.split('-')[1]
  2423. }
  2424. else if (this.tagNo === 2008) {
  2425. this.modalData.cQualityEngineer6 = val.username + '-' + val.user_display
  2426. this.modalData.cQualityEngineer6Name = this.modalData.cQualityEngineer6.split('-')[1]
  2427. }
  2428. },
  2429. newCustomer () {
  2430. this.modalData.customerNo = ''
  2431. this.modalData.customerDesc = ''
  2432. this.newCustomerFlag = true
  2433. },
  2434. customerNoBlur(){
  2435. let params = {
  2436. customerNo: this.modalData.customerNo,
  2437. createBy: this.$store.state.user.name,
  2438. }
  2439. queryCustomerList(params).then(({data}) => {
  2440. if (data && data.code === 0) {
  2441. if (data.rows.length === 1){
  2442. this.modalData.customerDesc = data.rows[0].customerDesc
  2443. }else {
  2444. this.modalData.customerDesc = ''
  2445. }
  2446. }else {
  2447. this.$message.warning(data.message)
  2448. }
  2449. }).catch((error) => {
  2450. this.$message.error(error)
  2451. })
  2452. },
  2453. saveNewCustomer () {
  2454. this.generateNextCustomerNo().then((customerNo) => {
  2455. if (customerNo !== false) {
  2456. this.modalData.customerNo = customerNo
  2457. let tempData = {
  2458. site: this.$store.state.user.site,
  2459. customerNo: customerNo,
  2460. customerDesc: this.modalData.customerDesc,
  2461. createBy: this.$store.state.user.name,
  2462. }
  2463. saveNewCustomer(tempData).then(({data}) => {
  2464. if (data.code === 0) {
  2465. this.modalData.customerNo = ''
  2466. this.modalData.customerDesc = ''
  2467. this.$message.success(data.msg)
  2468. this.newCustomerFlag = false
  2469. }
  2470. })
  2471. }
  2472. else {
  2473. this.$alert('该客户已存在,请重新输入客户名称!', '提示', {
  2474. confirmButtonText: '确定',
  2475. type: 'warning'
  2476. })
  2477. }
  2478. })
  2479. },
  2480. generateNextCustomerNo() {
  2481. return new Promise((resolve, reject) => {
  2482. getCustomerNo(this.modalData).then(({ data }) => {
  2483. if (data.code === 0){
  2484. if (data.data === null || data.data === undefined || data.data === '' || data.data === '0') {
  2485. resolve('C0001');
  2486. } else {
  2487. const stringData = String(data.data.customerNo); // 显式转换为字符串
  2488. const lastCustomerNo = parseInt(stringData.substring(1));
  2489. const nextCustomerNo = lastCustomerNo + 1;
  2490. let customerNo;
  2491. if (nextCustomerNo < 10) {
  2492. customerNo = 'C000' + nextCustomerNo;
  2493. } else if (nextCustomerNo < 100) {
  2494. customerNo = 'C00' + nextCustomerNo;
  2495. } else if (nextCustomerNo < 1000) {
  2496. customerNo = 'C0' + nextCustomerNo;
  2497. } else {
  2498. customerNo = 'C' + nextCustomerNo;
  2499. }
  2500. resolve(customerNo);
  2501. }
  2502. }
  2503. else {
  2504. resolve(false);
  2505. }
  2506. }).catch(error => {
  2507. reject('Failed to fetch customerNo: ' + error);
  2508. });
  2509. });
  2510. },
  2511. closeNewCustomer () {
  2512. this.modalData.customerNo = ''
  2513. this.modalData.customerDesc = ''
  2514. this.newCustomerFlag = false
  2515. },
  2516. // 校验用户是否收藏
  2517. favoriteIsOk () {
  2518. let userFavorite = {
  2519. userId: this.$store.state.user.id,
  2520. languageCode: this.$i18n.locale
  2521. }
  2522. userFavoriteList(userFavorite).then(({data}) => {
  2523. for (let i = 0; i < data.list.length; i++) {
  2524. if (this.$route.meta.menuId === data.list[i].menuId) {
  2525. this.favorite = true
  2526. }
  2527. }
  2528. })
  2529. },
  2530. // 收藏 OR 取消收藏
  2531. favoriteFunction () {
  2532. let userFavorite = {
  2533. userId: this.$store.state.user.id,
  2534. functionId: this.$route.meta.menuId,
  2535. }
  2536. if (this.favorite) {
  2537. removeUserFavorite(userFavorite).then(({data}) => {
  2538. this.$message.success(data.msg)
  2539. this.favorite = false
  2540. })
  2541. } else {
  2542. // 收藏
  2543. saveUserFavorite(userFavorite).then(({data}) => {
  2544. this.$message.success(data.msg)
  2545. this.favorite = true
  2546. })
  2547. }
  2548. },
  2549. //导出excel
  2550. async createExportData () {
  2551. this.searchData.limit = -1
  2552. this.searchData.page = 1
  2553. await eamProjectInfoSearch(this.searchData).then(({data}) => {
  2554. this.exportList = data.page.list
  2555. this.exportList.forEach((item) => {
  2556. item.projectManagerName = item.projectManager.split('-')[1];
  2557. item.projectOwnerName = item.projectOwner.split('-')[1];
  2558. item.engineerName = item.engineer.split('-')[1];
  2559. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1];
  2560. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1];
  2561. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1];
  2562. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1];
  2563. if (item.cQualityEngineer4 !== null && item.cQualityEngineer4 !== '') {
  2564. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1];
  2565. }
  2566. if (item.docEngineer !== null && item.docEngineer !== '') {
  2567. item.docEngineerName = item.docEngineer.split('-')[1];
  2568. }
  2569. if (item.cQualityEngineer5 !== null && item.cQualityEngineer5 !== '') {
  2570. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1];
  2571. }
  2572. if (item.cQualityEngineer6 !== null && item.cQualityEngineer6 !== '') {
  2573. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1];
  2574. }
  2575. });
  2576. for (let i = 0; i < this.exportList.length; i++) {
  2577. if (this.exportList[i].responsibleDepartment === 'R001') {
  2578. this.exportList[i].projectLeader = this.exportList[i].projectManager.split("-")[1];
  2579. } else if (this.exportList[i].responsibleDepartment === 'R002') {
  2580. this.exportList[i].projectLeader = this.exportList[i].projectOwner.split("-")[1];
  2581. } else if (this.exportList[i].responsibleDepartment === 'R004') {
  2582. this.exportList[i].projectLeader = this.exportList[i].engineer.split("-")[1];
  2583. } else if (this.exportList[i].responsibleDepartment === 'R005') {
  2584. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer1.split("-")[1];
  2585. } else if (this.exportList[i].responsibleDepartment === 'R007') {
  2586. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer2.split("-")[1];
  2587. } else if (this.exportList[i].responsibleDepartment === 'R008') {
  2588. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer3.split("-")[1];
  2589. } else if (this.exportList[i].responsibleDepartment === 'R009') {
  2590. this.exportList[i].projectLeader = this.exportList[i].cManufactureEngineer.split("-")[1];
  2591. } else if (this.exportList[i].responsibleDepartment === 'R012') {
  2592. if (this.exportList[i].docEngineer !== null && this.exportList[i].docEngineer !== '') {
  2593. this.exportList[i].projectLeader = this.exportList[i].docEngineer.split("-")[1];
  2594. }
  2595. } else if (this.exportList[i].responsibleDepartment === 'R011') {
  2596. if (this.exportList[i].cQualityEngineer4 !== null && this.exportList[i].cQualityEngineer4 !== '') {
  2597. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer4.split("-")[1];
  2598. }
  2599. } else if (this.exportList[i].responsibleDepartment === 'R013') {
  2600. if (this.exportList[i].cQualityEngineer5 !== null && this.exportList[i].cQualityEngineer5 !== '') {
  2601. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer5.split("-")[1];
  2602. }
  2603. } else if (this.exportList[i].responsibleDepartment === 'R014') {
  2604. if (this.exportList[i].cQualityEngineer6 !== null && this.exportList[i].cQualityEngineer6 !== '') {
  2605. this.exportList[i].projectLeader = this.exportList[i].cQualityEngineer6.split("-")[1];
  2606. }
  2607. }
  2608. }
  2609. })
  2610. return this.exportList
  2611. },
  2612. startDownload () {},
  2613. finishDownload () {},
  2614. fields () {
  2615. let json = "{"
  2616. this.columnList.forEach((item, index) => {
  2617. if (index == this.columnList.length - 1) {
  2618. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2619. } else {
  2620. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2621. }
  2622. })
  2623. json += "}"
  2624. let s = eval("(" + json + ")")
  2625. return s
  2626. },
  2627. agencyMatter(){
  2628. this.agencyMatters = false
  2629. this.getDataList()
  2630. },
  2631. // 获取数据列表
  2632. getDataList (params) {
  2633. this.selectTypeFlag = params
  2634. this.searchData.limit = this.pageSize
  2635. this.searchData.page = this.pageIndex
  2636. eamProjectInfoSearch(this.searchData).then(({data}) => {
  2637. if (data.code === 0) {
  2638. this.dataList = data.page.list
  2639. this.allPersonnelInfoList = data.rows
  2640. this.pageIndex = data.page.currPage
  2641. this.pageSize = data.page.pageSize
  2642. this.totalPage = data.page.totalCount
  2643. // 遍历dataList
  2644. this.dataList.forEach((item) => {
  2645. item.projectManagerName = item.projectManager.split('-')[1]
  2646. item.projectOwnerName = item.projectOwner.split('-')[1]
  2647. item.engineerName = item.engineer.split('-')[1]
  2648. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  2649. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  2650. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  2651. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  2652. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  2653. }
  2654. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  2655. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  2656. }
  2657. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  2658. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  2659. }
  2660. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  2661. if (item.docEngineer != null && item.docEngineer !== ''){
  2662. item.docEngineerName = item.docEngineer.split('-')[1]
  2663. }
  2664. })
  2665. // 获取全部人员信息用于下拉框
  2666. this.getAllPersonnelList()
  2667. // 判断是否全部存在数据
  2668. if (this.totalPage > 0) {
  2669. // 设置选中行
  2670. this.$refs.mainTable.setCurrentRow(this.dataList[0])
  2671. // 加载当前的页签的table
  2672. this.refreshCurrentTabTable()
  2673. }
  2674. } else {
  2675. this.$alert(data.msg, '提示', {
  2676. confirmButtonText: '确定',
  2677. type: 'warning'
  2678. })
  2679. }
  2680. })
  2681. },
  2682. queryDataList (params) {
  2683. this.selectTypeFlag = params
  2684. this.searchData.limit = this.pageSize
  2685. this.searchData.page = this.pageIndex
  2686. if (params !== null && params !== undefined) {
  2687. params.limit = this.pageSize
  2688. params.page = this.pageIndex
  2689. params.site = this.$store.state.user.site
  2690. params.userName = this.$store.state.user.name
  2691. } else {
  2692. params = this.searchData
  2693. }
  2694. queryEamProjectInfo(params).then(({data}) => {
  2695. if (data.code === 0) {
  2696. this.dataList = data.page.list
  2697. this.allPersonnelInfoList = data.rows
  2698. this.pageIndex = data.page.currPage
  2699. this.pageSize = data.page.pageSize
  2700. this.totalPage = data.page.totalCount
  2701. // 遍历dataList
  2702. this.dataList.forEach((item) => {
  2703. item.projectManagerName = item.projectManager.split('-')[1]
  2704. item.projectOwnerName = item.projectOwner.split('-')[1]
  2705. item.engineerName = item.engineer.split('-')[1]
  2706. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  2707. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  2708. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  2709. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  2710. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  2711. }
  2712. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  2713. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  2714. }
  2715. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  2716. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  2717. }
  2718. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  2719. if (item.docEngineer != null && item.docEngineer !== ''){
  2720. item.docEngineerName = item.docEngineer.split('-')[1]
  2721. }
  2722. })
  2723. // 获取全部人员信息用于下拉框
  2724. this.getAllPersonnelList()
  2725. // 判断是否全部存在数据
  2726. if (this.totalPage > 0) {
  2727. // 设置选中行
  2728. this.$refs.mainTable.setCurrentRow(this.dataList[0])
  2729. // 加载当前的页签的table
  2730. this.refreshCurrentTabTable()
  2731. }
  2732. } else {
  2733. this.$alert(data.msg, '提示', {
  2734. confirmButtonText: '确定',
  2735. type: 'warning'
  2736. })
  2737. }
  2738. })
  2739. },
  2740. getAllPersonnelList() {
  2741. let allPersonnelInfoDataList = JSON.parse(JSON.stringify(this.allPersonnelInfoList))
  2742. // 找出所有的同时过滤出唯一的 project owners, managers, and engineers
  2743. const allPersonnelList = [];
  2744. const projectOwnersMap = new Map();
  2745. const projectManagersMap = new Map();
  2746. const engineersMap = new Map();
  2747. allPersonnelInfoDataList.forEach((item) => {
  2748. // Handle project owners
  2749. if (!projectOwnersMap.has(item.projectOwner)) {
  2750. const projectOwnerId = projectOwnersMap.size + 1; // Incrementing by +1
  2751. projectOwnersMap.set(item.projectOwner, {
  2752. projectOwnerId,
  2753. projectOwner: item.projectOwner,
  2754. projectOwnerName: item.projectOwner.split('-')[1]
  2755. });
  2756. allPersonnelList.push(projectOwnersMap.get(item.projectOwner));
  2757. }
  2758. // Handle project managers
  2759. if (!projectManagersMap.has(item.projectManager)) {
  2760. const projectManagerId = projectManagersMap.size + 1;
  2761. projectManagersMap.set(item.projectManager, {
  2762. projectManagerId,
  2763. projectManager: item.projectManager,
  2764. projectManagerName: item.projectManager.split('-')[1]
  2765. });
  2766. allPersonnelList.push(projectManagersMap.get(item.projectManager));
  2767. }
  2768. // Handle engineers
  2769. if (!engineersMap.has(item.engineer)) {
  2770. const engineerId = engineersMap.size + 1;
  2771. engineersMap.set(item.engineer, {
  2772. engineerId,
  2773. engineer: item.engineer,
  2774. engineerName: item.engineer.split('-')[1]
  2775. });
  2776. allPersonnelList.push(engineersMap.get(item.engineer));
  2777. }
  2778. });
  2779. this.allPersonnelInfoList = allPersonnelList;
  2780. },
  2781. // ======== 列表操作方法 ========
  2782. /**
  2783. * 单机选中项目信息
  2784. * @param row
  2785. */
  2786. projectPartClickRow(row){
  2787. this.projectPartCurrentRow=JSON.parse(JSON.stringify(row));
  2788. },
  2789. /**
  2790. * 当前值发生变化的时候修改
  2791. * @param row
  2792. * @param oldRow
  2793. */
  2794. changeCurrentRow (row, oldRow) {
  2795. // 判断是否是获取焦点的事件
  2796. if (row) {
  2797. this.projectPartCurrentRow = JSON.parse(JSON.stringify(row))
  2798. //刷新当前页表
  2799. this.refreshCurrentTabTable()
  2800. }
  2801. },
  2802. // 每页数
  2803. sizeChangeHandle (val) {
  2804. this.pageSize = val
  2805. this.pageIndex = 1
  2806. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  2807. this.queryDataList(this.selectTypeFlag)
  2808. } else {
  2809. this.getDataList()
  2810. }
  2811. },
  2812. // 当前页
  2813. currentChangeHandle (val) {
  2814. this.pageIndex = val
  2815. if (this.selectTypeFlag !== null && this.selectTypeFlag !== undefined) {
  2816. this.queryDataList(this.selectTypeFlag)
  2817. } else {
  2818. this.getDataList()
  2819. }
  2820. },
  2821. addModal () {
  2822. this.modalData = {
  2823. flag: '1',
  2824. bu: this.userBuList[0].buNo,
  2825. site: this.$store.state.user.site,
  2826. customerNo:'',
  2827. customerDesc:'',
  2828. projectCategory:'',
  2829. testPartNo:'',
  2830. partDesc:'',
  2831. projectNo: '',
  2832. projectDesc:'',
  2833. projectCloseDate:'',
  2834. needDate:'',
  2835. cProjectRegion: '',
  2836. projectManager:'',
  2837. projectOwner:'',
  2838. projectOwnerName:'',
  2839. projectManagerName:'',
  2840. engineer: '',
  2841. engineerName: '',
  2842. cQualityEngineer1:'',
  2843. cQualityEngineer1Name:'',
  2844. cQualityEngineer2:'',
  2845. cQualityEngineer2Name:'',
  2846. cQualityEngineer3:'',
  2847. cQualityEngineer3Name:'',
  2848. cQualityEngineer4:'',
  2849. cQualityEngineer4Name:'',
  2850. cQualityEngineer5:'',
  2851. cQualityEngineer5Name:'',
  2852. cQualityEngineer6:'',
  2853. cQualityEngineer6Name:'',
  2854. cManufactureEngineer: '',
  2855. cManufactureEngineerName: '',
  2856. docEngineer: '',
  2857. docEngineerName: '',
  2858. projectCreationDate:new Date(),
  2859. createDate: '',
  2860. // active: 'Y',
  2861. createBy: this.$store.state.user.name,
  2862. updateBy: this.$store.state.user.name,
  2863. }
  2864. this.modalDisableFlag = false
  2865. this.modalPartDisableFlag = false
  2866. this.modalFlag = true
  2867. },
  2868. updateModal (row) {
  2869. this.modalData = {
  2870. flag: '2',
  2871. site: row.site,
  2872. bu: row.site + '_' + row.buNo,
  2873. customerNo: row.customerNo,
  2874. customerDesc: row.customerDesc,
  2875. projectCategory: row.projectCategory,
  2876. testPartNo: row.testPartNo,
  2877. partDesc: row.partDesc,
  2878. projectId: row.projectId,
  2879. projectNo: row.projectNo,
  2880. projectDesc: row.projectDesc,
  2881. priority: row.priority,
  2882. projectCloseDate: row.projectCloseDate,
  2883. needDate: row.needDate,
  2884. cProjectRegion: row.cProjectRegion,
  2885. projectManager: row.projectManager,
  2886. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  2887. projectOwner: row.projectOwner,
  2888. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  2889. engineer: row.engineer,
  2890. engineerName: row.engineer.split('-')[1], // 截取用户名
  2891. cQualityEngineer1: row.cQualityEngineer1,
  2892. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  2893. cQualityEngineer2: row.cQualityEngineer2,
  2894. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  2895. cQualityEngineer3: row.cQualityEngineer3,
  2896. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  2897. cQualityEngineer4: row.cQualityEngineer4,
  2898. cQualityEngineer5: row.cQualityEngineer5,
  2899. cQualityEngineer6: row.cQualityEngineer6,
  2900. cManufactureEngineer: row.cManufactureEngineer,
  2901. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  2902. docEngineer: row.docEngineer,
  2903. projectCreationDate: row.projectCreationDate,
  2904. status: row.status,
  2905. // active: row.active,
  2906. createBy: this.$store.state.user.name,
  2907. updateBy: this.$store.state.user.name,
  2908. }
  2909. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== ''){
  2910. this.modalData.cQualityEngineer4Name= row.cQualityEngineer4.split('-')[1] // 截取用户名
  2911. }
  2912. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== ''){
  2913. this.modalData.cQualityEngineer5Name= row.cQualityEngineer5.split('-')[1] // 截取用户名
  2914. }
  2915. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== ''){
  2916. this.modalData.cQualityEngineer6Name= row.cQualityEngineer6.split('-')[1] // 截取用户名
  2917. }
  2918. if (row.docEngineer != null && row.docEngineer !== ''){
  2919. this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名
  2920. }
  2921. this.modalDisableFlag = true
  2922. this.modalPartDisableFlag = false
  2923. this.modalFlag = true
  2924. },
  2925. // 删除
  2926. eamProjectInfoDelete (row) {
  2927. this.$confirm(`是否删除这个项目信息?`, '提示', {
  2928. confirmButtonText: '确定',
  2929. cancelButtonText: '取消',
  2930. type: 'warning'
  2931. }).then(() => {
  2932. eamProjectInfoDelete(row).then(({data}) => {
  2933. if (data && data.code === '0') {
  2934. this.getDataList()
  2935. EventBus.$emit('updateProjectPartInfo')
  2936. this.$message({
  2937. message: '操作成功',
  2938. type: 'success',
  2939. duration: 1500,
  2940. onClose: () => {}
  2941. })
  2942. } else {
  2943. this.$alert(data.msg, '错误', {
  2944. confirmButtonText: '确定'
  2945. })
  2946. }
  2947. })
  2948. }).catch(() => {
  2949. })
  2950. },
  2951. saveData () {
  2952. this.modalData.oriProjectId = this.modalData.projectNo
  2953. this.modalData.finalCustomerId = this.modalData.customerNo
  2954. if (this.modalData.projectNo === '' || this.modalData.projectNo == null) {
  2955. this.$message.warning('请输入项目编码!')
  2956. return
  2957. }
  2958. if (this.modalData.projectDesc === '' || this.modalData.projectDesc == null) {
  2959. this.$message.warning('请输入项目名称!')
  2960. return
  2961. }
  2962. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2963. this.modalData.customerNo = 'C0000'
  2964. this.modalData.customerDesc = '无客户'
  2965. this.modalData.finalCustomerId = this.modalData.customerNo
  2966. }
  2967. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2968. this.$alert('该客户不存在,请重新输入客户编码或点击新客户添加客户!', '提示', {
  2969. confirmButtonText: '确定',
  2970. type: 'warning'
  2971. })
  2972. return;
  2973. }
  2974. //请选择立项日期
  2975. if (this.searchData.projectCreationDate == null) {
  2976. this.$message.warning('请选择立项日期!')
  2977. return
  2978. }
  2979. if (this.modalData.needDate === '' || this.modalData.needDate == null) {
  2980. this.$message.warning('请选择预计完成日期!')
  2981. return
  2982. }
  2983. if (this.modalData.projectCategory === '' || this.modalData.projectCategory == null) {
  2984. this.$message.warning('请选择项目分类!')
  2985. return
  2986. }
  2987. if (this.modalData.bu === '' || this.modalData.bu == null) {
  2988. this.$message.warning('请选择BU!')
  2989. return
  2990. }
  2991. if (this.modalData.projectManager === '' || this.modalData.projectManager == null) {
  2992. this.$message.warning('请输入PM/Sales!')
  2993. return
  2994. }if (this.modalData.projectOwner === '' || this.modalData.projectOwner == null) {
  2995. this.$message.warning('请输入PjM!')
  2996. return
  2997. }
  2998. if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2999. this.$message.warning('请输入Engineer!')
  3000. return
  3001. }
  3002. if (this.modalData.cQualityEngineer1 === '' || this.modalData.cQualityEngineer1 == null) {
  3003. this.$message.warning('请输入IPQC-Lam/Pri/Etch/Slit!')
  3004. return
  3005. }
  3006. if (this.modalData.cQualityEngineer2 === '' || this.modalData.cQualityEngineer2 == null) {
  3007. this.$message.warning('请输入IPQC-Converting!')
  3008. return
  3009. }
  3010. if (this.modalData.cQualityEngineer3 === '' || this.modalData.cQualityEngineer3 == null) {
  3011. this.$message.warning('请输入FQC1!')
  3012. return
  3013. }
  3014. if (this.modalData.cQualityEngineer5 === '' || this.modalData.cQualityEngineer5 == null) {
  3015. this.$message.warning('请输入FQC2!')
  3016. return
  3017. }
  3018. if (this.modalData.cQualityEngineer6 === '' || this.modalData.cQualityEngineer6 == null) {
  3019. this.$message.warning('请输入IQC!')
  3020. return
  3021. }
  3022. if (this.modalData.cQualityEngineer4 === '' || this.modalData.cQualityEngineer4 == null) {
  3023. this.$message.warning('请输入SQE!')
  3024. return
  3025. }
  3026. if (this.modalData.cManufactureEngineer === '' || this.modalData.cManufactureEngineer == null) {
  3027. this.$message.warning('请输入MFG!')
  3028. return
  3029. }
  3030. if (this.modalData.docEngineer === '' || this.modalData.docEngineer == null) {
  3031. this.$message.warning('请输入文档工程师!')
  3032. return
  3033. }
  3034. // if (this.modalData.active === '' || this.modalData.active == null) {
  3035. // this.$message.warning('选择是否在用!')
  3036. // return
  3037. // }
  3038. if (this.modalData.flag === '1') {
  3039. // 遍历userBuList
  3040. this.userBuList.forEach((item) => {
  3041. if (this.modalData.bu === item.buNo) {
  3042. this.modalData.buDesc = item.buDesc
  3043. }
  3044. })
  3045. this.$confirm('项目 ' + this.modalData.projectNo + '-' + this.modalData.projectDesc + ' 的BU为:' + this.modalData.buDesc + ',是否确认继续保存?', '提示', {
  3046. confirmButtonText: '确定',
  3047. cancelButtonText: '取消',
  3048. type: 'warning'
  3049. }).then(() => {
  3050. if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
  3051. this.$confirm('预计完成日期小于当前日期,确定继续保存?', '提示', {
  3052. confirmButtonText: '确定',
  3053. cancelButtonText: '取消',
  3054. type: 'warning'
  3055. }).then(() => {
  3056. this.modalData.status = '草稿'
  3057. let inData = {
  3058. projectId: null,
  3059. projectNo: this.modalData.projectNo,
  3060. projectDesc: this.modalData.projectDesc,
  3061. projectCategory: this.modalData.projectCategory,
  3062. projectCloseDate: this.modalData.projectCloseDate,
  3063. needDate: this.modalData.needDate,
  3064. cProjectRegion: this.modalData.cProjectRegion,
  3065. projectManager: this.modalData.projectManager,
  3066. projectOwner: this.modalData.projectOwner,
  3067. engineer: this.modalData.engineer,
  3068. cQualityEngineer1: this.modalData.cQualityEngineer1,
  3069. cQualityEngineer2: this.modalData.cQualityEngineer2,
  3070. cQualityEngineer3: this.modalData.cQualityEngineer3,
  3071. cQualityEngineer4: this.modalData.cQualityEngineer4,
  3072. cQualityEngineer5: this.modalData.cQualityEngineer5,
  3073. cQualityEngineer6: this.modalData.cQualityEngineer6,
  3074. cManufactureEngineer: this.modalData.cManufactureEngineer,
  3075. docEngineer: this.modalData.docEngineer,
  3076. projectCreationDate: this.modalData.projectCreationDate,
  3077. createDate: this.modalData.createDate,
  3078. createBy: this.modalData.createBy,
  3079. updateBy: this.modalData.updateBy,
  3080. site: this.modalData.site,
  3081. bu: this.modalData.bu,
  3082. customerNo: this.modalData.customerNo,
  3083. customerDesc: this.modalData.customerDesc,
  3084. status: this.modalData.status,
  3085. active: this.modalData.active,
  3086. closeDate: this.modalData.projectCloseDate,
  3087. buildDate: this.modalData.projectCreationDate,
  3088. priority: this.modalData.priority,
  3089. testPartNo: 'P000000',
  3090. partDesc: '无物料',
  3091. }
  3092. eamProjectInfoSave(this.modalData).then(({data}) => {
  3093. if (data && data.code === '0') {
  3094. eamProjectInfoSearch(this.searchData).then(({data}) => {
  3095. if (data && data.code === 0) {
  3096. inData.projectId = data.page.list[0].projectId
  3097. eamProjectPartInfoSave(inData).then(({data}) => {
  3098. if (data && data.code === 0) {
  3099. this.getDataList()
  3100. this.modalFlag = false
  3101. EventBus.$emit('updateProjectPartInfo')
  3102. this.$message({
  3103. message: '操作成功',
  3104. type: 'success',
  3105. duration: 1500,
  3106. onClose: () => {
  3107. },
  3108. })
  3109. } else {
  3110. this.$alert(data.msg, '错误', {
  3111. confirmButtonText: '确定'
  3112. })
  3113. }
  3114. })
  3115. }
  3116. })
  3117. }
  3118. })
  3119. }).catch(() => {
  3120. // 如果点击取消提示已取消操作
  3121. this.$message({
  3122. type: 'info',
  3123. message: '已取消操作'
  3124. })
  3125. })
  3126. } else {
  3127. this.modalData.status = '草稿'
  3128. let inData = {
  3129. projectId: null,
  3130. projectNo: this.modalData.projectNo,
  3131. projectDesc: this.modalData.projectDesc,
  3132. projectCategory: this.modalData.projectCategory,
  3133. projectCloseDate: this.modalData.projectCloseDate,
  3134. needDate: this.modalData.needDate,
  3135. cProjectRegion: this.modalData.cProjectRegion,
  3136. projectManager: this.modalData.projectManager,
  3137. projectOwner: this.modalData.projectOwner,
  3138. engineer: this.modalData.engineer,
  3139. cQualityEngineer1: this.modalData.cQualityEngineer1,
  3140. cQualityEngineer2: this.modalData.cQualityEngineer2,
  3141. cQualityEngineer3: this.modalData.cQualityEngineer3,
  3142. cQualityEngineer4: this.modalData.cQualityEngineer4,
  3143. cQualityEngineer5: this.modalData.cQualityEngineer5,
  3144. cQualityEngineer6: this.modalData.cQualityEngineer6,
  3145. cManufactureEngineer: this.modalData.cManufactureEngineer,
  3146. docEngineer: this.modalData.docEngineer,
  3147. projectCreationDate: this.modalData.projectCreationDate,
  3148. createDate: this.modalData.createDate,
  3149. createBy: this.modalData.createBy,
  3150. updateBy: this.modalData.updateBy,
  3151. site: this.modalData.site,
  3152. bu: this.modalData.bu,
  3153. customerNo: this.modalData.customerNo,
  3154. customerDesc: this.modalData.customerDesc,
  3155. status: this.modalData.status,
  3156. active: this.modalData.active,
  3157. closeDate: this.modalData.projectCloseDate,
  3158. buildDate: this.modalData.projectCreationDate,
  3159. priority: this.modalData.priority,
  3160. testPartNo: 'P000000',
  3161. partDesc: '无物料',
  3162. }
  3163. eamProjectInfoSave(this.modalData).then(({data}) => {
  3164. if (data && data.code === '0') {
  3165. eamProjectInfoSearch(this.searchData).then(({data}) => {
  3166. if (data && data.code === 0) {
  3167. inData.projectId = data.page.list[0].projectId
  3168. eamProjectPartInfoSave(inData).then(({data}) => {
  3169. if (data && data.code === 0) {
  3170. this.getDataList()
  3171. this.modalFlag = false
  3172. EventBus.$emit('updateProjectPartInfo')
  3173. this.$message({
  3174. message: '操作成功',
  3175. type: 'success',
  3176. duration: 1500,
  3177. onClose: () => {
  3178. },
  3179. })
  3180. } else {
  3181. this.$alert(data.msg, '错误', {
  3182. confirmButtonText: '确定'
  3183. })
  3184. }
  3185. })
  3186. }
  3187. })
  3188. } else {
  3189. this.$alert(data.msg, '错误', {
  3190. confirmButtonText: '确定'
  3191. })
  3192. }
  3193. })
  3194. }
  3195. }).catch(() => {
  3196. // 如果点击取消提示已取消操作
  3197. this.$message({
  3198. type: 'info',
  3199. message: '已取消操作'
  3200. })
  3201. })
  3202. } else if (this.modalData.flag === '2'){
  3203. let inData = {
  3204. projectId : this.modalData.projectId,
  3205. projectNo: this.modalData.projectNo,
  3206. projectDesc: this.modalData.projectDesc,
  3207. projectCategory: this.modalData.projectCategory,
  3208. projectCloseDate: this.modalData.projectCloseDate,
  3209. needDate: this.modalData.needDate,
  3210. cProjectRegion: this.modalData.cProjectRegion,
  3211. projectManager: this.modalData.projectManager,
  3212. projectOwner: this.modalData.projectOwner,
  3213. engineer: this.modalData.engineer,
  3214. cQualityEngineer1: this.modalData.cQualityEngineer1,
  3215. cQualityEngineer2: this.modalData.cQualityEngineer2,
  3216. cQualityEngineer3: this.modalData.cQualityEngineer3,
  3217. cQualityEngineer4: this.modalData.cQualityEngineer4,
  3218. cQualityEngineer5: this.modalData.cQualityEngineer5,
  3219. cQualityEngineer6: this.modalData.cQualityEngineer6,
  3220. cManufactureEngineer: this.modalData.cManufactureEngineer,
  3221. docEngineer: this.modalData.docEngineer,
  3222. projectCreationDate: this.modalData.projectCreationDate,
  3223. createDate: this.modalData.createDate,
  3224. createBy: this.modalData.createBy,
  3225. updateBy: this.modalData.updateBy,
  3226. site: this.modalData.site,
  3227. bu: this.modalData.bu,
  3228. customerNo: this.modalData.customerNo,
  3229. customerDesc: this.modalData.customerDesc,
  3230. status: this.modalData.status,
  3231. active: this.modalData.active,
  3232. closeDate : this.modalData.projectCloseDate,
  3233. buildDate : this.modalData.projectCreationDate,
  3234. priority: this.modalData.priority,
  3235. testPartNo: 'P000000',
  3236. partDesc: '无物料',
  3237. }
  3238. if (new Date(this.modalData.needDate).getTime() < new Date().getTime()) {
  3239. this.$confirm('预计完成日期小于当前日期,确定继续保存?', '提示', {
  3240. confirmButtonText: '确定',
  3241. cancelButtonText: '取消',
  3242. type: 'warning'
  3243. }).then(() => {
  3244. eamProjectInfoEdit(this.modalData).then(({data}) => {
  3245. if (data && data.code === '0') {
  3246. if (this.projectPartList.length !== 0 && this.projectPartList[0].testPartNo === 'P000000') {
  3247. inData.projectPartId = this.projectPartList[0].projectPartId
  3248. eamProjectPartInfoEdit(inData).then(({data}) => {
  3249. if (data && data.code !== 0) {
  3250. this.$alert(data.msg, '错误', {
  3251. confirmButtonText: '确定'
  3252. })
  3253. }
  3254. })
  3255. }
  3256. this.getDataList()
  3257. this.modalFlag=false
  3258. EventBus.$emit('updateProjectPartInfo')
  3259. this.$message({
  3260. message: '操作成功',
  3261. type: 'success',
  3262. duration: 1500,
  3263. onClose: () => {}
  3264. })
  3265. } else {
  3266. this.$alert(data.msg, '错误', {
  3267. confirmButtonText: '确定'
  3268. })
  3269. }
  3270. })
  3271. }
  3272. ).catch(() => {
  3273. // 如果点击取消提示已取消操作
  3274. this.$message({
  3275. type: 'info',
  3276. message: '已取消操作'
  3277. })
  3278. })
  3279. }
  3280. else {
  3281. eamProjectInfoEdit(this.modalData).then(({data}) => {
  3282. if (data && data.code === '0') {
  3283. if (this.projectPartList.length !== 0 && this.projectPartList[0].testPartNo === 'P000000') {
  3284. inData.projectPartId = this.projectPartList[0].projectPartId
  3285. eamProjectPartInfoEdit(inData).then(({data}) => {
  3286. if (data && data.code !== 0) {
  3287. this.$alert(data.msg, '错误', {
  3288. confirmButtonText: '确定'
  3289. })
  3290. }
  3291. })
  3292. }
  3293. this.getDataList()
  3294. this.modalFlag=false
  3295. EventBus.$emit('updateProjectPartInfo')
  3296. this.$message({
  3297. message: '操作成功',
  3298. type: 'success',
  3299. duration: 1500,
  3300. onClose: () => {}
  3301. })
  3302. } else {
  3303. this.$alert(data.msg, '错误', {
  3304. confirmButtonText: '确定'
  3305. })
  3306. }
  3307. })
  3308. }
  3309. } else if (this.modalData.flag === '3') {
  3310. if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
  3311. this.$message.warning('请输入项目料号!')
  3312. return
  3313. }
  3314. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  3315. this.$message.warning('请输入料号描述!')
  3316. return
  3317. }
  3318. if (this.modalData.partType === '' || this.modalData.partType == null) {
  3319. this.$message.warning('请选择料号状态!')
  3320. return
  3321. }
  3322. this.modalData.closeDate = this.modalData.projectCloseDate
  3323. this.modalData.buildDate = this.modalData.projectCreationDate
  3324. eamProjectPartInfoSave(this.modalData).then(({data}) => {
  3325. if (data && data.code === 0) {
  3326. this.$message({
  3327. message: '操作成功',
  3328. type: 'success',
  3329. duration: 1500,
  3330. onClose: () => {}
  3331. })
  3332. this.refreshCurrentTabTable()
  3333. this.modalFlag=false
  3334. EventBus.$emit('updateProjectPartInfo')
  3335. } else {
  3336. this.$alert(data.msg, '错误', {
  3337. confirmButtonText: '确定'
  3338. })
  3339. }
  3340. })
  3341. } else {
  3342. if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
  3343. this.$message.warning('请输入项目料号!')
  3344. return
  3345. }
  3346. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  3347. this.$message.warning('请输入料号描述!')
  3348. return
  3349. }
  3350. if (this.modalData.partType === '' || this.modalData.partType == null) {
  3351. this.$message.warning('请选择料号状态!')
  3352. return
  3353. }
  3354. this.modalData.closeDate = this.modalData.projectCloseDate
  3355. this.modalData.buildDate = this.modalData.projectCreationDate
  3356. eamProjectPartInfoEdit(this.modalData).then(({data}) => {
  3357. if (data && data.code === 0) {
  3358. this.refreshCurrentTabTable()
  3359. this.modalFlag=false
  3360. EventBus.$emit('updateProjectPartInfo')
  3361. this.$message({
  3362. message: '操作成功',
  3363. type: 'success',
  3364. duration: 1500,
  3365. onClose: () => {}
  3366. })
  3367. } else {
  3368. this.$alert(data.msg, '错误', {
  3369. confirmButtonText: '确定'
  3370. })
  3371. }
  3372. })
  3373. }
  3374. },
  3375. searchBusinessInfoList1 () {
  3376. searchBusinessInfo1(this.searchBusinessData1).then(({data}) => {
  3377. if (data && data.code === 0){
  3378. this.businessDataList1 = data.rows;
  3379. }
  3380. })
  3381. },
  3382. searchBusinessInfoList () {
  3383. searchBusinessInfo(this.searchBusinessData).then(({data}) => {
  3384. if (data && data.code === 0){
  3385. this.businessDataList = data.rows;
  3386. }
  3387. })
  3388. },
  3389. searchBusinessInfoList2 () {
  3390. searchBusinessInfo2(this.searchBusinessData2).then(({data}) => {
  3391. if (data && data.code === 0){
  3392. this.businessDataList2 = data.rows;
  3393. }
  3394. })
  3395. },
  3396. searchBusinessInfoList3 () {
  3397. searchBusinessInfo3(this.searchBusinessData3).then(({data}) => {
  3398. if (data && data.code === 0){
  3399. this.businessDataList3 = data.rows;
  3400. }
  3401. })
  3402. },
  3403. searchBusinessInfoList4 () {
  3404. searchBusinessInfo4(this.searchBusinessData4).then(({data}) => {
  3405. if (data && data.code === 0){
  3406. this.businessDataList4 = data.rows;
  3407. }
  3408. })
  3409. },
  3410. searchBusinessInfoList5 () {
  3411. searchBusinessInfo5(this.searchBusinessData5).then(({data}) => {
  3412. if (data && data.code === 0){
  3413. this.businessDataList5 = data.rows;
  3414. }
  3415. })
  3416. },
  3417. searchBusinessInfoList6 () {
  3418. searchBusinessInfo6(this.searchBusinessData6).then(({data}) => {
  3419. if (data && data.code === 0){
  3420. this.businessDataList6 = data.rows;
  3421. }
  3422. })
  3423. },
  3424. searchBusinessInfoList7 () {
  3425. searchBusinessInfo7(this.searchBusinessData7).then(({data}) => {
  3426. if (data && data.code === 0){
  3427. this.businessDataList7 = data.rows;
  3428. }
  3429. })
  3430. },
  3431. // 打开项目经理
  3432. openProjectManagerInfoDialog () {
  3433. //请求
  3434. this.searchBusinessInfoList();
  3435. },
  3436. // 打开项目负责人
  3437. openProjectOwnerInfoDialog () {
  3438. //请求
  3439. this.searchBusinessInfoList1();
  3440. },
  3441. // 打开工程师
  3442. openEngineerInfoDialog () {
  3443. //请求
  3444. this.searchBusinessInfoList2();
  3445. },
  3446. // 打开IPQC
  3447. openIPQCInfoDialog () {
  3448. //请求
  3449. this.searchBusinessInfoList3();
  3450. },
  3451. // 打开FQC1
  3452. openFQC1InfoDialog () {
  3453. //请求
  3454. this.searchBusinessInfoList4();
  3455. },
  3456. // 打开MFG
  3457. openMFGInfoDialog () {
  3458. //请求
  3459. this.searchBusinessInfoList5();
  3460. },
  3461. // 打开文档工程师
  3462. openDocEngineerInfoDialog () {
  3463. //请求
  3464. this.searchBusinessInfoList7();
  3465. },
  3466. openEngineer6InfoDialog () {
  3467. //请求
  3468. this.searchBusinessInfoList6();
  3469. },
  3470. // 关闭
  3471. closeProjectManagerInfoDialog () {
  3472. this.businessDataList = []
  3473. this.projectManagerFlag = false
  3474. },
  3475. closeProjectOwnerInfoDialog () {
  3476. this.businessDataList1 = []
  3477. this.projectOwnerFlag = false
  3478. },
  3479. //关闭
  3480. closeEngineerInfoDialog () {
  3481. this.businessDataList2 = []
  3482. this.engineerFlag = false
  3483. },
  3484. closeEngineer6InfoDialog () {
  3485. this.businessDataList6 = []
  3486. this.engineer6Flag = false
  3487. },
  3488. //关闭
  3489. closeIPQCInfoDialog () {
  3490. this.businessDataList3 = []
  3491. this.IPQCFlag = false
  3492. },
  3493. //关闭
  3494. closeFQC1InfoDialog () {
  3495. this.businessDataList4 = []
  3496. this.FQC1Flag = false
  3497. },
  3498. //关闭
  3499. closeMFGInfoDialog () {
  3500. this.businessDataList5 = []
  3501. this.MFGlag = false
  3502. },
  3503. //关闭
  3504. closeDocEngineerInfoDialog () {
  3505. this.businessDataList7 = []
  3506. this.docEngineerFlag = false
  3507. },
  3508. projectManagerRowDblclick(row) {
  3509. if (row && row.username && row.userDisplay) {
  3510. this.modalData.projectManager = row.username + '-' + row.userDisplay;
  3511. if (this.modalData.projectManager) {
  3512. this.modalData.projectManagerName = this.modalData.projectManager.split('-')[1];
  3513. }
  3514. }
  3515. this.projectManagerFlag = false;
  3516. },
  3517. projectOwnerRowDblclick (row) {
  3518. this.modalData.projectOwner = row.username + '-' + row.userDisplay
  3519. this.modalData.projectOwnerName = this.modalData.projectOwner.split('-')[1] // 截取用户名
  3520. this.projectOwnerFlag = false
  3521. },
  3522. engineerRowDblclick (row) {
  3523. this.modalData.cQualityEngineer1 = row.username + '-' + row.userDisplay
  3524. this.modalData.cQualityEngineer1Name = this.modalData.cQualityEngineer1.split('-')[1] // 截取用户名
  3525. this.engineerFlag = false
  3526. },
  3527. engineer6RowDblclick (row) {
  3528. this.modalData.engineer = row.username + '-' + row.userDisplay
  3529. this.modalData.engineerName = this.modalData.engineer.split('-')[1] // 截取用户名
  3530. this.engineer6Flag = false
  3531. },
  3532. IPQCRowDblclick (row) {
  3533. this.modalData.cQualityEngineer2 = row.username + '-' + row.userDisplay
  3534. this.modalData.cQualityEngineer2Name = this.modalData.cQualityEngineer2.split('-')[1] // 截取用户名
  3535. this.IPQCFlag = false
  3536. },
  3537. FQC1RowDblclick (row) {
  3538. this.modalData.cQualityEngineer3 = row.username + '-' + row.userDisplay
  3539. this.modalData.cQualityEngineer3Name = this.modalData.cQualityEngineer3.split('-')[1] // 截取用户名
  3540. this.FQC1Flag = false
  3541. },
  3542. MFGRowDblclick (row) {
  3543. this.modalData.cManufactureEngineer = row.username + '-' + row.userDisplay
  3544. this.modalData.cManufactureEngineerName = this.modalData.cManufactureEngineer.split('-')[1] // 截取用户名
  3545. this.MFGlag = false
  3546. },
  3547. docEngineerRowDblclick (row) {
  3548. this.modalData.docEngineer = row.username + '-' + row.userDisplay
  3549. this.modalData.docEngineerName = this.modalData.docEngineer.split('-')[1] // 截取用户名
  3550. this.docEngineerFlag = false
  3551. },
  3552. closeClear () {
  3553. this.modalData.bu = ''
  3554. this.modalData.projectNo = ''
  3555. this.modalData.projectDesc = ''
  3556. this.modalData.projectCloseDate = ''
  3557. this.modalData.needDate = ''
  3558. this.modalData.customerNo = ''
  3559. this.modalData.customerDesc = ''
  3560. this.modalData.projectCategory = ''
  3561. this.modalData.testPartNo = ''
  3562. this.modalData.partDesc = ''
  3563. this.modalData.projectManager = ''
  3564. this.modalData.projectManagerName = ''
  3565. this.modalData.engineer = ''
  3566. this.modalData.engineerName = ''
  3567. this.modalData.cQualityEngineer1 = ''
  3568. this.modalData.cQualityEngineer1Name = ''
  3569. this.modalData.cQualityEngineer2 = ''
  3570. this.modalData.cQualityEngineer2Name = ''
  3571. this.modalData.cQualityEngineer3 = ''
  3572. this.modalData.cQualityEngineer3Name = ''
  3573. this.modalData.cQualityEngineer4 = ''
  3574. this.modalData.cQualityEngineer4Name = ''
  3575. this.modalData.cQualityEngineer5 = ''
  3576. this.modalData.cQualityEngineer5Name = ''
  3577. this.modalData.cQualityEngineer6 = ''
  3578. this.modalData.cQualityEngineer6Name = ''
  3579. this.modalData.cManufactureEngineer = ''
  3580. this.modalData.cManufactureEngineerName = ''
  3581. this.modalData.docEngineer = ''
  3582. this.modalData.docEngineerName = ''
  3583. this.modalData.projectCreationDate = new Date()
  3584. },
  3585. getProjectPartInfo () {
  3586. let queryProjectPart = {
  3587. projectId: this.projectPartCurrentRow.projectId,
  3588. projectNo: this.projectPartCurrentRow.projectNo,
  3589. site: this.projectPartCurrentRow.site,
  3590. buNo: this.projectPartCurrentRow.buNo,
  3591. userName: this.$store.state.user.name,
  3592. limit: 10,
  3593. page: 1
  3594. }
  3595. eamProjectPartSearch(queryProjectPart).then(({data}) => {
  3596. if (data && data.code === 0) {
  3597. this.projectPartList = data.page.list
  3598. // 遍历dataList
  3599. this.projectPartList.forEach((item) => {
  3600. item.projectManagerName = item.projectManager.split('-')[1]
  3601. item.projectOwnerName = item.projectOwner.split('-')[1]
  3602. item.engineerName = item.engineer.split('-')[1]
  3603. item.cQualityEngineer1Name = item.cQualityEngineer1.split('-')[1]
  3604. item.cQualityEngineer2Name = item.cQualityEngineer2.split('-')[1]
  3605. item.cQualityEngineer3Name = item.cQualityEngineer3.split('-')[1]
  3606. if (item.cQualityEngineer4 != null && item.cQualityEngineer4 !== ''){
  3607. item.cQualityEngineer4Name = item.cQualityEngineer4.split('-')[1]
  3608. }
  3609. if (item.cQualityEngineer5 != null && item.cQualityEngineer5 !== ''){
  3610. item.cQualityEngineer5Name = item.cQualityEngineer5.split('-')[1]
  3611. }
  3612. if (item.cQualityEngineer6 != null && item.cQualityEngineer6 !== ''){
  3613. item.cQualityEngineer6Name = item.cQualityEngineer6.split('-')[1]
  3614. }
  3615. item.cManufactureEngineerName = item.cManufactureEngineer.split('-')[1]
  3616. if (item.docEngineer != null && item.docEngineer !== ''){
  3617. item.docEngineerName = item.docEngineer.split('-')[1]
  3618. }
  3619. })
  3620. }
  3621. })
  3622. },
  3623. addProjectPartModal (row) {
  3624. this.modalData = {
  3625. flag: '3',
  3626. site: row.site,
  3627. bu: row.site + '_' + row.buNo,
  3628. projectPartId: '',
  3629. customerNo: row.customerNo,
  3630. customerDesc: row.customerDesc,
  3631. projectCategory: row.projectCategory,
  3632. testPartNo: '',
  3633. partDesc: '',
  3634. projectId: row.projectId,
  3635. projectNo: row.projectNo,
  3636. projectDesc: row.projectDesc,
  3637. priority: row.priority,
  3638. projectCloseDate: row.projectCloseDate,
  3639. needDate: row.needDate,
  3640. projectManager: row.projectManager,
  3641. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  3642. projectOwner: row.projectOwner,
  3643. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  3644. engineer: row.engineer,
  3645. engineerName: row.engineer.split('-')[1], // 截取用户名
  3646. cQualityEngineer1: row.cQualityEngineer1,
  3647. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  3648. cQualityEngineer2: row.cQualityEngineer2,
  3649. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  3650. cQualityEngineer3: row.cQualityEngineer3,
  3651. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  3652. cQualityEngineer4: row.cQualityEngineer4,
  3653. cQualityEngineer5: row.cQualityEngineer5,
  3654. cQualityEngineer6: row.cQualityEngineer6,
  3655. cManufactureEngineer: row.cManufactureEngineer,
  3656. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  3657. docEngineer: row.docEngineer,
  3658. projectCreationDate: row.projectCreationDate,
  3659. status: '草稿',
  3660. partType: 'Active',
  3661. // active: row.active,
  3662. createBy: this.$store.state.user.name,
  3663. updateBy: this.$store.state.user.name,
  3664. }
  3665. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== ''){
  3666. this.modalData.cQualityEngineer4Name= row.cQualityEngineer4.split('-')[1] // 截取用户名
  3667. }
  3668. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== ''){
  3669. this.modalData.cQualityEngineer5Name= row.cQualityEngineer5.split('-')[1] // 截取用户名
  3670. }
  3671. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== ''){
  3672. this.modalData.cQualityEngineer6Name= row.cQualityEngineer6.split('-')[1] // 截取用户名
  3673. }
  3674. if (row.docEngineer != null && row.docEngineer !== ''){
  3675. this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名
  3676. }
  3677. this.modalDisableFlag = true
  3678. this.modalPartDisableFlag = true
  3679. this.modalFlag = true
  3680. },
  3681. updatePartModal (row) {
  3682. this.modalData = {
  3683. flag: '4',
  3684. site: row.site,
  3685. bu: this.projectPartCurrentRow.site + '_' + this.projectPartCurrentRow.buNo,
  3686. customerNo: row.customerNo,
  3687. customerDesc: row.customerDesc,
  3688. projectCategory: row.projectCategory,
  3689. testPartNo: row.testPartNo,
  3690. partDesc: row.partDesc,
  3691. projectId: row.projectId,
  3692. projectNo: row.projectNo,
  3693. projectDesc: row.projectDesc,
  3694. projectPartId: row.projectPartId,
  3695. priority: row.priority,
  3696. projectCloseDate: row.closeDate,
  3697. needDate: row.needDate,
  3698. projectManager: row.projectManager,
  3699. projectManagerName: row.projectManager.split('-')[1], // 截取用户名
  3700. projectOwner: row.projectOwner,
  3701. projectOwnerName: row.projectOwner.split('-')[1], // 截取用户名
  3702. engineer: row.engineer,
  3703. engineerName: row.engineer.split('-')[1], // 截取用户名
  3704. cQualityEngineer1: row.cQualityEngineer1,
  3705. cQualityEngineer1Name: row.cQualityEngineer1.split('-')[1], // 截取用户名
  3706. cQualityEngineer2: row.cQualityEngineer2,
  3707. cQualityEngineer2Name: row.cQualityEngineer2.split('-')[1], // 截取用户名
  3708. cQualityEngineer3: row.cQualityEngineer3,
  3709. cQualityEngineer3Name: row.cQualityEngineer3.split('-')[1], // 截取用户名
  3710. cQualityEngineer4: row.cQualityEngineer4,
  3711. cQualityEngineer5: row.cQualityEngineer5,
  3712. cQualityEngineer6: row.cQualityEngineer6,
  3713. cManufactureEngineer: row.cManufactureEngineer,
  3714. cManufactureEngineerName: row.cManufactureEngineer.split('-')[1], // 截取用户名
  3715. docEngineer: row.docEngineer,
  3716. projectCreationDate: row.buildDate,
  3717. status: row.status,
  3718. partType: row.partType,
  3719. // active: row.active,
  3720. createBy: this.$store.state.user.name,
  3721. updateBy: this.$store.state.user.name,
  3722. }
  3723. if (row.cQualityEngineer4 != null && row.cQualityEngineer4 !== ''){
  3724. this.modalData.cQualityEngineer4Name= row.cQualityEngineer4.split('-')[1] // 截取用户名
  3725. }
  3726. if (row.cQualityEngineer5 != null && row.cQualityEngineer5 !== ''){
  3727. this.modalData.cQualityEngineer5Name= row.cQualityEngineer5.split('-')[1] // 截取用户名
  3728. }
  3729. if (row.cQualityEngineer6 != null && row.cQualityEngineer6 !== ''){
  3730. this.modalData.cQualityEngineer6Name= row.cQualityEngineer6.split('-')[1] // 截取用户名
  3731. }
  3732. if (row.docEngineer != null && row.docEngineer !== ''){
  3733. this.modalData.docEngineerName= row.docEngineer.split('-')[1] // 截取用户名
  3734. }
  3735. this.modalDisableFlag = true
  3736. this.modalPartDisableFlag = true
  3737. this.modalFlag = true
  3738. },
  3739. toMes (row) {
  3740. this.$router.push({ path: 'eam-eamProjectPartInfo', query: { testPartNo: row.testPartNo }})
  3741. },
  3742. deletePartModal (row) {
  3743. this.$confirm(`是否删除这个项目料号信息?`, '提示', {
  3744. confirmButtonText: '确定',
  3745. cancelButtonText: '取消',
  3746. type: 'warning'
  3747. }).then(() => {
  3748. eamProjectPartInfoDelete(row).then(({data}) => {
  3749. if (data && data.code === 0) {
  3750. this.getDataList()
  3751. EventBus.$emit('updateProjectPartInfo')
  3752. this.$message({
  3753. message: '操作成功',
  3754. type: 'success',
  3755. duration: 1500,
  3756. onClose: () => {}
  3757. })
  3758. } else {
  3759. this.$alert(data.msg, '错误', {
  3760. confirmButtonText: '确定'
  3761. })
  3762. }
  3763. })
  3764. }).catch(() => {
  3765. })
  3766. },
  3767. // 动态列开始 获取 用户保存的 格式列
  3768. async getTableUserColumn(tableId, columnId) {
  3769. let queryTableUser = {
  3770. userId: this.$store.state.user.name,
  3771. functionId: this.$route.meta.menuId,
  3772. tableId: tableId,
  3773. status: true,
  3774. languageCode: this.$i18n.locale
  3775. }
  3776. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  3777. if (data.rows.length > 0) {
  3778. //this.columnList1 = []
  3779. switch (columnId) {
  3780. case 1:
  3781. this.columnList = data.rows
  3782. break;
  3783. case 2:
  3784. this.columnPartList = data.rows
  3785. break;
  3786. // case 3:
  3787. // this.columnList2 = data.rows
  3788. // break;
  3789. // case 4:
  3790. // this.columnList3 = data.rows
  3791. // break;
  3792. }
  3793. } else {
  3794. this.getColumnList(tableId, columnId)
  3795. }
  3796. })
  3797. },
  3798. formatDate(row, column) {
  3799. // row 是当前行的数据对象
  3800. // column 是当前列的属性信息对象
  3801. const date = row[column.property];
  3802. if (date) {
  3803. const s = new Date(date).toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' });
  3804. return s.replace(/\//g, '-')
  3805. } else {
  3806. return '';
  3807. }
  3808. },
  3809. // 获取 tableDefault 列
  3810. async getColumnList (tableId, columnId) {
  3811. let queryTable= {
  3812. functionId: this.$route.meta.menuId,
  3813. tableId: tableId,
  3814. languageCode: this.$i18n.locale
  3815. }
  3816. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  3817. if (!data.rows.length == 0) {
  3818. switch (columnId) {
  3819. case 1:
  3820. this.columnList = data.rows
  3821. break;
  3822. case 2:
  3823. this.columnPartList = data.rows
  3824. break;
  3825. // case 3:
  3826. // this.columnList2 = data.rows
  3827. // break;
  3828. // case 4:
  3829. // this.columnList3 = data.rows
  3830. // break;
  3831. }
  3832. } else {
  3833. // this.showDefault = true.
  3834. }
  3835. })
  3836. },
  3837. // 列表表格选择替换
  3838. tabClick (tab, event) {
  3839. // 刷新列表数据
  3840. this.refreshCurrentTabTable()
  3841. },
  3842. refreshCurrentTabTable () {
  3843. if (this.activeName == 'projectPart') {
  3844. this.getProjectPartInfo();
  3845. }
  3846. },
  3847. //获取按钮的权限数据
  3848. getButtonAuthData () {
  3849. let searchFlag = this.isAuth(this.menuId+":search")
  3850. let saveFlag = this.isAuth(this.menuId+":save")
  3851. let updateFlag = this.isAuth(this.menuId+":update")
  3852. let deleteFlag = this.isAuth(this.menuId+":delete")
  3853. //处理页面的权限数据
  3854. this.authSearch = !searchFlag
  3855. this.authSave = !saveFlag
  3856. this.authUpdate = !updateFlag
  3857. this.authDelete = !deleteFlag
  3858. },
  3859. rowStyle ({row}) {
  3860. if (this.projectPartCurrentRow.testPartNo === row.testPartNo) {
  3861. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  3862. }
  3863. },
  3864. }
  3865. }
  3866. </script>
  3867. <style scoped lang="scss">
  3868. .el-tabs__nav {
  3869. margin-left: 0 !important;
  3870. }
  3871. .red-text /deep/ .el-input__inner {
  3872. color: red;
  3873. }
  3874. /deep/ .left-section {
  3875. flex: 1; /* 左边部分占据剩余空间 */
  3876. margin-right: 10px; /* 右边与左边之间的间隔 */
  3877. margin-left: -10px; /* 左边与父元素之间的间隔 */
  3878. }
  3879. /deep/ .right-section {
  3880. width: 66%; /* 右边部分宽度占满剩余空间 */
  3881. margin-right: 5px;
  3882. }
  3883. /deep/ .custom-upload .el-upload-dragger {
  3884. width: 150px;
  3885. height: 150px;
  3886. text-align: center;
  3887. position: relative;
  3888. overflow: hidden;
  3889. /* 添加其他样式 */
  3890. }
  3891. /deep/ .table-container {
  3892. border: 1px solid #e0e0e0;
  3893. border-radius: 4px;
  3894. padding: 10px;
  3895. margin-bottom: 10px;
  3896. }
  3897. </style>