detailModal.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. // 组件
  19. import detail from '@/views/allocationManagement/transferReturn/detail'
  20. export default {
  21. name: 'AllocateReturnDetailModal',
  22. components: { detail },
  23. props: {
  24. openModal: { // 弹框显示状态
  25. type: Boolean,
  26. default: false
  27. },
  28. itemSn: {
  29. type: [Number, String],
  30. default: ''
  31. }
  32. },
  33. data () {
  34. return {
  35. isShow: this.openModal // 是否打开弹框
  36. }
  37. },
  38. watch: {
  39. // 父页面传过来的弹框状态
  40. openModal (newValue, oldValue) {
  41. this.isShow = newValue
  42. },
  43. // 重定义的弹框状态
  44. isShow (newValue, oldValue) {
  45. if (!newValue) {
  46. this.$emit('close')
  47. this.$store.state.app.curActionPermission = ''
  48. } else {
  49. this.$store.state.app.curActionPermission = 'M_allocateReturnConfirmationDetail'
  50. }
  51. }
  52. }
  53. }
  54. </script>
  55. <style lang="less">
  56. .confirmationDetail-modal{
  57. .ant-modal-body {
  58. padding: 10px 10px 20px;
  59. }
  60. .btn-cont {
  61. text-align: center;
  62. margin: 5px 0 10px;
  63. }
  64. }
  65. </style>