addService.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view>
  3. <cu-custom bgColor="bg-blue" :isBack="true" v-if="title == '问题诉求情况'">
  4. <block slot="backText">返回</block>
  5. <!-- <block slot="content">问题诉求情况</block> -->
  6. </cu-custom>
  7. <form @submit="formSubmit" class="cu-list menu">
  8. <view class="titlebg2">
  9. <view class="titlet2">企业信息</view>
  10. </view>
  11. <view class="textbg">
  12. <view class="text12">
  13. 企业名称:
  14. </view>
  15. <view class="text22">
  16. <uni-combox :candidates="companys" placeholder="请选择所在城市" v-model="companyName"
  17. @input="getCompany"></uni-combox>
  18. </view>
  19. </view>
  20. <view class="textbg">
  21. <view class="text12">
  22. 属地:
  23. </view>
  24. <view class="text22">
  25. {{company.des1}}
  26. </view>
  27. </view>
  28. <view class="textbg">
  29. <view class="text12">
  30. 企业负责人:
  31. </view>
  32. <view class="text22">
  33. {{company.lxr}}
  34. </view>
  35. </view>
  36. <view class="textbg">
  37. <view class="text12">
  38. 负责人号码:
  39. </view>
  40. <view class="text22">
  41. {{company.phone}}
  42. </view>
  43. </view>
  44. <view style="height: 30rpx;background-color: white;"></view>
  45. <view class="titlebg2" style="margin-top:10rpx ;">
  46. <view class="titlet2">挂钩干部</view>
  47. </view>
  48. <view class="textbg">
  49. <view class="text12">
  50. 姓名:
  51. </view>
  52. <view class="text22">
  53. {{inputForm.qy.bz5}}
  54. </view>
  55. </view>
  56. <view style="height: 30rpx;background-color: white;"></view>
  57. <view class="titlebg2" style="margin-top:10rpx ;">
  58. <view class="titlet2">对接方式</view>
  59. </view>
  60. <view class="titlebg2">
  61. <radio-group @change="radioChange">
  62. <label class="radio">
  63. <radio value="上门沟通" checked="true" />上门沟通
  64. </label>
  65. <label class="radio">
  66. <radio value="电话联系" />电话联系
  67. </label>
  68. <label class="radio">
  69. <radio value="平台沟通" />平台沟通
  70. </label>
  71. </radio-group>
  72. </view>
  73. <view class="titlebg2" style="margin-top:10rpx ;">
  74. <view class="titlet2" style="width: 20%;">{{inputForm.method}}记录时间</view>
  75. <uni-datetime-picker type="date" :v-model="inputForm.contactDate" placeholder="请选择近期与企业沟通时间"
  76. @change="changeLog" />
  77. </view>
  78. <view style="height: 40rpx;"></view>
  79. <view class="flexC" v-if="canedit">
  80. <button form-type="submit" class="bt1 cu-btn block bg-blue margin-tb-sm lg">提交</button>
  81. </view>
  82. <view style="height: 40rpx;"></view>
  83. </form>
  84. </view>
  85. </template>
  86. <script>
  87. import loginService from '@/api/auth/loginService.js'
  88. import lyServiceService from '@/api/service/lyServiceService.js'
  89. export default {
  90. onShow() {
  91. this.$auth.checkLogin()
  92. },
  93. data() {
  94. return {
  95. title: '问题诉求情况',
  96. inputForm: {
  97. id: '',
  98. qy: {
  99. id: '',
  100. name: '',
  101. lxr: '',
  102. phone: '',
  103. bz5: '',
  104. des1: '',
  105. bz6: ''
  106. },
  107. method: '上门沟通',
  108. contactDate: ''
  109. },
  110. picLists: [],
  111. canedit: true,
  112. companys: [],
  113. companyList: [],
  114. companyName: '',
  115. company: {
  116. id: '',
  117. name: '',
  118. lxr: '',
  119. phone: '',
  120. bz5: '',
  121. des1: '',
  122. bz6: ''
  123. },
  124. }
  125. },
  126. async onLoad(query) {
  127. //新增
  128. let data2 = await loginService.queryByUserNameList()
  129. for (var i = 0; i < data2.data.length; i++) {
  130. this.companys.push(data2.data[i].name);
  131. this.companyList.push(data2.data[i]);
  132. }
  133. this.inputForm.qy = this.recover(this.inputForm.qy, data2.data[0])
  134. this.inputForm.id = "";
  135. this.company = data2.data[0]
  136. this.companyName = data2.data[0].name
  137. },
  138. methods: {
  139. radioChange(e) {
  140. this.inputForm.method = e.detail.value
  141. },
  142. getCompany(e) {
  143. let company = this.companyList.filter((item) => {
  144. return item.name.indexOf(e) > -1
  145. })
  146. if (company.length == 1) {
  147. this.company = company[0]
  148. }
  149. },
  150. changeLog(e) {
  151. this.inputForm.contactDate = e
  152. },
  153. formSubmit: function(e) {
  154. this.inputForm.qy = this.company;
  155. lyServiceService.save(this.inputForm).then(res => {
  156. console.log("res", res);
  157. if (res.statusCode == 200) {
  158. uni.redirectTo({
  159. url: '/pages/service/LyService'
  160. })
  161. }
  162. })
  163. },
  164. }
  165. }
  166. </script>
  167. <style>
  168. /* .file-title) {
  169. font-size: 17px !important;
  170. } */
  171. input,
  172. textarea {
  173. color: #8799a3;
  174. }
  175. .input1 {
  176. background-color: #ffffff;
  177. padding: 1upx 40upx;
  178. display: flex;
  179. align-items: center;
  180. padding-top: 20upx;
  181. border-bottom: 1px solid #eee;
  182. }
  183. .input1 .title {
  184. text-align: justify;
  185. padding-right: 30upx;
  186. font-size: 30upx;
  187. position: relative;
  188. height: 60upx;
  189. line-height: 60upx;
  190. border: ;
  191. }
  192. .title2 {
  193. width: 75%;
  194. text-align: left;
  195. }
  196. .input2 {
  197. flex: 1;
  198. font-size: 30upx;
  199. color: #555;
  200. padding-right: 20upx;
  201. width: 500rpx;
  202. }
  203. .uni-input {}
  204. .textbg {
  205. display: flex;
  206. background-color: white;
  207. padding-top: 29rpx;
  208. }
  209. .text12 {
  210. width: 200rpx;
  211. margin-left: 30rpx;
  212. color: #000000;
  213. font-size: 29rpx;
  214. }
  215. .text2 {
  216. flex: 1;
  217. color: #000000;
  218. font-size: 30rpx;
  219. padding-bottom: 2rpx;
  220. }
  221. .text22 {
  222. flex: 1;
  223. color: #666666;
  224. font-size: 29rpx;
  225. padding-bottom: 2rpx;
  226. align-self: flex-end;
  227. }
  228. .titlebg2 {
  229. display: flex;
  230. background-color: white;
  231. padding-left: 22rpx;
  232. padding-top: 35rpx;
  233. padding-bottom: 25rpx;
  234. margin-bottom: 2rpx;
  235. }
  236. .titlet1 {
  237. width: 7rpx;
  238. margin-top: 7rpx;
  239. margin-bottom: 7rpx;
  240. background-color: #2752eb;
  241. margin-right: 8rpx;
  242. }
  243. .titlet2 {
  244. font-weight: 800;
  245. color: #000;
  246. }
  247. .titlebb {
  248. color: #000000;
  249. font-weight: 800;
  250. padding-left: 40rpx;
  251. background-color: #ffffff;
  252. padding-top: 20rpx;
  253. }
  254. .flexC {
  255. display: flex;
  256. }
  257. .bt1 {
  258. flex: 1;
  259. margin: 30rpx;
  260. }
  261. .bt2 {
  262. flex: 1;
  263. margin: 30rpx;
  264. }
  265. </style>