detail.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <div class="quotationDetail-wrap">
  3. <a-page-header :ghost="false" @back="handleBack" class="quotationDetail-back">
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="quotationDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
  7. </template>
  8. <!-- 操作区,位于 title 行的行尾 -->
  9. <!-- <template slot="extra">
  10. <a-button key="3" type="danger" id="quotationDetail-export-btn">导出</a-button>
  11. <a-button key="2" id="quotationDetail-preview-btn">打印预览</a-button>
  12. <a-button key="1" type="primary" id="quotationDetail-print-btn">快速打印</a-button>
  13. </template> -->
  14. </a-page-header>
  15. <a-card size="small" :bordered="false" class="quotationDetail-cont">
  16. <a-collapse :activeKey="['1']">
  17. <a-collapse-panel key="1" header="基础信息">
  18. <a-descriptions :column="3">
  19. <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
  20. <a-descriptions-item label="客户地址">箭冠营销中心</a-descriptions-item>
  21. <a-descriptions-item label="报价单号">箭冠营销中心</a-descriptions-item>
  22. <a-descriptions-item label="联系电话">箭冠营销中心</a-descriptions-item>
  23. <a-descriptions-item label="备注">箭冠营销中心</a-descriptions-item>
  24. <a-descriptions-item label="业务员">箭冠营销中心</a-descriptions-item>
  25. <a-descriptions-item label="制单人">箭冠营销中心</a-descriptions-item>
  26. </a-descriptions>
  27. </a-collapse-panel>
  28. </a-collapse>
  29. </a-card>
  30. <a-card size="small" :bordered="false" class="quotationDetail-cont">
  31. <!-- 总计 -->
  32. <a-alert type="info" showIcon style="margin-bottom:10px">
  33. <div slot="message">总款数:<strong>1</strong>,总数量:<strong>1</strong>,总赠品数量:<strong>0</strong>,总售价:<strong>14</strong>,总成本:<strong>6.33</strong>,总毛利: <strong>6</strong></div>
  34. </a-alert>
  35. <!-- 列表 -->
  36. <s-table
  37. class="sTable"
  38. ref="table"
  39. size="small"
  40. :rowKey="(record) => record.id"
  41. :columns="columns"
  42. :data="loadData"
  43. :scroll="{ x: 1160 }"
  44. bordered></s-table>
  45. </a-card>
  46. </div>
  47. </template>
  48. <script>
  49. import { STable, VSelect } from '@/components'
  50. export default {
  51. components: { STable, VSelect },
  52. data () {
  53. return {
  54. queryParam: {
  55. },
  56. disabled: false, // 查询、重置按钮是否可操作
  57. brandData: [], // 产品品牌 下拉数据
  58. typeData: [], // 产品类别 下拉数据
  59. // 表头
  60. columns: [
  61. { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
  62. { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
  63. { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  64. { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
  65. { title: '品牌', dataIndex: 'producstOrigCode', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  66. { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  67. { title: '销售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  68. { title: '数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  69. { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  70. { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' }
  71. ],
  72. // 加载数据方法 必须为 Promise 对象
  73. loadData: parameter => {
  74. this.disabled = true
  75. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  76. // const data = res.data
  77. // const no = (data.pageNo - 1) * data.pageSize
  78. // for (var i = 0; i < data.list.length; i++) {
  79. // data.list[i].no = no + i + 1
  80. // }
  81. // this.disabled = false
  82. // return data
  83. // })
  84. const _this = this
  85. return new Promise(function (resolve, reject) {
  86. const data = {
  87. pageNo: 1,
  88. pageSize: 10,
  89. list: [
  90. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  91. ],
  92. count: 10
  93. }
  94. const no = (data.pageNo - 1) * data.pageSize
  95. for (var i = 0; i < data.list.length; i++) {
  96. data.list[i].no = no + i + 1
  97. }
  98. _this.disabled = false
  99. resolve(data)
  100. })
  101. }
  102. }
  103. },
  104. methods: {
  105. // 重置
  106. resetSearchForm () {
  107. this.queryParam.orderBundleNo = ''
  108. this.queryParam.orderBundle.custMobile = ''
  109. this.queryParam.bundleName = ''
  110. this.queryParam.itemName = ''
  111. this.oldTime = undefined
  112. this.newTime = undefined
  113. this.$refs.table.refresh(true)
  114. },
  115. // 提交
  116. handleSubmit () {},
  117. // 返回列表
  118. handleBack () {
  119. this.$router.push({ path: '/salesManagement/quotation/list', query: { closeLastOldTab: true } })
  120. }
  121. }
  122. }
  123. </script>
  124. <style lang="less">
  125. .quotationDetail-wrap{
  126. .quotationDetail-back{
  127. margin-bottom: 15px;
  128. }
  129. .quotationDetail-cont{
  130. margin-bottom: 15px;
  131. }
  132. }
  133. </style>