detailDialog.vue 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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. <el-form ref="form" :model="form" :rules="rules" label-width="120px">
  13. <headerTitle title="发货信息"></headerTitle>
  14. <el-row>
  15. <el-col :span="12">
  16. <el-form-item
  17. label="客户名称:"
  18. prop="contactName"
  19. style="margin-bottom: 16px"
  20. >
  21. {{form.contactName}}
  22. </el-form-item>
  23. <el-form-item
  24. label="客户联系人:"
  25. prop="linkName"
  26. style="margin-bottom: 16px"
  27. >
  28. {{form.linkName}}
  29. </el-form-item>
  30. <el-form-item
  31. label="客户电话:"
  32. prop="linkPhone"
  33. style="margin-bottom: 16px"
  34. >
  35. {{form.linkPhone}}
  36. </el-form-item>
  37. <el-form-item
  38. label="客户地址:"
  39. prop="partaAddress"
  40. style="margin-bottom: 16px"
  41. >
  42. {{form.receiveAddress}}
  43. </el-form-item>
  44. <el-form-item
  45. label="发货附件:"
  46. prop="sendFiles"
  47. style="margin-bottom: 16px"
  48. >
  49. <div v-if="detailData.sendFiles && detailData.sendFiles?.length">
  50. <el-link v-for="link in detailData.sendFiles" :key="link.id"
  51. type="primary" :underline="false"
  52. @click="downloadFile(link)"> {{ link.name }}</el-link>
  53. </div>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="12">
  57. <el-form-item
  58. label="车牌号:"
  59. prop="carNo"
  60. style="margin-bottom: 16px"
  61. >
  62. {{form.carNo}}
  63. </el-form-item>
  64. <el-form-item
  65. label="发货单据编码:"
  66. prop="docNo"
  67. style="margin-bottom: 16px"
  68. >
  69. {{form.docNo}}
  70. </el-form-item>
  71. <el-form-item
  72. label="制单人:"
  73. prop="makerName"
  74. style="margin-bottom: 16px"
  75. >
  76. {{form.makerName}}
  77. </el-form-item>
  78. <el-form-item prop="orderNo" label="订单编码:" >
  79. {{form.orderNo}}
  80. </el-form-item>
  81. <el-form-item prop="replied" label="是否回执:">
  82. {{form.replied==1?'是':'否'}}
  83. </el-form-item>
  84. <el-form-item
  85. label="审核状态:"
  86. prop="reviewStatus"
  87. style="margin-bottom: 16px"
  88. >
  89. {{reviewStatusEnum[form.reviewStatus].label}}
  90. </el-form-item>
  91. </el-col>
  92. </el-row>
  93. </el-form>
  94. <headerTitle title="产品清单"></headerTitle>
  95. <ele-pro-table ref="table" :needPage="false" :columns="competAnalysisListcolumns" :toolkit="[]" :datasource="detailData.productList" row-key="id">
  96. <!-- <template v-slot:toolbar>
  97. <div class="headbox">
  98. <span class="amount">总计:{{detailData.totalAmount}}元</span>
  99. <span class="amount">应付金额:{{detailData.payAmount}}元</span>
  100. </div>
  101. </template> -->
  102. <template v-slot:technicalDrawings="{ row }">
  103. <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
  104. <el-link
  105. v-for="link in row.technicalDrawings" :key="link.id"
  106. type="primary" :underline="false"
  107. @click="downloadFile(link)"> {{ link.name }}</el-link>
  108. </div>
  109. </template>
  110. </ele-pro-table>
  111. <div slot="footer" class="footer">
  112. <el-button @click="cancel">返回</el-button>
  113. </div>
  114. </ele-modal>
  115. </template>
  116. <script>
  117. import {getFile} from '@/api/system/file';
  118. import dictMixins from '@/mixins/dictMixins';
  119. import {download } from '@/utils/file';
  120. import {reviewStatusEnum} from '@/enum/dict';
  121. import {copyObj} from '@/utils/util';
  122. export default {
  123. mixins: [dictMixins],
  124. data() {
  125. return {
  126. reviewStatusEnum,
  127. visible: false,
  128. detailId:'',
  129. title: '详情',
  130. row: {},
  131. activeName: 'base',
  132. form:{
  133. orderFiles:[{name:'222'}]
  134. },
  135. rules:{},
  136. detailData:{},
  137. receiptPaymentListcolumns:[
  138. {
  139. width: 45,
  140. type: 'index',
  141. columnKey: 'index',
  142. align: 'center',
  143. fixed: 'left'
  144. },
  145. {
  146. width: 200,
  147. prop: 'moneyName',
  148. label: '款项名称',
  149. slot: 'moneyName'
  150. },
  151. {
  152. width: 100,
  153. prop: 'price',
  154. label: '金额',
  155. slot: 'price',
  156. formatter: (_row, _column, cellValue) => {
  157. return _row.price+'元'
  158. }
  159. },
  160. {
  161. width: 100,
  162. prop: 'ratio',
  163. label: '比例',
  164. slot: 'ratio',
  165. formatter: (_row, _column, cellValue) => {
  166. return _row.ratio+'%'
  167. }
  168. },
  169. {
  170. width: 160,
  171. prop: 'deadLine',
  172. label: '截止日期',
  173. slot: 'deadLine'
  174. },
  175. {
  176. prop: 'remark',
  177. label: ' 说明',
  178. slot: 'remark'
  179. }
  180. ],
  181. competAnalysisListcolumns: [
  182. {
  183. width: 45,
  184. type: 'index',
  185. columnKey: 'index',
  186. align: 'center',
  187. fixed: 'left'
  188. },
  189. {
  190. width: 200,
  191. prop: 'productName',
  192. label: '名称',
  193. slot: 'productName'
  194. },
  195. {
  196. width: 120,
  197. prop: 'productCode',
  198. label: '编码',
  199. slot: 'productCode'
  200. },
  201. {
  202. width: 200,
  203. prop: 'productCategoryName',
  204. label: '类型',
  205. slot: 'productCategoryName'
  206. },
  207. {
  208. width: 160,
  209. prop: 'productBrand',
  210. label: '牌号',
  211. slot: 'productBrand'
  212. },
  213. {
  214. width: 120,
  215. prop: 'modelType',
  216. label: '型号',
  217. slot: 'modelType'
  218. },
  219. {
  220. width: 120,
  221. prop: 'specification',
  222. label: '规格',
  223. slot: 'specification'
  224. },
  225. {
  226. width: 160,
  227. prop: 'singlePrice',
  228. label: '单价',
  229. slot: 'singlePrice'
  230. },
  231. {
  232. width: 120,
  233. prop: 'totalCount',
  234. label: '数量',
  235. slot: 'totalCount'
  236. },
  237. {
  238. width: 120,
  239. prop: 'totalPrice',
  240. label: '销售总金额',
  241. slot: 'totalPrice',
  242. formatter: (_row, _column, cellValue) => {
  243. return _row.totalPrice+'元'
  244. }
  245. },
  246. {
  247. width: 120,
  248. prop: 'measuringUnit',
  249. label: '计量单位',
  250. slot: 'measuringUnit'
  251. },
  252. {
  253. width: 120,
  254. prop: 'deliveryDays',
  255. label: '交期(天)',
  256. slot: 'deliveryDays'
  257. },
  258. {
  259. width: 200,
  260. prop: 'guaranteePeriod',
  261. label: '质保期',
  262. slot: 'guaranteePeriod',
  263. formatter: (_row, _column, cellValue) => {
  264. return _row.guaranteePeriod+_row.guaranteePeriodUnitName
  265. }
  266. },
  267. // {
  268. // width: 120,
  269. // prop: 'guaranteePeriodUnitCode',
  270. // label: '',
  271. // slot: 'guaranteePeriodUnitCode'
  272. // },
  273. {
  274. width: 120,
  275. prop: 'technicalAnswerName',
  276. label: '技术答疑人',
  277. slot: 'technicalAnswerName'
  278. },
  279. {
  280. width: 220,
  281. prop: 'technicalParams',
  282. label: '技术参数',
  283. slot: 'technicalParams'
  284. },
  285. {
  286. width:240,
  287. prop: 'technicalDrawings',
  288. label: '技术图纸',
  289. slot: 'technicalDrawings',
  290. formatter: (_row, _column, cellValue) => {
  291. return _row.guaranteePeriod+_row.guaranteePeriodUnitName
  292. }
  293. },
  294. {
  295. width: 220,
  296. prop: 'remark',
  297. label: '备注',
  298. slot: 'remark'
  299. }
  300. ],
  301. };
  302. },
  303. methods: {
  304. async open(row) {
  305. this.form = row;
  306. this.visible = true;
  307. this.getDetailData(row.id)
  308. this.detailId=row.id
  309. },
  310. cancel() {
  311. this.$nextTick(() => {
  312. // 关闭后,销毁所有的表单数据
  313. this.form = copyObj(this.formDef),
  314. this.otherForm = copyObj(this.otherFormDef),
  315. this.tableBankData = []
  316. this.tableLinkData = []
  317. this.visible = false;
  318. })
  319. },
  320. downloadFile(file){
  321. getFile({ objectName: file.storePath }, file.name);
  322. },
  323. async getDetailData (id) {
  324. this.loading = true;
  325. const data = await getSendSaleOrderrecordDetail(id);
  326. this.loading = false;
  327. if (data) {
  328. this.detailData = data;
  329. }
  330. },
  331. }
  332. };
  333. </script>
  334. <style scoped lang="scss">
  335. .ele-dialog-form{
  336. .el-form-item{
  337. margin-bottom: 10px;
  338. }
  339. }
  340. .headbox{
  341. display: flex;
  342. justify-content: flex-start;
  343. align-items: center;
  344. .amount{
  345. font-size: 14px;
  346. font-weight: bold;
  347. margin-right: 20px;
  348. }
  349. }
  350. </style>