brandCategoryModal.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <template>
  2. <a-modal
  3. centered
  4. id="brand-category-modal"
  5. class="brand-category-modal"
  6. :footer="null"
  7. :maskClosable="false"
  8. :title="openType=='brand'?'促销品费用归属品牌':'促销品费用归属品类'"
  9. v-model="isShow"
  10. @cancel="isShow=false"
  11. :width="520">
  12. <a-spin :spinning="spinning" tip="Loading...">
  13. <div class="con">
  14. <div class="con-list">
  15. 品{{ openType=='brand'?'牌':'类' }}数量:17
  16. </div>
  17. <div class="con-list">
  18. <span v-for="con in 30" :key="con">霍尼韦尔</span>
  19. </div>
  20. </div>
  21. <div class="btn-cont">
  22. <a-button id="brand-category-modal-back" @click="isShow = false">关闭</a-button>
  23. </div>
  24. </a-spin>
  25. </a-modal>
  26. </template>
  27. <script>
  28. import { commonMixin } from '@/utils/mixin'
  29. // 组件
  30. import { VSelect, Upload } from '@/components'
  31. import supplier from '@/views/common/supplier.js'
  32. import warehouse from '@/views/common/chooseWarehouse.js'
  33. // 接口
  34. import { sparePartsReturnInfo } from '@/api/sparePartsReturn'
  35. export default {
  36. name: 'BrandCategoryModal',
  37. mixins: [commonMixin],
  38. components: { VSelect, Upload, supplier, warehouse },
  39. props: {
  40. openModal: { // 弹框显示状态
  41. type: Boolean,
  42. default: false
  43. },
  44. openType: {
  45. type: String,
  46. default: ''
  47. }
  48. },
  49. data () {
  50. return {
  51. spinning: false,
  52. isShow: this.openModal // 是否打开弹框
  53. }
  54. },
  55. methods: {
  56. // 获取编辑详情
  57. getDetail () {
  58. sparePartsReturnInfo({ sn: this.itemSn }).then(res => {
  59. if (res.status == 200) {
  60. const resultObj = res.data
  61. this.attachList = resultObj.attachmentList
  62. const obj = {
  63. supplierSn: resultObj.supplierSn,
  64. returnReason: resultObj.returnReason, // 退货原因
  65. explainInfo: resultObj.explainInfo, // 补充说明
  66. warehouseSn: resultObj.warehouseSn,
  67. sparePartsReturnSn: this.itemSn
  68. }
  69. this.$nextTick(() => {
  70. this.$refs.attachList.setFileList(this.attachList)
  71. })
  72. this.form = { ...this.form, ...obj }
  73. } else {
  74. this.detailsData = null
  75. }
  76. })
  77. }
  78. },
  79. watch: {
  80. // 父页面传过来的弹框状态
  81. openModal (newValue, oldValue) {
  82. this.isShow = newValue
  83. },
  84. // 重定义的弹框状态
  85. isShow (newValue, oldValue) {
  86. if (!newValue) {
  87. this.$emit('close')
  88. }
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="less" scoped>
  94. .brand-category-modal{
  95. .ant-modal-body {
  96. padding: 40px 40px 24px;
  97. }
  98. .con-list{
  99. margin-bottom:8px;
  100. span{
  101. display: inline-block;
  102. margin:5px 10px 5px 0;
  103. }
  104. }
  105. .btn-cont {
  106. text-align: center;
  107. margin: 35px 0 10px;
  108. }
  109. .ant-form-item:nth-child(4){
  110. margin-bottom: 0px !important;
  111. }
  112. }
  113. </style>