| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976 |
- <template>
- <view class="page-container">
- <!-- 入库信息卡片 -->
- <view class="card_wrap">
- <u--form labelPosition="top" :model="warehouseInfo" ref="form" class="address-section">
- <view class="address-header">
- <u-icon name="car-fill" size="36rpx" color="#108cff" class="location-icon"></u-icon>
- <text class="address-title">入库信息</text>
- </view>
- <!-- 编码和快递单号同一行 -->
- <u-row class="info-row" justify="space-between">
- <u-col span="4.5">
- <u-form-item label="编码" prop="codeStorage">
- <u--input v-model="warehouseInfo.codeStorage" placeholder="请输入编码" class="info-input" />
- </u-form-item>
- </u-col>
- <u-col span="4.5">
- <u-form-item label="快递单号" prop="expressOrderNo">
- <u--input v-model="warehouseInfo.expressOrderNo" placeholder="请输入快递单号" class="info-input" />
- </u-form-item>
- </u-col>
- <u-col span="2">
- <u-form-item label="物流图片" prop="uploadedImage">
- <view class="image-uploader" @click="selectImage">
- <u-icon v-if="!warehouseInfo.uploadedImage" name="camera-fill" size="48rpx"
- color="#909399" class="camera-icon"></u-icon>
- <image v-else :src="warehouseInfo.uploadedImage" mode="aspectFill"
- class="image-preview">
- </image>
- </view>
- </u-form-item>
- </u-col>
- </u-row>
- <!-- 单独一行的收单物品 -->
- <u-row class="info-row">
- <u-col span="12">
- <u-form-item label="收单物品" prop="item">
- <u--input v-model="warehouseInfo.item" placeholder="请输入收单物品" class="info-input" />
- </u-form-item>
- </u-col>
- </u-row>
- <!-- 查码费和表款同一行 -->
- <u-row class="info-row" justify="space-between">
- <u-col span="5.8">
- <u-form-item label="查码费">
- <u--input v-model="warehouseInfo.checkCodeFee" placeholder="请输入查码费" class="info-input"
- type="number" />
- </u-form-item>
- </u-col>
- <u-col span="5.8">
- <u-form-item label="表款">
- <u--input v-model="warehouseInfo.watchPrice" placeholder="请输入表款" class="info-input"
- type="number" />
- </u-form-item>
- </u-col>
- </u-row>
- <u-row class="info-row" justify="space-between">
- <u-col span="5.8">
- <u-form-item label="好处费">
- <u--input v-model="warehouseInfo.benefitFee" placeholder="请输入好处费" class="info-input"
- type="number" />
- </u-form-item>
- </u-col>
- <u-col span="5.8">
- <u-form-item label="运费">
- <u--input v-model="warehouseInfo.freight" placeholder="请输入运费" class="info-input"
- type="number" />
- </u-form-item>
- </u-col>
- </u-row>
- <!-- 维修金额和毛业绩同一行 -->
- <u-row class="info-row" justify="space-between">
- <u-col span="5.8">
- <u-form-item label="维修金额">
- <u--input v-model="warehouseInfo.repairAmount" placeholder="请输入维修金额" class="info-input"
- type="number" />
- </u-form-item>
- </u-col>
- <u-col span="5.8">
- <u-form-item label="毛业绩">
- <u--input v-model="warehouseInfo.grossPerformance" placeholder="请输入毛业绩" class="info-input"
- type="number" />
- </u-form-item>
- </u-col>
- </u-row>
- <!-- 收单备注 -->
- <u-row class="info-row">
- <u-col span="12">
- <u-form-item label="收单备注">
- <u--textarea v-model="warehouseInfo.remarks" placeholder="请输入收单备注" class="info-input"
- confirmType="done" rows="4" />
- </u-form-item>
- </u-col>
- </u-row>
- </u--form>
- </view>
- <!-- 新添加的卡片 -->
- <view class="card_wrap">
- <view class="address-section">
- <view class="address-header">
- <u-icon name="list" size="36rpx" color="#108cff" class="location-icon"></u-icon>
- <text class="address-title">分成信息</text>
- <u-button type="primary" plain shape="circle" size="mini" class="add-button" @click="addSplit">
- <u-icon name="plus" size="24rpx" color="#108cff"></u-icon>
- <text>添加</text>
- </u-button>
- </view>
- <!-- 分成信息表格 -->
- <view class="split-table">
- <u-row class="split-table-header">
- <u-col span="2">
- <text class="header-text">关联</text>
- </u-col>
- <u-col span="2">
- <text class="header-text">账户类型</text>
- </u-col>
- <u-col span="2">
- <text class="header-text">分成人</text>
- </u-col>
- <u-col span="2">
- <text class="header-text">比例(%)</text>
- </u-col>
- <u-col span="2">
- <text class="header-text">归属公司</text>
- </u-col>
- <u-col span="2" class="action-column">
- <text class="header-text">操作</text>
- </u-col>
- </u-row>
- <u-row v-for="(item, index) in profitSharingList" :key="item.id" class="split-table-row">
- <u-col span="2">
- <view class="table-cell">
- <select v-model="item.deptId" class="custom-select" @change="onAssociationChange(item)">
- <option value="">无</option>
- <option v-for="option in associationOptions" :key="option.id" :value="option.id">
- {{ option.label }}
- </option>
- </select>
- </view>
- </u-col>
- <u-col span="2">
- <view class="table-cell">
- <view
- :class="['account-type', item.accountType === 'frontend' ? 'frontend' : 'backend']"
- @click="toggleAccountType(item)" style="cursor: pointer;">
- {{ item.accountType == '1' ? '前' : '后' }}
- </view>
- </view>
- </u-col>
- <u-col span="2">
- <view class="table-cell">
- <select v-model="item.userId" class="custom-select">
- <option value="">无</option>
- <option v-for="person in item.personOptions" :key="person.id" :value="person.id">
- {{ person.label }}
- </option>
- </select>
- </view>
- </u-col>
- <u-col span="2">
- <view class="table-cell">
- <u--input v-model="item.commissionRate" type="number" class="percentage-input"
- @input="handlePercentageInput(item)" min="0" max="100" precision="0" />
- </view>
- </u-col>
- <u-col span="2">
- <view class="table-cell">
- <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
- <view :class="['radio-circle', item.isCompanyPerformance == '1' ? 'active' : '']">
- <u-icon v-if="item.isCompanyPerformance == '1'" name="checkmark" size="20rpx"
- color="#fff"></u-icon>
- </view>
- </view>
- </view>
- </u-col>
- <u-col span="2" class="action-column">
- <view class="table-cell">
- <u-button type="error" plain shape="circle" size="mini" @click="deleteRow(item.id)">
- <u-icon name="trash" size="20rpx" color="#ff6b6b"></u-icon>
- </u-button>
- </view>
- </u-col>
- </u-row>
- </view>
- </view>
- </view>
- <!-- 确认入库按钮 -->
- <div class="confirm-button-container">
- <u-button type="success" @click="confirmWarehouseEntry" style="border-radius: 11px;">
- <u-icon name="checkmark-circle-fill" size="28rpx" color="#fff"></u-icon>
- <text style="margin-left: 8rpx;">确认入库</text>
- </u-button>
- </div>
- </view>
- </template>
- <script>
- export default {
- props: {
- orderDetail: {
- type: Object,
- default: () => { },
- },
- receiptList: {
- type: Array,
- default: () => { },
- },
- },
- watch: {
- receiptList: {
- handler(newVal) {
- if (newVal) {
- // "searchValue": null,
- // "createBy": "12234",
- // "createTime": "2025-12-25 13:39:25",
- // "updateBy": "12234",
- // "updateTime": "2025-12-27 09:33:05",
- // "remark": null,
- // "params": {},
- // "id": "4347",
- // "sendFormId": "5464",
- // "clueId": "1973381744953516033",
- // "item": "测试发单-VV", //收单物品
- // "brand": "LV",
- // "needCheckCode": 1,
- // "code": "111",
- // "paymentAmount": 99.00,
- // "phone": "18692257000",
- // "tableFee": 999999.00,
- // "benefitFee": 666.00, //好处费
- // "freight": 666666.00, //运费
- // "checkCodeFee": 666.00, //查码费
- // "totalCost": null,
- // "sellingPrice": 125000.00,
- // "performance": null,
- // "receiptRemark": null,
- // "repairAmount": 666.00, //维修金额
- // "grossPerformance": 666.00, //毛业绩
- // "expressOrderNo": "666", //快递单号
- // "fileIds": "",
- // "model": "lvvvv",
- // "splitRatio": null,
- // "customerServiceName": "1",
- // "deptId": "373",
- // "category": "2",
- // "delFlag": null,
- // "idCard": "444",
- // "paymentMethod": null,
- // "bankCardNumber": "333",
- // "bankName": "222",
- // "customName": "111"
- const data = newVal[0]
- this.warehouseInfo = {
- codeStorage: data.code,//编码
- expressOrderNo: data.expressOrderNo || '',//快递单号
- // uploadedImage: '',//物流图片
- item: data.item || '',//收单物品
- checkCodeFee: data.checkCodeFee || '',//查码费
- watchPrice: data.tableFee || '',//表款
- benefitFee: data.benefitFee || '',//好处费
- freight: data.freight || '',//运费
- repairAmount: data.repairAmount || '',//维修金额
- grossPerformance: data.grossPerformance || '',//毛业绩
- remarks: data.receiptRemark || '',//收单备注
- }
- this.getList()
- }
- },
- }
- },
- data() {
- return {
- // 入库信息相关的数据
- warehouseInfo: {
- codeStorage: '',//编码
- expressOrderNo: '',//快递单号
- uploadedImage: '',//物流图片
- item: '',//收单物品
- checkCodeFee: '',//查码费
- watchPrice: '',//表款
- benefitFee: '',//好处费
- freight: '',//运费
- repairAmount: '',//维修金额
- grossPerformance: '',//毛业绩
- remarks: '',//收单备注
- },
- // 分成信息相关的数据
- profitSharingList: [
- {
- searchValue: null,
- createBy: null,
- createTime: "2025-12-27 13:20:35",
- updateBy: null,
- updateTime: null,
- remark: null,
- params: {},
- id: "2004784451068899330",
- sendFormId: "5464",
- deptId: "",
- accountType: "1",
- userId: "",
- userName: "小石",
- commissionRate: 100.00,
- delFlag: null,
- clueId: null,
- receiptFormId: null,
- isCompanyPerformance: "2",
- orgName: "运营部",
- type: null,
- item: "测试发单-VV",
- phone: "18692257000",
- receiptNickName: "开发账号",
- commissionAmount: null,
- grossAmount: null,
- tableFee: "0",
- benefitFee: "0",
- freight: "0",
- checkCodeFee: "0",
- totalCost: "0",
- sellingPrice: "0",
- receiptDate: "2025-12-27 13:19:25",
- receiptItem: null,
- category: "首饰",
- brand: null,
- code: null,
- paymentMethod: null,
- customerServiceName: "其他",
- identificationName: null,
- identification: null,
- nickName: null,
- personOptions: []
- }
- ],
- // 关联选项列表
- associationOptions: [],
- // 分成人选项列表
- personOptions: [],
- // 表单验证规则
- };
- },
- mounted() {
- // 获取分成人名单
- this.getCommissionUserList();
- },
- methods: {
- // 选择图片
- selectImage() {
- uni.chooseImage({
- count: 1,
- sizeType: ['original', 'compressed'],
- sourceType: ['album', 'camera'],
- success: (res) => {
- const tempFilePath = res.tempFilePaths[0];
- this.warehouseInfo.uploadedImage = tempFilePath;
- }
- });
- },
- // 添加分成行
- addSplit() {
- // 生成唯一ID
- const newId = Date.now() + '_' + (this.profitSharingList.length + 1);
- // 添加新行
- this.profitSharingList.push({
- id: newId,
- association: '',
- accountType: 'frontend',
- person: '',
- personOptions: [],
- percentage: 0,
- belongToCompany: false
- });
- // 重新计算所有行的比例
- this.recalculatePercentage();
- },
- // 重新计算分成比例
- recalculatePercentage() {
- // 分别计算前端和后端的行数
- const frontendRows = this.profitSharingList.filter(item => item.accountType === 'frontend');
- const backendRows = this.profitSharingList.filter(item => item.accountType === 'backend');
- // 计算前端平均比例
- if (frontendRows.length > 0) {
- const frontendAvg = Math.floor(100 / frontendRows.length);
- frontendRows.forEach(item => {
- item.percentage = frontendAvg;
- });
- }
- // 计算后端平均比例
- if (backendRows.length > 0) {
- const backendAvg = Math.floor(100 / backendRows.length);
- backendRows.forEach(item => {
- item.percentage = backendAvg;
- });
- }
- },
- // 切换账户类型
- toggleAccountType(item) {
- item.accountType = item.accountType === 'frontend' ? 'backend' : 'frontend';
- // 重新计算分成比例
- this.recalculatePercentage();
- },
- // 处理百分比输入
- handlePercentageInput(item) {
- // 确保输入是数字
- let value = Number(item.percentage);
- // 验证输入值是否在有效范围内(0-100)
- if (isNaN(value)) {
- item.percentage = 0;
- } else if (value < 0) {
- item.percentage = 0;
- } else if (value > 100) {
- item.percentage = 100;
- } else {
- // 确保是整数
- item.percentage = Math.floor(value);
- }
- },
- // 切换归属公司状态
- toggleBelongToCompany(item) {
- item.belongToCompany = !item.belongToCompany;
- },
- // 关联选择变化时,更新分成人选项
- onAssociationChange(item) {
- if (item.deptId) {
- const selectedOption = this.associationOptions.find(opt => opt.id === item.deptId);
- item.personOptions = selectedOption ? selectedOption.children || [] : [];
- item.userId = '';
- } else {
- item.personOptions = [];
- item.userId = '';
- }
- },
- // 确认入库方法
- confirmWarehouseEntry() {
- // 表单校验
- if (this.validateProfitSharing()) {
- this.$emit('confirmInterStore', {
- warehouseInfo: this.warehouseInfo,
- })
- this.addShare()
- }
- },
- // 分成信息校验方法
- validateProfitSharing() {
- for (let i = 0; i < this.profitSharingList.length; i++) {
- const item = this.profitSharingList[i];
- if (!item.userId || !item.userId.trim()) {
- uni.showToast({
- title: `第${i + 1}行请选择分成人`,
- icon: 'none'
- });
- return false;
- }
- if (item.commissionRate <= 0 || item.commissionRate > 100) {
- uni.showToast({
- title: `第${i + 1}行分成比例必须在1-100之间`,
- icon: 'none'
- });
- return false;
- }
- }
- // 校验前端分成比例总和必须是100%
- const frontendTotal = this.profitSharingList
- .filter(item => item.accountType === '1')
- .reduce((sum, item) => sum + Number(item.commissionRate), 0);
- if (frontendTotal !== 100) {
- uni.showToast({
- title: '前端分成比例总和必须为100%',
- icon: 'none'
- });
- return false;
- }
- // 校验后端分成比例总和必须是100%
- const backendTotal = this.profitSharingList
- .filter(item => item.accountType === '2')
- .reduce((sum, item) => sum + Number(item.commissionRate), 0);
- if (backendTotal !== 100) {
- uni.showToast({
- title: '后端分成比例总和必须为100%',
- icon: 'none'
- });
- return false;
- }
- return true;
- },
- // 获取分成人名单
- async getCommissionUserList() {
- const commissionUserList = await uni.$u.api.getCustomerManagerAllList()
- console.log(commissionUserList.data[0].children, '分成人名单')
- this.associationOptions = commissionUserList.data[0].children
- if (this.profitSharingList.length > 0) {
- this.profitSharingList = this.profitSharingList.map(item => ({
- ...item,
- personOptions: item.deptId ? this.getPersonOptionsByDeptId(item.deptId) : []
- }));
- }
- },
- //初始化分成比例
- async getList() {
- const { rows, total } = await uni.$u.api.selectCommissionList({
- pageSize: 9999,
- pageNum: 1,
- }, { sendFormId: this.receiptList[0].sendFormId, });
- this.profitSharingList = rows.map(item => {
- let personOptions = [];
- if (item.deptId) {
- if (this.associationOptions.length > 0) {
- personOptions = this.getPersonOptionsByDeptId(item.deptId);
- } else {
- personOptions = [];
- }
- }
- return {
- ...item,
- personOptions
- };
- });
- if (this.associationOptions.length === 0) {
- await this.getCommissionUserList();
- }
- console.log('这里是分成比例', this.profitSharingList, '总数是', total);
- },
- getPersonOptionsByDeptId(deptId) {
- const selectedOption = this.associationOptions.find(opt => opt.id === deptId);
- return selectedOption ? selectedOption.children || [] : [];
- },
- //添加分成比例
- async addProfitSharingList(data) {
- await uni.$u.api.clueCommissionAdd(data);
- },
- addShare() {
- console.log('开始上传')
- // 遍历分成比例列表
- this.profitSharingList.forEach(item => {
- console.log(item, 'item')
- // 调用添加分成比例接口
- this.addProfitSharingList({
- // 账户类型:1(前端)/2(后端)
- accountType: item.accountType === 'frontend' ? 1 : 2,
- // 线索ID
- clueId: this.receiptList[0].clueId,
- // 分成比例 数字
- commissionRate: item.percentage,
- // 主键ID ???
- // id: item.id,
- // 是否归属公司 是1,否2
- isCompanyPerformance: item.belongToCompany ? 1 : 2,
- // 收据表单ID
- // receiptFormId: this.receiptList[0].id,
- // 发送表单ID
- sendFormId: this.receiptList[0].sendFormId,
- // 用户ID
- userId: item.person,
- // 需要根据userId去关联选项列表中找
- userName: item.personOptions.find(opt => opt.id == item.person)?.label || '',
- });
- });
- },
- //删除分成
- async deleteRow(id) {
- console.log(id, 'id')
- try {
- await uni.$u.api.deleteClueCommissionForm(id)
- uni.$u.toast('删除成功')
- this.getList()
- } catch (error) {
- uni.$u.toast('删除失败,请稍后重试', error)
- }
- },
- }
- };
- </script>
- <style lang="scss" scoped>
- // 导入公共样式
- @import './common.scss';
- // 主样式
- .page-container {
- box-sizing: border-box;
- padding: 0;
- background-color: map-get($colors, bg);
- font-family: map-get($font, family);
- -webkit-font-smoothing: map-get($font, smoothing);
- font-smoothing: map-get($font, smoothing);
- }
- .address-section {
- padding: map-get($sizes, padding-sm) map-get($sizes, padding);
- .u-col {
- padding: 0;
- box-sizing: border-box;
- }
- .u-col:first-child {
- padding-right: 15rpx;
- }
- .u-col:last-child {
- padding-left: 15rpx;
- }
- }
- // 表单行样式
- .info-row {
- margin-bottom: 20rpx;
- box-sizing: border-box;
- padding: 0;
- }
- // 表单标签样式
- .info-label {
- @include font-styles($size: tiny, $weight: regular, $color: tertiary);
- margin-bottom: 8rpx;
- display: block;
- }
- // 输入框样式
- .info-input {
- height: 65rpx;
- border-radius: 8rpx;
- border: 1rpx solid #e5e7eb;
- padding: 20rpx 16rpx;
- width: 100%;
- box-sizing: border-box;
- @include font-styles($size: small, $weight: regular, $color: secondary);
- // textarea特殊样式
- &[type="textarea"] {
- min-height: 160rpx;
- resize: vertical;
- padding-top: 20rpx;
- padding-bottom: 20rpx;
- }
- }
- // 防止表单label换行
- ::v-deep .u-form-item__body__left__content__label {
- white-space: nowrap;
- }
- // 图片上传样式
- .image-uploader {
- width: 100%;
- height: 65rpx;
- border: 2rpx dashed #409eff;
- border-radius: 8rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- background-color: #ecf5ff;
- box-sizing: border-box;
- overflow: hidden;
- transition: all 0.3s ease;
- &:hover {
- border-color: #66b1ff;
- background-color: #f0f9ff;
- transform: scale(1.02);
- }
- }
- .camera-icon {
- margin: 0;
- font-size: 32rpx;
- color: #409eff;
- transition: all 0.3s ease;
- }
- .image-uploader:hover .camera-icon {
- color: #66b1ff;
- transform: scale(1.1);
- }
- .image-preview {
- width: 100%;
- height: 100%;
- object-fit: cover;
- border-radius: 10rpx;
- box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
- transition: all 0.3s ease;
- }
- .image-uploader:hover .image-preview {
- transform: scale(1.02);
- box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
- }
- .hidden-input {
- display: none;
- }
- // 分成信息卡片样式
- .address-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- margin-bottom: 20rpx;
- .address-title {
- @include font-styles($size: small, $weight: medium, $color: primary);
- margin-left: 10rpx;
- }
- }
- .split-content {
- padding: 10rpx 0;
- }
- .split-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 15rpx 0;
- border-bottom: 1rpx solid map-get($colors, border);
- &:last-child {
- border-bottom: none;
- }
- }
- .split-label {
- @include font-styles($size: tiny, $weight: regular, $color: tertiary);
- }
- .split-value {
- @include font-styles($size: small, $weight: regular, $color: secondary);
- }
- .add-button {
- padding: 0;
- width: 50rpx;
- height: 50rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /* 分成信息表格样式 */
- .split-table {
- width: 100%;
- margin-top: 20rpx;
- background-color: #fff;
- border-radius: 8rpx;
- overflow: hidden;
- }
- .split-table-header {
- background-color: #f5f7fa;
- padding: 15rpx 0;
- border-bottom: 1rpx solid #e4e7ed;
- }
- .split-table-row {
- padding: 15rpx 0;
- border-bottom: 1rpx solid #e4e7ed;
- align-items: center;
- &:last-child {
- border-bottom: none;
- }
- }
- .header-text {
- @include font-styles($size: tiny, $weight: regular, $color: tertiary);
- text-align: center;
- display: block;
- }
- .table-cell {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 0 10rpx;
- box-sizing: border-box;
- }
- .action-column {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- /* 自定义下拉框样式 - 隐藏原生箭头 */
- .custom-select {
- width: 100%;
- height: 50rpx;
- border-radius: 0;
- border: 1rpx solid #e5e7eb;
- text-align: center;
- /* 增加右侧内边距,为自定义箭头留出空间 */
- @include font-styles($size: tiny, $weight: regular, $color: secondary);
- background-color: #fff;
- /* 确保隐藏所有浏览器的原生箭头 */
- appearance: none !important;
- -webkit-appearance: none !important;
- -moz-appearance: none !important;
- -o-appearance: none !important;
- cursor: pointer;
- /* 使用自定义SVG箭头 */
- background-repeat: no-repeat;
- background-position: right 8rpx center;
- background-size: 12rpx 12rpx;
- box-sizing: border-box;
- position: relative;
- /* 防止箭头在焦点状态下显示 */
- &:focus {
- outline: none;
- border-color: #409eff;
- box-shadow: 0 0 0 2rpx rgba(64, 158, 255, 0.2);
- }
- /* 针对IE/Edge浏览器的特殊处理 */
- &::-ms-expand {
- display: none !important;
- }
- /* 针对某些旧版浏览器的额外处理 */
- &::-webkit-select-arrow {
- display: none !important;
- }
- /* 添加伪元素覆盖可能残留的箭头 */
- &::after {
- content: '';
- position: absolute;
- right: 8rpx;
- top: 50%;
- transform: translateY(-50%);
- width: 12rpx;
- height: 12rpx;
- 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");
- background-repeat: no-repeat;
- background-size: 100% 100%;
- pointer-events: none;
- z-index: 1;
- }
- }
- /* 百分比输入框样式 */
- .percentage-input {
- text-align: center;
- background-color: #f9f9f9;
- color: #606266;
- text-align: center;
- padding: 0rpx !important;
- }
- /* 账户类型标签样式 */
- .account-type {
- padding: 4rpx 16rpx;
- border-radius: 12rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #fff;
- text-align: center;
- }
- .account-type.frontend {
- background-color: #409eff;
- }
- .account-type.backend {
- background-color: #909399;
- }
- /* 调整表格布局,使其更紧凑 */
- .split-table {
- width: 100%;
- margin-top: 10rpx;
- }
- .split-table-header,
- .split-table-row {
- padding: 10rpx 0;
- }
- .table-cell {
- padding: 0 5rpx;
- }
- /* 调整输入框样式 */
- .percentage-input {
- width: 80%;
- height: 50rpx;
- font-size: 28rpx;
- }
- /* 归属公司单选框样式 */
- .radio-wrapper {
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .radio-circle {
- width: 32rpx;
- height: 32rpx;
- border-radius: 50%;
- border: 2rpx solid #dcdfe6;
- display: flex;
- align-items: center;
- justify-content: center;
- transition: all 0.3s ease;
- }
- .radio-circle.active {
- border-color: #67c23a;
- background-color: #67c23a;
- }
- /* 确认入库按钮样式 */
- .confirm-button-container {
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 40rpx 0;
- margin-top: 20rpx;
- }
- /* 响应式布局调整 */
- @media screen and (max-width: 750rpx) {
- .split-table {
- overflow-x: auto;
- }
- .custom-select {
- width: 100%;
- }
- .account-type {
- padding: 2rpx 10rpx;
- font-size: 22rpx;
- }
- }
- @media screen and (min-width: 751rpx) {
- .table-cell {
- padding: 0 10rpx;
- }
- }
- </style>
|