pageFour.vue 34 KB

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