import.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div class="intelligentReplenishmentImport-wrap">
  3. <a-page-header :ghost="false" :backIcon="false" class="intelligentReplenishmentImport-back">
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="intelligentReplenishmentImport-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
  7. </template>
  8. </a-page-header>
  9. <a-card size="small" :bordered="false" class="intelligentReplenishmentImport-cont">
  10. <div>
  11. <p class="total">共 <span>50</span> 条数据,红色字体表示数据不符合规范,请返回上一步修改文件后重新上传</p>
  12. <s-table
  13. class="sTable"
  14. ref="table"
  15. size="small"
  16. :rowKey="(record) => record.id"
  17. :columns="columns"
  18. :data="loadData"
  19. :scroll="{ x: 1440 }"
  20. bordered>
  21. </s-table>
  22. <div class="btn-cont">
  23. <a-button type="primary" class="button-error" id="intelligentReplenishmentLevel-submit" @click="handleSubmit">确认导入</a-button>
  24. <a-button type="primary" class="button-error" id="intelligentReplenishmentLevel-back" @click="handleBackSet">上一步</a-button>
  25. <a-button id="intelligentReplenishmentLevel-back" @click="isShow = false" class="button-cancel">取消</a-button>
  26. </div>
  27. </div>
  28. </a-card>
  29. </div>
  30. </template>
  31. <script>
  32. import { STable } from '@/components'
  33. export default {
  34. components: { STable },
  35. data () {
  36. return {
  37. columns: [
  38. { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
  39. { title: '产品编码', dataIndex: 'purchaseNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
  40. { title: '产品名称', dataIndex: 'creatDate', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  41. { title: '产品状态', dataIndex: 'purchaseNos', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  42. { title: '订货周期(天)', dataIndex: 'purchaseNoa', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
  43. { title: '是否淘汰', dataIndex: 'purchaseNod', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
  44. { title: '淘汰描述', dataIndex: 'purchaseNof', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  45. { title: '备注', dataIndex: 'purchaseNog', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
  46. { title: '错误原因', dataIndex: 'purchaseNoh', width: 200, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
  47. ],
  48. // 加载数据方法 必须为 Promise 对象
  49. loadData: parameter => {
  50. // return custTypeList(Object.assign(parameter, this.queryParam)).then(res => {
  51. // const data = res.data
  52. // const no = (data.pageNo - 1) * data.pageSize
  53. // for (var i = 0; i < data.list.length; i++) {
  54. // data.list[i].no = no + i + 1
  55. // }
  56. // return data
  57. // })
  58. return new Promise(function (resolve, reject) {
  59. const data = {
  60. pageNo: 1,
  61. pageSize: 10,
  62. list: [
  63. { id: '1', state: 1, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
  64. { id: '2', state: 2, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
  65. { id: '3', state: 3, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
  66. { id: '4', state: 4, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' },
  67. { id: '5', state: 5, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  68. ],
  69. count: 10
  70. }
  71. resolve(data)
  72. })
  73. }
  74. }
  75. },
  76. methods: {
  77. // 返回
  78. handleBack () {
  79. this.$router.push({ path: `/inventoryManagement/intelligentReplenishment/list` })
  80. },
  81. // 返回基础设置页
  82. handleBackSet () {
  83. this.$router.push({ path: `/inventoryManagement/intelligentReplenishment/set/${this.$route.params.sn}` })
  84. },
  85. // 确认导入
  86. handleSubmit () {}
  87. }
  88. }
  89. </script>
  90. <style lang="less">
  91. .intelligentReplenishmentImport-wrap{
  92. .intelligentReplenishmentImport-back{
  93. margin-bottom: 10px;
  94. }
  95. .intelligentReplenishmentImport-cont{
  96. .total{
  97. margin: 20px 0 30px;
  98. span{
  99. font-weight: bold;
  100. }
  101. }
  102. .btn-cont{
  103. margin: 30px 0 20px;
  104. text-align: center;
  105. .button-cancel{
  106. font-size: 12px;
  107. margin-left: 15px;
  108. }
  109. }
  110. }
  111. }
  112. </style>