overall.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="inventoryCheckingOverall-wrap">
  3. <a-page-header :ghost="false" @back="handleBack" class="inventoryCheckingOverall-back">
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="inventoryChecking-overall-submit" href="javascript:;" @click="handleBack">返回列表</a>
  7. </template>
  8. </a-page-header>
  9. <a-card size="small" :bordered="false" class="inventoryCheckingOverall-cont">
  10. <!-- 操作按钮 -->
  11. <div class="table-operator">
  12. <a-checkbox-group @change="onChange" v-model="queryParam.keyword" :disabled="disabled" id="inventoryCheckingOverall-type">
  13. <a-checkbox value="A">不含废品仓</a-checkbox>
  14. <a-checkbox value="B">有库存</a-checkbox>
  15. </a-checkbox-group>
  16. </div>
  17. <!-- 列表 -->
  18. <s-table
  19. class="sTable"
  20. ref="table"
  21. size="small"
  22. :rowKey="(record) => record.id"
  23. :columns="columns"
  24. :data="loadData"
  25. :showPagination="false"
  26. bordered>
  27. </s-table>
  28. </a-card>
  29. <a-affix :offset-bottom="0">
  30. <div style="text-align: center;width: 100%;background-color: #fff;padding: 30px 0;box-shadow: 0 0 20px #dcdee2;">
  31. <a-button type="primary" id="inventoryChecking-overall-submit" size="large" @click="handleSubmit" style="padding: 0 60px;">提交</a-button>
  32. </div>
  33. </a-affix>
  34. </div>
  35. </template>
  36. <script>
  37. import { warehouseAllList, warehouseDel } from '@/api/warehouse'
  38. import { STable, VSelect } from '@/components'
  39. export default {
  40. components: { STable, VSelect },
  41. data () {
  42. return {
  43. queryParam: { // 查询条件
  44. keyword: [] //
  45. },
  46. disabled: false, // 查询、重置按钮是否可操作
  47. columns: [
  48. { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
  49. { title: '产品编码', dataIndex: 'createDate', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
  50. { title: '产品名称', dataIndex: 'nsso', width: 70, align: 'center', customRender: function (text) { return text || '--' } },
  51. { title: '单位', dataIndex: 'no3', width: 70, align: 'center', customRender: function (text) { return text || '--' } },
  52. { title: '库存数量', dataIndex: 'n4o', width: 70, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
  53. ],
  54. // 加载数据方法 必须为 Promise 对象
  55. loadData: parameter => {
  56. this.disabled = true
  57. // return warehouseAllList( this.queryParam ).then(res => {
  58. // const data = res.data
  59. // this.disabled = false
  60. // return data
  61. // })
  62. const _this = this
  63. return new Promise(function (resolve, reject) {
  64. const data = {
  65. pageNo: 1,
  66. pageSize: 10,
  67. list: [
  68. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  69. ],
  70. count: 10
  71. }
  72. for (var i = 0; i < data.list.length; i++) {
  73. data.list[i].no = i + 1
  74. }
  75. _this.disabled = false
  76. resolve(data)
  77. })
  78. }
  79. }
  80. },
  81. methods: {
  82. // 提交
  83. handleSubmit () {
  84. },
  85. // 返回
  86. handleBack () {
  87. this.$router.push({ path: '/inventoryManagement/inventoryChecking/list', query: { closeLastOldTab: true } })
  88. },
  89. //
  90. onChange () {}
  91. }
  92. }
  93. </script>
  94. <style lang="less">
  95. .inventoryCheckingOverall-wrap{
  96. padding: 10px 0 30px;
  97. .table-operator{
  98. margin-bottom: 25px;
  99. }
  100. .inventoryCheckingOverall-cont, .inventoryCheckingOverall-back{
  101. margin-bottom: 10px;
  102. }
  103. }
  104. </style>