plm前端
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.

2164 lines
73 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'项目编号'">
  5. <el-input v-model="searchData.projectId" style="width: 160px"></el-input>
  6. </el-form-item>
  7. <el-form-item label="项目类型">
  8. <!-- <span slot="label" style="" @click="getBaseList(1010,1)"><a herf="#">项目类型</a></span>-->
  9. <!-- <el-input v-model="searchData.projectType" style="width: 120px"></el-input>-->
  10. <dict-data-select dict-type="project_info_type_db" filterable clearable :use-default-value="false" v-model="searchData.projectType"></dict-data-select>
  11. </el-form-item>
  12. <el-form-item :label="'项目责任人'">
  13. <el-input v-model="searchData.projectOwnerName" style="width: 130px"></el-input>
  14. </el-form-item>
  15. <el-form-item label=" ">
  16. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  17. <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>
  18. <download-excel
  19. :fields="fields()"
  20. :data="exportData"
  21. type="xls"
  22. :name="exportName"
  23. :header="exportHeader"
  24. :footer="exportFooter"
  25. :fetch="createExportData"
  26. :before-generate="startDownload"
  27. :before-finish="finishDownload"
  28. worksheet="导出信息"
  29. class="el-button el-button--primary el-button--medium">
  30. {{ '导出' }}
  31. </download-excel>
  32. </el-form-item>
  33. </el-form>
  34. <el-table
  35. :height="height"
  36. :data="dataList1"
  37. border
  38. ref="mainTable"
  39. @row-click="changeData"
  40. highlight-current-row
  41. v-loading="dataListLoading"
  42. style="width: 100%;">
  43. <el-table-column
  44. header-align="center"
  45. align="center"
  46. width="150"
  47. fixed="right"
  48. label="操作">
  49. <template slot-scope="scope">
  50. <a type="text" size="small" @click="addOrUpdateHandle(scope.row.projectId)">新增</a>
  51. <a type="text" size="small" @click="UpdateHandle(scope.row)">修改</a>
  52. <a type="text" size="small" @click="deleteProjectInfo(scope.row)">删除</a>
  53. </template>
  54. </el-table-column>
  55. <el-table-column
  56. v-for="(item,index) in columnList1" :key="index"
  57. :sortable="item.columnSortable"
  58. :prop="item.columnProp"
  59. :header-align="item.headerAlign"
  60. :show-overflow-tooltip="item.showOverflowTooltip"
  61. :align="item.align"
  62. :fixed="item.fixed==''?false:item.fixed"
  63. :min-width="item.columnWidth"
  64. :label="item.columnLabel">
  65. <template slot-scope="scope">
  66. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  67. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  68. style="width: 100px; height: 80px"/></span>
  69. </template>
  70. </el-table-column>
  71. </el-table>
  72. <el-pagination
  73. @size-change="sizeChangeHandle"
  74. @current-change="currentChangeHandle"
  75. :current-page="pageIndex"
  76. :page-sizes="[20, 50, 100, 1000]"
  77. :page-size="pageSize"
  78. :total="totalPage"
  79. layout="total, sizes, prev, pager, next, jumper">
  80. </el-pagination>
  81. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  82. <el-tab-pane label="项目信息" name="info">
  83. <el-form label-position="top" style="margin-top: 0px; margin-left: 0px;">
  84. <el-row :gutter="20">
  85. <el-col :span="5"><div class="grid-content bg-purple">
  86. <el-form-item :label="'项目号'">
  87. <el-input v-model="projectData.projectId" readonly ></el-input>
  88. </el-form-item>
  89. </div></el-col>
  90. <el-col :span="5"><div class="grid-content bg-purple">
  91. <el-form-item :label="'项目类型'">
  92. <el-input v-model="projectData.projectType" readonly ></el-input>
  93. </el-form-item>
  94. </div></el-col>
  95. <el-col :span="5"><div class="grid-content bg-purple">
  96. <el-form-item :label="'项目来源'">
  97. <el-input v-model="projectData.projectSourceDesc" readonly ></el-input>
  98. </el-form-item>
  99. </div></el-col>
  100. <el-col :span="5"><div class="grid-content bg-purple">
  101. <el-form-item :label="'优先级'">
  102. <el-input v-model="projectData.priorityDesc" readonly></el-input>
  103. </el-form-item>
  104. </div></el-col>
  105. <el-col :span="4"><div class="grid-content bg-purple">
  106. <el-form-item :label="'需求日期'">
  107. <el-input v-model="projectData.needDate" readonly ></el-input>
  108. </el-form-item>
  109. </div></el-col>
  110. </el-row>
  111. <el-row :gutter="20">
  112. <el-col :span="5">
  113. <div class="grid-content bg-purple">
  114. <el-form-item :label="'项目名称'">
  115. <el-input v-model="projectData.projectName" readonly style="" ></el-input>
  116. </el-form-item>
  117. </div>
  118. </el-col>
  119. <el-col :span="19"><div class="grid-content bg-purple">
  120. <el-form-item :label="'项目描述'">
  121. <el-input v-model="projectData.projectDesc" readonly style="" ></el-input>
  122. </el-form-item>
  123. </div></el-col>
  124. </el-row>
  125. <el-row :gutter="20">
  126. <el-col :span="8"><div class="grid-content bg-purple">
  127. <el-form-item :label="'项目经理'">
  128. <el-input v-model="projectData.projectManagerName" readonly style="" ></el-input>
  129. </el-form-item>
  130. </div></el-col>
  131. <el-col :span="8"><div class="grid-content bg-purple">
  132. <el-form-item :label="'项目责任人'">
  133. <el-input v-model="projectData.projectOwnerName" readonly style="" ></el-input>
  134. </el-form-item>
  135. </div></el-col>
  136. <el-col :span="8"><div class="grid-content bg-purple">
  137. <el-form-item :label="'项目权限'">
  138. <el-input v-model="projectData.userRoleName" readonly style="" ></el-input>
  139. </el-form-item>
  140. </div></el-col>
  141. </el-row>
  142. <el-row :gutter="20">
  143. <el-col :span="24"><div class="grid-content bg-purple">
  144. <el-form-item :label="'客户应用/要求'">
  145. <el-input v-model="projectData.customerRemark" readonly style="" ></el-input>
  146. </el-form-item>
  147. </div></el-col>
  148. </el-row>
  149. <el-row :gutter="20">
  150. <el-col :span="24"><div class="grid-content bg-purple">
  151. <el-form-item :label="'其他特殊要求'">
  152. <el-input v-model="projectData.remark" readonly style="" ></el-input>
  153. </el-form-item>
  154. </div></el-col>
  155. </el-row>
  156. </el-form>
  157. </el-tab-pane>
  158. <el-tab-pane label="客户信息" name="customer">
  159. <el-form label-position="top" label-width="100px" >
  160. <el-row :gutter="20">
  161. <el-col :span="4"><div class="grid-content bg-purple">
  162. <el-form-item :label="'客户代码'">
  163. <el-input v-model="customerData.customerNo" readonly ></el-input>
  164. </el-form-item>
  165. </div></el-col>
  166. <el-col :span="8"><div class="grid-content bg-purple">
  167. <el-form-item :label="'客户名称'">
  168. <el-input v-model="customerData.customerDesc" readonly ></el-input>
  169. </el-form-item>
  170. </div></el-col>
  171. <el-col :span="4"><div class="grid-content bg-purple">
  172. <el-form-item :label="'客户币种'">
  173. <el-input v-model="customerData.customerCurrency" readonly ></el-input>
  174. </el-form-item>
  175. </div></el-col>
  176. <el-col :span="4"><div class="grid-content bg-purple">
  177. <el-form-item :label="'年营业额'">
  178. <el-input v-model="customerData.turnoverOfYear" readonly ></el-input>
  179. </el-form-item>
  180. </div></el-col>
  181. <el-col :span="4"><div class="grid-content bg-purple">
  182. <el-form-item :label="'年潜在投入'">
  183. <el-input v-model="customerData.potentialRevenueOfYear" readonly ></el-input>
  184. </el-form-item>
  185. </div></el-col>
  186. </el-row>
  187. <el-row :gutter="20">
  188. <el-col :span="4"><div class="grid-content bg-purple">
  189. <el-form-item :label="'重要程度'">
  190. <el-input v-model="customerData.importantCustomer" readonly ></el-input>
  191. </el-form-item>
  192. </div></el-col>
  193. <el-col :span="4"><div class="grid-content bg-purple">
  194. <el-form-item :label="'客户状态'">
  195. <el-input v-model="customerData.customerStatus" readonly ></el-input>
  196. </el-form-item>
  197. </div></el-col>
  198. <el-col :span="16"><div class="grid-content bg-purple">
  199. <el-form-item :label="'客户描述'">
  200. <el-input v-model="customerData.customerDescription" readonly ></el-input>
  201. </el-form-item>
  202. </div></el-col>
  203. </el-row>
  204. <el-row :gutter="20">
  205. <el-col :span="4"><div class="grid-content bg-purple">
  206. <el-form-item :label="'终端客户代码'">
  207. <el-input v-model="finalCustomerData.customerNo" readonly ></el-input>
  208. </el-form-item>
  209. </div></el-col>
  210. <el-col :span="8"><div class="grid-content bg-purple">
  211. <el-form-item :label="'终端客户名称'">
  212. <el-input v-model="finalCustomerData.customerDesc" readonly ></el-input>
  213. </el-form-item>
  214. </div></el-col>
  215. <el-col :span="4"><div class="grid-content bg-purple">
  216. <el-form-item :label="'客户币种'">
  217. <el-input v-model="finalCustomerData.customerCurrency" readonly ></el-input>
  218. </el-form-item>
  219. </div></el-col>
  220. <el-col :span="4"><div class="grid-content bg-purple">
  221. <el-form-item :label="'年营业额'">
  222. <el-input v-model="finalCustomerData.turnoverOfYear" readonly ></el-input>
  223. </el-form-item>
  224. </div></el-col>
  225. <el-col :span="4"><div class="grid-content bg-purple">
  226. <el-form-item :label="'年潜在投入'">
  227. <el-input v-model="finalCustomerData.potentialRevenueOfYear" readonly ></el-input>
  228. </el-form-item>
  229. </div></el-col>
  230. </el-row>
  231. <el-row :gutter="20">
  232. <el-col :span="4"><div class="grid-content bg-purple">
  233. <el-form-item :label="'重要程度'">
  234. <el-input v-model="finalCustomerData.importantCustomer" readonly ></el-input>
  235. </el-form-item>
  236. </div></el-col>
  237. <el-col :span="4"><div class="grid-content bg-purple">
  238. <el-form-item :label="'客户状态'">
  239. <el-input v-model="finalCustomerData.customerStatus" readonly ></el-input>
  240. </el-form-item>
  241. </div></el-col>
  242. <el-col :span="16"><div class="grid-content bg-purple">
  243. <el-form-item :label="'客户描述'">
  244. <el-input v-model="finalCustomerData.customerDescription" readonly ></el-input>
  245. </el-form-item>
  246. </div></el-col>
  247. </el-row>
  248. </el-form>
  249. </el-tab-pane>
  250. <el-tab-pane label="客户联系人" name="customer_contact">
  251. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  252. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  253. <el-button type="primary" @click="contactChooseModal()">编辑</el-button>
  254. <download-excel
  255. :fields="fields2()"
  256. :data="exportData2"
  257. type="xls"
  258. :name="exportName2"
  259. :header="exportHeader2"
  260. :footer="exportFooter2"
  261. :fetch="createExportData2"
  262. :before-generate="startDownload2"
  263. :before-finish="finishDownload2"
  264. worksheet="导出信息"
  265. class="el-button el-button--primary el-button--medium">
  266. {{ '导出' }}
  267. </download-excel>
  268. </el-form>
  269. </el-form>
  270. <el-table
  271. :data="contactList"
  272. height="240"
  273. border
  274. v-loading="dataListLoading"
  275. style="width: 100%; ">
  276. <el-table-column
  277. v-for="(item,index) in columnList2" :key="index"
  278. :sortable="item.columnSortable"
  279. :prop="item.columnProp"
  280. :header-align="item.headerAlign"
  281. :show-overflow-tooltip="item.showOverflowTooltip"
  282. :align="item.align"
  283. :fixed="item.fixed==''?false:item.fixed"
  284. :min-width="item.columnWidth"
  285. :label="item.columnLabel">
  286. <template slot-scope="scope">
  287. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  288. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  289. style="width: 100px; height: 80px"/></span>
  290. </template>
  291. </el-table-column>
  292. </el-table>
  293. </el-tab-pane>
  294. <el-tab-pane label="附件信息" name="down">
  295. <oss-components height="25vh" label="项目编码" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.projectId"></oss-components>
  296. <!--文件上传-->
  297. <!-- <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">-->
  298. <!-- <el-form :inline="true" label-position="top" style="margin-top: 0px">-->
  299. <!-- <el-button type="primary" @click="addUploadFileModal">上传文件</el-button>-->
  300. <!-- </el-form>-->
  301. <!-- </el-form>-->
  302. <!-- <el-table-->
  303. <!-- :data="fileContentList"-->
  304. <!-- height="240"-->
  305. <!-- border-->
  306. <!-- v-loading="dataListLoading"-->
  307. <!-- style="width: 100%; ">-->
  308. <!-- <el-table-column-->
  309. <!-- v-for="(item,index) in columnFileContentArray" :key="index"-->
  310. <!-- :sortable="item.columnSortable"-->
  311. <!-- :prop="item.columnProp"-->
  312. <!-- :header-align="item.headerAlign"-->
  313. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  314. <!-- :align="item.align"-->
  315. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  316. <!-- :min-width="item.columnWidth"-->
  317. <!-- :label="item.columnLabel">-->
  318. <!-- <template slot-scope="scope">-->
  319. <!-- <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>-->
  320. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"-->
  321. <!-- style="width: 100px; height: 80px"/></span>-->
  322. <!-- </template>-->
  323. <!-- </el-table-column>-->
  324. <!-- <el-table-column-->
  325. <!-- fixed="right"-->
  326. <!-- header-align="center"-->
  327. <!-- align="center"-->
  328. <!-- width="100"-->
  329. <!-- label="操作">-->
  330. <!-- <template slot-scope="scope">-->
  331. <!-- &lt;!&ndash; <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>&ndash;&gt;-->
  332. <!-- <a @click="downloadFile(scope.row)" >下载</a>-->
  333. <!-- <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>-->
  334. <!-- </template>-->
  335. <!-- </el-table-column>-->
  336. <!-- </el-table>-->
  337. </el-tab-pane>
  338. <el-tab-pane label="项目物料" name="part">
  339. <projectPart ref="projectPart"></projectPart>
  340. </el-tab-pane>
  341. <el-tab-pane label="询价信息" name="quotation">
  342. <projectQuotation ref="projectQuotation" ></projectQuotation>
  343. </el-tab-pane>
  344. <el-tab-pane label="报价信息" name="quotationHeader">
  345. <quotationHeader ref="quotationHeader"></quotationHeader>
  346. </el-tab-pane>
  347. <el-tab-pane label="打样信息" name="sample">
  348. <sample ref="sample"></sample>
  349. </el-tab-pane>
  350. <el-tab-pane label="测试记录" name="test">
  351. <test ref="test"></test>
  352. </el-tab-pane>
  353. <el-tab-pane label="刀模申请" name="purchase">
  354. <purchase ref="purchase"></purchase>
  355. </el-tab-pane>
  356. <el-tab-pane label="技术参数卡" name="technicalSpecification">
  357. <technicalSpecification ref="technicalSpecification"></technicalSpecification>
  358. </el-tab-pane>
  359. <el-tab-pane label="变更记录" name="changeRecord">
  360. <change-record :data-list="changeRecordList" :height="240" :columns="columnChangeRecord"></change-record>
  361. <!-- <el-table-->
  362. <!-- :data="changeRecordList"-->
  363. <!-- height="260"-->
  364. <!-- border-->
  365. <!-- style="width: 100%;">-->
  366. <!-- <el-table-column-->
  367. <!-- v-for="(item,index) in columnChangeRecord" :key="index"-->
  368. <!-- :sortable="item.columnSortable"-->
  369. <!-- :prop="item.columnProp"-->
  370. <!-- :header-align="item.headerAlign"-->
  371. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  372. <!-- :align="item.align"-->
  373. <!-- :fixed="item.fixed==''?false:item.fixed"-->
  374. <!-- :min-width="item.columnWidth"-->
  375. <!-- :label="item.columnLabel">-->
  376. <!-- <template slot-scope="scope">-->
  377. <!-- <div v-if="item.columnProp === 'changeNo'">-->
  378. <!-- <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toChangeMenu(scope.row.changeNo)"> {{ scope.row[item.columnProp] }}</el-link>-->
  379. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  380. <!-- </div>-->
  381. <!-- <div v-else>-->
  382. <!-- <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>-->
  383. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  384. <!-- </div>-->
  385. <!-- </template>-->
  386. <!-- </el-table-column>-->
  387. <!--&lt;!&ndash; <el-table-column&ndash;&gt;-->
  388. <!--&lt;!&ndash; fixed="right"&ndash;&gt;-->
  389. <!--&lt;!&ndash; header-align="center"&ndash;&gt;-->
  390. <!--&lt;!&ndash; align="center"&ndash;&gt;-->
  391. <!--&lt;!&ndash; width="100"&ndash;&gt;-->
  392. <!--&lt;!&ndash; label="操作">&ndash;&gt;-->
  393. <!--&lt;!&ndash; <template slot-scope="scope">&ndash;&gt;-->
  394. <!--&lt;!&ndash; </template>&ndash;&gt;-->
  395. <!--&lt;!&ndash; </el-table-column>&ndash;&gt;-->
  396. <!-- </el-table>-->
  397. </el-tab-pane>
  398. </el-tabs>
  399. <!-- <el-dialog-->
  400. <!-- width="530px"-->
  401. <!-- title="项目联系人"-->
  402. <!-- :close-on-click-modal="false"-->
  403. <!-- :visible.sync="contactChooseFlag">-->
  404. <!-- <el-transfer v-model="contactChooseList1" :props="{-->
  405. <!-- key: 'contactId',-->
  406. <!-- label: 'contactName'-->
  407. <!-- }" :data="contactChooseList2" :titles="['未选择', '已选择']"></el-transfer>-->
  408. <!-- <span slot="footer" class="dialog-footer">-->
  409. <!-- <div style="margin-top: 5px">-->
  410. <!-- <el-button type="primary" @click="saveProjectContactList()">确定</el-button>-->
  411. <!-- <el-button @click="contactChooseFlag = false" type="primary">取消</el-button>-->
  412. <!-- </div>-->
  413. <!-- </span>-->
  414. <!-- </el-dialog>-->
  415. <!-- 客户联系人-> 快速新增 -->
  416. <el-dialog title="项目联系人" :close-on-click-modal="false" v-drag :visible.sync="contactChooseFlag" width="700px">
  417. <div style="font-size: 12px">
  418. <el-form :inline="true" label-position="top" :model="contactData">
  419. <el-form-item :label="'联系人名称'">
  420. <el-input v-model="contactData.contactName" clearable style="width: 150px"></el-input>
  421. </el-form-item>
  422. <el-form-item :label="' '">
  423. <el-button type="primary" @click="queryCustomerContact">查询</el-button>
  424. </el-form-item>
  425. </el-form>
  426. </div>
  427. <el-container>
  428. <el-main style="width: 200px;padding: 1px">
  429. <span style="font-size: 12px" >可选联系人</span>
  430. <el-table
  431. height="300px"
  432. :data="contactChooseList1"
  433. border
  434. ref="contactTable1"
  435. @row-click="contactClickRow1"
  436. @selection-change="selectionContact1"
  437. highlight-current-row
  438. style="width: 100%">
  439. <el-table-column
  440. type="selection"
  441. header-align="center"
  442. align="center"
  443. width="50">
  444. </el-table-column>
  445. <el-table-column
  446. prop="contactName"
  447. header-align="center"
  448. align="center"
  449. min-width="200"
  450. label="联系人名称">
  451. </el-table-column>
  452. </el-table>
  453. </el-main>
  454. <el-main style="width: 10px;padding: 1px">
  455. <div style="margin-top: 150px;margin-left: 18px">
  456. <el-button type="primary" @click="addContact">添加>></el-button>
  457. </div>
  458. <div style="margin-top: 15px;margin-left: 18px">
  459. <el-button type="primary" @click="deleteContact">删除<<</el-button>
  460. </div>
  461. </el-main>
  462. <el-main style="width: 200px;padding: 1px">
  463. <span style="font-size: 12px" >已有联系人</span>
  464. <el-table
  465. height="300px"
  466. :data="contactChooseList2"
  467. border
  468. ref="contactTable2"
  469. @row-click="contactClickRow2"
  470. @selection-change="selectionContact2"
  471. highlight-current-row
  472. style="width: 100%">
  473. <el-table-column
  474. type="selection"
  475. header-align="center"
  476. align="center"
  477. width="50">
  478. </el-table-column>
  479. <el-table-column
  480. prop="contactName"
  481. header-align="center"
  482. align="center"
  483. min-width="200"
  484. label="联系人名称">
  485. </el-table-column>
  486. </el-table>
  487. </el-main>
  488. </el-container>
  489. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  490. <el-button type="primary" @click="contactChooseFlag = false">关闭</el-button>
  491. </el-footer>
  492. </el-dialog>
  493. <!-- 上传文件的modal -->
  494. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  495. <add-or-update v-if="addOrUpdateVisible" v-model="addOrUpdate" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update>
  496. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  497. </div>
  498. </template>
  499. <script>
  500. import {
  501. customerInformationSearchForCheck, // 客户信息列表查询`
  502. } from '@/api/customer/customerInformation.js'
  503. import AddOrUpdate from './com_projectInfo-add-or-update'
  504. import {
  505. getTableDefaultListLanguage,
  506. getTableUserListLanguage,
  507. } from "@/api/table.js"
  508. import Chooselist from '@/views/modules/common/Chooselist'
  509. import {projectInfoSearch,
  510. deleteProjectFile,
  511. getFileContentList,
  512. downLoadProjectFile,
  513. getCustomerContactData,
  514. getContactChooseData,
  515. getContactChooseData2,
  516. saveProjectContactList,
  517. deleteProjectInfo,
  518. getProjectUserRole,
  519. addContact,
  520. deleteContact,
  521. queryCustomerContact
  522. } from "@/api/project/project.js"
  523. import {
  524. getChangeRecordByPartNo, // 查询变更记录
  525. } from '@/api/part/partInformation.js'
  526. import projectUploadFile from "./com_project_upload_file";/*上传文件的組件*/
  527. import projectPart from "./com_project_info_part.vue";/*組件*/
  528. import projectQuotation from "./com_project_puotation";/*組件*/
  529. import sample from "./com_project_sample";/*組件*/
  530. import test from "./com_project_test";/*組件*/
  531. import purchase from "./com_project_info_purchase_request";/*組件*/
  532. import technicalSpecification from "./com_project_technicalSpecification";
  533. import quotationHeader from "./com_project_info_quotation.vue";
  534. import DictDataSelect from "../../sys/dict-data-select.vue";
  535. import ChangeRecord from "./com_project_change_record.vue";
  536. import OssComponents from "../../oss/ossComponents.vue";
  537. /*組件*/
  538. export default {
  539. components: {
  540. OssComponents,
  541. ChangeRecord,
  542. DictDataSelect,
  543. Chooselist,
  544. AddOrUpdate,
  545. projectUploadFile,
  546. projectPart,
  547. projectQuotation,
  548. sample,
  549. test,
  550. purchase,
  551. technicalSpecification,
  552. quotationHeader,
  553. },
  554. name: "null",
  555. data() {
  556. return {
  557. // addOrUpdate
  558. addOrUpdate:'0',
  559. //项目已选联系人
  560. contactChooseList1:[],
  561. //客户可选联系人
  562. contactChooseList2:[],
  563. contactList: [],
  564. fileContentList: [],
  565. activeName: 'info',
  566. addOrUpdateVisible:false,
  567. searchData:{
  568. page: 1,
  569. limit: 100,
  570. site:this.$store.state.user.site,
  571. projectId:'',
  572. projectType:'',
  573. projectOwnerName:'',
  574. userName:this.$store.state.user.name,
  575. },
  576. contactChooseFlag:false,
  577. currentRow:'',
  578. height: 200,
  579. dataList1:[],
  580. dataListLoading: false,
  581. // 导出 start
  582. exportData: [],
  583. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  584. exportHeader: ["项目清单"],
  585. exportFooter: [],
  586. exportList:[],
  587. // 导出 start
  588. exportData2: [],
  589. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  590. exportHeader2: ["项目客户联系人"],
  591. exportFooter2: [],
  592. exportList2:[],
  593. tagNo:'',
  594. tagNo2:'',
  595. pageIndex: 1,
  596. pageSize: 100,
  597. totalPage: 0,
  598. // 导出 end
  599. columnList1: [
  600. {
  601. userId: this.$store.state.user.name,
  602. functionId: 101002001,
  603. serialNumber: '101002001Table1ProjectId',
  604. tableId: "101002001Table1",
  605. tableName: "项目信息主表",
  606. columnProp: "projectId",
  607. headerAlign: "center",
  608. align: "center",
  609. columnLabel: "项目号",
  610. columnHidden: false,
  611. columnImage: false,
  612. columnSortable: false,
  613. sortLv: 0,
  614. status: true,
  615. fixed: '',
  616. columnWidth: 100
  617. },
  618. {
  619. userId: this.$store.state.user.name,
  620. functionId: 101002001,
  621. serialNumber: '101002001Table1ProjectType',
  622. tableId: "101002001Table1",
  623. tableName: "项目信息主表",
  624. columnProp: "projectType",
  625. headerAlign: "center",
  626. align: "left",
  627. columnLabel: "项目类型",
  628. columnHidden: false,
  629. columnImage: false,
  630. columnSortable: false,
  631. sortLv: 0,
  632. status: true,
  633. fixed: '',
  634. columnWidth: 100
  635. },
  636. {
  637. userId: this.$store.state.user.name,
  638. functionId: 101002001,
  639. serialNumber: '101002001Table1ProjectName',
  640. tableId: "101002001Table1",
  641. tableName: "项目信息主表",
  642. columnProp: "projectName",
  643. headerAlign: "center",
  644. align: "left",
  645. columnLabel: "项目名称",
  646. columnHidden: false,
  647. columnImage: false,
  648. columnSortable: false,
  649. sortLv: 0,
  650. status: true,
  651. fixed: '',
  652. columnWidth: 200
  653. },
  654. {
  655. userId: this.$store.state.user.name,
  656. functionId: 101002001,
  657. serialNumber: '101002001Table1Status',
  658. tableId: "101002001Table1",
  659. tableName: "项目信息主表",
  660. columnProp: "status",
  661. headerAlign: "center",
  662. align: "left",
  663. columnLabel: "项目状态",
  664. columnHidden: false,
  665. columnImage: false,
  666. columnSortable: false,
  667. sortLv: 0,
  668. status: true,
  669. fixed: '',
  670. columnWidth: 100
  671. },
  672. {
  673. userId: this.$store.state.user.name,
  674. functionId: 101002001,
  675. serialNumber: '101002001Table1Priority',
  676. tableId: "101002001Table1",
  677. tableName: "项目信息主表",
  678. columnProp: "priorityDesc",
  679. headerAlign: "center",
  680. align: "left",
  681. columnLabel: "优先级",
  682. columnHidden: false,
  683. columnImage: false,
  684. columnSortable: false,
  685. sortLv: 0,
  686. status: true,
  687. fixed: '',
  688. columnWidth: 100
  689. },
  690. {
  691. userId: this.$store.state.user.name,
  692. functionId: 101002001,
  693. serialNumber: '101002001Table1BuNo',
  694. tableId: "101002001Table1",
  695. tableName: "项目信息主表",
  696. columnProp: "buNo",
  697. headerAlign: "center",
  698. align: "left",
  699. columnLabel: "BU编码",
  700. columnHidden: false,
  701. columnImage: false,
  702. columnSortable: false,
  703. sortLv: 0,
  704. status: true,
  705. fixed: '',
  706. columnWidth: 100
  707. },
  708. {
  709. userId: this.$store.state.user.name,
  710. functionId: 101002001,
  711. serialNumber: '101002001Table1BuDesc',
  712. tableId: "101002001Table1",
  713. tableName: "项目信息主表",
  714. columnProp: "buDesc",
  715. headerAlign: "center",
  716. align: "left",
  717. columnLabel: "BU名称",
  718. columnHidden: false,
  719. columnImage: false,
  720. columnSortable: false,
  721. sortLv: 0,
  722. status: true,
  723. fixed: '',
  724. columnWidth: 100
  725. },
  726. {
  727. userId: this.$store.state.user.name,
  728. functionId: 101002001,
  729. serialNumber: '101002001Table1ProjectOwnerName',
  730. tableId: "101002001Table1",
  731. tableName: "项目信息主表",
  732. columnProp: "projectOwnerName",
  733. headerAlign: "center",
  734. align: "left",
  735. columnLabel: "项目负责人",
  736. columnHidden: false,
  737. columnImage: false,
  738. columnSortable: false,
  739. sortLv: 0,
  740. status: true,
  741. fixed: '',
  742. columnWidth: 100
  743. },
  744. {
  745. userId: this.$store.state.user.name,
  746. functionId: 101002001,
  747. serialNumber: '101002001Table1ProjectSource',
  748. tableId: "101002001Table1",
  749. tableName: "项目信息主表",
  750. columnProp: "projectSourceDesc",
  751. headerAlign: "center",
  752. align: "left",
  753. columnLabel: "项目来源",
  754. columnHidden: false,
  755. columnImage: false,
  756. columnSortable: false,
  757. sortLv: 0,
  758. status: true,
  759. fixed: '',
  760. columnWidth: 100
  761. },
  762. {
  763. userId: this.$store.state.user.name,
  764. functionId: 101002001,
  765. serialNumber: '101002001Table1CustomerId',
  766. tableId: "101002001Table1",
  767. tableName: "项目信息主表",
  768. columnProp: "customerId",
  769. headerAlign: "center",
  770. align: "left",
  771. columnLabel: "客户代码",
  772. columnHidden: false,
  773. columnImage: false,
  774. columnSortable: false,
  775. sortLv: 0,
  776. status: true,
  777. fixed: '',
  778. columnWidth: 100
  779. },
  780. {
  781. userId: this.$store.state.user.name,
  782. functionId: 101002001,
  783. serialNumber: '101002001Table1CustomerName',
  784. tableId: "101002001Table1",
  785. tableName: "项目信息主表",
  786. columnProp: "customerName",
  787. headerAlign: "center",
  788. align: "left",
  789. columnLabel: "客户名称",
  790. columnHidden: false,
  791. columnImage: false,
  792. columnSortable: false,
  793. sortLv: 0,
  794. status: true,
  795. fixed: '',
  796. columnWidth: 150
  797. },
  798. {
  799. userId: this.$store.state.user.name,
  800. functionId: 101002001,
  801. serialNumber: '101002001Table1CreateDate',
  802. tableId: "101002001Table1",
  803. tableName: "项目信息主表",
  804. columnProp: "createDate",
  805. headerAlign: "center",
  806. align: "left",
  807. columnLabel: "创建时间",
  808. columnHidden: false,
  809. columnImage: false,
  810. columnSortable: false,
  811. sortLv: 0,
  812. status: true,
  813. fixed: '',
  814. columnWidth: 120
  815. },
  816. {
  817. userId: this.$store.state.user.name,
  818. functionId: 101002001,
  819. serialNumber: '101002001Table1CreateBy',
  820. tableId: "101002001Table1",
  821. tableName: "项目信息主表",
  822. columnProp: "createBy",
  823. headerAlign: "center",
  824. align: "left",
  825. columnLabel: "创建人",
  826. columnHidden: false,
  827. columnImage: false,
  828. columnSortable: false,
  829. sortLv: 0,
  830. status: true,
  831. fixed: '',
  832. columnWidth: 80
  833. },
  834. {
  835. userId: this.$store.state.user.name,
  836. functionId: 101002001,
  837. serialNumber: '101002001Table1UpdateDate',
  838. tableId: "101002001Table1",
  839. tableName: "项目信息主表",
  840. columnProp: "updateDate",
  841. headerAlign: "center",
  842. align: "left",
  843. columnLabel: "修改时间",
  844. columnHidden: false,
  845. columnImage: false,
  846. columnSortable: false,
  847. sortLv: 0,
  848. status: true,
  849. fixed: '',
  850. columnWidth: 120
  851. },
  852. {
  853. userId: this.$store.state.user.name,
  854. functionId: 101002001,
  855. serialNumber: '101002001Table1UpdateBy',
  856. tableId: "101002001Table1",
  857. tableName: "项目信息主表",
  858. columnProp: "updateBy",
  859. headerAlign: "center",
  860. align: "left",
  861. columnLabel: "修改人",
  862. columnHidden: false,
  863. columnImage: false,
  864. columnSortable: false,
  865. sortLv: 0,
  866. status: true,
  867. fixed: '',
  868. columnWidth: 80
  869. },
  870. ],
  871. columnList2: [
  872. {
  873. userId: this.$store.state.user.name,
  874. functionId: 101002001,
  875. serialNumber: '101002001Table2ContactName',
  876. tableId: '101002001Table2',
  877. tableName: '项目联系人表',
  878. columnProp: 'contactId',
  879. headerAlign: 'center',
  880. align: 'center',
  881. columnLabel: '联系人编码',
  882. columnHidden: false,
  883. columnImage: false,
  884. columnSortable: false,
  885. sortLv: 0,
  886. status: true,
  887. fixed: '',
  888. columnWidth: 100
  889. },
  890. {
  891. userId: this.$store.state.user.name,
  892. functionId: 101002001,
  893. serialNumber: '101002001Table2ContactName',
  894. tableId: '101002001Table2',
  895. tableName: '项目联系人表',
  896. columnProp: 'contactName',
  897. headerAlign: 'center',
  898. align: 'left',
  899. columnLabel: '联系人',
  900. columnHidden: false,
  901. columnImage: false,
  902. columnSortable: false,
  903. sortLv: 0,
  904. status: true,
  905. fixed: '',
  906. columnWidth: 100
  907. },
  908. {
  909. userId: this.$store.state.user.name,
  910. functionId: 101002001,
  911. serialNumber: '101002001Table2ContactPhoneNumber1',
  912. tableId: '101002001Table2',
  913. tableName: '项目联系人表',
  914. columnProp: 'contactPhoneNumber1',
  915. headerAlign: 'center',
  916. align: 'left',
  917. columnLabel: '联系电话',
  918. columnHidden: false,
  919. columnImage: false,
  920. columnSortable: false,
  921. sortLv: 0,
  922. status: true,
  923. fixed: '',
  924. columnWidth: 100
  925. },
  926. {
  927. userId: this.$store.state.user.name,
  928. functionId: 101002001,
  929. serialNumber: '101002001Table2ContactLandlineNumber',
  930. tableId: '101002001Table2',
  931. tableName: '项目联系人表',
  932. columnProp: 'contactLandlineNumber',
  933. headerAlign: 'center',
  934. align: 'left',
  935. columnLabel: '座机',
  936. columnHidden: false,
  937. columnImage: false,
  938. columnSortable: false,
  939. sortLv: 0,
  940. status: true,
  941. fixed: '',
  942. columnWidth: 100
  943. },
  944. {
  945. userId: this.$store.state.user.name,
  946. functionId: 101002001,
  947. serialNumber: '101002001Table2Position',
  948. tableId: '101002001Table2',
  949. tableName: '项目联系人表',
  950. columnProp: 'position',
  951. headerAlign: 'center',
  952. align: 'left',
  953. columnLabel: '公司职务',
  954. columnHidden: false,
  955. columnImage: false,
  956. columnSortable: false,
  957. sortLv: 0,
  958. status: true,
  959. fixed: '',
  960. columnWidth: 100
  961. },
  962. {
  963. userId: this.$store.state.user.name,
  964. functionId: 101002001,
  965. serialNumber: '101002001Table2Mailbox',
  966. tableId: '101002001Table2',
  967. tableName: '项目联系人表',
  968. columnProp: 'mailbox',
  969. headerAlign: 'center',
  970. align: 'left',
  971. columnLabel: '邮箱',
  972. columnHidden: false,
  973. columnImage: false,
  974. columnSortable: false,
  975. sortLv: 0,
  976. status: true,
  977. fixed: '',
  978. columnWidth: 100
  979. },
  980. {
  981. userId: this.$store.state.user.name,
  982. functionId: 101002001,
  983. serialNumber: '101002001Table2PrimaryContact',
  984. tableId: '101002001Table2',
  985. tableName: '项目联系人表',
  986. columnProp: 'primaryContact',
  987. headerAlign: 'center',
  988. align: 'center',
  989. columnLabel: '默认联系人',
  990. columnHidden: false,
  991. columnImage: false,
  992. columnSortable: false,
  993. sortLv: 0,
  994. status: true,
  995. fixed: '',
  996. columnWidth: 100
  997. },
  998. {
  999. userId: this.$store.state.user.name,
  1000. functionId: 101002001,
  1001. serialNumber: '101002001Table2ContactStatus',
  1002. tableId: '101002001Table2',
  1003. tableName: '项目联系人表',
  1004. columnProp: 'contactStatus',
  1005. headerAlign: 'center',
  1006. align: 'center',
  1007. columnLabel: '状态',
  1008. columnHidden: false,
  1009. columnImage: false,
  1010. columnSortable: false,
  1011. sortLv: 0,
  1012. status: true,
  1013. fixed: '',
  1014. columnWidth: 60
  1015. },
  1016. {
  1017. userId: this.$store.state.user.name,
  1018. functionId: 101002001,
  1019. serialNumber: '101002001Table2CreateDate',
  1020. tableId: '101002001Table2',
  1021. tableName: '项目联系人表',
  1022. columnProp: 'createDate',
  1023. headerAlign: 'center',
  1024. align: 'center',
  1025. columnLabel: '创建时间',
  1026. columnHidden: false,
  1027. columnImage: false,
  1028. columnSortable: false,
  1029. sortLv: 0,
  1030. status: true,
  1031. fixed: '',
  1032. columnWidth: 120
  1033. },
  1034. {
  1035. userId: this.$store.state.user.name,
  1036. functionId: 101002001,
  1037. serialNumber: '101002001Table2CreateBy',
  1038. tableId: '101002001Table2',
  1039. tableName: '项目联系人表',
  1040. columnProp: 'createBy',
  1041. headerAlign: 'center',
  1042. align: 'center',
  1043. columnLabel: '创建人',
  1044. columnHidden: false,
  1045. columnImage: false,
  1046. columnSortable: false,
  1047. sortLv: 0,
  1048. status: true,
  1049. fixed: '',
  1050. columnWidth: 80
  1051. },
  1052. {
  1053. userId: this.$store.state.user.name,
  1054. functionId: 101002001,
  1055. serialNumber: '101002001Table2UpdateDate',
  1056. tableId: '101002001Table2',
  1057. tableName: '项目联系人表',
  1058. columnProp: 'updateDate',
  1059. headerAlign: 'center',
  1060. align: 'center',
  1061. columnLabel: '更新时间',
  1062. columnHidden: false,
  1063. columnImage: false,
  1064. columnSortable: false,
  1065. sortLv: 0,
  1066. status: true,
  1067. fixed: '',
  1068. columnWidth: 120
  1069. },
  1070. {
  1071. userId: this.$store.state.user.name,
  1072. functionId: 101002001,
  1073. serialNumber: '101002001Table2UpdateBy',
  1074. tableId: '101002001Table2',
  1075. tableName: '项目联系人表',
  1076. columnProp: 'updateBy',
  1077. headerAlign: 'center',
  1078. align: 'left',
  1079. columnLabel: '更新人',
  1080. columnHidden: false,
  1081. columnImage: false,
  1082. columnSortable: false,
  1083. sortLv: 0,
  1084. status: true,
  1085. fixed: '',
  1086. columnWidth: 80
  1087. }
  1088. ],
  1089. projectData: {
  1090. id: 0,
  1091. site:this.$store.state.user.site,
  1092. projectLevel:'',
  1093. projectId:'',
  1094. projectTypeDb:'',
  1095. projectType:'',
  1096. customerName:'',
  1097. customerId:'',
  1098. projectName:'',
  1099. projectDesc:'',
  1100. needDate:'',
  1101. priority:'',
  1102. projectSource:'',
  1103. priorityDesc:'',
  1104. projectSourceDesc:'',
  1105. projectManagerName:'',
  1106. projectOwnerName:'',
  1107. customerRemark:'',
  1108. remark:'',
  1109. userRoleName:'',
  1110. },
  1111. customerData:{
  1112. site: '',
  1113. customerNo: '',
  1114. customerDesc: '',
  1115. customerDescription: '',
  1116. customerIndustry: '',
  1117. customerCurrency: '',
  1118. turnoverOfYear: '',
  1119. potentialRevenueOfYear: '',
  1120. importantCustomer: '',
  1121. customerStatus: '',
  1122. companyName: '',
  1123. jobDescription: '',
  1124. remark: '',
  1125. contactName: '',
  1126. contactPhoneNumber1: '',
  1127. primaryContact: '',
  1128. contactStatus: '',
  1129. addressName: ''
  1130. },
  1131. finalCustomerData:{
  1132. site: '',
  1133. customerNo: '',
  1134. customerDesc: '',
  1135. customerDescription: '',
  1136. customerIndustry: '',
  1137. customerCurrency: '',
  1138. turnoverOfYear: '',
  1139. potentialRevenueOfYear: '',
  1140. importantCustomer: '',
  1141. customerStatus: '',
  1142. companyName: '',
  1143. jobDescription: '',
  1144. remark: '',
  1145. contactName: '',
  1146. contactPhoneNumber1: '',
  1147. primaryContact: '',
  1148. contactStatus: '',
  1149. addressName: ''
  1150. },
  1151. columnFileContentArray: [
  1152. {
  1153. columnProp: 'fileName',
  1154. headeralign: 'left',
  1155. align: 'left',
  1156. columnLabel: '文件名称',
  1157. columnHidden: false,
  1158. columnImage: false,
  1159. columnSortable: false,
  1160. sortLv: 0,
  1161. status: true,
  1162. fixed: false
  1163. // }, {
  1164. // columnProp: 'createdBy',
  1165. // headeralign: 'left',
  1166. // align: 'left',
  1167. // columnLabel: '上传人',
  1168. // columnHidden: false,
  1169. // columnImage: false,
  1170. // columnSortable: true,
  1171. // sortLv: 0,
  1172. // status: true,
  1173. // fixed: false
  1174. }, {
  1175. columnProp: 'createDate',
  1176. headeralign: 'left',
  1177. align: 'left',
  1178. columnLabel: '上传时间',
  1179. columnHidden: false,
  1180. columnImage: false,
  1181. columnSortable: true,
  1182. sortLv: 0,
  1183. status: true,
  1184. fixed: false
  1185. }, {
  1186. columnProp: 'orderRef3',
  1187. headeralign: 'left',
  1188. align: 'left',
  1189. columnLabel: '类型',
  1190. columnHidden: false,
  1191. columnImage: false,
  1192. columnSortable: true,
  1193. sortLv: 0,
  1194. status: true,
  1195. fixed: false
  1196. },
  1197. ],
  1198. contactSelections1: [],
  1199. contactSelections2: [],
  1200. contactData: {
  1201. site: this.$store.state.user.site,
  1202. customerId: '',
  1203. projectId: '',
  1204. contactId: '',
  1205. contactName: '',
  1206. },
  1207. changeRecordList: [],
  1208. columnChangeRecord: [
  1209. {
  1210. columnProp: 'changeNo',
  1211. headerAlign: 'center',
  1212. align: 'center',
  1213. columnLabel: '申请编号',
  1214. columnHidden: false,
  1215. columnImage: false,
  1216. status: true,
  1217. fixed: '',
  1218. columnWidth: 120
  1219. },
  1220. {
  1221. columnProp: 'applicantName',
  1222. headerAlign: 'center',
  1223. align: 'center',
  1224. columnLabel: '申请人',
  1225. columnHidden: false,
  1226. columnImage: false,
  1227. status: true,
  1228. fixed: '',
  1229. columnWidth: 120
  1230. },
  1231. {
  1232. columnProp: 'applicationDepartmentName',
  1233. headerAlign: 'center',
  1234. align: 'center',
  1235. columnLabel: '申请部门',
  1236. columnHidden: false,
  1237. columnImage: false,
  1238. status: true,
  1239. fixed: '',
  1240. columnWidth: 120
  1241. },
  1242. {
  1243. columnProp: 'changeStatus',
  1244. headerAlign: 'center',
  1245. align: 'center',
  1246. columnLabel: '变更单状态',
  1247. columnHidden: false,
  1248. columnImage: false,
  1249. status: true,
  1250. fixed: '',
  1251. columnWidth: 100
  1252. },
  1253. {
  1254. columnProp: 'ecnStage',
  1255. headerAlign: 'center',
  1256. align: 'center',
  1257. columnLabel: 'ECN阶段',
  1258. columnHidden: false,
  1259. columnImage: false,
  1260. status: true,
  1261. fixed: '',
  1262. columnWidth: 100
  1263. },
  1264. {
  1265. columnProp: 'changeType',
  1266. headerAlign: 'center',
  1267. align: 'center',
  1268. columnLabel: '变更类别',
  1269. columnHidden: false,
  1270. columnImage: false,
  1271. status: true,
  1272. fixed: '',
  1273. columnWidth: 100
  1274. },
  1275. {
  1276. columnProp: 'ecnType',
  1277. headerAlign: 'center',
  1278. align: 'center',
  1279. columnLabel: 'ECN种类',
  1280. columnHidden: false,
  1281. columnImage: false,
  1282. status: true,
  1283. fixed: '',
  1284. columnWidth: 100
  1285. },
  1286. {
  1287. columnProp: 'applyDate',
  1288. headerAlign: 'center',
  1289. align: 'center',
  1290. columnLabel: '申请日期',
  1291. columnHidden: false,
  1292. columnImage: false,
  1293. status: true,
  1294. fixed: '',
  1295. columnWidth: 100
  1296. },
  1297. {
  1298. columnProp: 'changePhaseInDate',
  1299. headerAlign: 'center',
  1300. align: 'center',
  1301. columnLabel: '变更生效日期',
  1302. columnHidden: false,
  1303. columnImage: false,
  1304. status: true,
  1305. fixed: '',
  1306. columnWidth: 100
  1307. },
  1308. {
  1309. columnProp: 'xxx',
  1310. headerAlign: 'center',
  1311. align: 'center',
  1312. columnLabel: 'ECN执行日期',
  1313. columnHidden: false,
  1314. columnImage: false,
  1315. status: true,
  1316. fixed: '',
  1317. columnWidth: 100
  1318. }
  1319. ],
  1320. ossColumns:[
  1321. {
  1322. userId: this.$store.state.user.name,
  1323. functionId: 103001,
  1324. serialNumber: '103001Table2FileName',
  1325. tableId: '103001Table2',
  1326. tableName: '文件信息表',
  1327. columnProp: 'fileName',
  1328. headerAlign: 'center',
  1329. align: 'center',
  1330. columnLabel: '文件名称',
  1331. columnHidden: false,
  1332. columnImage: false,
  1333. columnSortable: false,
  1334. sortLv: 0,
  1335. status: true,
  1336. fixed: '',
  1337. columnWidth: 140
  1338. },
  1339. {
  1340. userId: this.$store.state.user.name,
  1341. functionId: 103001,
  1342. serialNumber: '103001Table2FileRemark',
  1343. tableId: '103001Table2',
  1344. tableName: '文件信息表',
  1345. columnProp: 'fileRemark',
  1346. headerAlign: 'center',
  1347. align: 'center',
  1348. columnLabel: '备注',
  1349. columnHidden: false,
  1350. columnImage: false,
  1351. columnSortable: false,
  1352. sortLv: 0,
  1353. status: true,
  1354. fixed: '',
  1355. columnWidth: 240
  1356. },
  1357. // {
  1358. // userId: this.$store.state.user.name,
  1359. // functionId: 103001,
  1360. // serialNumber: '103001Table2OrderRef3',
  1361. // tableId: '103001Table2',
  1362. // tableName: '文件信息表',
  1363. // columnProp: 'orderRef3',
  1364. // headerAlign: 'center',
  1365. // align: 'center',
  1366. // columnLabel: '文件描述',
  1367. // columnHidden: false,
  1368. // columnImage: false,
  1369. // columnSortable: false,
  1370. // sortLv: 0,
  1371. // status: true,
  1372. // fixed: '',
  1373. // columnWidth: 120
  1374. // },
  1375. {
  1376. userId: this.$store.state.user.name,
  1377. functionId: 103001,
  1378. serialNumber: '103001Table2CreateDate',
  1379. tableId: '103001Table2',
  1380. tableName: '文件信息表',
  1381. columnProp: 'createDate',
  1382. headerAlign: 'center',
  1383. align: 'center',
  1384. columnLabel: '上传时间',
  1385. columnHidden: false,
  1386. columnImage: false,
  1387. columnSortable: false,
  1388. sortLv: 0,
  1389. status: true,
  1390. fixed: '',
  1391. columnWidth: 140
  1392. },
  1393. {
  1394. userId: this.$store.state.user.name,
  1395. functionId: 103001,
  1396. serialNumber: '103001Table2CreatedBy',
  1397. tableId: '103001Table2',
  1398. tableName: '文件信息表',
  1399. columnProp: 'createBy',
  1400. headerAlign: 'center',
  1401. align: 'center',
  1402. columnLabel: '上传人',
  1403. columnHidden: false,
  1404. columnImage: false,
  1405. columnSortable: false,
  1406. sortLv: 0,
  1407. status: true,
  1408. fixed: '',
  1409. columnWidth: 140
  1410. }
  1411. ],
  1412. }
  1413. },
  1414. mounted() {
  1415. this.$nextTick(() => {
  1416. this.height = window.innerHeight - 520;
  1417. })
  1418. },
  1419. methods: {
  1420. // 获取基础数据列表S
  1421. getBaseList (val, type) {
  1422. this.tagNo = val
  1423. this.tagNo2 = type
  1424. this.$nextTick(() => {
  1425. let strVal = ''
  1426. if (val === 1010) {
  1427. if(type==1) {
  1428. strVal = this.searchData.projectType
  1429. }
  1430. }
  1431. this.$refs.baseList.init(val, strVal)
  1432. })
  1433. },
  1434. /* 列表方法的回调 */
  1435. getBaseData (val) {
  1436. if (this.tagNo === 1010) {
  1437. if(this.tagNo2==1) {
  1438. this.searchData.projectType = val.Base_desc
  1439. }
  1440. }
  1441. },
  1442. // 新增 / 修改
  1443. addOrUpdateHandle (id) {
  1444. this.addOrUpdateVisible = true
  1445. this.addOrUpdate = id;
  1446. this.$nextTick(() => {
  1447. this.$refs.addOrUpdate.init();
  1448. if (id && id !== 'save' && id !== 'update'){
  1449. this.$refs.addOrUpdate.updateDataForm(id);
  1450. }
  1451. })
  1452. },
  1453. UpdateHandle (row) {
  1454. let inData={
  1455. site:row.site,
  1456. username:this.$store.state.user.name,
  1457. projectId:row.projectId
  1458. }
  1459. getProjectUserRole(inData).then(({data}) => {
  1460. if(this.$store.state.user.name=='admin'||data.row.updateFlag=='Y') {
  1461. this.addOrUpdateVisible = true
  1462. this.addOrUpdate = 'update';
  1463. this.$nextTick(() => {
  1464. this.$refs.addOrUpdate.init(row.id)
  1465. })
  1466. }else {
  1467. this.$alert('没有权限修改这个项目信息!', '错误', {
  1468. confirmButtonText: '确定'
  1469. })
  1470. }
  1471. })
  1472. },
  1473. //导出excel
  1474. async createExportData() {
  1475. this.searchData.limit = -1
  1476. this.searchData.page = 1
  1477. await projectInfoSearch(this.searchData).then(({data}) => {
  1478. this.exportList= data.page.list;
  1479. })
  1480. return this.exportList;
  1481. },
  1482. startDownload() {
  1483. // this.exportData = this.dataList
  1484. },
  1485. finishDownload() {
  1486. },
  1487. fields() {
  1488. let json = "{"
  1489. this.columnList1.forEach((item, index) => {
  1490. if (index == this.columnList1.length - 1) {
  1491. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1492. } else {
  1493. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1494. }
  1495. })
  1496. json += "}"
  1497. let s = eval("(" + json + ")")
  1498. return s
  1499. },
  1500. //导出excel
  1501. async createExportData2() {
  1502. return this.contactList;
  1503. },
  1504. startDownload2() {
  1505. // this.exportData = this.dataList
  1506. },
  1507. finishDownload2() {
  1508. },
  1509. fields2() {
  1510. let json = "{"
  1511. this.columnList2.forEach((item, index) => {
  1512. if (index == this.columnList2.length - 1) {
  1513. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1514. } else {
  1515. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1516. }
  1517. })
  1518. json += "}"
  1519. let s = eval("(" + json + ")")
  1520. return s
  1521. },
  1522. // 导出 end
  1523. // 获取数据列表
  1524. search () {
  1525. this.searchData.limit = this.pageSize
  1526. this.searchData.page = this.pageIndex
  1527. projectInfoSearch(this.searchData).then(({data}) => {
  1528. if (data.code == 0) {
  1529. this.dataList1 = data.page.list
  1530. this.pageIndex = data.page.currPage
  1531. this.pageSize = data.page.pageSize
  1532. this.totalPage = data.page.totalCount
  1533. if(this.dataList1.length>0){
  1534. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1535. this.changeData(this.dataList1[0])
  1536. }
  1537. }
  1538. this.dataListLoading = false
  1539. })
  1540. },
  1541. //单击切换订单
  1542. changeData(row) {
  1543. this.currentRow = JSON.parse(JSON.stringify(row));
  1544. this.projectData=row;
  1545. let inData= {
  1546. site:row.site,
  1547. customerNo:row.customerId,
  1548. page: 1,
  1549. limit: 10,
  1550. }
  1551. this.refreshCurrentTabTable ();
  1552. customerInformationSearchForCheck(inData).then(({data}) => {
  1553. if (data.code == 0) {
  1554. if(data.page.list.length>0){
  1555. this.customerData=data.page.list[0]
  1556. }
  1557. }
  1558. })
  1559. let inData2= {
  1560. site:row.site,
  1561. customerNo:row.finalCustomerId,
  1562. page: 1,
  1563. limit: 10,
  1564. }
  1565. customerInformationSearchForCheck(inData2).then(({data}) => {
  1566. if (data.code == 0) {
  1567. if(data.page.list.length>0){
  1568. this.finalCustomerData=data.page.list[0]
  1569. }
  1570. }
  1571. })
  1572. },
  1573. addUploadFileModal(){
  1574. let currentData = {
  1575. site: this.currentRow.site,
  1576. createBy: this.$store.state.user.name,
  1577. projectId: this.currentRow.projectId,
  1578. projectName: this.currentRow.projectName,
  1579. remark: '',
  1580. };
  1581. //打开组件 去做新增业务
  1582. this.$nextTick(() => {
  1583. this.$refs.projectUploadFile.init(currentData);
  1584. })
  1585. },
  1586. deleteFile(row){
  1587. this.$confirm('确定要删除此文件?', '提示', {
  1588. confirmButtonText: '确定',
  1589. cancelButtonText: '取消',
  1590. type: 'warning'
  1591. }).then(() => {
  1592. deleteProjectFile(row).then(({data}) => {
  1593. if (data && data.code == 0) {
  1594. this.getFileContentData();
  1595. this.$message({
  1596. message: '操作成功',
  1597. type: 'success',
  1598. duration: 1500,
  1599. onClose: () => {
  1600. }
  1601. })
  1602. } else {
  1603. this.$alert(data.msg, '错误', {
  1604. confirmButtonText: '确定'
  1605. })
  1606. }
  1607. })
  1608. }).catch(() => {
  1609. })
  1610. },
  1611. // 刷新页签的table数据
  1612. refreshCurrentTabTable () {
  1613. if (this.activeName == 'down') {
  1614. this.getFileContentData();
  1615. }
  1616. if (this.activeName == 'customer_contact') {
  1617. this.getCustomerContactData();
  1618. }
  1619. if (this.activeName == 'part') {
  1620. this.refreshPartTable();
  1621. }
  1622. if (this.activeName == 'quotation') {
  1623. this.refreshQuotationTable();
  1624. }
  1625. if (this.activeName == 'quotationHeader') {
  1626. this.refreshQuotationHeaderTable();
  1627. }
  1628. if (this.activeName == 'sample') {
  1629. this.refreshSampleTable();
  1630. }
  1631. if (this.activeName == 'test') {
  1632. this.refreshTestTable();
  1633. }
  1634. if (this.activeName == 'purchase') {
  1635. this.refreshPurchaseTable();
  1636. }
  1637. if (this.activeName == 'technicalSpecification') {
  1638. this.refreshTechnicalSpecificationTable();
  1639. }
  1640. if (this.activeName === 'changeRecord') {
  1641. this.getChangeRecordList()
  1642. }
  1643. },
  1644. // 获取变更记录
  1645. getChangeRecordList () {
  1646. let tempData = {
  1647. site: this.$store.state.user.site,
  1648. projectId: this.currentRow.projectId
  1649. }
  1650. getChangeRecordByPartNo(tempData).then(({data}) => {
  1651. if (data && data.code === 0) {
  1652. this.changeRecordList = data.rows
  1653. } else {
  1654. this.changeRecordList = []
  1655. }
  1656. })
  1657. },
  1658. refreshPartTable(){
  1659. let inData = {
  1660. site: this.currentRow.site,
  1661. projectId: this.currentRow.projectId,
  1662. username: this.$store.state.user.name,
  1663. customerId: this.currentRow.customerId
  1664. }
  1665. this.$refs.projectPart.init(inData)
  1666. },
  1667. refreshTechnicalSpecificationTable(){
  1668. let inData={
  1669. site: this.currentRow.site,
  1670. projectId: this.currentRow.projectId,
  1671. page: 1,
  1672. limit: 1000
  1673. }
  1674. this.$refs.technicalSpecification.init(inData)
  1675. },
  1676. refreshQuotationHeaderTable(){
  1677. let inData={
  1678. site: this.currentRow.site,
  1679. projectId: this.currentRow.projectId,
  1680. username:this.$store.state.user.name,
  1681. no: 1,
  1682. size: 1000
  1683. }
  1684. this.$refs.quotationHeader.init(inData)
  1685. },
  1686. refreshQuotationTable(){
  1687. let inData={
  1688. site: this.currentRow.site,
  1689. projectId: this.currentRow.projectId,
  1690. username:this.$store.state.user.name,
  1691. page: 1,
  1692. limit: 1000
  1693. }
  1694. this.$refs.projectQuotation.init(inData)
  1695. },
  1696. refreshSampleTable(){
  1697. let inData={
  1698. site: this.currentRow.site,
  1699. projectId: this.currentRow.projectId,
  1700. // username:this.$store.state.user.name,
  1701. page: 1,
  1702. limit: 1000
  1703. }
  1704. this.$refs.sample.init(inData)
  1705. },
  1706. refreshTestTable(){
  1707. let inData={
  1708. site: this.currentRow.site,
  1709. projectId: this.currentRow.projectId,
  1710. username:this.$store.state.user.name,
  1711. page: 1,
  1712. limit: 1000
  1713. }
  1714. this.$refs.test.init(inData)
  1715. },
  1716. refreshPurchaseTable(){
  1717. let inData={
  1718. site: this.currentRow.site,
  1719. projectId: this.currentRow.projectId,
  1720. username:this.$store.state.user.name,
  1721. }
  1722. this.$refs.purchase.init(inData)
  1723. },
  1724. //刷新派设备文档的列表
  1725. getFileContentData() {
  1726. let currentData = {orderRef2: this.currentRow.projectId};
  1727. getFileContentList(currentData).then(({data}) => {
  1728. //区分请求成功和失败的状况
  1729. if (data && data.code == 200) {
  1730. this.fileContentList = data.rows;
  1731. } else {
  1732. this.fileContentList = [];
  1733. }
  1734. });
  1735. },
  1736. // 下载
  1737. downloadFile(row){
  1738. // axios.get('/proxyApi/pms/eamProject/downLoadProjectFile/' + row.id, {
  1739. // responseType: 'blob',
  1740. // headers: {
  1741. // 'Content-Type': 'application/json',
  1742. // 'token': Vue.cookie.get('token')
  1743. // }
  1744. // })
  1745. let inData={
  1746. site:this.currentRow.site,
  1747. username:this.$store.state.user.name,
  1748. projectId:this.currentRow.projectId
  1749. }
  1750. getProjectUserRole(inData).then(({data}) => {
  1751. if(this.$store.state.user.name=='admin'||data.row.downFlag=='Y') {
  1752. downLoadProjectFile(row)
  1753. .then(({data}) => {
  1754. // 不限制文件下载类型
  1755. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1756. // 下载文件名称
  1757. const fileName = row.fileName
  1758. // a标签下载
  1759. const linkNode = document.createElement('a')
  1760. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1761. linkNode.style.display = 'none'
  1762. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1763. console.log(linkNode)
  1764. // if(val == 'Y'){
  1765. // this.pdfVisible = true
  1766. // this.pdfUrl = linkNode.href
  1767. // }else {
  1768. document.body.appendChild(linkNode)
  1769. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1770. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1771. document.body.removeChild(linkNode)
  1772. // }
  1773. })
  1774. }else {
  1775. this.$alert('没有权限下载这个项目的文件!', '错误', {
  1776. confirmButtonText: '确定'
  1777. })
  1778. }
  1779. })
  1780. },
  1781. // 每页数
  1782. sizeChangeHandle (val) {
  1783. this.pageSize = val
  1784. this.pageIndex = 1
  1785. this.search()
  1786. },
  1787. // 当前页
  1788. currentChangeHandle (val) {
  1789. this.pageIndex = val
  1790. this.search()
  1791. },
  1792. // 动态列开始 获取 用户保存的 格式列
  1793. async getTableUserColumn(tableId, columnId) {
  1794. let queryTableUser = {
  1795. userId: this.$store.state.user.name,
  1796. functionId: this.$route.meta.menuId,
  1797. tableId: tableId,
  1798. status: true,
  1799. languageCode: this.$i18n.locale
  1800. }
  1801. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1802. if (data.rows.length > 0) {
  1803. //this.columnList = []
  1804. switch (columnId) {
  1805. case 1:
  1806. this.columnList1 = data.rows
  1807. this.checkField();
  1808. break;
  1809. // case 2:
  1810. // this.columnList1 = data.rows
  1811. // break;
  1812. // case 3:
  1813. // this.columnList2 = data.rows
  1814. // break;
  1815. // case 4:
  1816. // this.columnList3 = data.rows
  1817. // break;
  1818. }
  1819. } else {
  1820. this.getColumnList(tableId, columnId)
  1821. }
  1822. })
  1823. },
  1824. // 获取 tableDefault 列
  1825. async getColumnList(tableId, columnId) {
  1826. let queryTable= {
  1827. functionId: this.$route.meta.menuId,
  1828. tableId: tableId,
  1829. languageCode: this.$i18n.locale
  1830. }
  1831. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1832. if (!data.rows.length == 0) {
  1833. switch (columnId) {
  1834. case 1:
  1835. this.columnList1 = data.rows
  1836. this.checkField();
  1837. break;
  1838. // case 2:
  1839. // this.columnList1 = data.rows
  1840. // break;
  1841. // case 3:
  1842. // this.columnList2 = data.rows
  1843. // break;
  1844. // case 4:
  1845. // this.columnList3 = data.rows
  1846. // break;
  1847. }
  1848. } else {
  1849. // this.showDefault = true.
  1850. }
  1851. })
  1852. },
  1853. //动态列结束
  1854. // 列表表格选择替换
  1855. tabClick (tab, event) {
  1856. // 刷新列表数据
  1857. this.refreshCurrentTabTable()
  1858. },
  1859. getCustomerContactData () {
  1860. let inData = {
  1861. site:this.currentRow.site,
  1862. customerId:this.currentRow.customerId,
  1863. projectId:this.currentRow.projectId,
  1864. }
  1865. getCustomerContactData(inData).then(({data}) => {
  1866. //区分请求成功和失败的状况
  1867. if (data && data.code == 0) {
  1868. this.contactList = data.rows;
  1869. } else {
  1870. this.contactList = [];
  1871. }
  1872. });
  1873. },
  1874. // contactChooseModal () {
  1875. // if (this.currentRow == null || this.currentRow === '') {
  1876. // this.$alert('请选择项目!', '错误', {
  1877. // confirmButtonText: '确定'
  1878. // })
  1879. // return false
  1880. // }
  1881. // let inData = {
  1882. // site:this.currentRow.site,
  1883. // customerId:this.currentRow.customerId,
  1884. // projectId:this.currentRow.projectId,
  1885. // }
  1886. // getContactChooseData(inData).then(({data}) => {
  1887. // //区分请求成功和失败的状况
  1888. // if (data && data.code == 0) {
  1889. // this.contactChooseList1 = data.rows1;
  1890. // this.contactChooseList2 = data.rows2;
  1891. //
  1892. // } else {
  1893. // this.contactChooseList1 = [];
  1894. // this.contactChooseList2 = [];
  1895. // }
  1896. // });
  1897. // this.contactChooseFlag=true;
  1898. // },
  1899. contactChooseModal () {
  1900. if (this.currentRow == null || this.currentRow === '') {
  1901. this.$alert('请选择项目!', '错误', {
  1902. confirmButtonText: '确定'
  1903. })
  1904. return false
  1905. }
  1906. let inData = {
  1907. site: this.currentRow.site,
  1908. customerId: this.currentRow.customerId,
  1909. projectId: this.currentRow.projectId
  1910. }
  1911. this.contactSelections1 = null
  1912. this.contactSelections2 = null
  1913. this.contactData.contactName = ''
  1914. getContactChooseData2(inData).then(({data}) => {
  1915. //区分请求成功和失败的状况
  1916. if (data && data.code === 0) {
  1917. this.contactChooseList1 = data.rows1
  1918. this.contactChooseList2 = data.rows2
  1919. }
  1920. })
  1921. this.contactChooseFlag = true
  1922. },
  1923. // 查询物料项目
  1924. queryCustomerContact () {
  1925. this.contactData.projectId = this.currentRow.projectId
  1926. this.contactData.customerId = this.currentRow.customerId
  1927. queryCustomerContact(this.contactData).then(({data}) => {
  1928. if (data && data.code === 0) {
  1929. this.contactChooseList1 = data.rows
  1930. } else {
  1931. this.contactChooseList1 = []
  1932. }
  1933. })
  1934. },
  1935. // 可选联系人
  1936. contactClickRow1 (row) {
  1937. this.$refs.contactTable1.toggleRowSelection(row)
  1938. },
  1939. // 已有联系人
  1940. contactClickRow2 (row) {
  1941. this.$refs.contactTable2.toggleRowSelection(row)
  1942. },
  1943. selectionContact1 (val) {
  1944. this.contactSelections1 = val
  1945. },
  1946. selectionContact2 (val) {
  1947. this.contactSelections2 = val
  1948. },
  1949. // 客户联系人新增
  1950. addContact () {
  1951. if (this.contactSelections1 == null || this.contactSelections1.length === 0) {
  1952. this.$message.warning('请选择可选联系人!')
  1953. return
  1954. }
  1955. let inData = {
  1956. site: this.currentRow.site,
  1957. customerId: this.currentRow.customerId,
  1958. projectId: this.currentRow.projectId,
  1959. contactList2: this.contactSelections1
  1960. }
  1961. addContact(inData).then(({data}) => {
  1962. if (data && data.code === 0) {
  1963. getContactChooseData2(inData).then(({data}) => {
  1964. //区分请求成功和失败的状况
  1965. if (data && data.code === 0) {
  1966. this.contactChooseList1 = data.rows1
  1967. this.contactChooseList2 = data.rows2
  1968. }
  1969. })
  1970. this.getCustomerContactData()
  1971. this.contactSelections1 = []
  1972. } else {
  1973. this.$alert(data.msg, '错误', {
  1974. confirmButtonText: '确定'
  1975. })
  1976. }
  1977. })
  1978. },
  1979. // 客户联系人删除
  1980. deleteContact () {
  1981. if (this.contactSelections2 == null || this.contactSelections2.length === 0) {
  1982. this.$message.warning('请选择已有联系人!')
  1983. return
  1984. }
  1985. let inData = {
  1986. site: this.currentRow.site,
  1987. customerId: this.currentRow.customerId,
  1988. projectId: this.currentRow.projectId,
  1989. contactList2: this.contactSelections2
  1990. }
  1991. deleteContact(inData).then(({data}) => {
  1992. if (data && data.code === 0) {
  1993. getContactChooseData2(inData).then(({data}) => {
  1994. //区分请求成功和失败的状况
  1995. if (data && data.code === 0) {
  1996. this.contactChooseList1 = data.rows1
  1997. this.contactChooseList2 = data.rows2
  1998. }
  1999. })
  2000. this.getCustomerContactData()
  2001. this.contactSelections2 = []
  2002. } else {
  2003. this.$alert(data.msg, '错误', {
  2004. confirmButtonText: '确定'
  2005. })
  2006. }
  2007. })
  2008. },
  2009. saveProjectContactList(){
  2010. let data={
  2011. site:this.currentRow.site,
  2012. customerId:this.currentRow.customerId,
  2013. projectId:this.currentRow.projectId,
  2014. contactList:this.contactChooseList1
  2015. }
  2016. saveProjectContactList(data).then(({data}) => {
  2017. if (data && data.code === 0) {
  2018. this.$message.success( '操作成功')
  2019. this.contactChooseFlag = false
  2020. this.refreshCurrentTabTable()
  2021. } else {
  2022. this.$message.error(data.msg)
  2023. }
  2024. })
  2025. },
  2026. deleteProjectInfo(row){
  2027. let inData={
  2028. site:row.site,
  2029. username:this.$store.state.user.name,
  2030. projectId:row.projectId
  2031. }
  2032. getProjectUserRole(inData).then(({data}) => {
  2033. if(this.$store.state.user.name=='admin'||data.row.deleteFlag=='Y') {
  2034. this.$confirm(`确定删除当前记录?`, '提示', {
  2035. confirmButtonText: '确定',
  2036. cancelButtonText: '取消',
  2037. type: 'warning'
  2038. }).then(() => {
  2039. deleteProjectInfo(row).then(({data}) => {
  2040. if (data && data.code === 0) {
  2041. this.$message.success( '操作成功')
  2042. this.contactChooseFlag = false
  2043. this.search()
  2044. } else {
  2045. this.$message.error(data.msg)
  2046. }
  2047. })
  2048. }).catch(() => {})
  2049. }else {
  2050. this.$alert('没有权限删除这个项目信息!', '错误', {
  2051. confirmButtonText: '确定'
  2052. })
  2053. }
  2054. })
  2055. },
  2056. checkField(){
  2057. if(!this.accessField('10202001')){
  2058. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerId');
  2059. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerName');
  2060. }
  2061. if(!this.accessField('10202002')){
  2062. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'projectSource');
  2063. }
  2064. },
  2065. toChangeMenu(changeNo){
  2066. if (this.$router.resolve(`/changeManagement-changeRecord`).resolved.name === '404'){
  2067. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  2068. }else {
  2069. this.$router.push({name:`changeManagement-changeRecord`,params:{changeNo:changeNo},})
  2070. }
  2071. }
  2072. },
  2073. activated() {
  2074. if (this.$route.params.projectId){
  2075. this.searchData.projectId = this.$route.params.projectId
  2076. this.search();
  2077. }
  2078. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2079. },
  2080. }
  2081. </script>
  2082. <style >
  2083. .el-transfer-panel {
  2084. border: 2px solid #17b3a3;
  2085. border-radius: 4px;
  2086. overflow: hidden;
  2087. background: #fff;
  2088. display: inline-block;
  2089. vertical-align: middle;
  2090. width: 200px;
  2091. max-height: 100%;
  2092. -webkit-box-sizing: border-box;
  2093. box-sizing: border-box;
  2094. position: relative;
  2095. }
  2096. .el-transfer-panel .el-transfer-panel__header {
  2097. height: 40px;
  2098. line-height: 40px;
  2099. background: #17b3a3;
  2100. margin: 0;
  2101. padding-left: 15px;
  2102. border-bottom: 1px solid #17b3a3;
  2103. -webkit-box-sizing: border-box;
  2104. box-sizing: border-box;
  2105. color: #000;
  2106. }
  2107. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  2108. font-size: 14px;
  2109. color: #303133;
  2110. font-weight: 400;
  2111. }
  2112. </style>