financialAuditDetail.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <div class="financialAuditDetail-wrap">
  3. <a-page-header :ghost="false" @back="handleBack" class="financialAuditDetail-back">
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="financialAuditDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
  7. </template>
  8. <!-- 操作区,位于 title 行的行尾 -->
  9. <!-- <template slot="extra">
  10. <a-button key="1" type="primary" id="financialAuditDetail-print-btn">快速打印</a-button>
  11. </template> -->
  12. </a-page-header>
  13. <!-- 基础信息 -->
  14. <a-card size="small" :bordered="false" class="financialAuditDetail-cont">
  15. <a-collapse :activeKey="['1']">
  16. <a-collapse-panel key="1" header="基础信息">
  17. <a-descriptions :column="3">
  18. <a-descriptions-item label="盘点单号">箭冠营销中心</a-descriptions-item>
  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>
  24. </a-collapse-panel>
  25. </a-collapse>
  26. </a-card>
  27. <!-- 详情 -->
  28. <a-card size="small" :bordered="false" class="financialAuditDetail-cont">
  29. <a-collapse :activeKey="['1']">
  30. <a-collapse-panel key="1" header="详情">
  31. <!-- 总计 -->
  32. <a-alert type="info" showIcon style="margin-bottom:15px">
  33. <div slot="message">盘盈总数量: <strong>6</strong> ,库存总成本(¥): <strong>6</strong> ,盘亏总数量: <strong>6</strong> ,盘亏总成本(¥): <strong>6</strong>,盈亏总数量: <strong>6</strong> ,盈亏总成本(¥): <strong>6</strong> </div>
  34. </a-alert>
  35. <!-- 筛选条件 -->
  36. <div class="table-page-search-wrapper">
  37. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  38. <a-row :gutter="15">
  39. <a-col :md="6" :sm="24">
  40. <a-form-item label="类型">
  41. <a-select placeholder="请选择" id="financialAuditDetail-type" allowClear v-model="queryParam.dataSourceNo">
  42. <a-select-option v-for="item in brandData" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
  43. </a-select>
  44. </a-form-item>
  45. </a-col>
  46. <a-col :md="6" :sm="24" style="margin-bottom: 24px;">
  47. <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialAuditDetail-refresh">查询</a-button>
  48. <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="financialAuditDetail-reset">重置</a-button>
  49. </a-col>
  50. </a-row>
  51. </a-form>
  52. </div>
  53. <!-- 列表 -->
  54. <s-table
  55. class="sTable"
  56. ref="table"
  57. size="default"
  58. :rowKey="(record) => record.id"
  59. :columns="columns"
  60. :data="loadData"
  61. bordered>
  62. <!-- 采购数量 -->
  63. <template slot="purchaseNum" slot-scope="text, record">
  64. <span>{{record.purchaseNum}}</span>
  65. </template>
  66. <!-- 缺货数量 -->
  67. <template slot="outOfStockNum" slot-scope="text, record">
  68. <span>{{record.outOfStockNum}}</span>
  69. </template>
  70. </s-table>
  71. </a-collapse-panel>
  72. </a-collapse>
  73. </a-card>
  74. </div>
  75. </template>
  76. <script>
  77. import { STable, VSelect } from '@/components'
  78. export default{
  79. components: { STable, VSelect },
  80. data(){
  81. return{
  82. queryParam: {
  83. dataSourceNo: undefined
  84. },
  85. exportLoading: false, // 导出loading
  86. disabled: false, // 查询、重置按钮是否可操作
  87. // 表头
  88. columns: [
  89. { title: '序号', dataIndex: 'no', align: 'center' },
  90. { title: '产品编码', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' } },
  91. { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
  92. { title: '单位', dataIndex: 'mementPay', align: 'center', customRender: function (text) { return text || '--' } },
  93. { title: '库存数量', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
  94. { title: '盘点数量', dataIndex: 'tostalP', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  95. { title: '盈亏数量', dataIndex: 'totalNums', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  96. ],
  97. // 加载数据方法 必须为 Promise 对象
  98. loadData: parameter => {
  99. this.disabled = true
  100. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  101. // const data = res.data
  102. // const no = (data.pageNo - 1) * data.pageSize
  103. // for (var i = 0; i < data.list.length; i++) {
  104. // data.list[i].no = no + i + 1
  105. // }
  106. // this.disabled = false
  107. // return data
  108. // })
  109. const _this = this
  110. return new Promise(function(resolve, reject){
  111. const data = {
  112. pageNo: 1,
  113. pageSize: 10,
  114. list: [
  115. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  116. ],
  117. count: 10
  118. }
  119. const no = (data.pageNo - 1) * data.pageSize
  120. for (var i = 0; i < data.list.length; i++) {
  121. data.list[i].no = no + i + 1
  122. }
  123. _this.disabled = false
  124. resolve(data)
  125. })
  126. },
  127. brandData: []
  128. }
  129. },
  130. methods: {
  131. // 重置
  132. resetSearchForm(){},
  133. // 返回列表
  134. handleBack(){
  135. this.$router.push({ path: '/inventoryManagement/inventoryChecking/list'})
  136. },
  137. }
  138. }
  139. </script>
  140. <style lang="less">
  141. .financialAuditDetail-cont, .financialAuditDetail-back{
  142. margin-bottom: 10px;
  143. }
  144. </style>