PageFour.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306
  1. <template>
  2. <view class="page-four-container">
  3. <!-- 入库信息卡片 -->
  4. <view class="card-wrap">
  5. <up-form labelPosition="top" :model="warehouseInfo" ref="form" :rules="rules" class="address-section">
  6. <view class="address-header">
  7. <up-icon name="car-fill" size="36rpx" color="#108cff" class="location-icon" />
  8. <text class="address-title">入库信息</text>
  9. </view>
  10. <!-- 编码、快递单号、物流图片 -->
  11. <up-row class="info-row" justify="space-between">
  12. <up-col span="4">
  13. <up-form-item label="编码" prop="codeStorage">
  14. <up-input v-model="warehouseInfo.codeStorage" placeholder="请输入编码" class="info-input"
  15. :disabled="warehouseInfo.needCheckCode === '2'" @blur="saveWarehouseInfoOnBlur" />
  16. </up-form-item>
  17. </up-col>
  18. <up-col span="4">
  19. <up-form-item label="快递单号" prop="expressOrderNo">
  20. <up-input v-model="warehouseInfo.expressOrderNo" placeholder="请输入快递单号" class="info-input"
  21. @blur="saveWarehouseInfoOnBlur" />
  22. </up-form-item>
  23. </up-col>
  24. <up-col span="4">
  25. <up-form-item label="物流图片" prop="uploadedImage">
  26. <view class="image-uploader" @click="selectImage">
  27. <up-icon v-if="!warehouseInfo.uploadedImage" name="camera-fill" size="48rpx" color="#909399"
  28. class="camera-icon" />
  29. <image v-else :src="warehouseInfo.uploadedImage" mode="aspectFill" class="image-preview" />
  30. </view>
  31. </up-form-item>
  32. </up-col>
  33. </up-row>
  34. <!-- 收单物品、收单类型 -->
  35. <up-row class="info-row" justify="space-between">
  36. <up-col span="6">
  37. <up-form-item label="收单物品" prop="item">
  38. <up-input v-model="warehouseInfo.item" placeholder="请输入收单物品" class="info-input"
  39. @blur="saveWarehouseInfoOnBlur" />
  40. </up-form-item>
  41. </up-col>
  42. <up-col span="6">
  43. <view @tap="selectCustomerServiceName">
  44. <up-form-item label="收单类型" prop="customerServiceNameLabel">
  45. <view class="click-wrapper info-input">
  46. {{ warehouseInfo.customerServiceNameLabel || '点击选择收单类型' }}
  47. </view>
  48. </up-form-item>
  49. <up-picker :show="showCustomerServicePicker" :columns="customerServiceColumns" confirm keyName="label"
  50. @confirm="handleConfirmCustomerService" @cancel="showCustomerServicePicker = false" />
  51. </view>
  52. </up-col>
  53. </up-row>
  54. <!-- 类别、是否需要查码 -->
  55. <up-row class="info-row" justify="space-between">
  56. <up-col span="6">
  57. <view @tap="selectCategory">
  58. <up-form-item label="类别" prop="category">
  59. <view class="click-wrapper info-input">
  60. {{ warehouseInfo.categoryLabel || '点击选择类别' }}
  61. </view>
  62. </up-form-item>
  63. <up-picker :show="showCategoryPicker" :columns="categoryColumns" confirm keyName="label"
  64. @confirm="handleConfirmCategory" @cancel="showCategoryPicker = false" />
  65. </view>
  66. </up-col>
  67. <up-col span="6">
  68. <view @tap="selectNeedCheckCode">
  69. <up-form-item label="是否需要查码" prop="needCheckCode">
  70. <view class="click-wrapper info-input">
  71. {{ warehouseInfo.needCheckCodeLabel || '点击选择是否需要查码' }}
  72. </view>
  73. </up-form-item>
  74. <up-picker :show="showNeedCheckCodePicker" :columns="needCheckCodeColumns" confirm keyName="label"
  75. @confirm="handleConfirmNeedCheckCode" @cancel="showNeedCheckCodePicker = false" />
  76. </view>
  77. </up-col>
  78. </up-row>
  79. <!-- 表款、查码费 -->
  80. <up-row class="info-row" justify="space-between">
  81. <up-col span="6">
  82. <up-form-item label="表款">
  83. <up-input v-model="warehouseInfo.watchPrice" placeholder="请输入表款" class="info-input" type="number"
  84. @blur="saveWarehouseInfoOnBlur" />
  85. </up-form-item>
  86. </up-col>
  87. <up-col span="6">
  88. <up-form-item label="查码费">
  89. <up-input v-model="warehouseInfo.checkCodeFee" placeholder="请输入查码费" class="info-input" type="number"
  90. :disabled="warehouseInfo.needCheckCode === '2'" @blur="saveWarehouseInfoOnBlur" />
  91. </up-form-item>
  92. </up-col>
  93. </up-row>
  94. <!-- 好处费、运费 -->
  95. <up-row class="info-row" justify="space-between">
  96. <up-col span="6">
  97. <up-form-item label="好处费">
  98. <up-input v-model="warehouseInfo.benefitFee" placeholder="请输入好处费" class="info-input" type="number"
  99. @blur="saveWarehouseInfoOnBlur" />
  100. </up-form-item>
  101. </up-col>
  102. <up-col span="6">
  103. <up-form-item label="运费">
  104. <up-input v-model="warehouseInfo.freight" placeholder="请输入运费" class="info-input" type="number"
  105. @blur="saveWarehouseInfoOnBlur" />
  106. </up-form-item>
  107. </up-col>
  108. </up-row>
  109. <!-- 维修金额、分单比例 -->
  110. <up-row class="info-row" justify="space-between">
  111. <up-col span="6">
  112. <up-form-item label="维修金额">
  113. <up-input v-model="warehouseInfo.repairAmount" placeholder="请输入维修金额" class="info-input" type="number"
  114. @blur="saveWarehouseInfoOnBlur" />
  115. </up-form-item>
  116. </up-col>
  117. <up-col span="6">
  118. <up-form-item label="分单比例(0~100)">
  119. <up-input v-model="warehouseInfo.splitRatio" placeholder="请输入分单比例(0~100)" class="info-input"
  120. type="number" @blur="saveWarehouseInfoOnBlur" />
  121. </up-form-item>
  122. </up-col>
  123. </up-row>
  124. <!-- 型号、保卡日期 -->
  125. <up-row class="info-row" justify="space-between">
  126. <up-col span="6">
  127. <up-form-item label="型号" required prop="model">
  128. <up-input v-model="warehouseInfo.model" placeholder="请输入型号" class="info-input"
  129. @blur="saveWarehouseInfoOnBlur" />
  130. </up-form-item>
  131. </up-col>
  132. <up-col span="6">
  133. <view @tap="openCardDatePicker">
  134. <up-form-item label="保卡日期" prop="cardDate">
  135. <view class="click-wrapper info-input">
  136. {{ warehouseInfo.cardDate || '点击选择保卡日期' }}
  137. </view>
  138. </up-form-item>
  139. </view>
  140. <up-datetime-picker :show="showCardDatePicker" :value="cardDatePickerValue" mode="date"
  141. @confirm="confirmCardDate" @close="showCardDatePicker = false" @cancel="showCardDatePicker = false" />
  142. </up-col>
  143. </up-row>
  144. <!-- 成本合计、业绩、毛业绩 -->
  145. <up-row class="info-row" justify="space-between">
  146. <up-col span="4">
  147. <up-form-item label="成本合计">
  148. <up-input :disabled="true" :value="computedTotalCost" placeholder="成本合计自动计算" class="info-input"
  149. type="number" />
  150. </up-form-item>
  151. </up-col>
  152. <up-col span="4">
  153. <up-form-item label="业绩">
  154. <up-input :disabled="true" :value="computedPerformance" placeholder="业绩自动计算" class="info-input"
  155. type="number" />
  156. </up-form-item>
  157. </up-col>
  158. <up-col span="4">
  159. <up-form-item label="毛业绩">
  160. <up-input :disabled="true" :value="computedGrossPerformance" placeholder="毛业绩自动计算" class="info-input"
  161. type="number" />
  162. </up-form-item>
  163. </up-col>
  164. </up-row>
  165. <!-- 是否入库 -->
  166. <!-- <up-row class="info-row">
  167. <up-col span="12">
  168. <view @tap="selectIsWarehouse">
  169. <up-form-item label="是否入库" prop="isWarehouse">
  170. <view class="click-wrapper info-input">
  171. {{ isWarehouseLabel || '点击选择是否入库' }}
  172. </view>
  173. </up-form-item>
  174. <up-picker :show="showIsWarehousePicker" :columns="isWarehouseColumns" confirm keyName="label"
  175. @confirm="handleConfirmIsWarehouse" @cancel="showIsWarehousePicker = false" />
  176. </view>
  177. </up-col>
  178. </up-row> -->
  179. <!-- 收单备注 -->
  180. <up-row class="info-row">
  181. <up-col span="12">
  182. <up-form-item label="收单备注">
  183. <up-textarea v-model="warehouseInfo.remarks" placeholder="请输入收单备注" class="info-textarea"
  184. confirmType="done" rows="4" @blur="saveWarehouseInfoOnBlur" />
  185. </up-form-item>
  186. </up-col>
  187. </up-row>
  188. </up-form>
  189. </view>
  190. <!-- 分成信息卡片 -->
  191. <view class="card-wrap">
  192. <view class="address-section">
  193. <view class="address-header add-button-container">
  194. <text class="address-title">分成信息</text>
  195. <view class="add-button" @click="addSplit">
  196. <up-icon name="plus" size="24rpx" color="#108cff" />
  197. <text>添加</text>
  198. </view>
  199. </view>
  200. <!-- 分成信息表格 -->
  201. <view class="split-table">
  202. <up-row class="split-table-header">
  203. <up-col span="4"><text class="header-text">关联</text></up-col>
  204. <up-col span="2"><text class="header-text">分成人</text></up-col>
  205. <up-col span="2"><text class="header-text">比例</text></up-col>
  206. <up-col span="1"><text class="header-text">类型</text></up-col>
  207. <up-col span="1"><text class="header-text">公司</text></up-col>
  208. <up-col span="2" class="action-column"><text class="header-text">操作</text></up-col>
  209. </up-row>
  210. <up-row v-for="(item, index) in profitSharingList" :key="item.uuid" class="split-table-row">
  211. <up-col span="4">
  212. <view class="table-cell">
  213. <up-button @click="handleSelectOrg(item)" :text="item.orgName || '选择组织'" plain />
  214. </view>
  215. </up-col>
  216. <up-col span="2">
  217. <view class="table-cell">
  218. <up-button @click="handleSelectPerson(item)" :text="item.userName || '选择人员'" plain />
  219. </view>
  220. </up-col>
  221. <up-col span="2">
  222. <view class="table-cell">
  223. <up-input v-model="item.commissionRate" type="number" class="percentage-input"
  224. @input="handlePercentageInput(item)" min="0" max="100" precision="0" />
  225. </view>
  226. </up-col>
  227. <up-col span="1">
  228. <view class="table-cell">
  229. <view :class="['account-type', item.accountType == '1' ? 'frontend' : 'backend']"
  230. @click="toggleAccountType(item)">
  231. {{ item.accountType == '1' ? '前' : '后' }}
  232. </view>
  233. </view>
  234. </up-col>
  235. <up-col span="1">
  236. <view class="table-cell">
  237. <view class="radio-wrapper" @click="toggleBelongToCompany(item)">
  238. <view :class="['radio-circle', item.isCompanyPerformance == '1' ? 'active' : '']">
  239. <up-icon v-if="item.isCompanyPerformance == '1'" name="checkmark" size="20rpx" color="#fff" />
  240. </view>
  241. </view>
  242. </view>
  243. </up-col>
  244. <up-col span="2" class="action-column">
  245. <view class="table-cell">
  246. <up-button type="error" plain shape="circle" size="mini" @click="deleteRow(item.id, item.uuid)"
  247. class="delete-btn">
  248. <up-icon name="trash" size="20rpx" color="#ff6b6b" />
  249. </up-button>
  250. </view>
  251. </up-col>
  252. </up-row>
  253. </view>
  254. </view>
  255. </view>
  256. <!-- 确认收单、确认入库按钮 -->
  257. <view class="confirm-button-container">
  258. <up-row gutter="24">
  259. <up-col span="6">
  260. <up-button class="next-btn" type="success" @click="confirmReceiveOrder">
  261. <up-icon name="checkmark-circle-fill" size="28rpx" color="#fff" />
  262. <text style="margin-left: 8rpx;">确认收单</text>
  263. </up-button>
  264. </up-col>
  265. <up-col span="6">
  266. <up-button class="next-btn" type="success" @click="confirmWarehouseEntry">
  267. <up-icon name="checkmark-circle-fill" size="28rpx" color="#fff" />
  268. <text style="margin-left: 8rpx;">确认入库</text>
  269. </up-button>
  270. </up-col>
  271. </up-row>
  272. </view>
  273. <!-- 组织选择器 -->
  274. <up-picker :show="showOrgPicker" title="请选择组织" :columns="columnsOrgList" keyName="label" @confirm="handleOrgConfirm"
  275. @cancel="showOrgPicker = false" />
  276. <!-- 人员选择器 -->
  277. <up-picker :show="showPersonPicker" title="请选择分成人" :columns="columnsPersonList" keyName="label"
  278. @confirm="handleConfirmPerson" @cancel="handleCancelPerson" />
  279. <up-toast ref="uToast" />
  280. </view>
  281. </template>
  282. <script>
  283. import imageUpload from '../utils/imageUpload.js'
  284. import dayjs from 'dayjs'
  285. export default {
  286. name: 'PageFour',
  287. props: {
  288. orderDetail: {
  289. type: Object,
  290. default: () => ({})
  291. },
  292. currentReceipt: {
  293. type: Object,
  294. default: () => ({})
  295. }
  296. },
  297. data() {
  298. return {
  299. warehouseInfo: {
  300. codeStorage: '',
  301. expressOrderNo: '',
  302. uploadedImage: '',
  303. item: '',
  304. checkCodeFee: '',
  305. watchPrice: '',
  306. benefitFee: '',
  307. freight: '',
  308. repairAmount: '',
  309. grossPerformance: '',
  310. performance: '',
  311. splitRatio: '',
  312. remarks: '',
  313. cardDate: '',
  314. customerServiceNameLabel: '',
  315. customerServiceName: '',
  316. categoryLabel: '',
  317. category: '',
  318. needCheckCodeLabel: '',
  319. needCheckCode: ''
  320. },
  321. showCardDatePicker: false,
  322. profitSharingList: [],
  323. showOrgPicker: false,
  324. showPersonPicker: false,
  325. columnsOrgList: [],
  326. columnsPersonList: [],
  327. showCustomerServicePicker: false,
  328. customerServiceColumns: [[
  329. { label: '收单类', value: '1' },
  330. { label: '维修类', value: '2' },
  331. { label: '销售类', value: '3' }
  332. ]],
  333. showCategoryPicker: false,
  334. categoryColumns: [[
  335. { label: '腕表', value: '1' },
  336. { label: '包包', value: '2' },
  337. { label: '首饰', value: '4' },
  338. { label: '其他', value: '3' }
  339. ]],
  340. showNeedCheckCodePicker: false,
  341. needCheckCodeColumns: [[
  342. { label: '是', value: '1' },
  343. { label: '否', value: '2' }
  344. ]],
  345. currentEditItem: '',
  346. isWarehouse: '2',
  347. isWarehouseLabel: '不入库',
  348. showIsWarehousePicker: false,
  349. isWarehouseColumns: [[
  350. { label: '确认入库', value: '1' },
  351. { label: '不入库', value: '2' }
  352. ]],
  353. brandList: [],
  354. rules: {
  355. model: [
  356. { required: true, message: '请输入型号', trigger: 'blur' }
  357. ]
  358. }
  359. }
  360. },
  361. computed: {
  362. computedTotalCost() {
  363. const freight = Number(this.warehouseInfo.freight) || 0
  364. const benefitFee = Number(this.warehouseInfo.benefitFee) || 0
  365. const checkCodeFee = Number(this.warehouseInfo.checkCodeFee) || 0
  366. const watchPrice = Number(this.warehouseInfo.watchPrice) || 0
  367. const repairAmount = Number(this.warehouseInfo.repairAmount) || 0
  368. return freight + benefitFee + checkCodeFee + watchPrice + repairAmount
  369. },
  370. computedPerformance() {
  371. const sellingPrice = Number(this.currentReceipt.sellingPrice) || 0
  372. return sellingPrice - this.computedTotalCost
  373. },
  374. computedGrossPerformance() {
  375. const performance = this.computedPerformance || 0
  376. const splitRatio = Number(this.warehouseInfo.splitRatio) / 100 || 0
  377. return (performance * splitRatio).toFixed(2)
  378. },
  379. // 保卡日期选择器用:转为时间戳
  380. cardDatePickerValue() {
  381. if (!this.warehouseInfo.cardDate) return Date.now()
  382. const t = dayjs(this.warehouseInfo.cardDate, 'YYYY-MM-DD').valueOf()
  383. return Number.isNaN(t) ? Date.now() : t
  384. }
  385. },
  386. watch: {
  387. currentReceipt: {
  388. handler(newVal) {
  389. if (newVal) {
  390. this.initWarehouseInfo(newVal)
  391. this.loadShareList()
  392. }
  393. },
  394. immediate: true,
  395. deep: true
  396. }
  397. },
  398. mounted() {
  399. this.loadCommissionUserList()
  400. this.loadBrandList()
  401. },
  402. methods: {
  403. /**
  404. * 加载品牌列表
  405. */
  406. async loadBrandList() {
  407. try {
  408. const res = await this.$getDicts('crm_form_brand')
  409. this.brandList = res
  410. } catch (error) {
  411. console.error('加载品牌列表失败:', error)
  412. }
  413. },
  414. /**
  415. * 初始化入库信息
  416. */
  417. initWarehouseInfo(data) {
  418. const receiptRemark = data.receiptRemark || ''
  419. const remarkParts = receiptRemark.split(';')
  420. // 设置默认值:收单类型默认为"收单类",类别默认为"腕表",是否需要查码默认为"是"
  421. const defaultCustomerServiceName = data.customerServiceName || '1'
  422. const defaultCategory = data.category || '1'
  423. const defaultNeedCheckCode = data.needCheckCode || '1'
  424. this.warehouseInfo = {
  425. codeStorage: data.code || '',
  426. expressOrderNo: data.expressOrderNo || '',
  427. uploadedImage: remarkParts[1] || '',
  428. item: data.item || '',
  429. checkCodeFee: data.checkCodeFee || '',
  430. watchPrice: data.tableFee || '',
  431. benefitFee: data.benefitFee || '',
  432. freight: data.freight || '',
  433. repairAmount: data.repairAmount || '',
  434. grossPerformance: data.grossPerformance || '',
  435. performance: data.performance || '',
  436. splitRatio: data.splitRatio || '',
  437. remarks: remarkParts[0] || '',
  438. model: data.model || '',
  439. cardDate: data.cardDate || '',
  440. customerServiceName: defaultCustomerServiceName,
  441. customerServiceNameLabel: this.getLabelByValue(
  442. this.customerServiceColumns[0],
  443. defaultCustomerServiceName
  444. ),
  445. category: defaultCategory,
  446. categoryLabel: this.getLabelByValue(
  447. this.categoryColumns[0],
  448. defaultCategory
  449. ),
  450. needCheckCode: defaultNeedCheckCode,
  451. needCheckCodeLabel: this.getLabelByValue(
  452. this.needCheckCodeColumns[0],
  453. defaultNeedCheckCode
  454. )
  455. }
  456. },
  457. /**
  458. * 根据值获取标签
  459. */
  460. getLabelByValue(columns, value) {
  461. const item = columns.find(col => col.value == value)
  462. return item ? item.label : ''
  463. },
  464. openCardDatePicker() {
  465. this.showCardDatePicker = true
  466. },
  467. confirmCardDate(e) {
  468. this.$nextTick(() => {
  469. this.warehouseInfo.cardDate = e.value ? dayjs(e.value).format('YYYY-MM-DD') : ''
  470. this.showCardDatePicker = false
  471. this.saveWarehouseInfoOnBlur()
  472. })
  473. },
  474. /**
  475. * 入库信息失焦 / 物流图片变更后保存
  476. */
  477. async saveWarehouseInfoOnBlur() {
  478. if (!this.currentReceipt || !this.currentReceipt.id) return
  479. try {
  480. await uni.$u.api.updateReceiptForm({
  481. id: this.currentReceipt.id,
  482. code: this.warehouseInfo.codeStorage || '',
  483. expressOrderNo: this.warehouseInfo.expressOrderNo || '',
  484. item: this.warehouseInfo.item || '',
  485. checkCodeFee: this.warehouseInfo.checkCodeFee || '',
  486. tableFee: this.warehouseInfo.watchPrice || '',
  487. benefitFee: this.warehouseInfo.benefitFee || '',
  488. freight: this.warehouseInfo.freight || '',
  489. repairAmount: this.warehouseInfo.repairAmount || '',
  490. grossPerformance: this.computedGrossPerformance || '',
  491. performance: this.computedPerformance || '',
  492. splitRatio: this.warehouseInfo.splitRatio || '',
  493. receiptRemark: `${this.warehouseInfo.remarks || ''};${this.warehouseInfo.uploadedImage || ''}`,
  494. customerServiceName: this.warehouseInfo.customerServiceName || '',
  495. category: this.warehouseInfo.category || '',
  496. needCheckCode: this.warehouseInfo.needCheckCode || '',
  497. totalCost: this.computedTotalCost || '',
  498. model: this.warehouseInfo.model || '',
  499. cardDate: this.warehouseInfo.cardDate || ''
  500. })
  501. } catch (e) {
  502. console.error('保存入库信息失败:', e)
  503. }
  504. },
  505. /**
  506. * 选择物流图片(选完后即保存)
  507. */
  508. async selectImage() {
  509. try {
  510. const tempFilePaths = await imageUpload.chooseImage(1)
  511. if (!tempFilePaths || tempFilePaths.length === 0) {
  512. uni.$u.toast('未获取到图片路径,请重试')
  513. return
  514. }
  515. const tempFilePath = tempFilePaths[0]
  516. const rep = await uni.$u.api.uploadFile(tempFilePath)
  517. if (rep.code == 200) {
  518. this.warehouseInfo.uploadedImage = rep.data.url
  519. await this.saveWarehouseInfoOnBlur()
  520. }
  521. } catch (error) {
  522. console.error('上传图片失败:', error)
  523. }
  524. },
  525. /**
  526. * 加载分成人名单
  527. */
  528. async loadCommissionUserList() {
  529. try {
  530. const res = await uni.$u.api.getCustomerManagerAllList()
  531. this.columnsOrgList = [res.data[0].children]
  532. } catch (error) {
  533. console.error('加载分成人名单失败:', error)
  534. }
  535. },
  536. /**
  537. * 加载分成列表
  538. */
  539. async loadShareList() {
  540. if (!this.currentReceipt.sendFormId) return
  541. try {
  542. const { rows } = await uni.$u.api.selectCommissionList({
  543. pageSize: 9999,
  544. pageNum: 1
  545. }, { sendFormId: this.currentReceipt.sendFormId })
  546. const newRows = rows
  547. .filter(item => item.receiptFormId == this.currentReceipt.id)
  548. .map(item => ({
  549. ...item,
  550. uuid: Math.random()
  551. }))
  552. this.profitSharingList = newRows
  553. } catch (error) {
  554. console.error('加载分成列表失败:', error)
  555. }
  556. },
  557. /**
  558. * 添加分成行
  559. */
  560. addSplit() {
  561. this.profitSharingList.push({
  562. deptId: '',
  563. accountType: '1',
  564. userId: '',
  565. commissionRate: 0,
  566. isCompanyPerformance: '2',
  567. orgName: '',
  568. userName: '',
  569. id: '',
  570. uuid: Math.random()
  571. })
  572. this.calculateTotalPercentage()
  573. },
  574. /**
  575. * 重新计算分成比例
  576. */
  577. calculateTotalPercentage() {
  578. const frontItems = this.profitSharingList.filter(item => item.accountType == '1')
  579. const backItems = this.profitSharingList.filter(item => item.accountType == '2')
  580. const totalFrontItems = frontItems.length || 1
  581. const totalBackItems = backItems.length || 1
  582. this.profitSharingList.forEach(item => {
  583. if (item.accountType == '1') {
  584. item.commissionRate = Math.floor(100 / totalFrontItems)
  585. }
  586. if (item.accountType == '2') {
  587. item.commissionRate = Math.floor(100 / totalBackItems)
  588. }
  589. })
  590. },
  591. /**
  592. * 切换账户类型
  593. */
  594. toggleAccountType(item) {
  595. item.accountType = item.accountType == '1' ? '2' : '1'
  596. this.calculateTotalPercentage()
  597. },
  598. /**
  599. * 处理百分比输入
  600. */
  601. handlePercentageInput(item) {
  602. let value = Number(item.commissionRate)
  603. if (isNaN(value)) value = 0
  604. if (value < 0) value = 0
  605. if (value > 100) value = 100
  606. item.commissionRate = Math.floor(value)
  607. },
  608. /**
  609. * 切换归属公司
  610. */
  611. toggleBelongToCompany(item) {
  612. item.isCompanyPerformance = item.isCompanyPerformance == '1' ? '2' : '1'
  613. },
  614. /**
  615. * 选择组织
  616. */
  617. handleSelectOrg(item) {
  618. this.currentEditItem = item.uuid
  619. this.showPersonPicker = true
  620. this.columnsPersonList = this.columnsOrgList
  621. },
  622. /**
  623. * 选择人员
  624. */
  625. handleSelectPerson(item) {
  626. this.currentEditItem = item.uuid
  627. const deptId = item.deptId
  628. const org = this.findOrg(this.columnsOrgList[0], deptId)
  629. if (org) {
  630. this.columnsPersonList = [org.children]
  631. }
  632. this.showPersonPicker = true
  633. },
  634. /**
  635. * 递归查找组织
  636. */
  637. findOrg(orgList, deptId) {
  638. for (const org of orgList) {
  639. if (org.id == deptId) {
  640. return org
  641. }
  642. if (org.children && org.children.length > 0) {
  643. const found = this.findOrg(org.children, deptId)
  644. if (found) return found
  645. }
  646. }
  647. return null
  648. },
  649. /**
  650. * 确认选择组织
  651. */
  652. handleOrgConfirm({ value }) {
  653. this.profitSharingList.forEach(item => {
  654. if (item.uuid == this.currentEditItem) {
  655. item.orgName = value[0].label
  656. item.deptId = value[0].id
  657. item.userId = ''
  658. item.userName = ''
  659. }
  660. })
  661. this.showOrgPicker = false
  662. },
  663. /**
  664. * 确认选择人员
  665. */
  666. handleConfirmPerson({ value }) {
  667. if (value[0].isUser) {
  668. this.profitSharingList.forEach(item => {
  669. if (item.uuid == this.currentEditItem) {
  670. item.userName = value[0].label
  671. item.userId = value[0].id
  672. }
  673. })
  674. this.columnsPersonList = []
  675. this.showPersonPicker = false
  676. } else {
  677. this.profitSharingList.forEach(item => {
  678. if (item.uuid == this.currentEditItem) {
  679. item.orgName = value[0].label
  680. item.deptId = value[0].id
  681. }
  682. })
  683. this.columnsPersonList = [value[0].children]
  684. }
  685. },
  686. /**
  687. * 取消选择人员
  688. */
  689. handleCancelPerson() {
  690. this.columnsPersonList = []
  691. this.showPersonPicker = false
  692. },
  693. /**
  694. * 删除分成行
  695. */
  696. async deleteRow(id, uuid) {
  697. uni.showModal({
  698. title: '确认删除',
  699. content: '是否确认删除当前行分成比例?',
  700. success: async (res) => {
  701. if (res.confirm) {
  702. if (!id) {
  703. this.profitSharingList = this.profitSharingList.filter(item => item.uuid != uuid)
  704. this.calculateTotalPercentage()
  705. return
  706. }
  707. try {
  708. await uni.$u.api.deleteClueCommissionForm(id)
  709. uni.$u.toast('删除成功')
  710. this.loadShareList()
  711. } catch (error) {
  712. uni.$u.toast('删除失败')
  713. }
  714. }
  715. }
  716. })
  717. },
  718. /**
  719. * 选择收单类型
  720. */
  721. selectCustomerServiceName() {
  722. this.showCustomerServicePicker = true
  723. },
  724. /**
  725. * 确认收单类型
  726. */
  727. handleConfirmCustomerService({ value }) {
  728. this.warehouseInfo.customerServiceNameLabel = value[0].label
  729. this.warehouseInfo.customerServiceName = value[0].value
  730. this.showCustomerServicePicker = false
  731. this.saveWarehouseInfoOnBlur()
  732. },
  733. /**
  734. * 选择类别
  735. */
  736. selectCategory() {
  737. this.showCategoryPicker = true
  738. },
  739. /**
  740. * 确认类别
  741. */
  742. handleConfirmCategory({ value }) {
  743. this.warehouseInfo.categoryLabel = value[0].label
  744. this.warehouseInfo.category = value[0].value
  745. this.showCategoryPicker = false
  746. this.saveWarehouseInfoOnBlur()
  747. },
  748. /**
  749. * 选择是否需要查码
  750. */
  751. selectNeedCheckCode() {
  752. this.showNeedCheckCodePicker = true
  753. },
  754. /**
  755. * 确认是否需要查码
  756. */
  757. handleConfirmNeedCheckCode({ value }) {
  758. this.warehouseInfo.needCheckCodeLabel = value[0].label
  759. this.warehouseInfo.needCheckCode = value[0].value
  760. // 如果选择"否",清空编码和查码费
  761. if (value[0].value === '2') {
  762. this.warehouseInfo.codeStorage = ''
  763. this.warehouseInfo.checkCodeFee = ''
  764. }
  765. this.showNeedCheckCodePicker = false
  766. this.saveWarehouseInfoOnBlur()
  767. },
  768. /**
  769. * 确认收单
  770. */
  771. async confirmReceiveOrder() {
  772. // 校验表单
  773. await this.$refs.form.validate().then(() => {
  774. uni.showModal({
  775. title: '确认收单',
  776. content: `是否确认收单该订单:${this.orderDetail.item}?`,
  777. success: async (res) => {
  778. if (res.confirm) {
  779. try {
  780. // 先判断当前的状态是不是3(收单),如果是3的话就不调这个接口,修改订单状态
  781. if (this.orderDetail.status != '3') {
  782. // 当前的收单状态不是收单状态,则修改订单状态
  783. await uni.$u.api.oderForm({
  784. status: '3',
  785. id: this.orderDetail.id
  786. })
  787. }
  788. // 更新收单表单
  789. await uni.$u.api.updateReceiptForm({
  790. id: this.currentReceipt.id,
  791. code: this.warehouseInfo.codeStorage || '',
  792. expressOrderNo: this.warehouseInfo.expressOrderNo || '',
  793. item: this.warehouseInfo.item || '',
  794. checkCodeFee: this.warehouseInfo.checkCodeFee || '',
  795. tableFee: this.warehouseInfo.watchPrice || '',
  796. benefitFee: this.warehouseInfo.benefitFee || '',
  797. freight: this.warehouseInfo.freight || '',
  798. repairAmount: this.warehouseInfo.repairAmount || '',
  799. grossPerformance: this.computedGrossPerformance || '',
  800. performance: this.computedPerformance || '',
  801. splitRatio: this.warehouseInfo.splitRatio || '',
  802. receiptRemark: `${this.warehouseInfo.remarks || ''};${this.warehouseInfo.uploadedImage || ''}`,
  803. customerServiceName: this.warehouseInfo.customerServiceName || '',
  804. category: this.warehouseInfo.category || '',
  805. needCheckCode: this.warehouseInfo.needCheckCode || '',
  806. totalCost: this.computedTotalCost || '',
  807. model: this.warehouseInfo.model || '',
  808. cardDate: this.warehouseInfo.cardDate || '',
  809. })
  810. // 上传分成数据
  811. await this.addShare()
  812. // //新增仓库或者编辑仓库
  813. // //等于1的时候放入仓库表
  814. // if (this.isWarehouse == '1') {
  815. // // 获取品牌ID
  816. // const brandObj = this.brandList.find(item => item.dictLabel === this.currentReceipt.brand)
  817. // const brandId = brandObj ? brandObj.dictValue : ''
  818. // //建立入库data
  819. // // 获取 PageThree 的高清实物图的 fileUrl 数组
  820. // // 直接使用 imageUpload 获取图片列表,与 PageThree 保持一致
  821. // let goodPicFileUrls = []
  822. // if (this.currentReceipt.id && this.orderDetail.itemBrand) {
  823. // try {
  824. // const list = await imageUpload.getFileList(
  825. // '2',
  826. // '3',
  827. // this.currentReceipt.id,
  828. // this.orderDetail.itemBrand,
  829. // this.currentReceipt.clueId
  830. // )
  831. // // 获取前6个图片的 fileUrl(与 PageThree 的 displayImages 保持一致)
  832. // // goodPicFileUrls = (list || []).slice(0, 6).map(item => item.fileUrl).filter(url => url)
  833. // goodPicFileUrls = (list || []).map(item => item.fileUrl).filter(url => url)
  834. // } catch (error) {
  835. // console.error('获取高清实物图失败:', error)
  836. // }
  837. // }
  838. // const warehouseData = {
  839. // goodPicFileList: goodPicFileUrls,//商品图片 page3的高清实物图的url数组
  840. // type: this.warehouseInfo.category || '',//商品分类
  841. // dictLabel: this.currentReceipt.brand || '',//品牌名称
  842. // dictValue: brandId || '',//品牌id
  843. // indentifyCode:this.warehouseInfo.codeStorage|| '',//独立编码
  844. // costPrice: this.computedTotalCost || '',//总成本价
  845. // recycleTime: dayjs().format('YYYY-MM-DD'),//回收时间 必填
  846. // stockStatus:0,//库存状态,0待入库,1已入库,因为是我们是预入库,所以是0
  847. // origin:this.orderDetail.website//来源
  848. // }
  849. // if (!this.currentReceipt.warehouseId) {
  850. // //当没有仓库id的时候调用新增仓库接口
  851. // await uni.$u.api.wareHouseAdd(warehouseData)
  852. // } else {
  853. // //当有仓库id的时候调用编辑仓库接口
  854. // warehouseData.id = this.currentReceipt.warehouseId
  855. // await uni.$u.api.wareHouseUpdate(warehouseData)
  856. // }
  857. // } else if (this.isWarehouse == '2') {
  858. // //等于2的时候不放入仓库表
  859. // }
  860. this.$refs.uToast.show({
  861. type: 'success',
  862. message: '收单成功',
  863. complete: () => {
  864. // uni.navigateBack({
  865. // delta: 1
  866. // })
  867. }
  868. })
  869. } catch (error) {
  870. console.error('收单失败:', error)
  871. uni.$u.toast('收单失败')
  872. }
  873. }
  874. }
  875. })
  876. }).catch(() => {
  877. uni.$u.toast('请输入正确的信息')
  878. })
  879. },
  880. //确认入库
  881. async confirmWarehouseEntry() {
  882. if (!this.orderDetail || !this.orderDetail.id) {
  883. uni.$u.toast('订单信息不存在')
  884. return
  885. }
  886. // 先请求最新订单状态,避免刚点完「确认收单」后仍是旧数据
  887. try {
  888. const res = await uni.$u.api.getClueSendFormVoByOrderId({ id: this.orderDetail.id })
  889. const latestOrder = (res.code === 200 && res.data) ? res.data : null
  890. if (latestOrder) {
  891. this.$emit('update-order-detail', latestOrder)
  892. this._latestOrderForWarehouse = latestOrder
  893. } else {
  894. this._latestOrderForWarehouse = null
  895. }
  896. const orderToCheck = latestOrder || this.orderDetail
  897. if (orderToCheck.status != '3') {
  898. uni.$u.toast('该订单未收单,不能入库')
  899. return
  900. }
  901. } catch (e) {
  902. console.error('获取订单状态失败', e)
  903. uni.$u.toast('获取订单状态失败')
  904. return
  905. }
  906. // 校验表单
  907. this.$refs.form.validate().then(async () => {
  908. // 先解析收单人、鉴定人,用于弹窗展示及入库提交(与 PC warehouseDialog 一致)
  909. const orderSource = this._latestOrderForWarehouse || this.orderDetail
  910. const receiptNickName = orderSource?.receiptNickName ?? ''
  911. const authUserId = orderSource?.authenticateUserId ?? null
  912. let identifyingPerson = orderSource?.authenticateNickName ?? ''
  913. const identifyingPersonId = authUserId != null ? String(authUserId) : ''
  914. if (authUserId != null && authUserId !== '') {
  915. try {
  916. const userRes = await uni.$u.api.getUserByUserIds({ userIds: String(authUserId) })
  917. const list = userRes?.data ?? userRes
  918. const user = Array.isArray(list) ? list[0] : list
  919. if (user && (user.nickName != null || user.nickname != null)) {
  920. identifyingPerson = user.nickName ?? user.nickname ?? ''
  921. }
  922. } catch (e) {
  923. console.warn('根据鉴定人 id 获取昵称失败,使用发单返回的昵称', e)
  924. }
  925. }
  926. const receiptLabel = receiptNickName || '-'
  927. const identifyingLabel = identifyingPerson || '-'
  928. // 与 PC warehouseDialog 一致:品牌、来源、实价、型号、编码、保卡日期、备注
  929. const brandLabel = this.currentReceipt.brand || '-'
  930. const websiteLabel = this.orderDetail.website || '-'
  931. const sellingPriceLabel = this.currentReceipt.sellingPrice != null && this.currentReceipt.sellingPrice !== '' ? this.currentReceipt.sellingPrice : '-'
  932. const modelLabel = this.warehouseInfo.model || '-'
  933. const codeLabel = this.warehouseInfo.codeStorage || '-'
  934. const cardDateLabel = this.warehouseInfo.cardDate || '-'
  935. const receiptRemarkLabel = `${this.warehouseInfo.remarks || ''}${this.warehouseInfo.uploadedImage ? ';' + this.warehouseInfo.uploadedImage : ''}`.trim() || '-'
  936. uni.showModal({
  937. title: '确认入库',
  938. content: `是否确认入库该订单:${this.orderDetail.item}-${this.currentReceipt.brand}?\n收单人:${receiptLabel}\n鉴定人:${identifyingLabel}\n品牌:${brandLabel}\n来源:${websiteLabel}\n实价:${sellingPriceLabel}\n型号:${modelLabel}\n编码:${codeLabel}\n保卡日期:${cardDateLabel}\n备注:${receiptRemarkLabel}`,
  939. success: async (res) => {
  940. if (res.confirm) {
  941. //点击了确认入库,执行入库方法
  942. try {
  943. // 获取品牌ID
  944. const brandObj = this.brandList.find(item => item.dictLabel === this.currentReceipt.brand)
  945. const brandId = brandObj ? brandObj.dictValue : ''
  946. //建立入库data
  947. // 获取 PageThree 的高清实物图的 fileUrl 数组,顺序与 PageThree 的 displayImages 一致(按 fileIds 排序)
  948. let goodPicFileUrls = []
  949. if (this.currentReceipt.id && this.orderDetail.itemBrand) {
  950. try {
  951. const list = await imageUpload.getFileList(
  952. '2',
  953. '3',
  954. this.currentReceipt.id,
  955. this.orderDetail.itemBrand,
  956. this.currentReceipt.clueId
  957. )
  958. // 按 currentReceipt.fileIds 排序,与 PageThree 的 loadDetailImages 逻辑一致
  959. let sortedList = list || []
  960. if (this.currentReceipt.fileIds && sortedList.length > 0) {
  961. const sortedIds = this.currentReceipt.fileIds.split(',')
  962. sortedList = [...sortedList].sort((a, b) => {
  963. const indexA = sortedIds.indexOf(a.id)
  964. const indexB = sortedIds.indexOf(b.id)
  965. if (indexA === -1 && indexB === -1) return 0
  966. if (indexA === -1) return 1
  967. if (indexB === -1) return -1
  968. return indexA - indexB
  969. })
  970. }
  971. goodPicFileUrls = sortedList.map(item => item.fileUrl).filter(url => url)
  972. } catch (error) {
  973. console.error('获取高清实物图失败:', error)
  974. }
  975. }
  976. const warehouseData = {
  977. goodPicFileList: goodPicFileUrls,//商品图片 page3的高清实物图的url数组
  978. type: this.warehouseInfo.category || '',//商品分类
  979. dictLabel: this.currentReceipt.brand || '',//品牌名称
  980. dictValue: brandId || '',//品牌id
  981. indentifyCode: this.warehouseInfo.codeStorage || '',//独立编码
  982. costPrice: this.computedTotalCost || '',//总成本价
  983. recycleTime: dayjs().format('YYYY-MM-DD') + ' 00:00:00', // 回收日期,落库 recycle_time
  984. cardDate: this.warehouseInfo.cardDate || '',//保卡日期
  985. stockStatus: 0,//库存状态,0待入库,1已入库,因为是我们是预入库,所以是0
  986. origin: this.orderDetail.website,//来源
  987. actualPrice: this.currentReceipt.sellingPrice || '',//实价,也就是顶部的第三个价格sellingPrice
  988. price: this.currentReceipt.sellingPrice || '',//官方指导价,也就是顶部的第三个价格sellingPrice
  989. model: this.warehouseInfo.model || '',//型号
  990. recyclePerson: (this._latestOrderForWarehouse && this._latestOrderForWarehouse.receiptNickName != null) ? this._latestOrderForWarehouse.receiptNickName : (this.warehouseInfo.recyclePerson || ''),//回收人员:使用接口返回的收单人员姓名
  991. recyclePersonId: (this._latestOrderForWarehouse && this._latestOrderForWarehouse.receiptUserId != null) ? this._latestOrderForWarehouse.receiptUserId : (this.warehouseInfo.recyclePersonId || ''),//回收人员id:使用接口返回的收单人员id
  992. identifyingPerson: identifyingPerson || '', // 鉴定人:发单鉴定人,昵称由系统接口按 id 查询
  993. identifyingPersonId: identifyingPersonId || '' // 鉴定人 id:来自发单 authenticateUserId
  994. }
  995. if (!this.currentReceipt.warehouseId) {
  996. //当没有仓库id的时候调用新增仓库接口
  997. await uni.$u.api.wareHouseAdd(warehouseData)
  998. } else {
  999. // //当有仓库id的时候调用编辑仓库接口
  1000. // warehouseData.id = this.currentReceipt.warehouseId
  1001. // await uni.$u.api.wareHouseUpdate(warehouseData)
  1002. }
  1003. this.$refs.uToast.show({
  1004. type: 'success',
  1005. message: '入库成功',
  1006. complete: () => {
  1007. // uni.navigateBack({
  1008. // delta: 1
  1009. // })
  1010. }
  1011. })
  1012. } catch (error) {
  1013. console.error('入库失败:', error)
  1014. uni.$u.toast('入库失败')
  1015. }
  1016. }
  1017. }
  1018. })
  1019. }).catch(() => {
  1020. uni.$u.toast('请输入正确的信息')
  1021. })
  1022. },
  1023. /**
  1024. * 上传分成
  1025. */
  1026. async addShare() {
  1027. for (const item of this.profitSharingList) {
  1028. const data = {
  1029. id: item.id || '',
  1030. accountType: item.accountType == '1' ? 1 : 2,
  1031. clueId: this.currentReceipt.clueId,
  1032. commissionRate: item.commissionRate,
  1033. isCompanyPerformance: item.isCompanyPerformance == '1' ? 1 : 2,
  1034. sendFormId: this.currentReceipt.sendFormId,
  1035. userId: item.userId,
  1036. userName: item.userName,
  1037. receiptFormId: this.currentReceipt.id
  1038. }
  1039. if (item.id) {
  1040. await uni.$u.api.clueCommissionUpdate(data)
  1041. } else {
  1042. await uni.$u.api.clueCommissionAdd(data)
  1043. }
  1044. }
  1045. },
  1046. selectIsWarehouse() {
  1047. this.showIsWarehousePicker = true
  1048. },
  1049. handleConfirmIsWarehouse({ value }) {
  1050. this.isWarehouse = value[0].value
  1051. this.isWarehouseLabel = value[0].label
  1052. this.showIsWarehousePicker = false
  1053. },
  1054. }
  1055. }
  1056. </script>
  1057. <style scoped lang="scss">
  1058. @import '../styles/common.scss';
  1059. .page-four-container {
  1060. @extend .page-container;
  1061. padding-bottom: 100rpx;
  1062. }
  1063. .address-section {
  1064. padding: 20rpx;
  1065. // 防止 label 换行(uview-plus 内部类名为 u-form-item__*)
  1066. ::v-deep .u-form-item__body__left__content__label,
  1067. ::v-deep .up-form-item__body__left__content__label {
  1068. white-space: nowrap !important;
  1069. word-break: keep-all !important;
  1070. overflow: visible !important;
  1071. }
  1072. ::v-deep .u-form-item__body__left__content,
  1073. ::v-deep .up-form-item__body__left__content {
  1074. overflow: visible !important;
  1075. }
  1076. }
  1077. .info-row {
  1078. margin-bottom: 20rpx;
  1079. }
  1080. .info-input {
  1081. height: 65rpx;
  1082. border-radius: 8rpx;
  1083. border: 1rpx solid #e5e7eb;
  1084. padding: 20rpx 16rpx;
  1085. width: 100%;
  1086. box-sizing: border-box;
  1087. }
  1088. .info-textarea {
  1089. width: 100%;
  1090. box-sizing: border-box;
  1091. ::v-deep .u-textarea {
  1092. min-height: 200rpx;
  1093. border-radius: 8rpx;
  1094. border: 1rpx solid #e5e7eb;
  1095. padding: 20rpx 16rpx;
  1096. line-height: 1.5;
  1097. }
  1098. ::v-deep textarea {
  1099. min-height: 200rpx;
  1100. border-radius: 8rpx;
  1101. width: 100%;
  1102. box-sizing: border-box;
  1103. line-height: 1.5;
  1104. font-size: 28rpx;
  1105. }
  1106. }
  1107. .click-wrapper {
  1108. width: 100%;
  1109. cursor: pointer;
  1110. display: flex;
  1111. align-items: center;
  1112. }
  1113. .image-uploader {
  1114. width: 100%;
  1115. height: 65rpx;
  1116. border: 2rpx dashed #409eff;
  1117. border-radius: 8rpx;
  1118. display: flex;
  1119. align-items: center;
  1120. justify-content: center;
  1121. cursor: pointer;
  1122. background-color: #ecf5ff;
  1123. }
  1124. .image-preview {
  1125. width: 100%;
  1126. height: 100%;
  1127. object-fit: cover;
  1128. border-radius: 10rpx;
  1129. }
  1130. .split-table {
  1131. width: 100%;
  1132. margin-top: 20rpx;
  1133. }
  1134. .split-table-header {
  1135. background-color: #f5f7fa;
  1136. padding: 15rpx 0;
  1137. border-bottom: 1rpx solid #e4e7ed;
  1138. }
  1139. .split-table-row {
  1140. padding: 15rpx 0;
  1141. border-bottom: 1rpx solid #e4e7ed;
  1142. align-items: center;
  1143. }
  1144. .header-text {
  1145. @include font-styles($size: tiny, $weight: regular, $color: tertiary);
  1146. text-align: center;
  1147. display: block;
  1148. }
  1149. .table-cell {
  1150. display: flex;
  1151. align-items: center;
  1152. justify-content: center;
  1153. padding: 0 10rpx;
  1154. }
  1155. .percentage-input {
  1156. text-align: center;
  1157. background-color: #f9f9f9;
  1158. padding: 0rpx !important;
  1159. }
  1160. .account-type {
  1161. padding: 4rpx 16rpx;
  1162. border-radius: 12rpx;
  1163. font-size: 24rpx;
  1164. font-weight: 500;
  1165. color: #fff;
  1166. text-align: center;
  1167. cursor: pointer;
  1168. &.frontend {
  1169. background-color: #409eff;
  1170. }
  1171. &.backend {
  1172. background-color: #909399;
  1173. }
  1174. }
  1175. .radio-wrapper {
  1176. cursor: pointer;
  1177. display: flex;
  1178. align-items: center;
  1179. justify-content: center;
  1180. }
  1181. .radio-circle {
  1182. width: 32rpx;
  1183. height: 32rpx;
  1184. border-radius: 50%;
  1185. border: 2rpx solid #dcdfe6;
  1186. display: flex;
  1187. align-items: center;
  1188. justify-content: center;
  1189. transition: all 0.3s ease;
  1190. &.active {
  1191. border-color: #67c23a;
  1192. background-color: #67c23a;
  1193. }
  1194. }
  1195. .confirm-button-container {
  1196. padding: 40rpx 0;
  1197. margin-top: 20rpx;
  1198. }
  1199. .confirm-button-container .next-btn {
  1200. width: 100%;
  1201. height: 80rpx;
  1202. line-height: 80rpx;
  1203. text-align: center;
  1204. border-radius: 11px;
  1205. }
  1206. .add-button-container {
  1207. justify-content: space-between;
  1208. }
  1209. </style>