pageFour.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976
  1. <template>
  2. <view class="page-container">
  3. <!-- 入库信息卡片 -->
  4. <view class="card_wrap">
  5. <u--form labelPosition="top" :model="warehouseInfo" ref="form" class="address-section">
  6. <view class="address-header">
  7. <u-icon name="car-fill" size="36rpx" color="#108cff" class="location-icon"></u-icon>
  8. <text class="address-title">入库信息</text>
  9. </view>
  10. <!-- 编码和快递单号同一行 -->
  11. <u-row class="info-row" justify="space-between">
  12. <u-col span="4.5">
  13. <u-form-item label="编码" prop="codeStorage">
  14. <u--input v-model="warehouseInfo.codeStorage" placeholder="请输入编码" class="info-input" />
  15. </u-form-item>
  16. </u-col>
  17. <u-col span="4.5">
  18. <u-form-item label="快递单号" prop="expressOrderNo">
  19. <u--input v-model="warehouseInfo.expressOrderNo" placeholder="请输入快递单号" class="info-input" />
  20. </u-form-item>
  21. </u-col>
  22. <u-col span="2">
  23. <u-form-item label="物流图片" prop="uploadedImage">
  24. <view class="image-uploader" @click="selectImage">
  25. <u-icon v-if="!warehouseInfo.uploadedImage" name="camera-fill" size="48rpx"
  26. color="#909399" class="camera-icon"></u-icon>
  27. <image v-else :src="warehouseInfo.uploadedImage" mode="aspectFill"
  28. class="image-preview">
  29. </image>
  30. </view>
  31. </u-form-item>
  32. </u-col>
  33. </u-row>
  34. <!-- 单独一行的收单物品 -->
  35. <u-row class="info-row">
  36. <u-col span="12">
  37. <u-form-item label="收单物品" prop="item">
  38. <u--input v-model="warehouseInfo.item" placeholder="请输入收单物品" class="info-input" />
  39. </u-form-item>
  40. </u-col>
  41. </u-row>
  42. <!-- 查码费和表款同一行 -->
  43. <u-row class="info-row" justify="space-between">
  44. <u-col span="5.8">
  45. <u-form-item label="查码费">
  46. <u--input v-model="warehouseInfo.checkCodeFee" placeholder="请输入查码费" class="info-input"
  47. type="number" />
  48. </u-form-item>
  49. </u-col>
  50. <u-col span="5.8">
  51. <u-form-item label="表款">
  52. <u--input v-model="warehouseInfo.watchPrice" placeholder="请输入表款" class="info-input"
  53. type="number" />
  54. </u-form-item>
  55. </u-col>
  56. </u-row>
  57. <u-row class="info-row" justify="space-between">
  58. <u-col span="5.8">
  59. <u-form-item label="好处费">
  60. <u--input v-model="warehouseInfo.benefitFee" placeholder="请输入好处费" class="info-input"
  61. type="number" />
  62. </u-form-item>
  63. </u-col>
  64. <u-col span="5.8">
  65. <u-form-item label="运费">
  66. <u--input v-model="warehouseInfo.freight" placeholder="请输入运费" class="info-input"
  67. type="number" />
  68. </u-form-item>
  69. </u-col>
  70. </u-row>
  71. <!-- 维修金额和毛业绩同一行 -->
  72. <u-row class="info-row" justify="space-between">
  73. <u-col span="5.8">
  74. <u-form-item label="维修金额">
  75. <u--input v-model="warehouseInfo.repairAmount" placeholder="请输入维修金额" class="info-input"
  76. type="number" />
  77. </u-form-item>
  78. </u-col>
  79. <u-col span="5.8">
  80. <u-form-item label="毛业绩">
  81. <u--input v-model="warehouseInfo.grossPerformance" placeholder="请输入毛业绩" class="info-input"
  82. type="number" />
  83. </u-form-item>
  84. </u-col>
  85. </u-row>
  86. <!-- 收单备注 -->
  87. <u-row class="info-row">
  88. <u-col span="12">
  89. <u-form-item label="收单备注">
  90. <u--textarea v-model="warehouseInfo.remarks" placeholder="请输入收单备注" class="info-input"
  91. confirmType="done" rows="4" />
  92. </u-form-item>
  93. </u-col>
  94. </u-row>
  95. </u--form>
  96. </view>
  97. <!-- 新添加的卡片 -->
  98. <view class="card_wrap">
  99. <view class="address-section">
  100. <view class="address-header">
  101. <u-icon name="list" size="36rpx" color="#108cff" class="location-icon"></u-icon>
  102. <text class="address-title">分成信息</text>
  103. <u-button type="primary" plain shape="circle" size="mini" class="add-button" @click="addSplit">
  104. <u-icon name="plus" size="24rpx" color="#108cff"></u-icon>
  105. <text>添加</text>
  106. </u-button>
  107. </view>
  108. <!-- 分成信息表格 -->
  109. <view class="split-table">
  110. <u-row class="split-table-header">
  111. <u-col span="2">
  112. <text class="header-text">关联</text>
  113. </u-col>
  114. <u-col span="2">
  115. <text class="header-text">账户类型</text>
  116. </u-col>
  117. <u-col span="2">
  118. <text class="header-text">分成人</text>
  119. </u-col>
  120. <u-col span="2">
  121. <text class="header-text">比例(%)</text>
  122. </u-col>
  123. <u-col span="2">
  124. <text class="header-text">归属公司</text>
  125. </u-col>
  126. <u-col span="2" class="action-column">
  127. <text class="header-text">操作</text>
  128. </u-col>
  129. </u-row>
  130. <u-row v-for="(item, index) in profitSharingList" :key="item.id" class="split-table-row">
  131. <u-col span="2">
  132. <view class="table-cell">
  133. <select v-model="item.deptId" class="custom-select" @change="onAssociationChange(item)">
  134. <option value="">无</option>
  135. <option v-for="option in associationOptions" :key="option.id" :value="option.id">
  136. {{ option.label }}
  137. </option>
  138. </select>
  139. </view>
  140. </u-col>
  141. <u-col span="2">
  142. <view class="table-cell">
  143. <view
  144. :class="['account-type', item.accountType === 'frontend' ? 'frontend' : 'backend']"
  145. @click="toggleAccountType(item)" style="cursor: pointer;">
  146. {{ item.accountType == '1' ? '前' : '后' }}
  147. </view>
  148. </view>
  149. </u-col>
  150. <u-col span="2">
  151. <view class="table-cell">
  152. <select v-model="item.userId" class="custom-select">
  153. <option value="">无</option>
  154. <option v-for="person in item.personOptions" :key="person.id" :value="person.id">
  155. {{ person.label }}
  156. </option>
  157. </select>
  158. </view>
  159. </u-col>
  160. <u-col span="2">
  161. <view class="table-cell">
  162. <u--input v-model="item.commissionRate" type="number" class="percentage-input"
  163. @input="handlePercentageInput(item)" min="0" max="100" precision="0" />
  164. </view>
  165. </u-col>
  166. <u-col span="2">
  167. <view class="table-cell">
  168. <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
  169. <view :class="['radio-circle', item.isCompanyPerformance == '1' ? 'active' : '']">
  170. <u-icon v-if="item.isCompanyPerformance == '1'" name="checkmark" size="20rpx"
  171. color="#fff"></u-icon>
  172. </view>
  173. </view>
  174. </view>
  175. </u-col>
  176. <u-col span="2" class="action-column">
  177. <view class="table-cell">
  178. <u-button type="error" plain shape="circle" size="mini" @click="deleteRow(item.id)">
  179. <u-icon name="trash" size="20rpx" color="#ff6b6b"></u-icon>
  180. </u-button>
  181. </view>
  182. </u-col>
  183. </u-row>
  184. </view>
  185. </view>
  186. </view>
  187. <!-- 确认入库按钮 -->
  188. <div class="confirm-button-container">
  189. <u-button type="success" @click="confirmWarehouseEntry" style="border-radius: 11px;">
  190. <u-icon name="checkmark-circle-fill" size="28rpx" color="#fff"></u-icon>
  191. <text style="margin-left: 8rpx;">确认入库</text>
  192. </u-button>
  193. </div>
  194. </view>
  195. </template>
  196. <script>
  197. export default {
  198. props: {
  199. orderDetail: {
  200. type: Object,
  201. default: () => { },
  202. },
  203. receiptList: {
  204. type: Array,
  205. default: () => { },
  206. },
  207. },
  208. watch: {
  209. receiptList: {
  210. handler(newVal) {
  211. if (newVal) {
  212. // "searchValue": null,
  213. // "createBy": "12234",
  214. // "createTime": "2025-12-25 13:39:25",
  215. // "updateBy": "12234",
  216. // "updateTime": "2025-12-27 09:33:05",
  217. // "remark": null,
  218. // "params": {},
  219. // "id": "4347",
  220. // "sendFormId": "5464",
  221. // "clueId": "1973381744953516033",
  222. // "item": "测试发单-VV", //收单物品
  223. // "brand": "LV",
  224. // "needCheckCode": 1,
  225. // "code": "111",
  226. // "paymentAmount": 99.00,
  227. // "phone": "18692257000",
  228. // "tableFee": 999999.00,
  229. // "benefitFee": 666.00, //好处费
  230. // "freight": 666666.00, //运费
  231. // "checkCodeFee": 666.00, //查码费
  232. // "totalCost": null,
  233. // "sellingPrice": 125000.00,
  234. // "performance": null,
  235. // "receiptRemark": null,
  236. // "repairAmount": 666.00, //维修金额
  237. // "grossPerformance": 666.00, //毛业绩
  238. // "expressOrderNo": "666", //快递单号
  239. // "fileIds": "",
  240. // "model": "lvvvv",
  241. // "splitRatio": null,
  242. // "customerServiceName": "1",
  243. // "deptId": "373",
  244. // "category": "2",
  245. // "delFlag": null,
  246. // "idCard": "444",
  247. // "paymentMethod": null,
  248. // "bankCardNumber": "333",
  249. // "bankName": "222",
  250. // "customName": "111"
  251. const data = newVal[0]
  252. this.warehouseInfo = {
  253. codeStorage: data.code,//编码
  254. expressOrderNo: data.expressOrderNo || '',//快递单号
  255. // uploadedImage: '',//物流图片
  256. item: data.item || '',//收单物品
  257. checkCodeFee: data.checkCodeFee || '',//查码费
  258. watchPrice: data.tableFee || '',//表款
  259. benefitFee: data.benefitFee || '',//好处费
  260. freight: data.freight || '',//运费
  261. repairAmount: data.repairAmount || '',//维修金额
  262. grossPerformance: data.grossPerformance || '',//毛业绩
  263. remarks: data.receiptRemark || '',//收单备注
  264. }
  265. this.getList()
  266. }
  267. },
  268. }
  269. },
  270. data() {
  271. return {
  272. // 入库信息相关的数据
  273. warehouseInfo: {
  274. codeStorage: '',//编码
  275. expressOrderNo: '',//快递单号
  276. uploadedImage: '',//物流图片
  277. item: '',//收单物品
  278. checkCodeFee: '',//查码费
  279. watchPrice: '',//表款
  280. benefitFee: '',//好处费
  281. freight: '',//运费
  282. repairAmount: '',//维修金额
  283. grossPerformance: '',//毛业绩
  284. remarks: '',//收单备注
  285. },
  286. // 分成信息相关的数据
  287. profitSharingList: [
  288. {
  289. searchValue: null,
  290. createBy: null,
  291. createTime: "2025-12-27 13:20:35",
  292. updateBy: null,
  293. updateTime: null,
  294. remark: null,
  295. params: {},
  296. id: "2004784451068899330",
  297. sendFormId: "5464",
  298. deptId: "",
  299. accountType: "1",
  300. userId: "",
  301. userName: "小石",
  302. commissionRate: 100.00,
  303. delFlag: null,
  304. clueId: null,
  305. receiptFormId: null,
  306. isCompanyPerformance: "2",
  307. orgName: "运营部",
  308. type: null,
  309. item: "测试发单-VV",
  310. phone: "18692257000",
  311. receiptNickName: "开发账号",
  312. commissionAmount: null,
  313. grossAmount: null,
  314. tableFee: "0",
  315. benefitFee: "0",
  316. freight: "0",
  317. checkCodeFee: "0",
  318. totalCost: "0",
  319. sellingPrice: "0",
  320. receiptDate: "2025-12-27 13:19:25",
  321. receiptItem: null,
  322. category: "首饰",
  323. brand: null,
  324. code: null,
  325. paymentMethod: null,
  326. customerServiceName: "其他",
  327. identificationName: null,
  328. identification: null,
  329. nickName: null,
  330. personOptions: []
  331. }
  332. ],
  333. // 关联选项列表
  334. associationOptions: [],
  335. // 分成人选项列表
  336. personOptions: [],
  337. // 表单验证规则
  338. };
  339. },
  340. mounted() {
  341. // 获取分成人名单
  342. this.getCommissionUserList();
  343. },
  344. methods: {
  345. // 选择图片
  346. selectImage() {
  347. uni.chooseImage({
  348. count: 1,
  349. sizeType: ['original', 'compressed'],
  350. sourceType: ['album', 'camera'],
  351. success: (res) => {
  352. const tempFilePath = res.tempFilePaths[0];
  353. this.warehouseInfo.uploadedImage = tempFilePath;
  354. }
  355. });
  356. },
  357. // 添加分成行
  358. addSplit() {
  359. // 生成唯一ID
  360. const newId = Date.now() + '_' + (this.profitSharingList.length + 1);
  361. // 添加新行
  362. this.profitSharingList.push({
  363. id: newId,
  364. association: '',
  365. accountType: 'frontend',
  366. person: '',
  367. personOptions: [],
  368. percentage: 0,
  369. belongToCompany: false
  370. });
  371. // 重新计算所有行的比例
  372. this.recalculatePercentage();
  373. },
  374. // 重新计算分成比例
  375. recalculatePercentage() {
  376. // 分别计算前端和后端的行数
  377. const frontendRows = this.profitSharingList.filter(item => item.accountType === 'frontend');
  378. const backendRows = this.profitSharingList.filter(item => item.accountType === 'backend');
  379. // 计算前端平均比例
  380. if (frontendRows.length > 0) {
  381. const frontendAvg = Math.floor(100 / frontendRows.length);
  382. frontendRows.forEach(item => {
  383. item.percentage = frontendAvg;
  384. });
  385. }
  386. // 计算后端平均比例
  387. if (backendRows.length > 0) {
  388. const backendAvg = Math.floor(100 / backendRows.length);
  389. backendRows.forEach(item => {
  390. item.percentage = backendAvg;
  391. });
  392. }
  393. },
  394. // 切换账户类型
  395. toggleAccountType(item) {
  396. item.accountType = item.accountType === 'frontend' ? 'backend' : 'frontend';
  397. // 重新计算分成比例
  398. this.recalculatePercentage();
  399. },
  400. // 处理百分比输入
  401. handlePercentageInput(item) {
  402. // 确保输入是数字
  403. let value = Number(item.percentage);
  404. // 验证输入值是否在有效范围内(0-100)
  405. if (isNaN(value)) {
  406. item.percentage = 0;
  407. } else if (value < 0) {
  408. item.percentage = 0;
  409. } else if (value > 100) {
  410. item.percentage = 100;
  411. } else {
  412. // 确保是整数
  413. item.percentage = Math.floor(value);
  414. }
  415. },
  416. // 切换归属公司状态
  417. toggleBelongToCompany(item) {
  418. item.belongToCompany = !item.belongToCompany;
  419. },
  420. // 关联选择变化时,更新分成人选项
  421. onAssociationChange(item) {
  422. if (item.deptId) {
  423. const selectedOption = this.associationOptions.find(opt => opt.id === item.deptId);
  424. item.personOptions = selectedOption ? selectedOption.children || [] : [];
  425. item.userId = '';
  426. } else {
  427. item.personOptions = [];
  428. item.userId = '';
  429. }
  430. },
  431. // 确认入库方法
  432. confirmWarehouseEntry() {
  433. // 表单校验
  434. if (this.validateProfitSharing()) {
  435. this.$emit('confirmInterStore', {
  436. warehouseInfo: this.warehouseInfo,
  437. })
  438. this.addShare()
  439. }
  440. },
  441. // 分成信息校验方法
  442. validateProfitSharing() {
  443. for (let i = 0; i < this.profitSharingList.length; i++) {
  444. const item = this.profitSharingList[i];
  445. if (!item.userId || !item.userId.trim()) {
  446. uni.showToast({
  447. title: `第${i + 1}行请选择分成人`,
  448. icon: 'none'
  449. });
  450. return false;
  451. }
  452. if (item.commissionRate <= 0 || item.commissionRate > 100) {
  453. uni.showToast({
  454. title: `第${i + 1}行分成比例必须在1-100之间`,
  455. icon: 'none'
  456. });
  457. return false;
  458. }
  459. }
  460. // 校验前端分成比例总和必须是100%
  461. const frontendTotal = this.profitSharingList
  462. .filter(item => item.accountType === '1')
  463. .reduce((sum, item) => sum + Number(item.commissionRate), 0);
  464. if (frontendTotal !== 100) {
  465. uni.showToast({
  466. title: '前端分成比例总和必须为100%',
  467. icon: 'none'
  468. });
  469. return false;
  470. }
  471. // 校验后端分成比例总和必须是100%
  472. const backendTotal = this.profitSharingList
  473. .filter(item => item.accountType === '2')
  474. .reduce((sum, item) => sum + Number(item.commissionRate), 0);
  475. if (backendTotal !== 100) {
  476. uni.showToast({
  477. title: '后端分成比例总和必须为100%',
  478. icon: 'none'
  479. });
  480. return false;
  481. }
  482. return true;
  483. },
  484. // 获取分成人名单
  485. async getCommissionUserList() {
  486. const commissionUserList = await uni.$u.api.getCustomerManagerAllList()
  487. console.log(commissionUserList.data[0].children, '分成人名单')
  488. this.associationOptions = commissionUserList.data[0].children
  489. if (this.profitSharingList.length > 0) {
  490. this.profitSharingList = this.profitSharingList.map(item => ({
  491. ...item,
  492. personOptions: item.deptId ? this.getPersonOptionsByDeptId(item.deptId) : []
  493. }));
  494. }
  495. },
  496. //初始化分成比例
  497. async getList() {
  498. const { rows, total } = await uni.$u.api.selectCommissionList({
  499. pageSize: 9999,
  500. pageNum: 1,
  501. }, { sendFormId: this.receiptList[0].sendFormId, });
  502. this.profitSharingList = rows.map(item => {
  503. let personOptions = [];
  504. if (item.deptId) {
  505. if (this.associationOptions.length > 0) {
  506. personOptions = this.getPersonOptionsByDeptId(item.deptId);
  507. } else {
  508. personOptions = [];
  509. }
  510. }
  511. return {
  512. ...item,
  513. personOptions
  514. };
  515. });
  516. if (this.associationOptions.length === 0) {
  517. await this.getCommissionUserList();
  518. }
  519. console.log('这里是分成比例', this.profitSharingList, '总数是', total);
  520. },
  521. getPersonOptionsByDeptId(deptId) {
  522. const selectedOption = this.associationOptions.find(opt => opt.id === deptId);
  523. return selectedOption ? selectedOption.children || [] : [];
  524. },
  525. //添加分成比例
  526. async addProfitSharingList(data) {
  527. await uni.$u.api.clueCommissionAdd(data);
  528. },
  529. addShare() {
  530. console.log('开始上传')
  531. // 遍历分成比例列表
  532. this.profitSharingList.forEach(item => {
  533. console.log(item, 'item')
  534. // 调用添加分成比例接口
  535. this.addProfitSharingList({
  536. // 账户类型:1(前端)/2(后端)
  537. accountType: item.accountType === 'frontend' ? 1 : 2,
  538. // 线索ID
  539. clueId: this.receiptList[0].clueId,
  540. // 分成比例 数字
  541. commissionRate: item.percentage,
  542. // 主键ID ???
  543. // id: item.id,
  544. // 是否归属公司 是1,否2
  545. isCompanyPerformance: item.belongToCompany ? 1 : 2,
  546. // 收据表单ID
  547. // receiptFormId: this.receiptList[0].id,
  548. // 发送表单ID
  549. sendFormId: this.receiptList[0].sendFormId,
  550. // 用户ID
  551. userId: item.person,
  552. // 需要根据userId去关联选项列表中找
  553. userName: item.personOptions.find(opt => opt.id == item.person)?.label || '',
  554. });
  555. });
  556. },
  557. //删除分成
  558. async deleteRow(id) {
  559. console.log(id, 'id')
  560. try {
  561. await uni.$u.api.deleteClueCommissionForm(id)
  562. uni.$u.toast('删除成功')
  563. this.getList()
  564. } catch (error) {
  565. uni.$u.toast('删除失败,请稍后重试', error)
  566. }
  567. },
  568. }
  569. };
  570. </script>
  571. <style lang="scss" scoped>
  572. // 导入公共样式
  573. @import './common.scss';
  574. // 主样式
  575. .page-container {
  576. box-sizing: border-box;
  577. padding: 0;
  578. background-color: map-get($colors, bg);
  579. font-family: map-get($font, family);
  580. -webkit-font-smoothing: map-get($font, smoothing);
  581. font-smoothing: map-get($font, smoothing);
  582. }
  583. .address-section {
  584. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  585. .u-col {
  586. padding: 0;
  587. box-sizing: border-box;
  588. }
  589. .u-col:first-child {
  590. padding-right: 15rpx;
  591. }
  592. .u-col:last-child {
  593. padding-left: 15rpx;
  594. }
  595. }
  596. // 表单行样式
  597. .info-row {
  598. margin-bottom: 20rpx;
  599. box-sizing: border-box;
  600. padding: 0;
  601. }
  602. // 表单标签样式
  603. .info-label {
  604. @include font-styles($size: tiny, $weight: regular, $color: tertiary);
  605. margin-bottom: 8rpx;
  606. display: block;
  607. }
  608. // 输入框样式
  609. .info-input {
  610. height: 65rpx;
  611. border-radius: 8rpx;
  612. border: 1rpx solid #e5e7eb;
  613. padding: 20rpx 16rpx;
  614. width: 100%;
  615. box-sizing: border-box;
  616. @include font-styles($size: small, $weight: regular, $color: secondary);
  617. // textarea特殊样式
  618. &[type="textarea"] {
  619. min-height: 160rpx;
  620. resize: vertical;
  621. padding-top: 20rpx;
  622. padding-bottom: 20rpx;
  623. }
  624. }
  625. // 防止表单label换行
  626. ::v-deep .u-form-item__body__left__content__label {
  627. white-space: nowrap;
  628. }
  629. // 图片上传样式
  630. .image-uploader {
  631. width: 100%;
  632. height: 65rpx;
  633. border: 2rpx dashed #409eff;
  634. border-radius: 8rpx;
  635. display: flex;
  636. align-items: center;
  637. justify-content: center;
  638. cursor: pointer;
  639. background-color: #ecf5ff;
  640. box-sizing: border-box;
  641. overflow: hidden;
  642. transition: all 0.3s ease;
  643. &:hover {
  644. border-color: #66b1ff;
  645. background-color: #f0f9ff;
  646. transform: scale(1.02);
  647. }
  648. }
  649. .camera-icon {
  650. margin: 0;
  651. font-size: 32rpx;
  652. color: #409eff;
  653. transition: all 0.3s ease;
  654. }
  655. .image-uploader:hover .camera-icon {
  656. color: #66b1ff;
  657. transform: scale(1.1);
  658. }
  659. .image-preview {
  660. width: 100%;
  661. height: 100%;
  662. object-fit: cover;
  663. border-radius: 10rpx;
  664. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  665. transition: all 0.3s ease;
  666. }
  667. .image-uploader:hover .image-preview {
  668. transform: scale(1.02);
  669. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
  670. }
  671. .hidden-input {
  672. display: none;
  673. }
  674. // 分成信息卡片样式
  675. .address-header {
  676. display: flex;
  677. align-items: center;
  678. justify-content: space-between;
  679. margin-bottom: 20rpx;
  680. .address-title {
  681. @include font-styles($size: small, $weight: medium, $color: primary);
  682. margin-left: 10rpx;
  683. }
  684. }
  685. .split-content {
  686. padding: 10rpx 0;
  687. }
  688. .split-item {
  689. display: flex;
  690. justify-content: space-between;
  691. align-items: center;
  692. padding: 15rpx 0;
  693. border-bottom: 1rpx solid map-get($colors, border);
  694. &:last-child {
  695. border-bottom: none;
  696. }
  697. }
  698. .split-label {
  699. @include font-styles($size: tiny, $weight: regular, $color: tertiary);
  700. }
  701. .split-value {
  702. @include font-styles($size: small, $weight: regular, $color: secondary);
  703. }
  704. .add-button {
  705. padding: 0;
  706. width: 50rpx;
  707. height: 50rpx;
  708. display: flex;
  709. align-items: center;
  710. justify-content: center;
  711. }
  712. /* 分成信息表格样式 */
  713. .split-table {
  714. width: 100%;
  715. margin-top: 20rpx;
  716. background-color: #fff;
  717. border-radius: 8rpx;
  718. overflow: hidden;
  719. }
  720. .split-table-header {
  721. background-color: #f5f7fa;
  722. padding: 15rpx 0;
  723. border-bottom: 1rpx solid #e4e7ed;
  724. }
  725. .split-table-row {
  726. padding: 15rpx 0;
  727. border-bottom: 1rpx solid #e4e7ed;
  728. align-items: center;
  729. &:last-child {
  730. border-bottom: none;
  731. }
  732. }
  733. .header-text {
  734. @include font-styles($size: tiny, $weight: regular, $color: tertiary);
  735. text-align: center;
  736. display: block;
  737. }
  738. .table-cell {
  739. display: flex;
  740. align-items: center;
  741. justify-content: center;
  742. padding: 0 10rpx;
  743. box-sizing: border-box;
  744. }
  745. .action-column {
  746. display: flex;
  747. align-items: center;
  748. justify-content: center;
  749. }
  750. /* 自定义下拉框样式 - 隐藏原生箭头 */
  751. .custom-select {
  752. width: 100%;
  753. height: 50rpx;
  754. border-radius: 0;
  755. border: 1rpx solid #e5e7eb;
  756. text-align: center;
  757. /* 增加右侧内边距,为自定义箭头留出空间 */
  758. @include font-styles($size: tiny, $weight: regular, $color: secondary);
  759. background-color: #fff;
  760. /* 确保隐藏所有浏览器的原生箭头 */
  761. appearance: none !important;
  762. -webkit-appearance: none !important;
  763. -moz-appearance: none !important;
  764. -o-appearance: none !important;
  765. cursor: pointer;
  766. /* 使用自定义SVG箭头 */
  767. background-repeat: no-repeat;
  768. background-position: right 8rpx center;
  769. background-size: 12rpx 12rpx;
  770. box-sizing: border-box;
  771. position: relative;
  772. /* 防止箭头在焦点状态下显示 */
  773. &:focus {
  774. outline: none;
  775. border-color: #409eff;
  776. box-shadow: 0 0 0 2rpx rgba(64, 158, 255, 0.2);
  777. }
  778. /* 针对IE/Edge浏览器的特殊处理 */
  779. &::-ms-expand {
  780. display: none !important;
  781. }
  782. /* 针对某些旧版浏览器的额外处理 */
  783. &::-webkit-select-arrow {
  784. display: none !important;
  785. }
  786. /* 添加伪元素覆盖可能残留的箭头 */
  787. &::after {
  788. content: '';
  789. position: absolute;
  790. right: 8rpx;
  791. top: 50%;
  792. transform: translateY(-50%);
  793. width: 12rpx;
  794. height: 12rpx;
  795. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23909399' d='M6 8l-4-4h8z'/%3E%3C/svg%3E");
  796. background-repeat: no-repeat;
  797. background-size: 100% 100%;
  798. pointer-events: none;
  799. z-index: 1;
  800. }
  801. }
  802. /* 百分比输入框样式 */
  803. .percentage-input {
  804. text-align: center;
  805. background-color: #f9f9f9;
  806. color: #606266;
  807. text-align: center;
  808. padding: 0rpx !important;
  809. }
  810. /* 账户类型标签样式 */
  811. .account-type {
  812. padding: 4rpx 16rpx;
  813. border-radius: 12rpx;
  814. font-size: 24rpx;
  815. font-weight: 500;
  816. color: #fff;
  817. text-align: center;
  818. }
  819. .account-type.frontend {
  820. background-color: #409eff;
  821. }
  822. .account-type.backend {
  823. background-color: #909399;
  824. }
  825. /* 调整表格布局,使其更紧凑 */
  826. .split-table {
  827. width: 100%;
  828. margin-top: 10rpx;
  829. }
  830. .split-table-header,
  831. .split-table-row {
  832. padding: 10rpx 0;
  833. }
  834. .table-cell {
  835. padding: 0 5rpx;
  836. }
  837. /* 调整输入框样式 */
  838. .percentage-input {
  839. width: 80%;
  840. height: 50rpx;
  841. font-size: 28rpx;
  842. }
  843. /* 归属公司单选框样式 */
  844. .radio-wrapper {
  845. cursor: pointer;
  846. display: flex;
  847. align-items: center;
  848. justify-content: center;
  849. }
  850. .radio-circle {
  851. width: 32rpx;
  852. height: 32rpx;
  853. border-radius: 50%;
  854. border: 2rpx solid #dcdfe6;
  855. display: flex;
  856. align-items: center;
  857. justify-content: center;
  858. transition: all 0.3s ease;
  859. }
  860. .radio-circle.active {
  861. border-color: #67c23a;
  862. background-color: #67c23a;
  863. }
  864. /* 确认入库按钮样式 */
  865. .confirm-button-container {
  866. display: flex;
  867. justify-content: center;
  868. align-items: center;
  869. padding: 40rpx 0;
  870. margin-top: 20rpx;
  871. }
  872. /* 响应式布局调整 */
  873. @media screen and (max-width: 750rpx) {
  874. .split-table {
  875. overflow-x: auto;
  876. }
  877. .custom-select {
  878. width: 100%;
  879. }
  880. .account-type {
  881. padding: 2rpx 10rpx;
  882. font-size: 22rpx;
  883. }
  884. }
  885. @media screen and (min-width: 751rpx) {
  886. .table-cell {
  887. padding: 0 10rpx;
  888. }
  889. }
  890. </style>