PageFour.vue 45 KB

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