index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  1. <template>
  2. <!-- 访客申请 -->
  3. <view class="container">
  4. <!-- 导航栏 -->
  5. <custom-navbar title="访客申请" :showBack="true"></custom-navbar>
  6. <!-- 表单内容 -->
  7. <view class="form-container">
  8. <!-- 第一块:对接人信息 -->
  9. <view class="section">
  10. <view class="section-title">
  11. <image class="title-icon" src="/static/images/person.png" mode="aspectFit"></image>
  12. 对接人信息
  13. </view>
  14. <view class="mar-b-16">
  15. <text class="label">所属部门</text>
  16. <view class="select-wrapper">
  17. <!-- 调试信息 -->
  18. <uni-data-select v-model="formData.departmentId" :localdata="departmentOptions"
  19. placeholder="请选择所属部门" @change="onDepartmentSelectChange" :clear="false">
  20. </uni-data-select>
  21. </view>
  22. </view>
  23. <view class="form-item1">
  24. <text class="label">员工姓名</text>
  25. <view class="select-wrapper">
  26. <uni-data-select v-model="formData.employeeId" :localdata="employeeOptions" placeholder="请选择员工"
  27. @change="onEmployeeSelectChange" :clear="false">
  28. </uni-data-select>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 第二块:访问信息 -->
  33. <view class="section">
  34. <view class="section-title">
  35. <image class="title-icon" src="/static/images/calendar.png" mode="aspectFit"></image>
  36. 访问信息
  37. </view>
  38. <view class="form-item">
  39. <text class="label">访问事由</text>
  40. <input class="input" v-model="formData.visitReason" placeholder="请输入访问事由"
  41. placeholder-style="color: #c0c4cc" />
  42. </view>
  43. <view class="form-item">
  44. <text class="label">到访时间</text>
  45. <uni-datetime-picker type="datetime" v-model="formData.visitTime" @change="onVisitTimeChange"
  46. :clear-icon="false" placeholder="请选择到访时间" format="YYYY-MM-DD HH:mm" :hide-second="true">
  47. <view class="input-wrapper">
  48. <text class="placeholder" v-if="!formData.visitTime">请选择到访时间</text>
  49. <text v-else>{{ formData.visitTime }}</text>
  50. <uni-icons type="calendar" size="16" color="#c0c4cc"></uni-icons>
  51. </view>
  52. </uni-datetime-picker>
  53. </view>
  54. <view class="form-item">
  55. <text class="label">访客姓名</text>
  56. <input class="input" v-model="formData.visitorName" placeholder="请输入访客姓名"
  57. placeholder-style="color: #c0c4cc" />
  58. </view>
  59. <view class="form-item">
  60. <text class="label">访客单位</text>
  61. <input class="input" v-model="formData.visitorCompany" placeholder="请输入访客单位"
  62. placeholder-style="color: #c0c4cc" />
  63. </view>
  64. <view class="form-item">
  65. <text class="label">手机号</text>
  66. <input class="input" v-model="formData.visitorPhone" placeholder="请输入手机号"
  67. placeholder-style="color: #c0c4cc" type="number" />
  68. </view>
  69. </view>
  70. <!-- 第三块:随行人员 -->
  71. <view class="section">
  72. <view class="section-title">随行人员</view>
  73. <view class="accompany-list">
  74. <view class="accompany-item" v-for="(item, index) in formData.accompanyPersons" :key="index">
  75. <view class="form-item">
  76. <text class="label">随行人员</text>
  77. <input class="input" v-model="item.name" placeholder="请输入随行人员姓名"
  78. placeholder-style="color: #c0c4cc" />
  79. </view>
  80. <view class="form-item">
  81. <text class="label">手机号</text>
  82. <input class="input" v-model="item.phone" placeholder="请输入手机号"
  83. placeholder-style="color: #c0c4cc" type="number" />
  84. </view>
  85. <view class="delete-btn" v-if="formData.accompanyPersons.length > 1"
  86. @click.stop="removeAccompany(index)">
  87. <uni-icons type="trash" size="18" color="#ff4757"></uni-icons>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="add-accompany-btn" @click="addAccompany">
  92. <uni-icons type="plus" size="16" color="#007aff"></uni-icons>
  93. <text>添加随行人员</text>
  94. </view>
  95. </view>
  96. <!-- 第四块:使用车辆 -->
  97. <view class="section">
  98. <view class="vehicle-header">
  99. <view class="section-title">
  100. <image class="title-icon" src="/static/images/cart.png" mode="aspectFit"></image>
  101. 使用车辆
  102. </view>
  103. <switch :checked="formData.useVehicle" @change="onVehicleChange" color="#007aff" />
  104. </view>
  105. <view v-if="formData.useVehicle" class="vehicle-content">
  106. <view class="form-item">
  107. <text class="label">接客时间</text>
  108. <uni-datetime-picker type="datetime" v-model="formData.pickupTime" @change="onPickupTimeChange"
  109. :clear-icon="false" placeholder="请选择接客时间" format="YYYY-MM-DD HH:mm" :hide-second="true">
  110. <view class="input-wrapper">
  111. <text class="placeholder" v-if="!formData.pickupTime">请选择接客时间</text>
  112. <text v-else>{{ formData.pickupTime }}</text>
  113. <uni-icons type="calendar" size="16" color="#c0c4cc"></uni-icons>
  114. </view>
  115. </uni-datetime-picker>
  116. </view>
  117. <view class="form-item">
  118. <text class="label">接客地点</text>
  119. <input class="input" v-model="formData.pickupLocation" placeholder="请输入接客地点"
  120. placeholder-style="color: #c0c4cc" />
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. <!-- 提交按钮 -->
  126. <view class="submit-container">
  127. <button class="submit-btn" @click="submitForm">提交</button>
  128. </view>
  129. <!-- 提交成功弹框 -->
  130. <uni-popup ref="successPopup" type="center" :mask-click="false">
  131. <view class="success-popup">
  132. <view class="popup-content">
  133. <view class="success-icon">
  134. <uni-icons type="checkmarkempty" size="60" color="#52c41a"></uni-icons>
  135. </view>
  136. <view class="popup-title">申请提交成功</view>
  137. <view class="popup-message">您的申请已成功提交,请关注公众号即时查询审核结果</view>
  138. <view class="popup-buttons">
  139. <button class="cancel-btn" @click="closeSuccessPopup">取消</button>
  140. <button class="follow-btn" @click="showQRCode">关注</button>
  141. </view>
  142. </view>
  143. </view>
  144. </uni-popup>
  145. <!-- 二维码弹框 -->
  146. <uni-popup ref="qrcodePopup" type="center" :mask-click="false">
  147. <view class="qrcode-popup">
  148. <view class="qrcode-content">
  149. <view class="qrcode-title">扫描二维码关注公众号</view>
  150. <view class="qrcode-image" @click="previewQRCode">
  151. <image src="/static/images/qrcode.png" mode="aspectFit"></image>
  152. <view class="preview-tip">
  153. <uni-icons type="search" size="16" color="#fff"></uni-icons>
  154. <text>点击查看大图</text>
  155. </view>
  156. </view>
  157. <view class="qrcode-tip">扫描上方二维码,关注公众号获取审核结果</view>
  158. <button class="qrcode-close-btn" @click="closeQRCode">我知道了</button>
  159. </view>
  160. </view>
  161. </uni-popup>
  162. </view>
  163. </template>
  164. <script>
  165. import user from '../../store/modules/user';
  166. import {
  167. getDept,
  168. selectUser,
  169. addVisit
  170. } from '@/config/api.js';
  171. export default {
  172. data() {
  173. return {
  174. type: '', // 从上一页传递过来的参数
  175. tabbarHeight: 50, // tabbar高度,默认50px
  176. user: null, // 用户信息
  177. formData: {
  178. departmentId: '',
  179. department: '',
  180. employeeId: '',
  181. employeeName: '',
  182. visitReason: '',
  183. visitTime: '',
  184. visitorName: '',
  185. visitorCompany: '',
  186. visitorPhone: '',
  187. accompanyPersons: [{
  188. name: '',
  189. phone: ''
  190. }],
  191. useVehicle: false,
  192. pickupTime: '',
  193. pickupLocation: ''
  194. },
  195. // 部门数据
  196. departments: [],
  197. // 部门选项(格式化为uni-data-select所需格式)
  198. departmentOptions: [],
  199. // 员工选项
  200. employeeOptions: [],
  201. }
  202. },
  203. onLoad(options) {
  204. console.log(uni.getStorageSync("user"), "usususuus")
  205. // 获取传递过来的参数
  206. if (options.type) {
  207. this.type = options.type;
  208. }
  209. // 获取用户信息
  210. this.user = uni.getStorageSync("user")
  211. this.getTabbarHeight()
  212. this.getDeptList()
  213. },
  214. onReady() {
  215. // 页面渲染完成后再次获取,确保准确
  216. this.getTabbarHeight()
  217. },
  218. methods: {
  219. // 获取tabbar高度
  220. getTabbarHeight() {
  221. // 获取菜单按钮信息,用于计算真实的可用高度
  222. const systemInfo = uni.getSystemInfoSync()
  223. // 在微信小程序中,使用 windowHeight 和 screenHeight 的差值
  224. // windowHeight 是不包含 tabbar 的可用高度
  225. const windowHeight = systemInfo.windowHeight
  226. const screenHeight = systemInfo.screenHeight
  227. // 微信小程序 tabbar 高度通常是 50px,但在不同设备可能不同
  228. // 直接使用差值
  229. let tabbarHeight = screenHeight - windowHeight
  230. console.log('系统信息:', {
  231. screenHeight,
  232. windowHeight,
  233. 计算的tabbar高度: tabbarHeight,
  234. safeAreaBottom: systemInfo.safeAreaInsets?.bottom || systemInfo.safeArea?.bottom || 0
  235. })
  236. // 在小程序中通常是 50-80 之间
  237. // 如果是 H5,差值会包含地址栏等,会更大
  238. // #ifdef MP-WEIXIN
  239. if (tabbarHeight < 30 || tabbarHeight > 100) {
  240. tabbarHeight = 50 // 微信小程序默认 50px
  241. }
  242. // #endif
  243. // #ifdef H5
  244. tabbarHeight = 50 // H5 固定使用 50px
  245. // #endif
  246. this.tabbarHeight = tabbarHeight
  247. },
  248. async getDeptList() {
  249. console.log("获取DEPT")
  250. try {
  251. const res = await getDept({
  252. parentId: 100
  253. })
  254. console.log("部门API返回数据:", res)
  255. this.departments = res.data
  256. // 格式化部门数据为uni-data-select所需格式
  257. this.departmentOptions = res.data.map(item => ({
  258. value: item.dept_id,
  259. text: item.dept_name
  260. }))
  261. console.log("格式化后的部门选项:", this.departmentOptions)
  262. // 添加延时确保数据已经设置
  263. this.$nextTick(() => {
  264. console.log("nextTick后的部门选项:", this.departmentOptions)
  265. })
  266. } catch (error) {
  267. console.error("获取部门列表失败:", error)
  268. uni.showToast({
  269. title: '获取部门列表失败',
  270. icon: 'none'
  271. })
  272. }
  273. },
  274. // 部门选择改变
  275. async onDepartmentSelectChange(value) {
  276. console.log("选择的部门ID:", value)
  277. this.formData.departmentId = value
  278. // 找到选中的部门信息
  279. const selectedDept = this.departments.find(dept => dept.dept_id === value)
  280. if (selectedDept) {
  281. this.formData.department = selectedDept.dept_name
  282. // 根据部门ID获取员工列表
  283. try {
  284. const userRes = await selectUser({
  285. deptId: value
  286. })
  287. console.log("员工列表:", userRes)
  288. // 格式化员工数据为uni-data-select所需格式
  289. if (userRes && userRes.rows) {
  290. this.employeeOptions = userRes.rows.map(item => ({
  291. value: item.user_id,
  292. text: item.nick_name
  293. }))
  294. console.log("格式化后的员工选项:", this.employeeOptions)
  295. } else if (userRes && userRes.data && userRes.data.rows) {
  296. // 备用路径,以防数据结构不同
  297. this.employeeOptions = userRes.data.rows.map(item => ({
  298. value: item.user_id,
  299. text: item.nick_name
  300. }))
  301. console.log("格式化后的员工选项(备用路径):", this.employeeOptions)
  302. }
  303. // 清空之前选择的员工
  304. this.formData.employeeId = ''
  305. this.formData.employeeName = ''
  306. } catch (error) {
  307. console.error("获取员工列表失败:", error)
  308. uni.showToast({
  309. title: '获取员工列表失败',
  310. icon: 'none'
  311. })
  312. }
  313. }
  314. },
  315. // 员工选择改变
  316. onEmployeeSelectChange(value) {
  317. console.log("选择的员工ID:", value)
  318. this.formData.employeeId = value
  319. // 根据employeeOptions找到对应的员工名称
  320. const selectedEmployee = this.employeeOptions.find(emp => emp.value === value)
  321. if (selectedEmployee) {
  322. this.formData.employeeName = selectedEmployee.text
  323. console.log("选择的员工名称:", selectedEmployee.text)
  324. }
  325. },
  326. // 到访时间改变
  327. onVisitTimeChange(e) {
  328. this.formData.visitTime = e;
  329. },
  330. // 接客时间改变
  331. onPickupTimeChange(e) {
  332. this.formData.pickupTime = e;
  333. },
  334. // 获取当前日期时间
  335. getCurrentDatetime() {
  336. const now = new Date();
  337. const year = now.getFullYear();
  338. const month = String(now.getMonth() + 1).padStart(2, '0');
  339. const day = String(now.getDate()).padStart(2, '0');
  340. const hour = String(now.getHours()).padStart(2, '0');
  341. const minute = String(now.getMinutes()).padStart(2, '0');
  342. return `${year}-${month}-${day} ${hour}:${minute}`;
  343. },
  344. // 添加随行人员
  345. addAccompany() {
  346. this.formData.accompanyPersons.push({
  347. name: '',
  348. phone: ''
  349. });
  350. },
  351. // 删除随行人员
  352. removeAccompany(index) {
  353. console.log('删除随行人员,索引:', index, '当前数量:', this.formData.accompanyPersons.length);
  354. if (this.formData.accompanyPersons.length > 1) {
  355. uni.showModal({
  356. title: '确认删除',
  357. content: '确定要删除这个随行人员吗?',
  358. success: (res) => {
  359. if (res.confirm) {
  360. this.formData.accompanyPersons.splice(index, 1);
  361. console.log('删除成功,剩余数量:', this.formData.accompanyPersons.length);
  362. }
  363. }
  364. });
  365. } else {
  366. uni.showToast({
  367. title: '至少保留一个随行人员',
  368. icon: 'none'
  369. });
  370. }
  371. },
  372. // 车辆开关改变
  373. onVehicleChange(e) {
  374. this.formData.useVehicle = e.detail.value;
  375. if (!this.formData.useVehicle) {
  376. // 关闭车辆使用时清空相关信息
  377. this.formData.pickupTime = '';
  378. this.formData.pickupLocation = '';
  379. }
  380. },
  381. // 手机号格式校验
  382. validatePhone(phone) {
  383. const phoneRegex = /^1[3-9]\d{9}$/;
  384. return phoneRegex.test(phone);
  385. },
  386. // 表单验证
  387. validateForm() {
  388. if (!this.formData.department) {
  389. uni.showToast({
  390. title: '请选择所属部门',
  391. icon: 'none'
  392. });
  393. return false;
  394. }
  395. if (!this.formData.employeeName) {
  396. uni.showToast({
  397. title: '请输入员工姓名',
  398. icon: 'none'
  399. });
  400. return false;
  401. }
  402. if (!this.formData.visitReason) {
  403. uni.showToast({
  404. title: '请输入访问事由',
  405. icon: 'none'
  406. });
  407. return false;
  408. }
  409. if (!this.formData.visitTime) {
  410. uni.showToast({
  411. title: '请选择到访时间',
  412. icon: 'none'
  413. });
  414. return false;
  415. }
  416. if (!this.formData.visitorName) {
  417. uni.showToast({
  418. title: '请输入访客姓名',
  419. icon: 'none'
  420. });
  421. return false;
  422. }
  423. if (!this.formData.visitorCompany) {
  424. uni.showToast({
  425. title: '请输入访客单位',
  426. icon: 'none'
  427. });
  428. return false;
  429. }
  430. if (!this.formData.visitorPhone) {
  431. uni.showToast({
  432. title: '请输入手机号',
  433. icon: 'none'
  434. });
  435. return false;
  436. }
  437. // 校验访客手机号格式
  438. if (!this.validatePhone(this.formData.visitorPhone)) {
  439. uni.showToast({
  440. title: '请输入正确的手机号格式',
  441. icon: 'none'
  442. });
  443. return false;
  444. }
  445. // 验证随行人员信息
  446. for (let i = 0; i < this.formData.accompanyPersons.length; i++) {
  447. const person = this.formData.accompanyPersons[i];
  448. if (person.name && !person.phone) {
  449. uni.showToast({
  450. title: `请输入第${i + 1}个随行人员的手机号`,
  451. icon: 'none'
  452. });
  453. return false;
  454. }
  455. if (!person.name && person.phone) {
  456. uni.showToast({
  457. title: `请输入第${i + 1}个随行人员的姓名`,
  458. icon: 'none'
  459. });
  460. return false;
  461. }
  462. // 校验随行人员手机号格式
  463. if (person.phone && !this.validatePhone(person.phone)) {
  464. uni.showToast({
  465. title: `第${i + 1}个随行人员手机号格式不正确`,
  466. icon: 'none'
  467. });
  468. return false;
  469. }
  470. }
  471. // 验证车辆使用信息
  472. if (this.formData.useVehicle) {
  473. if (!this.formData.pickupTime) {
  474. uni.showToast({
  475. title: '请选择接客时间',
  476. icon: 'none'
  477. });
  478. return false;
  479. }
  480. if (!this.formData.pickupLocation) {
  481. uni.showToast({
  482. title: '请选择接客地点',
  483. icon: 'none'
  484. });
  485. return false;
  486. }
  487. }
  488. return true;
  489. },
  490. // 提交表单
  491. async submitForm() {
  492. if (!this.validateForm()) {
  493. return;
  494. }
  495. // 过滤空的随行人员
  496. const validAccompanyPersons = this.formData.accompanyPersons.filter(person =>
  497. person.name && person.phone
  498. );
  499. // 构建提交数据
  500. const submitData = {
  501. visitDate: this.formData.visitTime, // 访问时间
  502. // userId: this.user?.id || '', // 员工id
  503. empName: this.formData.employeeName, // 访问部门人(员工姓名)
  504. visDept: this.formData.visitorCompany, // 访客单位
  505. visitPerson: this.formData.visitorName, // 访客姓名
  506. visitorTel: this.formData.visitorPhone, // 访客手机
  507. visitorNum: (validAccompanyPersons.length + 1).toString(), // 访问人数(访客+随行人员)
  508. visitReson: this.formData.visitReason, // 访问事由
  509. accPerson: JSON.stringify(validAccompanyPersons) // 随行人员转为JSON字符串
  510. };
  511. console.log('提交数据:', submitData);
  512. try {
  513. // 调用后端接口提交数据
  514. const response = await addVisit(submitData);
  515. console.log('提交成功:', response);
  516. // 显示提交成功弹框
  517. this.$refs.successPopup.open();
  518. } catch (error) {
  519. console.error('提交失败:', error);
  520. uni.showToast({
  521. title: '提交失败,请重试',
  522. icon: 'none'
  523. });
  524. }
  525. },
  526. // 关闭成功弹框
  527. closeSuccessPopup() {
  528. this.$refs.successPopup.close();
  529. // 返回上一页
  530. uni.navigateBack();
  531. },
  532. // 显示二维码
  533. showQRCode() {
  534. this.$refs.successPopup.close();
  535. // this.$refs.qrcodePopup.open();
  536. },
  537. // 关闭二维码弹框
  538. closeQRCode() {
  539. this.$refs.qrcodePopup.close();
  540. // 返回上一页
  541. uni.navigateBack();
  542. },
  543. // 预览二维码
  544. previewQRCode() {
  545. uni.previewImage({
  546. urls: ['/static/images/qrcode.png'],
  547. current: 0
  548. });
  549. },
  550. }
  551. }
  552. </script>
  553. <style lang="scss" scoped>
  554. .container {
  555. background-color: #f5f5f5;
  556. min-height: 100vh;
  557. }
  558. .form-container {
  559. padding: 20rpx;
  560. }
  561. .section {
  562. background-color: #fff;
  563. border-radius: 12rpx;
  564. margin-bottom: 20rpx;
  565. padding: 30rpx;
  566. }
  567. .section-title {
  568. font-size: 32rpx;
  569. font-weight: 600;
  570. color: #333;
  571. margin-bottom: 30rpx;
  572. display: flex;
  573. align-items: center;
  574. }
  575. .title-icon {
  576. width: 40rpx;
  577. height: 40rpx;
  578. margin-right: 15rpx;
  579. }
  580. .form-item {
  581. display: flex;
  582. align-items: center;
  583. margin-bottom: 30rpx;
  584. position: relative;
  585. &:last-child {
  586. margin-bottom: 0;
  587. }
  588. }
  589. .label {
  590. width: 160rpx;
  591. font-size: 28rpx;
  592. color: #666;
  593. flex-shrink: 0;
  594. }
  595. .input {
  596. flex: 1;
  597. height: 70rpx;
  598. padding: 0 20rpx;
  599. background-color: #f8f8f8;
  600. border-radius: 8rpx;
  601. font-size: 28rpx;
  602. color: #333;
  603. }
  604. .input-wrapper {
  605. flex: 1;
  606. height: 70rpx;
  607. padding: 0 20rpx;
  608. background-color: #f8f8f8;
  609. border-radius: 8rpx;
  610. display: flex;
  611. align-items: center;
  612. justify-content: space-between;
  613. }
  614. .placeholder {
  615. color: #c0c4cc;
  616. font-size: 28rpx;
  617. }
  618. .select-wrapper {
  619. flex: 1;
  620. ::v-deep .uni-stat__select {
  621. width: 100%;
  622. }
  623. ::v-deep .uni-stat-box {
  624. width: 100%;
  625. }
  626. ::v-deep .uni-select {
  627. width: 100%;
  628. border: none;
  629. }
  630. ::v-deep .uni-select__input-box {
  631. height: 70rpx;
  632. padding: 0 20rpx;
  633. background-color: #f8f8f8;
  634. border-radius: 8rpx;
  635. border: none;
  636. }
  637. ::v-deep .uni-select__input-text {
  638. font-size: 28rpx;
  639. color: #333;
  640. }
  641. ::v-deep .uni-select__input-placeholder {
  642. color: #c0c4cc;
  643. }
  644. ::v-deep .uni-select__selector {
  645. max-height: 400rpx;
  646. }
  647. }
  648. .accompany-list {
  649. .accompany-item {
  650. position: relative;
  651. padding: 20rpx;
  652. background-color: #f8f8f8;
  653. border-radius: 8rpx;
  654. margin-bottom: 20rpx;
  655. &:last-child {
  656. margin-bottom: 0;
  657. }
  658. }
  659. }
  660. .delete-btn {
  661. position: absolute;
  662. top: 10rpx;
  663. right: 10rpx;
  664. width: 70rpx;
  665. height: 70rpx;
  666. display: flex;
  667. align-items: center;
  668. justify-content: center;
  669. background-color: #fff;
  670. border-radius: 50%;
  671. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  672. z-index: 10;
  673. cursor: pointer;
  674. &:active {
  675. opacity: 0.7;
  676. transform: scale(0.95);
  677. }
  678. }
  679. .add-accompany-btn {
  680. display: flex;
  681. align-items: center;
  682. justify-content: center;
  683. height: 80rpx;
  684. background-color: #f8f9fa;
  685. border: 2rpx dashed #c0c4cc;
  686. border-radius: 8rpx;
  687. color: #909399;
  688. font-size: 28rpx;
  689. text {
  690. margin-left: 10rpx;
  691. }
  692. }
  693. .vehicle-header {
  694. display: flex;
  695. align-items: center;
  696. margin-bottom: 30rpx;
  697. .section-title {
  698. flex: 1;
  699. margin-bottom: 0;
  700. margin-left: 15rpx;
  701. }
  702. }
  703. .vehicle-content {
  704. padding-top: 20rpx;
  705. border-top: 1rpx solid #eee;
  706. }
  707. .submit-container {
  708. padding: 20rpx;
  709. background-color: #fff;
  710. margin-top: 20rpx;
  711. }
  712. .submit-btn {
  713. width: 100%;
  714. height: 88rpx;
  715. background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  716. border-radius: 44rpx;
  717. border: none;
  718. color: #fff;
  719. font-size: 32rpx;
  720. font-weight: 600;
  721. }
  722. .picker-container {
  723. background-color: #fff;
  724. border-radius: 20rpx 20rpx 0 0;
  725. }
  726. .picker-header {
  727. display: flex;
  728. align-items: center;
  729. justify-content: space-between;
  730. padding: 30rpx;
  731. border-bottom: 1rpx solid #eee;
  732. text {
  733. color: #007aff;
  734. font-size: 28rpx;
  735. }
  736. }
  737. .picker-title {
  738. font-size: 32rpx;
  739. font-weight: 600;
  740. color: #333 !important;
  741. }
  742. .picker-view {
  743. height: 400rpx;
  744. }
  745. .picker-item {
  746. display: flex;
  747. align-items: center;
  748. justify-content: center;
  749. height: 80rpx;
  750. font-size: 28rpx;
  751. color: #333;
  752. }
  753. // 提交成功弹框样式
  754. .success-popup {
  755. .popup-content {
  756. background-color: #fff;
  757. border-radius: 20rpx;
  758. padding: 60rpx 40rpx 40rpx;
  759. width: 560rpx;
  760. text-align: center;
  761. }
  762. .success-icon {
  763. margin-bottom: 30rpx;
  764. }
  765. .popup-title {
  766. font-size: 36rpx;
  767. font-weight: 600;
  768. color: #333;
  769. margin-bottom: 20rpx;
  770. }
  771. .popup-message {
  772. font-size: 28rpx;
  773. color: #666;
  774. line-height: 1.6;
  775. margin-bottom: 50rpx;
  776. }
  777. .popup-buttons {
  778. display: flex;
  779. gap: 20rpx;
  780. button {
  781. flex: 1;
  782. height: 80rpx;
  783. border-radius: 40rpx;
  784. font-size: 28rpx;
  785. border: none;
  786. }
  787. .cancel-btn {
  788. background-color: #f5f5f5;
  789. color: #666;
  790. }
  791. .follow-btn {
  792. background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  793. color: #fff;
  794. }
  795. }
  796. }
  797. // 二维码弹框样式
  798. .qrcode-popup {
  799. .qrcode-content {
  800. background-color: #fff;
  801. border-radius: 20rpx;
  802. padding: 50rpx 40rpx;
  803. width: 560rpx;
  804. text-align: center;
  805. }
  806. .qrcode-title {
  807. font-size: 32rpx;
  808. font-weight: 600;
  809. color: #333;
  810. margin-bottom: 40rpx;
  811. }
  812. .qrcode-image {
  813. width: 400rpx;
  814. height: 400rpx;
  815. margin: 0 auto 30rpx;
  816. border: 1rpx solid #eee;
  817. border-radius: 12rpx;
  818. overflow: hidden;
  819. position: relative;
  820. image {
  821. width: 100%;
  822. height: 100%;
  823. }
  824. .preview-tip {
  825. position: absolute;
  826. left: 0;
  827. right: 0;
  828. bottom: 0;
  829. height: 60rpx;
  830. background: rgba(0, 0, 0, 0.5);
  831. display: flex;
  832. align-items: center;
  833. justify-content: center;
  834. color: #fff;
  835. font-size: 24rpx;
  836. text {
  837. margin-left: 10rpx;
  838. }
  839. }
  840. &:active {
  841. opacity: 0.8;
  842. }
  843. }
  844. .qrcode-tip {
  845. font-size: 26rpx;
  846. color: #999;
  847. margin-bottom: 40rpx;
  848. line-height: 1.5;
  849. }
  850. .qrcode-close-btn {
  851. width: 100%;
  852. height: 80rpx;
  853. background: linear-gradient(135deg, #ff6b35 0%, #ff9500 100%);
  854. border-radius: 40rpx;
  855. color: #fff;
  856. font-size: 28rpx;
  857. border: none;
  858. }
  859. }
  860. </style>