detailDialog.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. <template>
  2. <!-- <ele-modal
  3. custom-class="ele-dialog-form long-dialog-form"
  4. :centered="true"
  5. v-if="visible"
  6. :visible.sync="visible"
  7. :title="title"
  8. :close-on-click-modal="false"
  9. width="80%"
  10. @close="cancel"
  11. > -->
  12. <div>
  13. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  14. <headerTitle title="基本信息">
  15. <!-- <el-button
  16. size="small"
  17. type="primary"
  18. icon="el-icon-s-grid"
  19. class="ele-btn-icon"
  20. @click="exportTable"
  21. >
  22. 导出
  23. </el-button> -->
  24. </headerTitle>
  25. <el-row>
  26. <el-col :span="12">
  27. <el-form-item
  28. label="关联商机名称"
  29. prop="opportunityName"
  30. style="margin-bottom: 22px"
  31. >
  32. {{ detailData.opportunityName }}
  33. </el-form-item>
  34. <el-form-item
  35. label="询价方名称"
  36. prop="contactName"
  37. style="margin-bottom: 22px"
  38. >
  39. {{ form.contactName }}
  40. </el-form-item>
  41. <el-form-item
  42. label="询价方联系人"
  43. prop="contactLinkName"
  44. style="margin-bottom: 22px"
  45. >
  46. {{ form.contactLinkName }}
  47. </el-form-item>
  48. <el-form-item
  49. label="询价方电话"
  50. prop="contactTel"
  51. style="margin-bottom: 22px"
  52. >
  53. {{ form.contactTel }}
  54. </el-form-item>
  55. <el-form-item
  56. label="询价方传真"
  57. prop="contactFax"
  58. style="margin-bottom: 22px"
  59. >
  60. {{ form.contactFax }}
  61. </el-form-item>
  62. <el-form-item
  63. label="询价方Email"
  64. prop="contactEmail"
  65. style="margin-bottom: 22px"
  66. >
  67. {{ form.contactEmail }}
  68. </el-form-item>
  69. <el-form-item
  70. label="询价方地址"
  71. prop="contactAddress"
  72. style="margin-bottom: 22px"
  73. >
  74. {{ form.contactAddress }}
  75. </el-form-item>
  76. <el-form-item prop="askFile" label="附件">
  77. <fileMain v-model="form.askFile" type="view"></fileMain>
  78. <!-- <el-link-->
  79. <!-- v-if="form.askFile && form.askFile !== ''"-->
  80. <!-- type="primary"-->
  81. <!-- :underline="false"-->
  82. <!-- @click="downloadFile(form.askFile)"-->
  83. <!-- >-->
  84. <!-- {{ form.askFile.name }}</el-link-->
  85. <!-- >-->
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="12">
  89. <el-form-item
  90. label="报价方名称"
  91. prop="quoteName"
  92. style="margin-bottom: 22px"
  93. >
  94. {{ form.quoteName }}
  95. </el-form-item>
  96. <el-form-item
  97. label="报价方联系人"
  98. prop="quoteLinkName"
  99. style="margin-bottom: 22px"
  100. >
  101. {{ form.quoteLinkName }}
  102. </el-form-item>
  103. <el-form-item prop="quoteTel" label="报价方联系电话">
  104. {{ form.quoteTel }}
  105. </el-form-item>
  106. <el-form-item prop="quoteFax" label="报价方传真">
  107. {{ form.quoteFax }}
  108. </el-form-item>
  109. <el-form-item
  110. label="报价方Email"
  111. prop="quoteEmail"
  112. style="margin-bottom: 22px"
  113. >
  114. {{ form.quoteEmail }}
  115. </el-form-item>
  116. <el-form-item
  117. label="报价方地址"
  118. prop="quoteAddress"
  119. style="margin-bottom: 22px"
  120. >
  121. {{ form.quoteAddress }}
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. <el-row style="margin-top: 20px">
  126. <el-col :span="6">
  127. <el-form-item prop="taxRate" label="税率">
  128. {{ form.taxRate }}%
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="6">
  132. <el-form-item prop="deliveryDate" label="交货日期">
  133. {{ form.deliveryDate?.substr(0, 10) }}
  134. </el-form-item>
  135. </el-col>
  136. <el-col :span="6">
  137. <el-form-item
  138. label="结算方式"
  139. prop="settlementMode"
  140. style="margin-bottom: 22px"
  141. >
  142. {{ form.settlementModeName }}
  143. </el-form-item>
  144. </el-col>
  145. <el-col :span="6">
  146. <el-form-item
  147. label="是否接受拆单"
  148. prop="acceptUnpack"
  149. style="margin-bottom: 22px"
  150. >
  151. {{ form.acceptUnpack == 1 ? '接受' : '不接受' }}
  152. </el-form-item>
  153. </el-col>
  154. </el-row>
  155. </el-form>
  156. <headerTitle title="报价单产品清单"></headerTitle>
  157. <inventoryTable
  158. ref="inventoryTable"
  159. :isCustomerMark="false"
  160. :isDeliveryDeadline="false"
  161. :isGuaranteePeriod="false"
  162. v-if="taskDefinitionKey === 'technicianApprove'"
  163. ></inventoryTable>
  164. <inventoryTabledetail
  165. :isCustomerMark="false"
  166. v-if="taskDefinitionKey != 'technicianApprove'"
  167. ref="inventoryTabledetailRef"
  168. ></inventoryTabledetail>
  169. </div>
  170. <!-- </ele-modal> -->
  171. </template>
  172. <script>
  173. import { getFile } from '@/api/system/file';
  174. import dictMixins from '@/mixins/dictMixins';
  175. import { copyObj } from '@/utils/util';
  176. // import inventoryTable from '@/views/bpm/handleTask/components/contractBook/inventoryTable.vue';
  177. import inventoryTabledetail from '@/BIZComponents/inventoryTableDetails.vue';
  178. import inventoryTable from '@/BIZComponents/inventoryTable.vue';
  179. import { getDetail } from '@/api/bpm/components/saleManage/quotation';
  180. import fileMain from "@/components/addDoc/index.vue";
  181. export default {
  182. mixins: [dictMixins],
  183. props: {
  184. businessId: {
  185. default: ''
  186. },
  187. taskDefinitionKey: {
  188. default: ''
  189. }
  190. },
  191. components: {
  192. fileMain,
  193. inventoryTable,
  194. inventoryTabledetail
  195. },
  196. data() {
  197. return {
  198. visible: false,
  199. detailId: '',
  200. title: '详情',
  201. row: {},
  202. activeName: 'base',
  203. form: {
  204. askFile:[]
  205. },
  206. rules: {},
  207. detailData: {},
  208. competAnalysisListcolumns: [
  209. {
  210. width: 45,
  211. type: 'index',
  212. columnKey: 'index',
  213. align: 'center',
  214. fixed: 'left'
  215. },
  216. {
  217. width: 200,
  218. prop: 'productName',
  219. label: '名称',
  220. slot: 'productName'
  221. },
  222. {
  223. width: 120,
  224. prop: 'productCode',
  225. label: '编码',
  226. slot: 'productCode'
  227. },
  228. {
  229. width: 200,
  230. prop: 'productCategoryName',
  231. label: '类型',
  232. slot: 'productCategoryName'
  233. },
  234. {
  235. width: 160,
  236. prop: 'productBrand',
  237. label: '牌号',
  238. slot: 'productBrand'
  239. },
  240. {
  241. width: 120,
  242. prop: 'modelType',
  243. label: '型号',
  244. slot: 'modelType'
  245. },
  246. {
  247. width: 120,
  248. prop: 'specification',
  249. label: '规格',
  250. slot: 'specification'
  251. },
  252. {
  253. width: 160,
  254. prop: 'singlePrice',
  255. label: '单价',
  256. slot: 'singlePrice'
  257. },
  258. {
  259. width: 120,
  260. prop: 'totalCount',
  261. label: '数量',
  262. slot: 'totalCount'
  263. },
  264. {
  265. width: 120,
  266. prop: 'totalPrice',
  267. label: '销售总金额',
  268. slot: 'totalPrice',
  269. formatter: (_row, _column, cellValue) => {
  270. return _row.totalPrice + '元';
  271. }
  272. },
  273. {
  274. width: 120,
  275. prop: 'measuringUnit',
  276. label: '计量单位',
  277. slot: 'measuringUnit'
  278. },
  279. {
  280. width: 120,
  281. prop: 'deliveryDays',
  282. label: '交期(天)',
  283. slot: 'deliveryDays'
  284. },
  285. {
  286. width: 200,
  287. prop: 'guaranteePeriod',
  288. label: '质保期',
  289. slot: 'guaranteePeriod',
  290. formatter: (_row, _column, cellValue) => {
  291. return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
  292. }
  293. },
  294. // {
  295. // width: 120,
  296. // prop: 'guaranteePeriodUnitCode',
  297. // label: '',
  298. // slot: 'guaranteePeriodUnitCode'
  299. // },
  300. {
  301. width: 240,
  302. prop: 'customerReqFiles',
  303. label: '客户需求',
  304. slot: 'customerReqFiles'
  305. },
  306. {
  307. width: 120,
  308. prop: 'technicalAnswerName',
  309. label: '技术答疑人',
  310. slot: 'technicalAnswerName'
  311. },
  312. {
  313. width: 220,
  314. prop: 'technicalParams',
  315. label: '技术参数',
  316. slot: 'technicalParams'
  317. },
  318. {
  319. width: 240,
  320. prop: 'technicalDrawings',
  321. label: '技术图纸',
  322. slot: 'technicalDrawings'
  323. },
  324. {
  325. width: 220,
  326. prop: 'remark',
  327. label: '备注',
  328. slot: 'remark'
  329. }
  330. ]
  331. };
  332. },
  333. created() {
  334. this.getDetailData(this.businessId);
  335. },
  336. methods: {
  337. //导出
  338. // async exportTable() {
  339. // this.loading = true;
  340. // // const response = await getExport(this.detailId);
  341. // },
  342. cancel() {
  343. this.$nextTick(() => {
  344. // 关闭后,销毁所有的表单数据
  345. (this.form = copyObj(this.formDef)),
  346. (this.otherForm = copyObj(this.otherFormDef)),
  347. (this.tableBankData = []);
  348. this.tableLinkData = [];
  349. this.visible = false;
  350. });
  351. },
  352. downloadFile(file) {
  353. getFile({ objectName: file.storePath }, file.name);
  354. },
  355. async getDetailData(id) {
  356. this.loading = true;
  357. const data = await getDetail(id);
  358. this.loading = false;
  359. if (data) {
  360. this.$refs.inventoryTable &&
  361. this.$refs.inventoryTable.putTableValue(data);
  362. this.$refs.inventoryTabledetailRef &&
  363. this.$refs.inventoryTabledetailRef.putTableValue(data);
  364. this.detailData = data;
  365. this.form = data;
  366. }
  367. },
  368. getTableValue() {
  369. return this.$refs.inventoryTable.getTableValue();
  370. }
  371. }
  372. };
  373. </script>
  374. <style scoped lang="scss">
  375. .ele-dialog-form {
  376. .el-form-item {
  377. margin-bottom: 10px;
  378. }
  379. }
  380. .headbox {
  381. display: flex;
  382. justify-content: space-between;
  383. align-items: center;
  384. .amount {
  385. font-size: 14px;
  386. font-weight: bold;
  387. }
  388. }
  389. </style>
  390. @/api/bpm/components/saleManage/quotation