opportunityDetailDialog.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379
  1. <template>
  2. <div>
  3. <headerTitle title="基本信息"></headerTitle>
  4. <el-form
  5. label-width="120px"
  6. ref="form"
  7. :model="form"
  8. :rules="rules"
  9. style="margin-top: 30px"
  10. >
  11. <el-row>
  12. <el-col :span="8">
  13. <el-form-item label="客户名称:" prop="contactName">
  14. {{ detailData.contactName }}
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="8">
  18. <el-form-item label=" 商机名称:" prop="name">
  19. {{ detailData.name }}
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="8">
  23. <el-form-item label="负责人名称:" prop="responsibleName">
  24. {{ detailData.responsibleName }}
  25. </el-form-item>
  26. </el-col>
  27. <el-col :span="8">
  28. <el-form-item label="商机来源:" prop="sourceCode">
  29. {{ detailData.sourceName }}
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="8">
  33. <el-form-item label="赢单率:" prop="winRate">
  34. {{detailData.winRate? detailData.winRate + '%' : '' }}
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="8">
  38. <el-form-item label="预算:" prop="budget">
  39. {{ detailData.budget? detailData.budget + '万元':'' }}
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="8">
  43. <el-form-item label="预计结单日期:" prop="expectedClosingDate">
  44. {{ detailData.expectedClosingDate }}
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="8">
  48. <el-form-item label="商机阶段:" prop="stageCode">
  49. {{ detailData.stageName }}
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="8">
  53. <el-form-item label="附件:" prop="files">
  54. <div v-if="detailData.files && detailData.files?.length">
  55. <el-link
  56. v-for="link in detailData.files"
  57. :key="link.id"
  58. type="primary"
  59. :underline="false"
  60. @click="downloadFile(link)"
  61. >
  62. {{ link.name }}</el-link
  63. >
  64. </div>
  65. </el-form-item>
  66. </el-col>
  67. <el-col :span="16">
  68. <el-form-item label="备注:" prop="remark">
  69. {{ detailData.remark }}
  70. </el-form-item>
  71. </el-col>
  72. </el-row>
  73. </el-form>
  74. <headerTitle title="产品清单"></headerTitle>
  75. <inventoryTable
  76. pageName="businessOpportunity"
  77. v-if="['productionSupervisorApprove1','technicianApprove','techLeaderApprove','productionSupervisorApprove2','salesManagerApprove'].includes(taskDefinitionKey)"
  78. ref="inventoryTable"
  79. :taskDefinitionKey=taskDefinitionKey
  80. :isDeliveryDeadline="false"
  81. :isGuaranteePeriod="false"
  82. :isCustomerMark="false"
  83. ></inventoryTable>
  84. <inventoryTabledetail
  85. v-if="!['productionSupervisorApprove1','technicianApprove','techLeaderApprove','productionSupervisorApprove2','salesManagerApprove'].includes(taskDefinitionKey)"
  86. ref="inventoryTabledetailRef"
  87. :isDeliveryDeadline="false"
  88. :isGuaranteePeriod="false"
  89. :isCustomerMark="false"
  90. ></inventoryTabledetail>
  91. <!-- <el-card
  92. shadow="never"
  93. header="竞品对手"
  94. body-style="padding: 22px 20px 0 20px;"
  95. >
  96. <ele-pro-table
  97. ref="table"
  98. :needPage="false"
  99. :columns="competAnalysisListcolumns1"
  100. :datasource="detailData.competAnalysisList"
  101. row-key="id"
  102. >
  103. </ele-pro-table>
  104. </el-card>
  105. <el-card
  106. shadow="never"
  107. header="关键人信息"
  108. body-style="padding: 22px 20px 0 20px;"
  109. >
  110. <ele-pro-table
  111. ref="table"
  112. :needPage="false"
  113. :columns="partyListcolumns"
  114. :datasource="detailData.partyList"
  115. row-key="id"
  116. >
  117. </ele-pro-table>
  118. </el-card> -->
  119. </div>
  120. </template>
  121. <script>
  122. import { getDetail } from '@/api/bpm/components/saleManage/businessOpportunity';
  123. import { getFile } from '@/api/system/file';
  124. import dictMixins from '@/mixins/dictMixins';
  125. import inventoryTable from '@/views/bpm/handleTask/components/contractBook/inventoryTable.vue';
  126. import inventoryTabledetail from '@/views/bpm/handleTask/components/contractBook/inventoryTabledetail.vue';
  127. export default {
  128. mixins: [dictMixins],
  129. components: {
  130. inventoryTable,
  131. inventoryTabledetail
  132. },
  133. props: {
  134. businessId: {
  135. default: ''
  136. },
  137. taskDefinitionKey: {
  138. default: ''
  139. }
  140. },
  141. data() {
  142. return {
  143. visible: false,
  144. title: '详情',
  145. row: {},
  146. activeName: 'base',
  147. form: {},
  148. rules: {},
  149. detailData: {},
  150. competAnalysisListcolumns1: [
  151. {
  152. prop: 'name',
  153. label: '竞争对手名称',
  154. // sortable: 'custom',
  155. showOverflowTooltip: true,
  156. align: 'center',
  157. width: 300
  158. },
  159. {
  160. prop: 'analysis',
  161. label: '竞品分析',
  162. showOverflowTooltip: true,
  163. align: 'center'
  164. }
  165. ],
  166. partyListcolumns: [
  167. {
  168. prop: 'linkName',
  169. label: '关键人名称',
  170. // sortable: 'custom',
  171. showOverflowTooltip: true,
  172. align: 'center',
  173. minWidth: 110
  174. },
  175. {
  176. prop: 'linkMobilePhone',
  177. label: '联系方式',
  178. showOverflowTooltip: true,
  179. align: 'center',
  180. minWidth: 110
  181. },
  182. {
  183. prop: 'linkPost',
  184. label: '职位',
  185. showOverflowTooltip: true,
  186. align: 'center',
  187. minWidth: 110
  188. },
  189. {
  190. prop: 'attitudeName',
  191. label: '态度',
  192. showOverflowTooltip: true,
  193. align: 'center',
  194. minWidth: 110
  195. },
  196. {
  197. prop: 'influenceName',
  198. label: '影响力',
  199. showOverflowTooltip: true,
  200. align: 'center',
  201. minWidth: 110
  202. },
  203. {
  204. prop: 'goal',
  205. label: '项目目标/期望',
  206. showOverflowTooltip: true,
  207. align: 'center',
  208. minWidth: 110
  209. }
  210. ],
  211. competAnalysisListcolumns: [
  212. {
  213. width: 45,
  214. type: 'index',
  215. columnKey: 'index',
  216. align: 'center',
  217. fixed: 'left'
  218. },
  219. {
  220. width: 200,
  221. prop: 'productName',
  222. label: '名称',
  223. slot: 'productName'
  224. },
  225. {
  226. width: 120,
  227. prop: 'productCode',
  228. label: '编码',
  229. slot: 'productCode'
  230. },
  231. {
  232. width: 200,
  233. prop: 'productCategoryName',
  234. label: '类型',
  235. slot: 'productCategoryName'
  236. },
  237. {
  238. width: 160,
  239. prop: 'productBrand',
  240. label: '牌号',
  241. slot: 'productBrand'
  242. },
  243. {
  244. width: 120,
  245. prop: 'modelType',
  246. label: '型号',
  247. slot: 'modelType'
  248. },
  249. {
  250. width: 120,
  251. prop: 'specification',
  252. label: '规格',
  253. slot: 'specification'
  254. },
  255. {
  256. width: 160,
  257. prop: 'singlePrice',
  258. label: '单价',
  259. slot: 'singlePrice'
  260. },
  261. {
  262. width: 120,
  263. prop: 'totalCount',
  264. label: '数量',
  265. slot: 'totalCount'
  266. },
  267. {
  268. width: 120,
  269. prop: 'totalPrice',
  270. label: '销售总金额',
  271. slot: 'totalPrice',
  272. formatter: (_row, _column, cellValue) => {
  273. return _row.totalPrice? _row.totalPrice + '元':'';
  274. }
  275. },
  276. {
  277. width: 120,
  278. prop: 'measuringUnit',
  279. label: '计量单位',
  280. slot: 'measuringUnit'
  281. },
  282. {
  283. width: 120,
  284. prop: 'deliveryDays',
  285. label: '交期(天)',
  286. slot: 'deliveryDays'
  287. },
  288. {
  289. width: 200,
  290. prop: 'guaranteePeriod',
  291. label: '质保期',
  292. slot: 'guaranteePeriod',
  293. formatter: (_row, _column, cellValue) => {
  294. return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
  295. }
  296. },
  297. // {
  298. // width: 120,
  299. // prop: 'guaranteePeriodUnitCode',
  300. // label: '',
  301. // slot: 'guaranteePeriodUnitCode'
  302. // },
  303. {
  304. width: 240,
  305. prop: 'customerReqFiles',
  306. label: '客户需求',
  307. slot: 'customerReqFiles'
  308. },
  309. {
  310. width: 120,
  311. prop: 'technicalAnswerName',
  312. label: '技术答疑人',
  313. slot: 'technicalAnswerName'
  314. },
  315. {
  316. width: 220,
  317. prop: 'technicalParams',
  318. label: '技术参数',
  319. slot: 'technicalParams'
  320. },
  321. {
  322. width: 240,
  323. prop: 'technicalDrawings',
  324. label: '技术图纸',
  325. slot: 'technicalDrawings',
  326. formatter: (_row, _column, cellValue) => {
  327. return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
  328. }
  329. },
  330. {
  331. width: 220,
  332. prop: 'remark',
  333. label: '备注',
  334. slot: 'remark'
  335. }
  336. ]
  337. };
  338. },
  339. created() {
  340. this.getDetailData(this.businessId);
  341. console.log(this.taskDefinitionKey,'11111111111111111');
  342. },
  343. methods: {
  344. downloadFile(file) {
  345. getFile({ objectName: file.storePath }, file.name);
  346. },
  347. async getDetailData(id) {
  348. this.loading = true;
  349. const data = await getDetail(id);
  350. this.loading = false;
  351. if (data) {
  352. this.detailData = data;
  353. this.$refs.inventoryTable &&
  354. this.$refs.inventoryTable.putTableValue(data);
  355. this.$refs.inventoryTabledetailRef &&
  356. this.$refs.inventoryTabledetailRef.putTableValue(data);
  357. }
  358. },
  359. getTableValue() {
  360. return this.$refs.inventoryTable.getTableValue();
  361. }
  362. }
  363. };
  364. </script>
  365. <style scoped lang="scss">
  366. .ele-dialog-form {
  367. .el-form-item {
  368. margin-bottom: 10px;
  369. }
  370. }
  371. </style>