warrantyadd.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <template>
  2. <view class="address">
  3. <uni-forms ref="form" class="flex1" :model="datainfo">
  4. <view class="adrbox">
  5. <view class="chtop flexc">
  6. <view class="line"></view>
  7. <view>报修信息</view>
  8. </view>
  9. <view class="plr15">
  10. <uni-forms-item label="项目" required="true" name="realName">
  11. <picker range-key='text' :value="syqxidx" :range="sexs" @change='bindDateChange'>
  12. <view class="flexc">
  13. <view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择项目'}}</view>
  14. <view class="rimg"><image :src="rimg"></image></view>
  15. </view>
  16. </picker>
  17. </uni-forms-item>
  18. <uni-forms-item label="标题" required="true" name="phonenumber">
  19. <view class="flexc">
  20. <uni-easyinput v-model="datainfo.phonenumber" :inputBorder='false' placeholder="请输入报修标题" />
  21. <view class="rimg"></view>
  22. </view>
  23. </uni-forms-item>
  24. <uni-easyinput type="textarea" autoHeight v-model="datainfo.companyIntroduction" :inputBorder='false' placeholder="请详细描述您要报修的内容(最多可输入200字哦" />
  25. <view class="voice mb28">
  26. <view class="flexc">
  27. <image :src="voice"></image>
  28. 语音输入
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 图片 -->
  33. <view class="imgs">
  34. <view class="img" @click="getPreview">
  35. <image :src="photo" class="pico"></image>
  36. <image :src="del" class="del" @click="getDelFn"></image>
  37. </view>
  38. <view class="img" @click="getPreview">
  39. <image :src="photo" class="pico"></image>
  40. <image :src="del" class="del" @click="getDelFn"></image>
  41. </view>
  42. <view class="img" @click="getPreview">
  43. <image :src="photo" class="pico"></image>
  44. <image :src="del" class="del" @click="getDelFn"></image>
  45. </view>
  46. <view class="img" @click="getPreview">
  47. <image :src="photo" class="pico"></image>
  48. <image :src="del" class="del" @click="getDelFn"></image>
  49. </view>
  50. <view class="addbox" @click="getaddImage">
  51. <image :src="photo" class="pico"></image>
  52. <view>添加图片</view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="adrbox">
  57. <view class="plr15">
  58. <uni-forms-item label="联系方式" name="phonenumber">
  59. <view class="flexc">
  60. <uni-easyinput v-model="datainfo.phonenumber" :inputBorder='false' placeholder="请输入联系方式" />
  61. <view class="rimg"></view>
  62. </view>
  63. </uni-forms-item>
  64. </view>
  65. </view>
  66. </uni-forms>
  67. <view class="rhbtn mt30" @click="getAddFn">提交信息</view>
  68. <loading></loading>
  69. </view>
  70. </template>
  71. <script>
  72. import config from '@/config'
  73. const baseUrl = config.baseUrl
  74. import { addressPermi, addressRole } from "@/utils/permission"; // 权限判断函数
  75. export default{
  76. components:{},
  77. data(){
  78. return{
  79. rimg:require('@/static/images/rimg.png'),
  80. check: require('@/mine/static/check.png'),
  81. ncheck: require('@/mine/static/ncheck.png'),
  82. voice: require('@/work/static/voice.png'),
  83. photo:require("@/work/static/service/photo.png"),
  84. del:require('@/work/static/service/rdel.png'),
  85. list:[{tit:'123',isdefault:true},{tit:'212123',isdefault:false,isuser:true},],
  86. text:"",
  87. datainfo:{},
  88. mjlist:[{tit:'80m²以内',val:'0'},{tit:'80-90m²',val:'1'},{tit:'90-119m²',val:'2'},{tit:'120-139m²',val:'3'},{tit:'140-159m²',val:'4'},{tit:'160m²以上',val:'5'},],
  89. checkflag:true,
  90. tabval:'0',
  91. sexs: [{
  92. text: '男',
  93. value: 0
  94. }, {
  95. text: '女',
  96. value: 1
  97. }],
  98. }
  99. },
  100. onLoad: function() {
  101. },
  102. methods:{
  103. addressPermi, addressRole,
  104. getAddFn(){
  105. // this.$tab.navigateTo("/mine/pages/house/addaddress")
  106. },
  107. getTabFn(val){
  108. this.tabval=val
  109. },
  110. getDataFn(){
  111. return
  112. var params={
  113. pageSize:this.pageSize,
  114. pageNum: this.pageNum,
  115. }
  116. params.noticeType=this.tabidx
  117. getNoticeList(params).then(res=>{
  118. if(res.code==200){
  119. }else{
  120. this.$toast(res.msg)
  121. }
  122. })
  123. },
  124. }
  125. }
  126. </script>
  127. <style>
  128. page{background: #F3F3F0;}
  129. </style>
  130. <style lang="scss" scoped>
  131. .address /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
  132. .address /deep/ .uni-forms-item:last-child{border-bottom: none;}
  133. .address /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;padding-left: 12rpx;}
  134. .address /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
  135. .address /deep/ .uni-easyinput__content-textarea{min-height: 140rpx;font-size: 26rpx;
  136. border-radius: 10rpx;padding: 20rpx 14rpx;text-align: left;}
  137. .address /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
  138. .address /deep/ .uni-input-input{font-size: 26rpx;}
  139. .address /deep/ .uni-textarea-textarea{font-size: 26rpx;}
  140. .address /deep/ .is-required{font-size: 26rpx;color: #F40027;margin-right: 4rpx;}
  141. .address /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
  142. .address{min-height: 100vh;padding: 20rpx 18rpx 100rpx;display: flex;flex-direction: column;}
  143. .adrbox{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
  144. .rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
  145. image{width: 100%;height: 100%;}
  146. }
  147. &.mjbox{
  148. padding: 36rpx 24rpx 18rpx;
  149. .tit{font-weight: bold;font-size: 26rpx;color: #272727;padding-left: 18rpx;}
  150. .adrlist{
  151. view{font-weight: bold;font-size: 26rpx;color: #666666;min-width: 198rpx;padding: 0 10rpx;box-sizing: border-box;margin: 0 12rpx 24rpx;height: 64rpx;display: flex;align-items: center;justify-content: center;border-radius: 10rpx;border: 2rpx solid #C1C1C1;
  152. &.act{background: #DFEAFF;border: 2rpx solid #0256FD;color: #0256FD;}
  153. }
  154. }
  155. }
  156. .chtop{margin-bottom: 8rpx;padding-top: 32rpx;
  157. view{font-weight: bold;font-size: 28rpx;color: #272727;}
  158. .line{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
  159. }
  160. .voice{font-weight: 500;display: flex;justify-content:flex-end;align-items: center;margin-top: 40rpx;font-size: 24rpx;color: #45CB99;
  161. image{width: 24rpx;height: 24rpx;margin-right: 8rpx;}
  162. }
  163. .imgs{display: flex;align-items: center;flex-wrap: wrap;padding: 0 24rpx;
  164. .img{width: 198rpx;height:142rpx;border-radius: 20rpx;margin: 0 12rpx 20rpx 12rpx;position: relative;
  165. // &:nth-of-type(2n){margin-right: 0;}
  166. }
  167. .pico{width: 100%;height: 100%;border-radius: 20rpx;}
  168. .del{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
  169. .addbox{background: #F0F0F0;border-radius: 20rpx;display: flex;align-items: center;flex-direction: column;width: 198rpx;height:142rpx;justify-content: center;margin:0 12rpx 20rpx 12rpx;
  170. image{width: 48rpx;height: 42rpx;margin-bottom: 12rpx;}
  171. view{font-weight: 500;font-size: 24rpx;color: #666666;}
  172. }
  173. }
  174. .checkimg{width: 80rpx;height: 40rpx;margin-right: 8rpx;}
  175. }
  176. </style>