index.vue 22 KB

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