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.

4296 lines
157 KiB

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