detail.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <div class="chainTransferOutDetail-wrap">
  3. <a-page-header :ghost="false" @back="handleBack" class="chainTransferOutDetail-back">
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="chainTransferOutDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
  7. </template>
  8. <!-- 操作区,位于 title 行的行尾 -->
  9. <template slot="extra">
  10. <a-button key="2" id="chainTransferOutDetail-preview-btn">打印预览</a-button>
  11. <a-button key="1" type="primary" id="chainTransferOutDetail-print-btn">快速打印</a-button>
  12. </template>
  13. </a-page-header>
  14. <!-- 总计 -->
  15. <a-alert type="info" showIcon style="margin-bottom:15px">
  16. <div slot="message">审核状态: <strong>支持市级</strong>,完结状态: <strong>支持市级</strong>,调出对象: <strong>支持市级</strong>,调入单号: <strong>2121212</strong>,总成本:¥<strong>6.33</strong>,总数量: <strong>6</strong> </div>
  17. </a-alert>
  18. <a-card :bordered="false" class="chainTransferOutDetail-cont">
  19. <!-- 列表 -->
  20. <s-table
  21. class="sTable"
  22. ref="table"
  23. size="default"
  24. :rowKey="(record) => record.id"
  25. :columns="columns"
  26. :data="loadData"
  27. bordered></s-table>
  28. </a-card>
  29. </div>
  30. </template>
  31. <script>
  32. import { STable, VSelect } from '@/components'
  33. export default{
  34. components: { STable, VSelect },
  35. data(){
  36. return{
  37. queryParam: {
  38. },
  39. disabled: false, // 查询、重置按钮是否可操作
  40. brandData: [], // 产品品牌 下拉数据
  41. typeData: [], // 产品类别 下拉数据
  42. // 表头
  43. columns: [
  44. { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
  45. { title: '产品编码', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' } },
  46. { title: '产品名称', dataIndex: 'custNahme', align: 'center', ellipsis: true },
  47. { title: '原厂编码', dataIndex: 'totalP', align: 'center', customRender: function (text) { return text || '--' } },
  48. { title: '成本价', dataIndex: 'custsN2agme', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  49. { title: '调入数量', scopedSlots: { customRender: 'transferOutQuantity' }, align: 'center' },
  50. { title: '单位', dataIndex: 'custsNsagme', align: 'center', customRender: function (text) { return text || '--' } },
  51. { title: '成本小计', dataIndex: 'custsNagme', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
  52. { title: '仓库', dataIndex: 'warehouse', align: 'center', customRender: function (text) { return text || '--' } },
  53. { title: '仓位', dataIndex: 'warehouseLoc', align: 'center', customRender: function (text) { return text || '--' } }
  54. ],
  55. // 加载数据方法 必须为 Promise 对象
  56. loadData: parameter => {
  57. this.disabled = true
  58. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  59. // const data = res.data
  60. // const no = (data.pageNo - 1) * data.pageSize
  61. // for (var i = 0; i < data.list.length; i++) {
  62. // data.list[i].no = no + i + 1
  63. // }
  64. // this.disabled = false
  65. // return data
  66. // })
  67. const _this = this
  68. return new Promise(function(resolve, reject){
  69. const data = {
  70. pageNo: 1,
  71. pageSize: 10,
  72. list: [
  73. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  74. ],
  75. count: 10
  76. }
  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. resolve(data)
  83. })
  84. },
  85. }
  86. },
  87. methods: {
  88. // 重置
  89. resetSearchForm () {
  90. this.queryParam.orderBundleNo = ''
  91. this.queryParam.orderBundle.custMobile = ''
  92. this.queryParam.bundleName = ''
  93. this.queryParam.itemName = ''
  94. this.oldTime = undefined
  95. this.newTime = undefined
  96. this.$refs.table.refresh(true)
  97. },
  98. // 提交
  99. handleSubmit(){},
  100. // 返回列表
  101. handleBack(){
  102. this.$router.push({ path: '/allocationManagement/chainTransferOut/list'})
  103. },
  104. }
  105. }
  106. </script>
  107. <style lang="less">
  108. .chainTransferOutDetail-wrap{
  109. .chainTransferOutDetail-back{
  110. margin-bottom: 15px;
  111. }
  112. .chainTransferOutDetail-cont{
  113. margin-bottom: 15px;
  114. }
  115. }
  116. </style>