detailModal.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <a-modal
  3. centered
  4. class="confirmationDetail-modal"
  5. :footer="null"
  6. :maskClosable="false"
  7. title="详情"
  8. v-model="isShow"
  9. @cancel="isShow=false"
  10. width="70%">
  11. <div>
  12. <detail :outBizSn="itemSn" :showPrice="$hasPermissions('M_allocateReturnConfirmationDetail_salesPrice')" pageType="modal" ref="detail"></detail>
  13. <div class="btn-cont"><a-button id="confirmationDetail-modal-back" @click="isShow = false">返回列表</a-button></div>
  14. </div>
  15. </a-modal>
  16. </template>
  17. <script>
  18. import detail from '@/views/allocationManagement/transferReturn/detail'
  19. export default {
  20. name: 'AllocateReturnDetailModal',
  21. components: { detail },
  22. props: {
  23. openModal: { // 弹框显示状态
  24. type: Boolean,
  25. default: false
  26. },
  27. itemSn: {
  28. type: [Number, String],
  29. default: ''
  30. }
  31. },
  32. data () {
  33. return {
  34. isShow: this.openModal // 是否打开弹框
  35. }
  36. },
  37. methods: {
  38. },
  39. watch: {
  40. // 父页面传过来的弹框状态
  41. openModal (newValue, oldValue) {
  42. this.isShow = newValue
  43. },
  44. // 重定义的弹框状态
  45. isShow (newValue, oldValue) {
  46. if (!newValue) {
  47. this.$emit('close')
  48. this.$store.state.app.curActionPermission = ''
  49. }else{
  50. this.$store.state.app.curActionPermission = 'M_allocateReturnConfirmationDetail'
  51. }
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="less">
  57. .confirmationDetail-modal{
  58. .ant-modal-body {
  59. padding: 10px 10px 20px;
  60. }
  61. .btn-cont {
  62. text-align: center;
  63. margin: 5px 0 10px;
  64. }
  65. }
  66. </style>