pageFour.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  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: data.receiptRemark.split(';')[1] || '',//物流图片 截取备注第二部分
  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.split(';')[0] || '',//收单备注 截取备注第一部分
  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: ['compressed'],
  305. sourceType: ['album', 'camera'],
  306. success: async (res) => {
  307. const tempFilePath = res.tempFilePaths[0];
  308. //把选择的图片上传给服务器,然后获取返回路径
  309. const rep = await uni.$u.api.uploadFile(tempFilePath)
  310. if (rep.code == 200) {
  311. console.log('上传成功=====>', rep.data.url)
  312. this.warehouseInfo.uploadedImage = rep.data.url
  313. }
  314. }
  315. });
  316. },
  317. // 添加分成行
  318. addSplit() {
  319. // 添加新行
  320. this.profitSharingList.push({
  321. deptId: '',
  322. accountType: '1',
  323. userId: '',
  324. personOptions: [],
  325. percentage: 0,
  326. isCompanyPerformance: '2'
  327. });
  328. // 重新计算所有行的比例
  329. this.recalculatePercentage();
  330. },
  331. // 重新计算分成比例
  332. recalculatePercentage() {
  333. // 分别计算前端和后端的行数
  334. const frontendRows = this.profitSharingList.filter(item => item.accountType === 'frontend');
  335. const backendRows = this.profitSharingList.filter(item => item.accountType === 'backend');
  336. // 计算前端平均比例
  337. if (frontendRows.length > 0) {
  338. const frontendAvg = Math.floor(100 / frontendRows.length);
  339. frontendRows.forEach(item => {
  340. item.percentage = frontendAvg;
  341. });
  342. }
  343. // 计算后端平均比例
  344. if (backendRows.length > 0) {
  345. const backendAvg = Math.floor(100 / backendRows.length);
  346. backendRows.forEach(item => {
  347. item.percentage = backendAvg;
  348. });
  349. }
  350. },
  351. // 切换账户类型
  352. toggleAccountType(item) {
  353. item.accountType = item.accountType == '1' ? '2' : '1';
  354. // 重新计算分成比例
  355. this.recalculatePercentage();
  356. },
  357. // 处理百分比输入
  358. handlePercentageInput(item) {
  359. // 确保输入是数字
  360. let value = Number(item.percentage);
  361. // 验证输入值是否在有效范围内(0-100)
  362. if (isNaN(value)) {
  363. item.percentage = 0;
  364. } else if (value < 0) {
  365. item.percentage = 0;
  366. } else if (value > 100) {
  367. item.percentage = 100;
  368. } else {
  369. // 确保是整数
  370. item.percentage = Math.floor(value);
  371. }
  372. },
  373. // 切换归属公司状态
  374. toggleBelongToCompany(item) {
  375. item.isCompanyPerformance = item.isCompanyPerformance == '1' ? '2' : '1';
  376. },
  377. // 关联选择变化时,更新分成人选项
  378. onAssociationChange(item) {
  379. if (item.deptId) {
  380. const selectedOption = this.associationOptions.find(opt => opt.id === item.deptId);
  381. item.personOptions = selectedOption ? selectedOption.children || [] : [];
  382. item.userId = '';
  383. } else {
  384. item.personOptions = [];
  385. item.userId = '';
  386. }
  387. },
  388. // 确认入库方法
  389. confirmWarehouseEntry() {
  390. // 表单校验
  391. if (this.validateProfitSharing()) {
  392. //上传表单数据
  393. this.$emit('confirmInterStore', {
  394. warehouseInfo: this.warehouseInfo,
  395. })
  396. //上传分成数据
  397. // this.addShare()
  398. }
  399. },
  400. // 分成信息校验方法
  401. validateProfitSharing() {
  402. for (let i = 0; i < this.profitSharingList.length; i++) {
  403. const item = this.profitSharingList[i];
  404. if (!item.userId || !item.userId.trim()) {
  405. uni.showToast({
  406. title: `第${i + 1}行请选择分成人`,
  407. icon: 'none'
  408. });
  409. return false;
  410. }
  411. if (item.commissionRate <= 0 || item.commissionRate > 100) {
  412. uni.showToast({
  413. title: `第${i + 1}行分成比例必须在1-100之间`,
  414. icon: 'none'
  415. });
  416. return false;
  417. }
  418. }
  419. return true;
  420. },
  421. // 获取分成人名单
  422. async getCommissionUserList() {
  423. const commissionUserList = await uni.$u.api.getCustomerManagerAllList()
  424. console.log(commissionUserList.data[0].children, '分成人名单')
  425. this.associationOptions = commissionUserList.data[0].children
  426. if (this.profitSharingList.length > 0) {
  427. this.profitSharingList = this.profitSharingList.map(item => ({
  428. ...item,
  429. personOptions: item.deptId ? this.getPersonOptionsByDeptId(item.deptId) : []
  430. }));
  431. }
  432. },
  433. //初始化分成比例
  434. async getList() {
  435. const { rows, total } = await uni.$u.api.selectCommissionList({
  436. pageSize: 9999,
  437. pageNum: 1,
  438. }, { sendFormId: this.receiptList[0].sendFormId, });
  439. this.profitSharingList = rows.map(item => {
  440. let personOptions = [];
  441. if (item.deptId) {
  442. if (this.associationOptions.length > 0) {
  443. personOptions = this.getPersonOptionsByDeptId(item.deptId);
  444. } else {
  445. personOptions = [];
  446. }
  447. }
  448. return {
  449. ...item,
  450. personOptions
  451. };
  452. });
  453. if (this.associationOptions.length === 0) {
  454. await this.getCommissionUserList();
  455. }
  456. console.log('这里是分成比例', this.profitSharingList, '总数是', total);
  457. },
  458. getPersonOptionsByDeptId(deptId) {
  459. const selectedOption = this.associationOptions.find(opt => opt.id === deptId);
  460. return selectedOption ? selectedOption.children || [] : [];
  461. },
  462. //添加分成比例
  463. async addProfitSharingList(data) {
  464. if (data.id) {
  465. //编辑
  466. await uni.$u.api.clueCommissionUpdate(data);
  467. } else {
  468. //新增
  469. await uni.$u.api.clueCommissionAdd(data);
  470. }
  471. },
  472. addShare() {
  473. console.log('开始上传')
  474. this.profitSharingList.forEach(item => {
  475. this.addProfitSharingList({
  476. id: item.id,
  477. accountType: item.accountType == '1' ? 1 : 2,
  478. clueId: this.receiptList[0].clueId,
  479. commissionRate: item.commissionRate,
  480. isCompanyPerformance: item.isCompanyPerformance == '1' ? 1 : 2,
  481. sendFormId: this.receiptList[0].sendFormId,
  482. userId: item.userId,
  483. userName: item.personOptions.find(opt => opt.id == item.userId)?.label || '',
  484. });
  485. });
  486. uni.$u.toast('上传成功')
  487. },
  488. //删除分成
  489. async deleteRow(id) {
  490. console.log(id, 'id')
  491. try {
  492. await uni.$u.api.deleteClueCommissionForm(id)
  493. uni.$u.toast('删除成功')
  494. this.getList()
  495. } catch (error) {
  496. uni.$u.toast('删除失败,请稍后重试', error)
  497. }
  498. },
  499. }
  500. };
  501. </script>
  502. <style lang="scss" scoped>
  503. // 导入公共样式
  504. @import './common.scss';
  505. // 主样式
  506. .page-container {
  507. box-sizing: border-box;
  508. padding: 0;
  509. background-color: map-get($colors, bg);
  510. font-family: map-get($font, family);
  511. -webkit-font-smoothing: map-get($font, smoothing);
  512. font-smoothing: map-get($font, smoothing);
  513. }
  514. .address-section {
  515. padding: map-get($sizes, padding-sm) map-get($sizes, padding);
  516. .u-col {
  517. padding: 0;
  518. box-sizing: border-box;
  519. }
  520. .u-col:first-child {
  521. padding-right: 15rpx;
  522. }
  523. .u-col:last-child {
  524. padding-left: 15rpx;
  525. }
  526. }
  527. // 表单行样式
  528. .info-row {
  529. margin-bottom: 20rpx;
  530. box-sizing: border-box;
  531. padding: 0;
  532. }
  533. // 表单标签样式
  534. .info-label {
  535. @include font-styles($size: tiny, $weight: regular, $color: tertiary);
  536. margin-bottom: 8rpx;
  537. display: block;
  538. }
  539. // 输入框样式
  540. .info-input {
  541. height: 65rpx;
  542. border-radius: 8rpx;
  543. border: 1rpx solid #e5e7eb;
  544. padding: 20rpx 16rpx;
  545. width: 100%;
  546. box-sizing: border-box;
  547. @include font-styles($size: small, $weight: regular, $color: secondary);
  548. // textarea特殊样式
  549. &[type="textarea"] {
  550. min-height: 160rpx;
  551. resize: vertical;
  552. padding-top: 20rpx;
  553. padding-bottom: 20rpx;
  554. }
  555. }
  556. // 防止表单label换行
  557. ::v-deep .u-form-item__body__left__content__label {
  558. white-space: nowrap;
  559. }
  560. // 图片上传样式
  561. .image-uploader {
  562. width: 100%;
  563. height: 65rpx;
  564. border: 2rpx dashed #409eff;
  565. border-radius: 8rpx;
  566. display: flex;
  567. align-items: center;
  568. justify-content: center;
  569. cursor: pointer;
  570. background-color: #ecf5ff;
  571. box-sizing: border-box;
  572. overflow: hidden;
  573. transition: all 0.3s ease;
  574. &:hover {
  575. border-color: #66b1ff;
  576. background-color: #f0f9ff;
  577. transform: scale(1.02);
  578. }
  579. }
  580. .camera-icon {
  581. margin: 0;
  582. font-size: 32rpx;
  583. color: #409eff;
  584. transition: all 0.3s ease;
  585. }
  586. .image-uploader:hover .camera-icon {
  587. color: #66b1ff;
  588. transform: scale(1.1);
  589. }
  590. .image-preview {
  591. width: 100%;
  592. height: 100%;
  593. object-fit: cover;
  594. border-radius: 10rpx;
  595. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  596. transition: all 0.3s ease;
  597. }
  598. .image-uploader:hover .image-preview {
  599. transform: scale(1.02);
  600. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
  601. }
  602. .hidden-input {
  603. display: none;
  604. }
  605. // 分成信息卡片样式
  606. .address-header {
  607. display: flex;
  608. align-items: center;
  609. justify-content: space-between;
  610. margin-bottom: 20rpx;
  611. .address-title {
  612. @include font-styles($size: small, $weight: medium, $color: primary);
  613. margin-left: 10rpx;
  614. }
  615. }
  616. .split-content {
  617. padding: 10rpx 0;
  618. }
  619. .split-item {
  620. display: flex;
  621. justify-content: space-between;
  622. align-items: center;
  623. padding: 15rpx 0;
  624. border-bottom: 1rpx solid map-get($colors, border);
  625. &:last-child {
  626. border-bottom: none;
  627. }
  628. }
  629. .split-label {
  630. @include font-styles($size: tiny, $weight: regular, $color: tertiary);
  631. }
  632. .split-value {
  633. @include font-styles($size: small, $weight: regular, $color: secondary);
  634. }
  635. .add-button {
  636. padding: 0;
  637. width: 50rpx;
  638. height: 50rpx;
  639. display: flex;
  640. align-items: center;
  641. justify-content: center;
  642. }
  643. /* 分成信息表格样式 */
  644. .split-table {
  645. width: 100%;
  646. margin-top: 20rpx;
  647. background-color: #fff;
  648. border-radius: 8rpx;
  649. overflow: hidden;
  650. }
  651. .split-table-header {
  652. background-color: #f5f7fa;
  653. padding: 15rpx 0;
  654. border-bottom: 1rpx solid #e4e7ed;
  655. }
  656. .split-table-row {
  657. padding: 15rpx 0;
  658. border-bottom: 1rpx solid #e4e7ed;
  659. align-items: center;
  660. &:last-child {
  661. border-bottom: none;
  662. }
  663. }
  664. .header-text {
  665. @include font-styles($size: tiny, $weight: regular, $color: tertiary);
  666. text-align: center;
  667. display: block;
  668. }
  669. .table-cell {
  670. display: flex;
  671. align-items: center;
  672. justify-content: center;
  673. padding: 0 10rpx;
  674. box-sizing: border-box;
  675. }
  676. .action-column {
  677. display: flex;
  678. align-items: center;
  679. justify-content: center;
  680. }
  681. /* 自定义下拉框样式 - 隐藏原生箭头 */
  682. .custom-select {
  683. width: 100%;
  684. height: 50rpx;
  685. border-radius: 0;
  686. border: 1rpx solid #e5e7eb;
  687. text-align: center;
  688. /* 增加右侧内边距,为自定义箭头留出空间 */
  689. @include font-styles($size: tiny, $weight: regular, $color: secondary);
  690. background-color: #fff;
  691. /* 确保隐藏所有浏览器的原生箭头 */
  692. appearance: none !important;
  693. -webkit-appearance: none !important;
  694. -moz-appearance: none !important;
  695. -o-appearance: none !important;
  696. cursor: pointer;
  697. /* 使用自定义SVG箭头 */
  698. background-repeat: no-repeat;
  699. background-position: right 8rpx center;
  700. background-size: 12rpx 12rpx;
  701. box-sizing: border-box;
  702. position: relative;
  703. /* 防止箭头在焦点状态下显示 */
  704. &:focus {
  705. outline: none;
  706. border-color: #409eff;
  707. box-shadow: 0 0 0 2rpx rgba(64, 158, 255, 0.2);
  708. }
  709. /* 针对IE/Edge浏览器的特殊处理 */
  710. &::-ms-expand {
  711. display: none !important;
  712. }
  713. /* 针对某些旧版浏览器的额外处理 */
  714. &::-webkit-select-arrow {
  715. display: none !important;
  716. }
  717. /* 添加伪元素覆盖可能残留的箭头 */
  718. &::after {
  719. content: '';
  720. position: absolute;
  721. right: 8rpx;
  722. top: 50%;
  723. transform: translateY(-50%);
  724. width: 12rpx;
  725. height: 12rpx;
  726. 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");
  727. background-repeat: no-repeat;
  728. background-size: 100% 100%;
  729. pointer-events: none;
  730. z-index: 1;
  731. }
  732. }
  733. /* 百分比输入框样式 */
  734. .percentage-input {
  735. text-align: center;
  736. background-color: #f9f9f9;
  737. color: #606266;
  738. text-align: center;
  739. padding: 0rpx !important;
  740. }
  741. /* 账户类型标签样式 */
  742. .account-type {
  743. padding: 4rpx 16rpx;
  744. border-radius: 12rpx;
  745. font-size: 24rpx;
  746. font-weight: 500;
  747. color: #fff;
  748. text-align: center;
  749. }
  750. .account-type.frontend {
  751. background-color: #409eff;
  752. }
  753. .account-type.backend {
  754. background-color: #909399;
  755. }
  756. /* 调整表格布局,使其更紧凑 */
  757. .split-table {
  758. width: 100%;
  759. margin-top: 10rpx;
  760. }
  761. .split-table-header,
  762. .split-table-row {
  763. padding: 10rpx 0;
  764. }
  765. .table-cell {
  766. padding: 0 5rpx;
  767. }
  768. /* 调整输入框样式 */
  769. .percentage-input {
  770. width: 80%;
  771. height: 50rpx;
  772. font-size: 28rpx;
  773. }
  774. /* 归属公司单选框样式 */
  775. .radio-wrapper {
  776. cursor: pointer;
  777. display: flex;
  778. align-items: center;
  779. justify-content: center;
  780. }
  781. .radio-circle {
  782. width: 32rpx;
  783. height: 32rpx;
  784. border-radius: 50%;
  785. border: 2rpx solid #dcdfe6;
  786. display: flex;
  787. align-items: center;
  788. justify-content: center;
  789. transition: all 0.3s ease;
  790. }
  791. .radio-circle.active {
  792. border-color: #67c23a;
  793. background-color: #67c23a;
  794. }
  795. /* 确认入库按钮样式 */
  796. .confirm-button-container {
  797. display: flex;
  798. justify-content: center;
  799. align-items: center;
  800. padding: 40rpx 0;
  801. margin-top: 20rpx;
  802. }
  803. /* 响应式布局调整 */
  804. @media screen and (max-width: 750rpx) {
  805. .split-table {
  806. overflow-x: auto;
  807. }
  808. .custom-select {
  809. width: 100%;
  810. }
  811. .account-type {
  812. padding: 2rpx 10rpx;
  813. font-size: 22rpx;
  814. }
  815. }
  816. @media screen and (min-width: 751rpx) {
  817. .table-cell {
  818. padding: 0 10rpx;
  819. }
  820. }
  821. </style>