addService.vue 5.9 KB

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