index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798
  1. <template>
  2. <view class="oder_form_wrap">
  3. <u-navbar placeholder :autoBack="true" title="发单表单">
  4. </u-navbar>
  5. <view class="form_wrap">
  6. <u--form labelPosition="top" labelWidth="100" :model="form" :rules="rules" ref="form" class="form_wrap"
  7. :errorType="'toast'">
  8. <u-form-item label="品牌" prop="brand" class="brand_wrap">
  9. <BrandSelect :list="brandDict" label-key="dictLabel" value-key="dictValue" placeholder="请选择物品品牌"
  10. v-model="form.brand" :border="false" border></BrandSelect>
  11. <u-icon slot="right" name="arrow-right"></u-icon>
  12. </u-form-item>
  13. <u-row gutter="5" justify="space-between">
  14. <u-col span="6">
  15. <u-form-item label="型号" prop="model">
  16. <u--input v-model="form.model" placeholder="例如:CF小号" border="surround"></u--input>
  17. </u-form-item>
  18. </u-col>
  19. <u-col span="6">
  20. <u-form-item label="实价" prop="price">
  21. <u--input v-model="form.price" placeholder="0.00" border="surround"></u--input>
  22. </u-form-item>
  23. </u-col>
  24. </u-row>
  25. <u-row gutter="5" justify="space-between">
  26. <u-col span="6">
  27. <u-form-item label="客户电话" prop="phone">
  28. <u--input v-model="form.phone" placeholder="电话号" border="surround"></u--input>
  29. </u-form-item>
  30. </u-col>
  31. <u-col span="6">
  32. <u-form-item label="客户微信" prop="wechat">
  33. <u--input v-model="form.wechat" placeholder="微信号" border="surround"></u--input>
  34. </u-form-item>
  35. </u-col>
  36. </u-row>
  37. <view class="address_wrap">
  38. <view class="address_title">
  39. <u-icon name="map" color="#3b82f6" size="16"></u-icon>
  40. <view>地址信息</view>
  41. </view>
  42. <u-form-item label="详细地址" prop="address" class='form_card'>
  43. <pick-regions :defaultRegion="defaultRegion" @getRegion="handleGetRegion" clearable
  44. class="region-picker">
  45. <view>
  46. <template v-if="form.province">
  47. <u--input :value="form.province + '/' + form.city + '/' + form.area"
  48. placeholder="点击选择" readonly suffixIcon="arrow-right"
  49. suffixIconStyle="color : #c0c4cc"></u--input>
  50. </template>
  51. <template v-else>
  52. <u--input placeholder="点击选择" readonly suffixIcon="arrow-right"
  53. suffixIconStyle="color : #c0c4cc"></u--input>
  54. </template>
  55. </view>
  56. </pick-regions>
  57. </u-form-item>
  58. <u--textarea v-model="form.address" placeholder="粘贴地址自动识别(例如:浙江省杭州市...)" confirmType="done"
  59. @blur="handleAddressBlur"></u--textarea>
  60. </view>
  61. <u-form-item label="上门时间" prop="visitTime" class="visit_time_wrap">
  62. <date-time-picker v-model="form.visitTime" :value-format="'YYYY-MM-DD HH:mm:ss'" :type="'datetime'">
  63. </date-time-picker>
  64. </u-form-item>
  65. <!-- <u-form-item label="类型" prop="category" class="category_wrap"> -->
  66. <u-form-item label="类型" prop="category" class="brand_wrap">
  67. <!-- <view class="category_select_wrap"> -->
  68. <ld-select :list="categoryDict" label-key="dictLabel" value-key="dictValue" placeholder="请选择类型"
  69. v-model="form.category" :border="false"></ld-select>
  70. <u-icon slot="right" name="arrow-right"></u-icon>
  71. <!-- </view> -->
  72. </u-form-item>
  73. <u-form-item label="价格范围" prop="priceRange">
  74. <u--input v-model="form.priceRange" placeholder="请输入价格范围" border="surround"></u--input>
  75. </u-form-item>
  76. <u-form-item label="战术选择" prop="tactic">
  77. <view class="tactic-buttons">
  78. <view v-for="item in tacticDict" :key="item.dictValue" class="tactic-button"
  79. :class="{ 'active': form.tactic === item.dictValue }" @click="form.tactic = item.dictValue">
  80. {{ item.dictLabel }}
  81. </view>
  82. </view>
  83. </u-form-item>
  84. <u-form-item label="备注信息" prop="remarks" class="remarks_wrap">
  85. <u--textarea v-model="form.remarks" placeholder="填写线索来源、客户特殊要求等..." count
  86. confirmType="done"></u--textarea>
  87. </u-form-item>
  88. </u--form>
  89. </view>
  90. <!-- 文件上传区域 -->
  91. <view class="upload_area" v-if="!sendFormId">
  92. <!-- 聊天记录附件 -->
  93. <order-file-upload title="聊天记录附件" orderFileType="1" fileType="image" :file-list="form.chatAttachmentList"
  94. @update:fileList="updateChatFiles" tip-text="上传聊天截图、录音等文件"></order-file-upload>
  95. <!-- 报价附件 -->
  96. <order-file-upload title="报价附件" orderFileType="2" fileType="image" :file-list="form.quoteAttachmentList"
  97. @update:fileList="updateQuoteFiles" tip-text="上传报价附件"></order-file-upload>
  98. <!-- 高清图附件 -->
  99. <order-file-upload title="高清图附件" orderFileType="3" fileType="image" :file-list="form.hdImageAttachmentList"
  100. @update:fileList="updateHdImageFiles" tip-text="上传物品高清图片"></order-file-upload>
  101. <!-- 其他附件 -->
  102. <order-file-upload title="其他附件" orderFileType="4" fileType="image" :file-list="form.otherAttachmentList"
  103. @update:fileList="updateOtherFiles" tip-text="上传其他相关文件"></order-file-upload>
  104. </view>
  105. <u-button @click="handleNavSaveClick" type="primary" :loading="saveLoading" :disabled="saveLoading">{{ saveLoading ? '提交中...' : '提交订单' }}</u-button>
  106. </view>
  107. </template>
  108. <script>
  109. import orderFileUpload from '@/components/order-file-upload/order-file-upload.vue'
  110. import dateTimePicker from "@/components/dateTimePicker/dateTimePicker.vue"
  111. import ldSelect from "@/components/ld-select/ld-select.vue"
  112. import BrandSelect from "@/components/brand-select/brand-select.vue"
  113. const CHINA_REGIONS = require('@/components/pick-regions/regions.json')
  114. export default {
  115. components: {
  116. orderFileUpload,
  117. dateTimePicker,
  118. ldSelect,
  119. BrandSelect
  120. },
  121. data() {
  122. return {
  123. defaultRegion: ['广东省', '广州市', '番禺区'],
  124. categoryDict: [],
  125. tacticDict: [],
  126. brandDict: [],
  127. sendFormId: undefined,
  128. saveLoading: false,
  129. form: {
  130. clueId: '',
  131. sendDate: '',
  132. website: '',
  133. item: '',
  134. phone: '',
  135. wechat: '',
  136. address: '',
  137. visitTime: '',
  138. remarks: '',
  139. category: '1',
  140. brand: '',
  141. model: '',
  142. price: '',
  143. priceRange: '',
  144. tactic: '',
  145. // 地区信息
  146. province: '',
  147. city: '',
  148. area: '',
  149. // 附件列表
  150. chatAttachmentList: [], // 聊天记录附件
  151. quoteAttachmentList: [], // 报价附件
  152. hdImageAttachmentList: [], // 高清图附件
  153. otherAttachmentList: [] // 其他附件
  154. },
  155. rules: {
  156. sendDate: {
  157. type: 'string',
  158. required: true,
  159. message: '请输入发单日期',
  160. trigger: ['blur', 'change']
  161. },
  162. model: {
  163. type: 'string',
  164. required: true,
  165. message: '请输入型号',
  166. trigger: ['blur', 'change']
  167. },
  168. price: {
  169. type: 'string',
  170. required: true,
  171. message: '请输入实价',
  172. trigger: ['blur', 'change']
  173. },
  174. website: {
  175. type: 'url',
  176. message: '请输入正确的网址格式',
  177. trigger: ['blur', 'change']
  178. },
  179. item: {
  180. type: 'string',
  181. required: true,
  182. message: '请输入物品描述',
  183. trigger: ['blur', 'change']
  184. },
  185. wechat: {
  186. type: 'string',
  187. required: false,
  188. message: '请输入客户微信',
  189. trigger: ['blur', 'change']
  190. },
  191. phone: {
  192. type: 'string',
  193. required: false,
  194. message: '请输入联系电话',
  195. trigger: ['blur', 'change']
  196. },
  197. address: {
  198. type: 'string',
  199. required: true,
  200. message: '请输入详细地址',
  201. trigger: ['blur', 'change']
  202. },
  203. visitTime: {
  204. type: 'string',
  205. required: true,
  206. message: '请输入上门时间',
  207. trigger: ['blur', 'change']
  208. },
  209. category: {
  210. type: 'string',
  211. required: true,
  212. message: '请选择类型',
  213. trigger: ['blur', 'change']
  214. },
  215. brand: {
  216. type: 'string',
  217. required: true,
  218. message: '请选择物品品牌',
  219. trigger: ['blur', 'change']
  220. },
  221. tactic: {
  222. type: 'string',
  223. required: true,
  224. message: '请选择战术',
  225. trigger: ['blur', 'change']
  226. }
  227. }
  228. }
  229. },
  230. methods: {
  231. // 加载表单数据
  232. async loadFormData(sendFormId) {
  233. try {
  234. const res = await uni.$u.api.getClueSendFormVoByOrderId({
  235. id: sendFormId
  236. });
  237. if (res.code === 200) {
  238. this.form = res.data;
  239. }
  240. } catch (error) {
  241. console.error('加载表单数据失败:', error);
  242. uni.$u.toast('加载表单数据失败');
  243. }
  244. },
  245. // 获取地区选择
  246. handleGetRegion(region) {
  247. const [provinceData, cityData, areaData] = region;
  248. this.form.province = provinceData.name;
  249. this.form.city = cityData.name;
  250. this.form.area = areaData.name;
  251. // 构建完整的地区信息
  252. const regionText = this.form.province + this.form.city + this.form.area;
  253. // 检查当前地址内容是否为纯地区信息(没有具体街道等)
  254. const isPureRegion = !this.form.address ||
  255. this.form.address.trim() === '' ||
  256. this.form.address.trim().includes(this.form.province) ||
  257. this.form.address.trim().includes(this.form.city) ||
  258. this.form.address.trim().includes(this.form.area);
  259. // 如果是纯地区信息或者是空地址,则更新为选择的地区
  260. if (isPureRegion) {
  261. this.form.address = regionText;
  262. } else {
  263. // 如果有具体地址信息,保留原有地址,但更新地区部分
  264. // 这里可以保持原有地址不变,让用户自己选择是否更新
  265. // 或者可以选择性地更新地区信息
  266. }
  267. },
  268. // 地址失焦时自动解析地址信息
  269. async handleAddressBlur() {
  270. if (!this.form.address || !this.form.address.trim()) {
  271. return;
  272. }
  273. const address = this.form.address.trim();
  274. const parsedRegion = this.parseAddress(address);
  275. if (parsedRegion && parsedRegion.province) {
  276. this.form.province = parsedRegion.province;
  277. this.form.city = parsedRegion.city || '';
  278. this.form.area = parsedRegion.area || '';
  279. // 更新 defaultRegion,用于更新 pick-regions 组件的显示
  280. this.defaultRegion = [
  281. parsedRegion.province,
  282. parsedRegion.city || '',
  283. parsedRegion.area || ''
  284. ];
  285. }
  286. },
  287. // 基于地址字典解析地址,提取省市区信息
  288. parseAddress(address) {
  289. if (!address || !CHINA_REGIONS || CHINA_REGIONS.length === 0) {
  290. return null;
  291. }
  292. let bestMatch = null;
  293. let bestMatchScore = 0; // 匹配分数:完整匹配得分更高
  294. // 遍历所有省份
  295. for (const province of CHINA_REGIONS) {
  296. const provinceName = province.name;
  297. // 移除可能的"省"、"市"、"自治区"、"特别行政区"等后缀进行匹配
  298. const provinceNameShort = provinceName.replace(/省|市|自治区|特别行政区|壮族自治区|维吾尔自治区|回族自治区/g, '');
  299. // 检查地址中是否包含省份名称
  300. const hasProvinceFull = address.includes(provinceName);
  301. const hasProvinceShort = address.includes(provinceNameShort);
  302. if (hasProvinceFull || hasProvinceShort) {
  303. // 找到省份在地址中的位置
  304. const provinceIndex = hasProvinceFull
  305. ? address.indexOf(provinceName)
  306. : address.indexOf(provinceNameShort);
  307. if (provinceIndex === -1) continue;
  308. // 获取省份后的剩余地址
  309. const provinceMatchLength = hasProvinceFull ? provinceName.length : provinceNameShort.length;
  310. const remainingAfterProvince = address.substring(provinceIndex + provinceMatchLength);
  311. // 直辖市特殊处理
  312. const municipalities = ['北京市', '上海市', '天津市', '重庆市'];
  313. if (municipalities.includes(provinceName)) {
  314. // 直辖市:市名就是省名,直接查找区/县
  315. const cityName = provinceName;
  316. let matchedArea = null;
  317. let maxAreaLength = 0;
  318. // 遍历该省份下的所有市(通常是"市辖区")
  319. if (province.childs && province.childs.length > 0) {
  320. for (const city of province.childs) {
  321. // 遍历该市下的所有区/县
  322. if (city.childs && city.childs.length > 0) {
  323. for (const area of city.childs) {
  324. const areaName = area.name;
  325. // 检查剩余地址中是否包含区/县名称
  326. if (remainingAfterProvince.includes(areaName)) {
  327. // 找到最长的匹配(更准确)
  328. if (areaName.length > maxAreaLength) {
  329. maxAreaLength = areaName.length;
  330. matchedArea = areaName;
  331. }
  332. }
  333. }
  334. }
  335. }
  336. }
  337. // 计算匹配分数:有区/县得3分,只有省市区得2分
  338. const matchScore = matchedArea ? 3 : 2;
  339. if (matchScore > bestMatchScore) {
  340. bestMatchScore = matchScore;
  341. bestMatch = {
  342. province: provinceName,
  343. city: cityName,
  344. area: matchedArea || ''
  345. };
  346. // 如果找到了完整的省市区,可以提前返回
  347. if (matchedArea) {
  348. return bestMatch;
  349. }
  350. }
  351. continue;
  352. }
  353. // 非直辖市:查找市
  354. if (province.childs && province.childs.length > 0) {
  355. for (const city of province.childs) {
  356. const cityName = city.name;
  357. // 移除可能的"市"、"州"、"盟"、"地区"、"自治州"等后缀
  358. const cityNameShort = cityName.replace(/市|州|盟|地区|自治州/g, '');
  359. // 检查剩余地址中是否包含市名称
  360. const hasCityFull = remainingAfterProvince.includes(cityName);
  361. const hasCityShort = remainingAfterProvince.includes(cityNameShort);
  362. if (hasCityFull || hasCityShort) {
  363. const cityIndex = hasCityFull
  364. ? remainingAfterProvince.indexOf(cityName)
  365. : remainingAfterProvince.indexOf(cityNameShort);
  366. if (cityIndex === -1) continue;
  367. // 获取市后的剩余地址
  368. const cityMatchLength = hasCityFull ? cityName.length : cityNameShort.length;
  369. const remainingAfterCity = remainingAfterProvince.substring(cityIndex + cityMatchLength);
  370. // 查找区/县
  371. let matchedArea = null;
  372. let maxAreaLength = 0;
  373. if (city.childs && city.childs.length > 0) {
  374. for (const area of city.childs) {
  375. const areaName = area.name;
  376. // 检查剩余地址中是否包含区/县名称
  377. if (remainingAfterCity.includes(areaName)) {
  378. // 找到最长的匹配(更准确)
  379. if (areaName.length > maxAreaLength) {
  380. maxAreaLength = areaName.length;
  381. matchedArea = areaName;
  382. }
  383. }
  384. }
  385. }
  386. // 计算匹配分数:完整省市区得3分,只有省市得2分
  387. const matchScore = matchedArea ? 3 : 2;
  388. if (matchScore > bestMatchScore) {
  389. bestMatchScore = matchScore;
  390. bestMatch = {
  391. province: provinceName,
  392. city: cityName,
  393. area: matchedArea || ''
  394. };
  395. // 如果找到了完整的省市区,可以提前返回
  396. if (matchedArea) {
  397. return bestMatch;
  398. }
  399. }
  400. }
  401. }
  402. }
  403. // 如果只找到了省份,也记录(得分1分)
  404. if (!bestMatch || bestMatchScore < 1) {
  405. bestMatch = {
  406. province: provinceName,
  407. city: '',
  408. area: ''
  409. };
  410. bestMatchScore = 1;
  411. }
  412. }
  413. }
  414. return bestMatch;
  415. },
  416. // 更新各类附件
  417. updateChatFiles(fileList) {
  418. this.form.chatAttachmentList = fileList;
  419. },
  420. updateQuoteFiles(fileList) {
  421. this.form.quoteAttachmentList = fileList;
  422. },
  423. updateHdImageFiles(fileList) {
  424. this.form.hdImageAttachmentList = fileList;
  425. },
  426. updateOtherFiles(fileList) {
  427. this.form.otherAttachmentList = fileList;
  428. },
  429. // 文件变化处理
  430. handleFileChange(data) {
  431. console.log('文件上传变化:', data);
  432. },
  433. // 获取字典数据
  434. async getDicts() {
  435. try {
  436. const [categoryRes, tacticRes, brandRes] = await Promise.all([
  437. this.$getDicts('crm_form_category'),
  438. this.$getDicts('crm_form_tactic'),
  439. this.$getDicts('crm_form_brand')
  440. ]);
  441. this.categoryDict = categoryRes;
  442. this.tacticDict = tacticRes;
  443. this.brandDict = brandRes;
  444. } catch (error) {
  445. console.error('获取字典数据失败:', error);
  446. }
  447. },
  448. // 处理保存(接口返回前禁止再次点击)
  449. async handleNavSaveClick() {
  450. if (this.saveLoading) return;
  451. try {
  452. // 表单验证
  453. await this.$refs.form.validate();
  454. this.saveLoading = true;
  455. if (this.form.id) {
  456. const updatedForm = {
  457. clueId: this.form.clueId,
  458. model: this.form.model,
  459. price: this.form.price,
  460. wechat: this.form.wechat,
  461. id: this.form.id,
  462. item: this.form.item,
  463. phone: this.form.phone,
  464. authenticateUserId: this.form.authenticateUserId,
  465. category: this.form.category,
  466. brand: this.form.brand,
  467. idCard: this.form.idCard,
  468. customName: this.form.customName,
  469. bankCardNumber: this.form.bankCardNumber,
  470. bankName: this.form.bankName,
  471. paymentMethod: this.form.paymentMethod,
  472. visitTime: this.form.visitTime,
  473. remarks: this.form.remarks,
  474. priceRange: this.form.priceRange,
  475. tactic: this.form.tactic
  476. }
  477. await uni.$u.api.updateClueOrderForm(updatedForm);
  478. uni.$emit('updateSendFormSuccess');
  479. uni.$u.toast('发单记录更新成功');
  480. } else {
  481. // 合并所有附件
  482. const allAttachments = [
  483. ...this.form.chatAttachmentList,
  484. ...this.form.quoteAttachmentList,
  485. ...this.form.hdImageAttachmentList,
  486. ...this.form.otherAttachmentList
  487. ];
  488. // 准备提交数据
  489. const submitData = {
  490. ...this.form,
  491. uploadList: allAttachments
  492. };
  493. await uni.$u.api.saveClueOrderForm(submitData);
  494. uni.$u.toast('发单记录添加成功');
  495. }
  496. // 延迟返回
  497. setTimeout(() => {
  498. uni.navigateBack();
  499. }, 1500);
  500. } catch (error) {
  501. console.error('保存失败:', error);
  502. if (error.message) {
  503. uni.$u.toast(error.message);
  504. }
  505. } finally {
  506. this.saveLoading = false;
  507. }
  508. }
  509. },
  510. onLoad(option) {
  511. console.log('option', option);
  512. const clueId = option.clueId;
  513. this.sendFormId = option.sendFormId;
  514. this.form.clueId = clueId;
  515. this.getDicts();
  516. if (option.sendFormId) {
  517. this.loadFormData(option.sendFormId);
  518. }
  519. }
  520. }
  521. </script>
  522. <style lang="scss" scoped>
  523. .oder_form_wrap {
  524. background-color: #f8f9fa;
  525. min-height: 100vh;
  526. padding-bottom: 10rpx;
  527. padding-top: 10px;
  528. padding-left: 20rpx;
  529. padding-right: 20rpx;
  530. }
  531. .upload_area {
  532. padding: 0 10rpx;
  533. }
  534. .bottom_btn {
  535. position: fixed;
  536. bottom: 0;
  537. left: 0;
  538. right: 0;
  539. padding: 20rpx;
  540. background: #fff;
  541. box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
  542. }
  543. ::v-deep .u-form-item {
  544. /* 移除底部边框 */
  545. border-bottom: none;
  546. /* 添加卡片样式 */
  547. // background-color: #fff;
  548. border-radius: 16rpx;
  549. /* 添加内边距 */
  550. padding: 10rpx;
  551. /* 确保内容不会溢出 */
  552. overflow: hidden;
  553. .u-input--square {
  554. border-radius: 20rpx;
  555. }
  556. .u-input--square:focus-within,
  557. .u-input--square.u-input--focus {
  558. border: 2rpx solid #2563eb !important;
  559. background-color: #fff !important;
  560. }
  561. }
  562. .brand_wrap {
  563. ::v-deep .u-form-item__body__right__content {
  564. border: 1px solid #dadbde;
  565. padding: 10rpx;
  566. border-radius: 20rpx;
  567. .inputWrap {
  568. border: none;
  569. }
  570. }
  571. }
  572. .address_wrap {
  573. border-radius: 20rpx;
  574. padding: 24rpx;
  575. display: flex;
  576. flex-direction: column;
  577. background-color: #fff;
  578. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
  579. margin: 0 10rpx;
  580. .address_title {
  581. display: flex;
  582. align-items: center;
  583. background-color: #fff;
  584. padding-bottom: 12rpx;
  585. gap: 16rpx;
  586. font-size: 26rpx;
  587. color: #6b7280;
  588. font-weight: 600;
  589. }
  590. ::v-deep .u-form-item {
  591. margin-bottom: 0 !important;
  592. padding: 0;
  593. .u-input--square {
  594. background-color: #f9fafb;
  595. }
  596. }
  597. ::v-deep .u-textarea--radius {
  598. border-radius: 20rpx;
  599. }
  600. .region-picker {
  601. width: 100%;
  602. }
  603. ::v-deep .u-textarea {
  604. background-color: #f9fafb;
  605. }
  606. }
  607. .visit_time_wrap {
  608. ::v-deep .uni-date-x {
  609. border-radius: 10px;
  610. padding: 8rpx 10rpx;
  611. border: 1px solid #dadbde;
  612. background-color: #f8f9fa;
  613. }
  614. }
  615. .category_wrap {
  616. .category_select_wrap {
  617. border-radius: 20rpx;
  618. border: 1px solid #dadbde;
  619. padding: 6rpx;
  620. width: 100%;
  621. ::v-deep .ldSelectInput {
  622. font-size: 28rpx !important;
  623. }
  624. }
  625. .category_select_wrap:focus-within,
  626. .category_select_wrap:focus {
  627. border: 2rpx solid #2563eb !important;
  628. background-color: #fff !important;
  629. }
  630. }
  631. .remarks_wrap {
  632. .u-textarea {
  633. background-color: #fff;
  634. }
  635. ::v-deep .u-textarea--radius {
  636. border-radius: 20rpx;
  637. }
  638. }
  639. ::v-deep .u-form-item__body {
  640. padding: 10rpx 0rpx;
  641. }
  642. ::v-deep .u-form-item__body__left__content__label {
  643. color: rgb(107 114 128 / 1) !important;
  644. font-size: 28rpx;
  645. font-weight: 700;
  646. }
  647. .u-button {
  648. border-radius: 40rpx;
  649. background-color: #2563eb;
  650. border: none;
  651. color: #fff;
  652. font-weight: 700;
  653. font-size: 40rpx;
  654. height: 100rpx;
  655. }
  656. .tactic-buttons {
  657. display: flex;
  658. justify-content: space-between;
  659. margin-top: 10rpx;
  660. width: 100%;
  661. }
  662. .tactic-button {
  663. position: relative;
  664. border-width: 3rpx;
  665. border-style: solid;
  666. border-color: #e5e7eb;
  667. width: 30%;
  668. height: 80rpx;
  669. line-height: 80rpx;
  670. text-align: center;
  671. border-radius: 30rpx;
  672. background-color: #f9fafb;
  673. color: rgb(107 114 128 / 1);
  674. font-size: 28rpx;
  675. transition: all 0.3s ease;
  676. font-weight: 700;
  677. }
  678. .tactic-button.active {
  679. border-color: #3b82f6;
  680. color: #3b82f6;
  681. background-color: #eff6ff;
  682. }
  683. .tactic-button::after {
  684. content: '';
  685. position: absolute;
  686. border-width: 5rpx;
  687. border-style: solid;
  688. border-color: #ffffff;
  689. top: 4%;
  690. right: -12%;
  691. transform: translate(-50%, -50%);
  692. width: 25rpx;
  693. height: 25rpx;
  694. border-radius: 50%;
  695. background-color: #3b82f6;
  696. opacity: 0;
  697. transition: all 0.3s ease;
  698. }
  699. .tactic-button.active::after {
  700. opacity: 1;
  701. }
  702. .u-textarea {
  703. background-color: #f5f5f5;
  704. }
  705. </style>