index.vue 21 KB

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