addService.vue 5.7 KB

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