communicate-detail.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <template>
  2. <!-- <el-dialog
  3. title="查看"
  4. width="70%"
  5. :close-on-click-modal="false"
  6. :visible.sync="visible"> -->
  7. <div>
  8. <div class="my-title">查看</div>
  9. <div style="margin-left: 20px; margin-right: 20px">
  10. <e-desc title="基本信息" column="3">
  11. <e-desc-item label="沟通编码">{{ dataForm.coCode }}</e-desc-item>
  12. <e-desc-item label="客户名称">{{ dataForm.customerName }}</e-desc-item>
  13. <e-desc-item label="客户联系人">{{ dataForm.contact }}</e-desc-item>
  14. <e-desc-item label="客户联系电话">{{ dataForm.contactTel }}</e-desc-item>
  15. <e-desc-item label="沟通方式">{{ dataForm.way }}</e-desc-item>
  16. <e-desc-item label="沟通类别">{{ dataForm.coTypeValue }}</e-desc-item>
  17. <e-desc-item label="沟通主要内容" span="3">{{ dataForm.content }}</e-desc-item>
  18. <e-desc-item label="备注说明" span="3">{{
  19. dataForm.notes
  20. }}</e-desc-item>
  21. </e-desc>
  22. <e-desc title="技术资料">
  23. <upload-component
  24. :display="true"
  25. :display-title="false"
  26. :accept="'*'"
  27. :file-obj-list="dataForm.attachListTechnical || []"
  28. />
  29. </e-desc>
  30. <e-desc title="数模/图纸">
  31. <upload-component
  32. :display="true"
  33. :display-title="false"
  34. :accept="'*'"
  35. :file-obj-list="dataForm.attachListDrawing || []"
  36. />
  37. </e-desc>
  38. <e-desc title="沟通表原件">
  39. <upload-component
  40. :display="true"
  41. :display-title="false"
  42. :accept="'*'"
  43. :file-obj-list="dataForm.attachList || []"
  44. />
  45. </e-desc>
  46. <e-desc title="其他附件">
  47. <upload-component
  48. :display="true"
  49. :display-title="false"
  50. :accept="'*'"
  51. :file-obj-list="dataForm.attachListOther || []"
  52. />
  53. </e-desc>
  54. <e-desc title="沟通物料明细">
  55. <el-table :data="cusRCommProductVOS" border style="width: 100%">
  56. <el-table-column label="序号" type="index" width="50" align="center">
  57. </el-table-column>
  58. <el-table-column
  59. prop="productName"
  60. header-align="center"
  61. align="center"
  62. min-width="120"
  63. :show-tooltip-when-overflow="true"
  64. label="物料名称"
  65. >
  66. </el-table-column>
  67. <el-table-column
  68. prop="productSpecifications"
  69. header-align="center"
  70. align="center"
  71. :show-tooltip-when-overflow="true"
  72. label="规格"
  73. >
  74. </el-table-column>
  75. <el-table-column
  76. prop="cnt"
  77. header-align="center"
  78. align="center"
  79. label="数量"
  80. >
  81. </el-table-column>
  82. <el-table-column
  83. prop="deliveryDate"
  84. header-align="center"
  85. align="center"
  86. min-width="100"
  87. width="150"
  88. label="交付日期"
  89. >
  90. </el-table-column>
  91. <el-table-column
  92. prop="notes"
  93. header-align="center"
  94. align="center"
  95. min-width="180"
  96. :show-tooltip-when-overflow="true"
  97. label="备注"
  98. >
  99. </el-table-column>
  100. </el-table>
  101. </e-desc>
  102. <e-desc title="任务工单派发">
  103. <el-table :data="dataForm.workInfoList" border style="width: 100%">
  104. <el-table-column
  105. label="序号"
  106. type="index"
  107. width="50"
  108. align="center"
  109. >
  110. </el-table-column>
  111. <el-table-column
  112. prop="taskType"
  113. header-align="center"
  114. align="center"
  115. min-width="100"
  116. width="120"
  117. label="工单类型"
  118. >
  119. <template slot-scope="scope">
  120. <span>{{ scope.row.taskTypeName }}</span>
  121. </template>
  122. </el-table-column>
  123. <el-table-column
  124. prop="taskName"
  125. header-align="center"
  126. align="center"
  127. :show-tooltip-when-overflow="true"
  128. label="工单名称"
  129. >
  130. </el-table-column>
  131. <el-table-column
  132. prop="ranks"
  133. header-align="center"
  134. align="center"
  135. width="120"
  136. label="级别"
  137. >
  138. <template slot-scope="scope">
  139. <span>{{ scope.row.rankTypeName }}</span>
  140. </template>
  141. </el-table-column>
  142. <el-table-column
  143. prop="content"
  144. header-align="center"
  145. align="center"
  146. min-width="100"
  147. label="工单内容"
  148. :show-tooltip-when-overflow="true"
  149. >
  150. </el-table-column>
  151. <el-table-column
  152. prop="receiver"
  153. header-align="center"
  154. align="center"
  155. width="150"
  156. label="任务接收人"
  157. >
  158. <template slot-scope="scope">
  159. <span>{{ scope.row.receiverName }}</span>
  160. </template>
  161. </el-table-column>
  162. <el-table-column
  163. prop="attachListVo"
  164. header-align="center"
  165. align="center"
  166. width="150"
  167. label="任务附件"
  168. >
  169. <template slot-scope="scope">
  170. <el-button
  171. :disabled="
  172. !scope.row.attachListVo || scope.row.attachListVo.length === 0
  173. "
  174. type="text"
  175. size="small"
  176. @click="attachDetails(scope.row.attachListVo)"
  177. >查看</el-button
  178. >
  179. </template>
  180. </el-table-column>
  181. <el-table-column
  182. prop="notes"
  183. header-align="center"
  184. align="center"
  185. :show-tooltip-when-overflow="true"
  186. label="备注"
  187. >
  188. </el-table-column>
  189. </el-table>
  190. </e-desc>
  191. </div>
  192. <span slot="footer" class="dialog-footer">
  193. <el-button @click="onChose">返回</el-button>
  194. </span>
  195. <attach-detail-dialog ref="attachDetail" @onChose="onChose" />
  196. </div>
  197. <!-- </el-dialog> -->
  198. </template>
  199. <script>
  200. import EDesc from "../common/e-desc";
  201. import EDescItem from "../common/e-desc-item";
  202. import { getCoDetail } from "@/api/cus";
  203. import uploadComponent from "../common/upload-component-v2";
  204. import AttachDetailDialog from "../common/attach-detail-dialog";
  205. export default {
  206. name: "communicate-detail",
  207. components: {
  208. EDesc,
  209. EDescItem,
  210. uploadComponent,
  211. AttachDetailDialog
  212. },
  213. data() {
  214. return {
  215. visible: false,
  216. id: 0,
  217. dataForm: {},
  218. cusRCommProductVOS: [],
  219. fileList: [],
  220. };
  221. },
  222. methods: {
  223. onChose() {
  224. this.$emit("onChose");
  225. },
  226. async init(id) {
  227. this.visible = true;
  228. this.id = id || 0;
  229. this.dataForm = {};
  230. this.cusRCommProductVOS = [];
  231. this.fileList = [];
  232. this.getDetails();
  233. },
  234. getDetails() {
  235. getCoDetail(this.id).then(({ data }) => {
  236. if (data && data.code === "200") {
  237. this.dataForm = data.data;
  238. // 附件显示
  239. this.fileList = [];
  240. if (this.dataForm.attachListTechnical) {
  241. this.dataForm.attachListTechnical.forEach((item) => {
  242. item.name = item.fileName;
  243. item.id = item.url;
  244. });
  245. }
  246. if (this.dataForm.attachListDrawing) {
  247. this.dataForm.attachListDrawing.forEach((item) => {
  248. item.name = item.fileName;
  249. item.id = item.url;
  250. });
  251. }
  252. if (this.dataForm.attachList) {
  253. this.dataForm.attachList.forEach((item) => {
  254. item.name = item.fileName;
  255. item.id = item.url;
  256. });
  257. }
  258. if (this.dataForm.attachListOther) {
  259. this.dataForm.attachListOther.forEach((item) => {
  260. item.name = item.fileName;
  261. item.id = item.url;
  262. });
  263. }
  264. if (data.data.cusRCommProductVOS) {
  265. data.data.cusRCommProductVOS.forEach((item) => {
  266. this.cusRCommProductVOS.push({
  267. ...item,
  268. });
  269. });
  270. }
  271. }
  272. });
  273. },
  274. attachDetails(attachList) {
  275. this.$refs.attachDetail.init(attachList);
  276. },
  277. },
  278. };
  279. </script>
  280. <style scoped>
  281. .my-line {
  282. border-bottom: 1px solid #c0c4cc;
  283. margin-bottom: 10px;
  284. }
  285. .title {
  286. padding: 10px 0;
  287. }
  288. </style>