You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

883 lines
21 KiB

1 year ago
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
1 year ago
​
​
​
​
3 months ago
​
​
​
​
1 year ago
​
​
​
​
​
1 month ago
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
11 months ago
11 months ago
​
​
​
​
​
11 months ago
11 months ago
​
​
11 months ago
11 months ago
​
1 year ago
​
​
​
11 months ago
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
11 months ago
1 year ago
1 year ago
​
​
​
​
​
​
​
​
1 year ago
11 months ago
​
​
​
​
1 year ago
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
1 year ago
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
1 month ago
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 month ago
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 month ago
​
​
​
​
11 months ago
​
​
​
​
1 month ago
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
1 year ago
​
​
​
1 year ago
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
11 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <div>
  3. <div class="pda-container">
  4. <!-- 头部栏 -->
  5. <div class="header-bar">
  6. <div class="header-left" @click="handleBack">
  7. <i class="el-icon-arrow-left"></i>
  8. <span>标签查询</span>
  9. </div>
  10. <div class="header-right" @click="goHome">
  11. 首页
  12. </div>
  13. </div>
  14. <div class="table-body" style="max-height: 500px; overflow-y: auto;">
  15. <div class="main-content form-section">
  16. <!-- 标签扫描输入框 -->
  17. <div class="input-group">
  18. <el-input
  19. v-model="labelCode"
  20. placeholder="请扫描标签编码"
  21. class="form-input"
  22. clearable
  23. inputmode="none"
  24. autocomplete="off"
  25. autocorrect="off"
  26. spellcheck="false"
  27. @keyup.enter.native="handleLabelScan"
  28. ref="labelInput"
  29. />
  30. </div>
  31. <!-- 标签信息显示 (扫描后显示) -->
  32. <div v-if="labelInfo" class="info-section">
  33. <div class="info-title">
  34. <i class="el-icon-document">标签信息</i>
  35. <button
  36. class="print-btn"
  37. @click="handlePrint"
  38. :disabled="printLoading"
  39. >
  40. <i :class="printLoading ? 'el-icon-loading' : 'el-icon-printer'"></i>
  41. {{ printLoading ? '打印中...' : '打印' }}
  42. </button>
  43. </div>
  44. <div class="info-row">
  45. <span class="info-label">标签编码:</span>
  46. <span class="info-value">{{ labelInfo.unitId || '-' }}</span>
  47. </div>
  48. <div class="info-row">
  49. <span class="info-label">工厂编码:</span>
  50. <span class="info-value">{{ labelInfo.site || '-' }}</span>
  51. </div>
  52. <div class="info-row">
  53. <span class="info-label">物料编码:</span>
  54. <span class="info-value">{{ labelInfo.partNo || '-' }}</span>
  55. </div>
  56. <!-- 只读查询回显完整库存类型,Q仍是实物在库但不可发料。- rqrq -->
  57. <div class="info-row">
  58. <span class="info-label">库存类型:</span>
  59. <span class="info-value">{{ labelInfo.inStockFlag === 'X' ? '未入库' : labelInfo.inStockFlag === 'N' ? '不在库' : labelInfo.inStockFlag === 'Y' ? '在库' : labelInfo.inStockFlag === 'Q' ? '隔离' : (labelInfo.inStockFlag || '-') }}</span>
  60. </div>
  61. <div class="info-row">
  62. <span class="info-label">数量:</span>
  63. <span class="info-value">{{ labelInfo.qty || '0' }}</span>
  64. </div>
  65. <div class="info-row">
  66. <span class="info-label">批次号:</span>
  67. <span class="info-value">{{ labelInfo.batchNo || '-' }}</span>
  68. </div>
  69. <div class="info-row">
  70. <span class="info-label">仓库:</span>
  71. <span class="info-value">{{ labelInfo.warehouseId || '-' }}</span>
  72. </div>
  73. <div class="info-row">
  74. <span class="info-label">库位:</span>
  75. <span class="info-value">{{ labelInfo.locationId || '-' }}</span>
  76. </div>
  77. <div class="info-row">
  78. <span class="info-label">WDR:</span>
  79. <span class="info-value">{{ labelInfo.wdr || '-' }}</span>
  80. </div>
  81. <div class="info-row">
  82. <span class="info-label">engChgLevel:</span>
  83. <span class="info-value">{{ labelInfo.engChgLevel }}</span>
  84. </div>
  85. <div class="info-row">
  86. <span class="info-label">expiredDate:</span>
  87. <span class="info-value">{{ formatDate(labelInfo.expiredDate) }}</span>
  88. </div>
  89. <div class="info-row">
  90. <span class="info-label">创建时间:</span>
  91. <span class="info-value">{{ formatDate(labelInfo.createdDate) }}</span>
  92. </div>
  93. <!-- 上次盘点日期 - rqrq -->
  94. <div class="info-row">
  95. <span class="info-label">上次盘点日期:</span>
  96. <span class="info-value">{{ formatDate(labelInfo.lastCountDate) }}</span>
  97. </div>
  98. <!-- 预定申请单号 - rqrq -->
  99. <div class="info-row" v-if="labelInfo.reserveOrderRef1">
  100. <span class="info-label">预定申请单号:</span>
  101. <span class="info-value">{{ labelInfo.reserveOrderRef1 || '-' }}</span>
  102. </div>
  103. <!-- 预定订单号 - rqrq -->
  104. <div class="info-row" v-if="labelInfo.reserveOrderRef3">
  105. <span class="info-label">预定订单号:</span>
  106. <span class="info-value">{{ labelInfo.reserveOrderRef3 || '-' }}</span>
  107. </div>
  108. </div>
  109. <!-- 底部操作按钮 -->
  110. <div v-if="labelInfo" class="bottom-actions">
  111. <button
  112. class="action-btn primary"
  113. @click="showSplitDialog"
  114. >
  115. 拆分
  116. </button>
  117. <button
  118. class="action-btn secondary"
  119. @click="clearData"
  120. >
  121. 清空
  122. </button>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <!-- 拆分对话框 -->
  128. <el-dialog
  129. title="标签拆分"
  130. :visible.sync="splitDialogVisible"
  131. width="90%"
  132. :close-on-click-modal="false"
  133. :append-to-body="true"
  134. :modal-append-to-body="true"
  135. >
  136. <div class="split-dialog-content">
  137. <div class="split-info-row">
  138. <span class="split-label">原标签编码:</span>
  139. <span class="split-value">{{ labelInfo ? labelInfo.unitId : '' }}</span>
  140. </div>
  141. <div class="split-info-row">
  142. <span class="split-label">当前数量:</span>
  143. <span class="split-value">{{ labelInfo ? labelInfo.qty : 0 }}</span>
  144. </div>
  145. <div class="split-input-group">
  146. <label class="split-label required">拆分数量:</label>
  147. <el-input
  148. v-model="splitQty"
  149. type="number"
  150. placeholder="请输入拆分数量(必须小于100)"
  151. class="split-input"
  152. ref="splitInput"
  153. />
  154. <div class="split-hint" v-if="splitQty && !isValidSplitQty">
  155. <i class="el-icon-warning"></i>
  156. 拆分数量必须大于0且小于当前数量
  157. </div>
  158. </div>
  159. <div class="split-info-row">
  160. <span class="split-label">拆分后原标签剩余:</span>
  161. <span class="split-value split-remain">{{ calculateRemainQty }}</span>
  162. </div>
  163. </div>
  164. <div slot="footer" class="dialog-footer">
  165. <button class="dialog-btn cancel" @click="splitDialogVisible = false">
  166. 取消
  167. </button>
  168. <button
  169. class="dialog-btn confirm"
  170. @click="confirmSplit"
  171. :disabled="splitLoading || !isValidSplitQty"
  172. >
  173. {{ splitLoading ? '处理中...' : '确定拆分' }}
  174. </button>
  175. </div>
  176. </el-dialog>
  177. </div>
  178. </template>
  179. <script>
  180. import { queryLabelInfo, splitLabel } from '@/api/inventory/label'
  181. import { printLabelCommon } from '@/api/production/production-inbound.js'
  182. export default {
  183. name: 'LabelQuery',
  184. data() {
  185. return {
  186. site: localStorage.getItem('site'),
  187. labelCode: '',
  188. labelInfo: null,
  189. loading: false,
  190. printLoading: false,
  191. splitDialogVisible: false,
  192. splitQty: '',
  193. splitLoading: false,
  194. // 离开或重置时递增,避免已发出的查询回填到空页面 - rqrq
  195. scanRequestSeq: 0
  196. };
  197. },
  198. computed: {
  199. /**
  200. * 计算拆分后原标签剩余数量
  201. */
  202. calculateRemainQty() {
  203. if (!this.labelInfo || !this.splitQty) {
  204. return this.labelInfo ? this.labelInfo.qty : 0;
  205. }
  206. const currentQty = parseFloat(this.labelInfo.qty) || 0;
  207. const split = parseFloat(this.splitQty) || 0;
  208. const remain = currentQty - split;
  209. return remain >= 0 ? remain : 0;
  210. },
  211. /**
  212. * 验证拆分数量是否有效
  213. */
  214. isValidSplitQty() {
  215. if (!this.splitQty || !this.labelInfo) {
  216. return false;
  217. }
  218. const split = parseFloat(this.splitQty);
  219. const current = parseFloat(this.labelInfo.qty) || 0;
  220. return split > 0 && split < current;
  221. }
  222. },
  223. methods: {
  224. /**
  225. * 返回上一页前清空扫描结果,避免 keep-alive 再次进入残留上一张标签 - rqrq
  226. */
  227. handleBack() {
  228. this.resetPage(false);
  229. this.$router.back();
  230. },
  231. /**
  232. * 回首页前同样清空,避免下次从菜单进来还带着上次标签 - rqrq
  233. */
  234. goHome() {
  235. this.resetPage(false);
  236. this.$router.push({ path: '/' });
  237. },
  238. /**
  239. * 统一清空标签、拆分弹窗和加载态,避免缓存页带回上次查询结果 - rqrq
  240. */
  241. resetPage(needFocus = true) {
  242. this.scanRequestSeq += 1;
  243. this.site = localStorage.getItem('site');
  244. this.labelCode = '';
  245. this.labelInfo = null;
  246. this.loading = false;
  247. this.printLoading = false;
  248. this.splitDialogVisible = false;
  249. this.splitQty = '';
  250. this.splitLoading = false;
  251. if (needFocus) {
  252. this.focusLabelInput();
  253. }
  254. },
  255. /**
  256. * 处理标签扫描
  257. */
  258. handleLabelScan() {
  259. if (!this.labelCode.trim()) {
  260. this.$message.error('请扫描有效的标签编码');
  261. return;
  262. }
  263. this.loading = true;
  264. this.scanRequestSeq += 1;
  265. const requestSeq = this.scanRequestSeq;
  266. queryLabelInfo({
  267. site: this.site,
  268. labelCode: this.labelCode.trim()
  269. }).then(({ data }) => {
  270. if (requestSeq !== this.scanRequestSeq) {
  271. return;
  272. }
  273. this.loading = false;
  274. if (data && data.code === 0) {
  275. this.labelInfo = data.data;
  276. this.$message.success('查询成功');
  277. } else {
  278. this.$message.error(data.msg || '标签不存在');
  279. this.labelCode = '';
  280. this.labelInfo = null;
  281. this.focusLabelInput();
  282. }
  283. }).catch(error => {
  284. if (requestSeq !== this.scanRequestSeq) {
  285. return;
  286. }
  287. this.loading = false;
  288. console.error('查询标签失败:', error);
  289. this.$message.error('查询异常');
  290. this.labelCode = '';
  291. this.labelInfo = null;
  292. this.focusLabelInput();
  293. });
  294. },
  295. /**
  296. * 清空数据
  297. */
  298. clearData() {
  299. this.labelCode = '';
  300. this.labelInfo = null;
  301. this.focusLabelInput();
  302. },
  303. /**
  304. * 聚焦标签输入框
  305. */
  306. focusLabelInput() {
  307. this.$nextTick(() => {
  308. if (this.$refs.labelInput) {
  309. this.$refs.labelInput.focus();
  310. }
  311. });
  312. },
  313. /**
  314. * 格式化日期
  315. */
  316. formatDate(date) {
  317. if (!date) return '-';
  318. const d = new Date(date);
  319. const year = d.getFullYear();
  320. const month = String(d.getMonth() + 1).padStart(2, '0');
  321. const day = String(d.getDate()).padStart(2, '0');
  322. const hours = String(d.getHours()).padStart(2, '0');
  323. const minutes = String(d.getMinutes()).padStart(2, '0');
  324. return `${year}-${month}-${day} ${hours}:${minutes}`;
  325. },
  326. /**
  327. * 获取状态标签类型
  328. */
  329. getStatusType(inStockFlag) {
  330. return inStockFlag === 'Y' ? 'success' : 'danger';
  331. },
  332. /**
  333. * 处理打印
  334. */
  335. handlePrint() {
  336. if (!this.labelInfo || !this.labelInfo.unitId) {
  337. this.$message.error('没有可打印的标签信息');
  338. return;
  339. }
  340. if (!this.labelInfo.site) {
  341. this.$message.error('标签缺少工厂编码,无法打印');
  342. return;
  343. }
  344. let printLabelType;
  345. if (this.labelInfo.partNo && this.labelInfo.partNo.startsWith("80")) {
  346. printLabelType = '库存成品标签';
  347. } else {
  348. printLabelType = 'BIL标签';
  349. }
  350. // 调用打印方法,传入unitId数组和标签类型
  351. this.printViaServer([this.labelInfo.unitId], printLabelType);
  352. },
  353. /**
  354. * 通过服务器打印
  355. * @param {Array} unitIds - HU unitId列表
  356. * @param {String} printLabelType - 标签类型
  357. */
  358. async printViaServer(unitIds, printLabelType) {
  359. if (!unitIds || unitIds.length === 0) {
  360. console.warn('没有可打印的标签');
  361. return;
  362. }
  363. this.printLoading = true;
  364. try {
  365. const printRequest = {
  366. userId: localStorage.getItem('userName'),
  367. username: localStorage.getItem('userName'),
  368. // 查询已不再按登录工厂过滤,打印必须用当前 HandlingUnit.site,否则会按错工厂取标签数据
  369. site: this.labelInfo.site,
  370. unitIds: unitIds,
  371. labelType: printLabelType
  372. };
  373. console.log('打印请求:', printRequest);
  374. const { data } = await printLabelCommon(printRequest);
  375. if (data.code === 200 || data.code === 0) {
  376. this.$message.success(`打印任务已发送!`);
  377. } else {
  378. this.$message.error(data.msg || '打印失败');
  379. }
  380. } catch (error) {
  381. console.error('服务器打印失败:', error);
  382. this.$message.error(`打印失败: ${error.message || error}`);
  383. } finally {
  384. this.printLoading = false;
  385. }
  386. },
  387. /**
  388. * 显示拆分对话框
  389. */
  390. showSplitDialog() {
  391. if (!this.labelInfo) {
  392. this.$message.error('没有可拆分的标签');
  393. return;
  394. }
  395. this.splitQty = '';
  396. this.splitDialogVisible = true;
  397. // 聚焦到拆分数量输入框
  398. this.$nextTick(() => {
  399. if (this.$refs.splitInput) {
  400. this.$refs.splitInput.focus();
  401. }
  402. });
  403. },
  404. /**
  405. * 确认拆分
  406. */
  407. async confirmSplit() {
  408. // 验证拆分数量
  409. if (!this.splitQty) {
  410. this.$message.error('请输入拆分数量');
  411. return;
  412. }
  413. const splitQty = parseFloat(this.splitQty);
  414. const currentQty = parseFloat(this.labelInfo.qty);
  415. if (splitQty <= 0) {
  416. this.$message.error('拆分数量必须大于0');
  417. return;
  418. }
  419. if (splitQty >= currentQty) {
  420. this.$message.error('拆分数量必须小于当前数量');
  421. return;
  422. }
  423. if (!this.labelInfo.site) {
  424. this.$message.error('标签缺少工厂编码,无法拆分');
  425. return;
  426. }
  427. this.splitLoading = true;
  428. try {
  429. const { data } = await splitLabel({
  430. // 拆分按 site + unitId 定位原标签,必须用 HandlingUnit.site,不能用登录工厂
  431. site: this.labelInfo.site,
  432. unitId: this.labelInfo.unitId,
  433. splitQty: splitQty,
  434. operatorName: localStorage.getItem('userName')
  435. });
  436. if (data && data.code === 0) {
  437. const result = data.data;
  438. this.$message.success('拆分成功!');
  439. // 关闭对话框
  440. this.splitDialogVisible = false;
  441. // 确定标签类型
  442. let printLabelType;
  443. if (this.labelInfo.partNo && this.labelInfo.partNo.startsWith("80")) {
  444. printLabelType = '库存成品标签';
  445. } else {
  446. printLabelType = 'BIL标签';
  447. }
  448. // 打印原标签和新标签
  449. console.log('打印标签:', [result.originalUnitId, result.newUnitId]);
  450. await this.printViaServer([result.originalUnitId, result.newUnitId], printLabelType);
  451. // 刷新标签信息(显示更新后的数量)
  452. this.labelCode = this.labelInfo.unitId;
  453. this.handleLabelScan();
  454. } else {
  455. this.$message.error(data.msg || '拆分失败');
  456. }
  457. } catch (error) {
  458. console.error('拆分标签失败:', error);
  459. this.$message.error('拆分异常: ' + (error.message || error));
  460. } finally {
  461. this.splitLoading = false;
  462. }
  463. }
  464. },
  465. mounted() {
  466. this.resetPage(true);
  467. },
  468. // keep-alive 再次进入时清空上次标签,回到待扫描 - rqrq
  469. activated() {
  470. this.resetPage(true);
  471. },
  472. beforeRouteLeave(to, from, next) {
  473. this.resetPage(false);
  474. next();
  475. }
  476. };
  477. </script>
  478. <style scoped>
  479. .input-group {
  480. margin-bottom: 1px !important;
  481. }
  482. /* PDA容器样式 */
  483. .pda-container {
  484. width: 100vw;
  485. height: 120vh;
  486. display: flex;
  487. flex-direction: column;
  488. background: #f5f5f5;
  489. font-family: 'Arial', sans-serif;
  490. }
  491. /* 头部栏样式 */
  492. .header-bar {
  493. display: flex;
  494. justify-content: space-between;
  495. align-items: center;
  496. padding: 8px 16px;
  497. background: #17B3A3;
  498. color: white;
  499. height: 40px;
  500. min-height: 40px;
  501. max-height: 40px;
  502. }
  503. .header-left {
  504. display: flex;
  505. align-items: center;
  506. cursor: pointer;
  507. }
  508. .header-left i {
  509. margin-right: 8px;
  510. font-size: 18px;
  511. }
  512. .header-left span {
  513. font-size: 16px;
  514. font-weight: 500;
  515. }
  516. .header-right {
  517. cursor: pointer;
  518. font-size: 14px;
  519. padding: 4px 8px;
  520. border-radius: 4px;
  521. }
  522. /* 主要内容区 */
  523. .table-body {
  524. flex: 1;
  525. overflow-y: auto;
  526. }
  527. .main-content {
  528. padding: 16px;
  529. }
  530. /* 输入组样式 */
  531. .input-label {
  532. display: block;
  533. margin-bottom: 8px;
  534. font-size: 14px;
  535. font-weight: 500;
  536. color: #333;
  537. }
  538. .form-input {
  539. width: 100%;
  540. height: 44px;
  541. }
  542. /* 信息展示区 */
  543. .info-section {
  544. background: white;
  545. border-radius: 8px;
  546. padding: 16px;
  547. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  548. }
  549. .info-title {
  550. display: flex;
  551. align-items: center;
  552. justify-content: space-between;
  553. font-size: 16px;
  554. font-weight: bold;
  555. color: #17B3A3;
  556. margin-bottom: 6px;
  557. padding-bottom: 5px;
  558. border-bottom: 2px solid #17B3A3;
  559. }
  560. .info-title i {
  561. margin-right: 8px;
  562. font-size: 18px;
  563. }
  564. /* 打印按钮 */
  565. .print-btn {
  566. display: flex;
  567. align-items: center;
  568. gap: 4px;
  569. padding: 6px 12px;
  570. background: #17B3A3;
  571. color: white;
  572. border: none;
  573. border-radius: 4px;
  574. font-size: 14px;
  575. cursor: pointer;
  576. transition: all 0.2s;
  577. white-space: nowrap;
  578. }
  579. .print-btn:hover:not(:disabled) {
  580. background: #15a394;
  581. transform: translateY(-1px);
  582. box-shadow: 0 2px 8px rgba(23, 179, 163, 0.3);
  583. }
  584. .print-btn:active:not(:disabled) {
  585. transform: translateY(0);
  586. }
  587. .print-btn:disabled {
  588. background: #ccc;
  589. cursor: not-allowed;
  590. opacity: 0.6;
  591. }
  592. .print-btn i {
  593. margin-right: 0;
  594. font-size: 16px;
  595. }
  596. .info-row {
  597. display: flex;
  598. justify-content: space-between;
  599. align-items: flex-start;
  600. padding: 10px 0;
  601. border-bottom: 1px solid #f0f0f0;
  602. }
  603. .info-row:last-child {
  604. border-bottom: none;
  605. }
  606. .info-label {
  607. font-size: 14px;
  608. color: #666;
  609. min-width: 90px;
  610. flex-shrink: 0;
  611. }
  612. .info-value {
  613. font-size: 14px;
  614. font-weight: 500;
  615. color: #333;
  616. flex: 1;
  617. text-align: right;
  618. word-break: break-all;
  619. }
  620. /* 底部按钮区 */
  621. .bottom-actions {
  622. display: flex;
  623. gap: 12px;
  624. padding-top: 16px;
  625. }
  626. .action-btn {
  627. flex: 1;
  628. padding: 12px 24px;
  629. border: none;
  630. border-radius: 6px;
  631. font-size: 16px;
  632. font-weight: 500;
  633. cursor: pointer;
  634. transition: all 0.2s;
  635. min-height: 44px;
  636. }
  637. .action-btn.primary {
  638. background: #17B3A3;
  639. color: white;
  640. }
  641. .action-btn.primary:hover {
  642. background: #15a394;
  643. }
  644. .action-btn.primary:disabled {
  645. background: #ccc;
  646. cursor: not-allowed;
  647. }
  648. .action-btn.secondary {
  649. background: #f5f5f5;
  650. color: #333;
  651. border: 1px solid #ddd;
  652. }
  653. .action-btn.secondary:hover {
  654. background: #e8e8e8;
  655. }
  656. /* 拆分对话框样式 */
  657. .split-dialog-content {
  658. padding: 16px 0;
  659. }
  660. .split-info-row {
  661. display: flex;
  662. justify-content: space-between;
  663. align-items: center;
  664. padding: 12px 0;
  665. border-bottom: 1px solid #f0f0f0;
  666. }
  667. .split-label {
  668. font-size: 14px;
  669. color: #666;
  670. font-weight: 500;
  671. }
  672. .split-value {
  673. font-size: 15px;
  674. font-weight: 600;
  675. color: #333;
  676. }
  677. .split-value.split-remain {
  678. color: #17B3A3;
  679. font-size: 16px;
  680. }
  681. .split-input-group {
  682. margin: 20px 0;
  683. }
  684. .split-input-group .split-label {
  685. display: block;
  686. margin-bottom: 8px;
  687. }
  688. .split-input {
  689. width: 100%;
  690. }
  691. /* 对话框底部按钮 */
  692. .dialog-footer {
  693. display: flex;
  694. gap: 12px;
  695. padding-top: 16px;
  696. }
  697. .dialog-btn {
  698. flex: 1;
  699. padding: 12px 24px;
  700. border: none;
  701. border-radius: 6px;
  702. font-size: 16px;
  703. font-weight: 500;
  704. cursor: pointer;
  705. transition: all 0.2s;
  706. min-height: 44px;
  707. }
  708. .dialog-btn.confirm {
  709. background: #17B3A3;
  710. color: white;
  711. }
  712. .dialog-btn.confirm:hover:not(:disabled) {
  713. background: #15a394;
  714. }
  715. .dialog-btn.confirm:disabled {
  716. background: #ccc;
  717. cursor: not-allowed;
  718. opacity: 0.6;
  719. }
  720. .dialog-btn.cancel {
  721. background: #f5f5f5;
  722. color: #333;
  723. border: 1px solid #ddd;
  724. }
  725. .dialog-btn.cancel:hover {
  726. background: #e8e8e8;
  727. }
  728. /* 强制对话框显示在最上层 */
  729. ::v-deep .el-dialog__wrapper {
  730. z-index: 9999 !important;
  731. }
  732. ::v-deep .el-dialog {
  733. z-index: 10000 !important;
  734. }
  735. ::v-deep .v-modal {
  736. z-index: 9998 !important;
  737. }
  738. /* 响应式设计 */
  739. @media screen and (max-width: 480px) {
  740. .header-bar {
  741. padding: 8px 12px;
  742. }
  743. .main-content {
  744. padding: 12px;
  745. }
  746. .info-section {
  747. padding: 2px;
  748. }
  749. .info-label {
  750. font-size: 13px;
  751. min-width: 80px;
  752. }
  753. .info-value {
  754. font-size: 13px;
  755. }
  756. .action-btn {
  757. padding: 10px 16px;
  758. font-size: 14px;
  759. }
  760. }
  761. </style>