chooseTypeModal.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <u-mask class="commonModal" :show="isShow" :mask-click-able="false">
  3. <view class="modal-con">
  4. <view class="modal-title">系统将按照补货数量,同步执行出库、签收操作</view>
  5. <view class="modal-main">
  6. <!-- <view class="modal-title">请选择配送方式</view> -->
  7. <!-- <u-radio-group v-model="form.dispatchType" width="50%" style="width: 100%;margin-bottom: 20upx;">
  8. <u-radio v-for="(item, index) in dispatchTypeList" :key="index" :name="item.code">{{item.dispName}}</u-radio>
  9. </u-radio-group> -->
  10. <u-input v-model="form.remarks" placeholder="请输入出库备注(最多500字符)" type="textarea" :maxlength="500" :border="true" :auto-height="false" :custom-style="{height: '100upx'}" />
  11. </view>
  12. <view class="modal-footer">
  13. <view class="button-cancel" @click="isShow=false">取消</view>
  14. <view class="button-confirm" @click="handleConfirm">提交</view>
  15. </view>
  16. </view>
  17. </u-mask>
  18. </template>
  19. <script>
  20. import { getLookUpItem } from '@/api/data'
  21. export default {
  22. props: {
  23. openModal: { // 弹框显示状态
  24. type: Boolean,
  25. default: false
  26. }
  27. },
  28. data() {
  29. return {
  30. isShow: this.openModal, // 是否打开弹框
  31. form: {
  32. dispatchType: undefined,
  33. remarks: ''
  34. },
  35. dispatchTypeList: []
  36. }
  37. },
  38. mounted() {
  39. this.getLookUpItem()
  40. },
  41. methods: {
  42. // 确认
  43. handleConfirm(){
  44. const _this = this;
  45. // 表单校验
  46. // if (!_this.form.dispatchType) {
  47. // uni.showToast({ icon: 'none', title: '请选择配送方式' });
  48. // return;
  49. // }
  50. this.$emit('confirm', _this.form, 0)
  51. },
  52. // 配送方式
  53. getLookUpItem () {
  54. getLookUpItem({ lookupCode: 'DISTRIBUTION_MODE', pageNo: 1, pageSize: 1000 }).then(res => {
  55. if (res.status == 200 && res.data && res.data.list) {
  56. this.dispatchTypeList = res.data.list
  57. } else {
  58. this.dispatchTypeList = []
  59. }
  60. })
  61. }
  62. },
  63. watch: {
  64. // 父页面传过来的弹框状态
  65. openModal (newValue, oldValue) {
  66. this.isShow = newValue
  67. },
  68. // 重定义的弹框状态
  69. isShow (newValue, oldValue) {
  70. if (!newValue) {
  71. this.$emit('close')
  72. }
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss" scoped>
  78. .commonModal{
  79. width: 100%;
  80. height: 100%;
  81. position: absolute;
  82. left: 0;
  83. top: 0;
  84. z-index: 9999999;
  85. .modal-con{
  86. width: 78%;
  87. margin: 50% auto;
  88. background-color: #fff;
  89. border-radius: 24upx;
  90. padding-top: 30upx;
  91. font-size: 30upx;
  92. .modal-title{
  93. text-align: center;
  94. font-size: 26upx;
  95. color: #666;
  96. }
  97. .modal-main{
  98. margin: 10upx 30upx 30upx;
  99. font-size: 30upx;
  100. .modal-title{
  101. margin-bottom: 10upx;
  102. }
  103. }
  104. .modal-footer{
  105. font-size: 30upx;
  106. display: flex;
  107. justify-content: space-between;
  108. align-items: center;
  109. text-align: center;
  110. border-top: 1upx solid #E5E5E5;
  111. .button-cancel{
  112. color: #999;
  113. border-right: 1upx solid #E5E5E5;
  114. flex-grow: 1;
  115. padding: 20upx 0;
  116. }
  117. .button-confirm{
  118. color: #2A86F4;
  119. flex-grow: 1;
  120. padding: 20upx 0;
  121. }
  122. }
  123. }
  124. }
  125. </style>