chooseShelf.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="salesSearch-wrap">
  3. <u-popup v-model="isShow" closeable class="search-popup" mode="right" @close="isShow=false" length="85%">
  4. <view class="form-title">选择货架(可多选)</view>
  5. <view class="form-content">
  6. <shelfList :checkEdList="defaultParams" @ok="submit"></shelfList>
  7. </view>
  8. </u-popup>
  9. </view>
  10. </template>
  11. <script>
  12. import shelfList from './shelfList.vue'
  13. export default{
  14. components: {
  15. shelfList,
  16. },
  17. props: {
  18. openModal: { // 弹框显示状态
  19. type: Boolean,
  20. default: false
  21. },
  22. defaultParams: { // 默认查询条件
  23. type: Array,
  24. default: () => {
  25. return []
  26. }
  27. },
  28. },
  29. data(){
  30. return{
  31. isShow: this.openModal,
  32. customBtnStyle: { // 自定义按钮样式
  33. borderColor: this.$config('primaryColor'),
  34. backgroundColor: this.$config('primaryColor'),
  35. color: '#fff'
  36. },
  37. showDate: false, // 是否显示时间弹窗
  38. settleStyleName: '',
  39. settleStyleModal: false,
  40. }
  41. },
  42. methods: {
  43. // 查询
  44. submit(data, shelfName) {
  45. this.$emit('refresh', data, shelfName)
  46. this.isShow = false
  47. },
  48. },
  49. watch: {
  50. // 父页面传过来的弹框状态
  51. openModal (newValue, oldValue) {
  52. this.isShow = newValue
  53. },
  54. // 重定义的弹框状态
  55. isShow (newValue, oldValue) {
  56. if (!newValue) {
  57. this.$emit('close')
  58. }
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .salesSearch-wrap{
  65. .search-popup {
  66. .form-title{
  67. text-align: center;
  68. padding: 30upx 20upx 0;
  69. }
  70. .form-content {
  71. display: block;
  72. padding: 20upx;
  73. box-sizing: content-box;
  74. }
  75. .uni-list-btns {
  76. display: flex;
  77. padding: 20upx;
  78. .handle-btn {
  79. font-size: 28upx;
  80. margin: 0 30upx;
  81. width: 100%;
  82. flex: 1;
  83. }
  84. }
  85. }
  86. }
  87. </style>