pageFour.vue 31 KB

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