contactDetailDialog.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <template>
  2. <ele-modal
  3. custom-class="ele-dialog-form"
  4. v-if="visible"
  5. :visible.sync="visible"
  6. :title="title"
  7. :close-on-click-modal="false"
  8. width="80%"
  9. @close="cancel"
  10. >
  11. <el-card
  12. shadow="never"
  13. header="基本信息"
  14. body-style="padding: 22px 20px 0 0;"
  15. >
  16. <el-form
  17. label-width="120px"
  18. ref="form"
  19. :model="form"
  20. :rules="rules"
  21. style="margin-top: 30px"
  22. >
  23. <el-row>
  24. <el-col :span="8">
  25. <el-form-item
  26. label="客户名称:"
  27. prop="contactName"
  28. >
  29. {{detailData.contactName}}
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="8">
  33. <el-form-item label=" 商机名称:" prop="name">
  34. {{detailData.name}}
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="8">
  38. <el-form-item label="负责人名称:" prop="responsibleName">
  39. {{detailData.responsibleName}}
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="8">
  43. <el-form-item label="商机来源:" prop="sourceCode">
  44. {{detailData.sourceName}}
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="8">
  48. <el-form-item label="赢单率:" prop="winRate">
  49. {{detailData.winRate+'%'}}
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="8">
  53. <el-form-item label="预算:" prop="budget">
  54. {{detailData.budget+'万元'}}
  55. </el-form-item>
  56. </el-col>
  57. <el-col :span="8">
  58. <el-form-item label="预计结单日期:" prop="expectedClosingDate">
  59. {{detailData.expectedClosingDate}}
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="8">
  63. <el-form-item label="商机阶段:" prop="stageCode">
  64. {{detailData.stageCode}}
  65. </el-form-item>
  66. </el-col>
  67. <el-col :span="16">
  68. <el-form-item
  69. label="备注:"
  70. prop="remark"
  71. >
  72. {{detailData.remark}}
  73. </el-form-item>
  74. </el-col>
  75. </el-row>
  76. </el-form>
  77. </el-card>
  78. <el-card
  79. shadow="never"
  80. header="竞品"
  81. body-style="padding: 22px 20px 0 20px;"
  82. >
  83. <ele-pro-table ref="table" :needPage="false" :columns="competAnalysisListcolumns" :datasource="detailData.competAnalysisList" row-key="id">
  84. </ele-pro-table>
  85. </el-card>
  86. <el-card
  87. shadow="never"
  88. header="关键人信息"
  89. body-style="padding: 22px 20px 0 20px;"
  90. >
  91. <ele-pro-table ref="table" :needPage="false" :columns="partyListcolumns" :datasource="detailData.partyList" row-key="id">
  92. </ele-pro-table>
  93. </el-card>
  94. <div slot="footer" class="footer">
  95. <el-button @click="cancel">返回</el-button>
  96. </div>
  97. </ele-modal>
  98. </template>
  99. <script>
  100. import { getDetail} from '@/api/saleManage/businessOpportunity';
  101. import {getFile} from '@/api/system/file';
  102. import {getInfoById as getCategoryInfo} from '@/api/classifyManage/index';
  103. import dictMixins from '@/mixins/dictMixins';;
  104. import {copyObj} from '@/utils/util';
  105. export default {
  106. mixins: [dictMixins],
  107. data() {
  108. return {
  109. visible: false,
  110. title: '详情',
  111. row: {},
  112. activeName: 'base',
  113. form:{},
  114. rules:{},
  115. detailData:{},
  116. competAnalysisListcolumns: [
  117. {
  118. prop: 'name',
  119. label: '竞争对手名称',
  120. // sortable: 'custom',
  121. showOverflowTooltip: true,
  122. align: 'center',
  123. minWidth: 110
  124. },
  125. {
  126. prop: 'analysis',
  127. label: '竞品分析',
  128. showOverflowTooltip: true,
  129. align: 'center',
  130. minWidth: 110
  131. },
  132. ],
  133. partyListcolumns: [
  134. {
  135. prop: 'linkName',
  136. label: '关键人名称',
  137. // sortable: 'custom',
  138. showOverflowTooltip: true,
  139. align: 'center',
  140. minWidth: 110
  141. },
  142. {
  143. prop: 'linkMobilePhone',
  144. label: '联系方式',
  145. showOverflowTooltip: true,
  146. align: 'center',
  147. minWidth: 110
  148. },
  149. {
  150. prop: 'linkPost',
  151. label: '职位',
  152. showOverflowTooltip: true,
  153. align: 'center',
  154. minWidth: 110
  155. },
  156. {
  157. prop: 'attitudeName',
  158. label: '态度',
  159. showOverflowTooltip: true,
  160. align: 'center',
  161. minWidth: 110
  162. },
  163. {
  164. prop: 'influenceName',
  165. label: '影响力',
  166. showOverflowTooltip: true,
  167. align: 'center',
  168. minWidth: 110
  169. },
  170. {
  171. prop: 'goal',
  172. label: '项目目标/期望',
  173. showOverflowTooltip: true,
  174. align: 'center',
  175. minWidth: 110
  176. },
  177. ],
  178. ifChiefList: [
  179. {
  180. value: 0,
  181. label: '否'
  182. },
  183. {
  184. value: 1,
  185. label: '是'
  186. }
  187. ],
  188. };
  189. },
  190. methods: {
  191. async open(row) {
  192. this.form = row;
  193. this.visible = true;
  194. this.getDetailData(row.id)
  195. },
  196. cancel() {
  197. this.$nextTick(() => {
  198. // 关闭后,销毁所有的表单数据
  199. this.form = copyObj(this.formDef),
  200. this.otherForm = copyObj(this.otherFormDef),
  201. this.tableBankData = []
  202. this.tableLinkData = []
  203. this.visible = false;
  204. })
  205. },
  206. async getDetailData (id) {
  207. this.loading = true;
  208. const data = await getDetail(id);
  209. this.loading = false;
  210. if (data) {
  211. this.detailData = data;
  212. }
  213. },
  214. }
  215. };
  216. </script>