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.

2046 lines
67 KiB

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