searchPopup.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <u-popup
  3. :show="show"
  4. mode="top"
  5. :round="10"
  6. closeable
  7. @close="close"
  8. bgColor="#fff"
  9. >
  10. <view class="search_wrap">
  11. <view class="title">筛选</view>
  12. <view class="form_item">
  13. <view class="label">接收状态</view>
  14. <u-radio-group
  15. class="radio-group"
  16. v-model="form.disposalStatus"
  17. placement="row"
  18. iconSize="32"
  19. labelSize="28"
  20. >
  21. <u-radio
  22. v-for="(it, idx) in disposalOpts"
  23. :key="idx"
  24. :customStyle="{ marginRight: '20rpx' }"
  25. :label="it.label"
  26. :name="it.value"
  27. ></u-radio>
  28. </u-radio-group>
  29. </view>
  30. <view class="form_item">
  31. <view class="label">执行状态</view>
  32. <u-radio-group
  33. class="radio-group"
  34. v-model="form.status"
  35. placement="row"
  36. iconSize="32"
  37. labelSize="28"
  38. >
  39. <u-radio
  40. v-for="(it, idx) in statusOpts"
  41. :key="idx"
  42. :customStyle="{ marginRight: '20rpx' }"
  43. :label="it.label"
  44. :name="it.value"
  45. ></u-radio>
  46. </u-radio-group>
  47. </view>
  48. <view class="form_item">
  49. <view class="label">班组名称</view>
  50. <u-input v-model="form.teamName" placeholder="请输入"></u-input>
  51. </view>
  52. <view class="form_item">
  53. <view class="label">产品名称</view>
  54. <u-input v-model="form.productName" placeholder="请输入"></u-input>
  55. </view>
  56. <view class="form_item">
  57. <view class="label">工序名称</view>
  58. <u-input v-model="form.workTaskName" placeholder="请输入"></u-input>
  59. </view>
  60. <view class="form_item">
  61. <view class="label">订单编码</view>
  62. <u-input v-model="form.workOrderCode" placeholder="请输入"></u-input>
  63. </view>
  64. <view class="btns">
  65. <button class="btn reset" @click="reset">重置</button>
  66. <button class="btn confirm" @click="confirm">确定</button>
  67. </view>
  68. </view>
  69. </u-popup>
  70. </template>
  71. <script>
  72. export default {
  73. props: {
  74. show: { type: Boolean, default: false },
  75. },
  76. data() {
  77. return {
  78. form: {
  79. disposalStatus: "",
  80. status: "",
  81. teamName: "",
  82. productName: "",
  83. workTaskName: "",
  84. workOrderCode: "",
  85. },
  86. disposalOpts: [
  87. { label: "待接收", value: 0 },
  88. { label: "已接收", value: 1 },
  89. { label: "已拒绝", value: 2 },
  90. ],
  91. statusOpts: [
  92. { label: "进行中", value: 1 },
  93. { label: "已转派", value: 2 },
  94. { label: "已取消", value: 3 },
  95. { label: "已关闭", value: 4 },
  96. { label: "已完成", value: 5 },
  97. ],
  98. };
  99. },
  100. methods: {
  101. close() {
  102. this.$emit("close");
  103. },
  104. reset() {
  105. this.form = {
  106. disposalStatus: "",
  107. status: "",
  108. teamName: "",
  109. productName: "",
  110. workTaskName: "",
  111. workOrderCode: "",
  112. };
  113. this.$emit("search", { ...this.form });
  114. this.close();
  115. },
  116. confirm() {
  117. this.$emit("search", { ...this.form });
  118. this.close();
  119. },
  120. },
  121. };
  122. </script>
  123. <style lang="scss" scoped>
  124. .search_wrap {
  125. padding: 30rpx 30rpx 40rpx;
  126. .title {
  127. font-size: 32rpx;
  128. font-weight: 600;
  129. text-align: center;
  130. margin-bottom: 20rpx;
  131. }
  132. .form_item {
  133. margin-bottom: 24rpx;
  134. .label {
  135. font-size: 26rpx;
  136. color: #333;
  137. margin-bottom: 10rpx;
  138. }
  139. }
  140. /deep/ .radio-group {
  141. flex-wrap: wrap;
  142. .u-radio__text {
  143. font-size: 28rpx !important;
  144. }
  145. .u-radio__icon-wrap {
  146. width: 32rpx !important;
  147. height: 32rpx !important;
  148. }
  149. }
  150. .btns {
  151. display: flex;
  152. gap: 20rpx;
  153. margin-top: 30rpx;
  154. .btn {
  155. flex: 1;
  156. height: 72rpx;
  157. line-height: 72rpx;
  158. border-radius: 8rpx;
  159. font-size: 28rpx;
  160. }
  161. .reset {
  162. background: #f5f5f5;
  163. color: #333;
  164. }
  165. .confirm {
  166. background: $theme-color;
  167. color: #fff;
  168. }
  169. }
  170. }
  171. </style>