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.

921 lines
23 KiB

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 year 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 year 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 year 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 year 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 year 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 year 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 year 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 year 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 year 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 year 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 year ago
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
1 year ago
1 year ago
​
​
​
​
  1. <template>
  2. <div class="pda-container">
  3. <!-- 头部栏 -->
  4. <div class="header-bar">
  5. <div class="header-left" @click="handleBack">
  6. <i class="el-icon-arrow-left"></i>
  7. <span>直接领料</span>
  8. </div>
  9. <div class="header-right" @click="$router.push({ path: '/' })">
  10. 首页
  11. </div>
  12. </div>
  13. <!-- 扫描框 -->
  14. <div class="search-container">
  15. <el-input clearable class="compact-input" v-model="scanCode" placeholder="请扫描材料纸质标签" prefix-icon="el-icon-search"
  16. @keyup.enter.native="handleScan" ref="scanInput" />
  17. <div class="mode-switch">
  18. <el-switch class="custom-switch" v-model="isRemoveMode" active-color="#ff4949" inactive-color="#13ce66">
  19. </el-switch>
  20. <span v-if="isRemoveMode" class="switch-text">{{ '移除' }}</span>
  21. <span v-else class="switch-text2">{{ '添加' }}</span>
  22. </div>
  23. </div>
  24. <!-- 是否部分勾选框 -->
  25. <div class="partial-checkbox-container">
  26. <el-checkbox v-model="isPartial" :disabled="scannedLabels.length > 0">是否部分领料</el-checkbox>
  27. </div>
  28. <!-- 统一滚动容器 -->
  29. <div class="scrollable-content">
  30. <!-- 工单物料信息 -->
  31. <div class="work-order-list" v-if="workOrderNo && componentPartNo">
  32. <div class="work-order-card">
  33. <div class="card-title">
  34. <span class="title-label">工单号:{{ workOrderNo }}&nbsp;&nbsp;行号:{{itemNo}}</span>
  35. </div>
  36. <!-- 物料描述单独一行 -->
  37. <div class="part-desc-row">
  38. <span class="desc-text">物料编码:{{ componentPartNo }}</span>
  39. </div>
  40. <div class="part-desc-row">
  41. <span class="desc-text">物料名称:{{ componentPartDesc }}</span>
  42. </div>
  43. <div class="card-details">
  44. <div class="detail-item">
  45. <div class="detail-label">需求数量</div>
  46. <div class="detail-value">{{ requiredQty }}</div>
  47. </div>
  48. <div class="detail-item">
  49. <div class="detail-label">已发数量</div>
  50. <div class="detail-value">{{ issuedQty }}</div>
  51. </div>
  52. <div class="detail-item">
  53. <div class="detail-label">本次</div>
  54. <div class="detail-value">{{ totalScannedQty }}</div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="section-title">
  60. <div class="title-left">
  61. <i class="el-icon-circle-check"></i>
  62. <span>出库信息确认</span>
  63. </div>
  64. </div>
  65. <!-- 标签列表 -->
  66. <div class="label-list">
  67. <div class="list-header">
  68. <div class="col-no">NO.</div>
  69. <div class="col-label">标签条码</div>
  70. <div class="col-batch">库位</div>
  71. <div class="col-batch">批次号</div>
  72. <div v-if="isPartial" class="col-qty">剩余高</div>
  73. <div class="col-qty">数量</div>
  74. </div>
  75. <div class="list-body">
  76. <div v-for="(label, index) in scannedLabels" :key="label.id" class="list-item"
  77. :class="{ 'clickable': isPartial }" @click="isPartial ? handleLabelClick(label, index) : null">
  78. <div class="col-no">{{ index+1 }}</div>
  79. <div class="col-label">{{ label.labelCode }}</div>
  80. <div class="col-batch">{{label.locationId}}</div>
  81. <div class="col-batch">{{ label.batchNo }}</div>
  82. <div v-if="isPartial" class="col-qty">{{ label.height.toFixed(3) }}</div>
  83. <div class="col-qty">
  84. <span class="quantity-display">{{ label.quantity }}</span>
  85. <i v-if="isPartial" class="el-icon-edit edit-icon"></i>
  86. </div>
  87. </div>
  88. <div v-if="scannedLabels.length === 0" class="empty-labels">
  89. <p>暂无扫描标签</p>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. <!-- 底部操作按钮 -->
  95. <div class="bottom-actions">
  96. <el-button class="action-btn secondary" :loading="loading" @click="confirmIssue">
  97. 确定
  98. </el-button>
  99. <!-- <button class="action-btn secondary" style="margin-left: 10px;">
  100. 打印
  101. </button> -->
  102. <button class="action-btn secondary" style="margin-left: 10px;" @click="clearScannedLabels">
  103. 取消
  104. </button>
  105. </div>
  106. <!-- 修改数量弹框 -->
  107. <div v-if="quantityDialogVisible" class="edit-overlay" @click.self="quantityDialogVisible = false">
  108. <div class="edit-modal">
  109. <div class="modal-header">
  110. <span class="modal-title">修改数量</span>
  111. <i class="el-icon-close close-btn" @click="quantityDialogVisible = false"></i>
  112. </div>
  113. <div class="modal-body">
  114. <div class="form-group">
  115. <label class="form-label">标签条码</label>
  116. <el-input v-model="currentEditLabel.labelCode" disabled class="form-input" />
  117. </div>
  118. <div class="form-group">
  119. <label class="form-label">当前数量</label>
  120. <el-input v-model="currentEditLabel.quantity" disabled class="form-input" />
  121. </div>
  122. <div class="form-group">
  123. <label class="form-label">剩余高度(mm) <span class="required">*</span></label>
  124. <el-input-number v-model="editHeight" :min="0.001" :precision="3" :step="0.001" class="form-input"
  125. style="width: 100%;" :controls="false">
  126. </el-input-number>
  127. </div>
  128. <div class="form-group">
  129. <label class="form-label">需要发料数量 <span class="required">*</span></label>
  130. <el-input-number v-model="editQuantity" :min="0.0001" :precision="4" :step="0.0001" class="form-input"
  131. style="width: 100%;" :controls="false">
  132. </el-input-number>
  133. </div>
  134. </div>
  135. <div class="modal-footer">
  136. <button class="btn-cancel" @click="quantityDialogVisible = false">取消</button>
  137. <button class="btn-confirm" @click="confirmQuantityChange">确定</button>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </template>
  143. <script>
  144. import {
  145. scanMaterialLabelIssue,
  146. confirmDirectIssue,
  147. } from '@/api/production/production-issue'
  148. import moment from 'moment'
  149. export default {
  150. data() {
  151. return {
  152. scanCode: '',
  153. isRemoveMode: false,
  154. isPartial: true,
  155. scannedLabels: [],
  156. workOrderNo: '',
  157. componentPartNo: '',
  158. componentPartDesc: '',
  159. requiredQty: 0,
  160. issuedQty: 0,
  161. itemNo: '',
  162. site: '',
  163. loading: false,
  164. issueInfo: {},
  165. quantityDialogVisible: false,
  166. currentEditLabel: {},
  167. currentEditIndex: -1,
  168. editQuantity: 0,
  169. editHeight: 0,
  170. }
  171. },
  172. computed: {
  173. totalScannedQty() {
  174. const total = this.scannedLabels.reduce((sum, l) => sum + (l.quantity || 0), 0)
  175. // 处理浮点数精度问题,保留4位小数
  176. return Math.round(total * 10000) / 10000
  177. },
  178. },
  179. methods: {
  180. formatDate(date) {
  181. return date ? moment(date).format('YYYY-MM-DD') : ''
  182. },
  183. handleScan() {
  184. if (!this.scanCode.trim()) return
  185. if (this.isRemoveMode) {
  186. this.removeLabelByCode(this.scanCode.trim())
  187. } else {
  188. this.validateAndAddLabel(this.scanCode.trim())
  189. }
  190. this.scanCode = ''
  191. },
  192. validateAndAddLabel(labelCode) {
  193. const params = {
  194. scannedLabel: labelCode,
  195. workOrderNo: this.workOrderNo,
  196. componentPartNo: this.componentPartNo,
  197. site: this.site,
  198. }
  199. scanMaterialLabelIssue(params)
  200. .then(({ data }) => {
  201. if (data && data.code === 0) {
  202. const exists = this.scannedLabels.find(
  203. (item) => item.labelCode === labelCode
  204. )
  205. if (exists) {
  206. this.$message.warning('该标签已扫描,请勿重复扫描')
  207. return
  208. }
  209. /* if (data.labelInfo.materialCode !== this.materialCode) {
  210. this.$message.error('标签物料编码与选择的材料不匹配')
  211. return
  212. } */
  213. const newLabel = {
  214. id: Date.now(),
  215. labelCode,
  216. componentPartNo: data.labelInfo.partNo,
  217. quantity: data.labelInfo.availableQty,
  218. batchNo: data.labelInfo.batchNo,
  219. warehouseId: data.labelInfo.warehouseId,
  220. locationId: data.labelInfo.locationId,
  221. height: data.labelInfo.height || 0,
  222. wdrNo: data.labelInfo.wdrNo,
  223. engChgLevel: data.labelInfo.engChgLevel,
  224. }
  225. this.scannedLabels.push(newLabel)
  226. console.log(this.scannedLabels)
  227. this.$message.success('扫描成功')
  228. // 如果勾选了"是否部分",添加后直接弹出修改数量弹框
  229. if (this.isPartial) {
  230. const newIndex = this.scannedLabels.length - 1
  231. this.$nextTick(() => {
  232. this.handleLabelClick(newLabel, newIndex)
  233. })
  234. }
  235. } else {
  236. this.$message.error(data.msg || '标签验证失败')
  237. }
  238. })
  239. .catch(() => {
  240. this.$message.error('扫描失败')
  241. })
  242. },
  243. removeLabelByCode(labelCode) {
  244. const index = this.scannedLabels.findIndex(
  245. (item) => item.labelCode === labelCode
  246. )
  247. if (index !== -1) {
  248. this.scannedLabels.splice(index, 1)
  249. this.$message.success('移除成功')
  250. } else {
  251. this.$message.warning('未找到该标签')
  252. }
  253. },
  254. clearScannedLabels() {
  255. if (this.scannedLabels.length > 0) {
  256. this.$confirm('确定清空所有已扫描的标签吗?', '提示', {
  257. confirmButtonText: '确定',
  258. cancelButtonText: '取消',
  259. type: 'warning',
  260. })
  261. .then(() => {
  262. this.scannedLabels = []
  263. // 设置标记,表示需要恢复directIssue页面的状态
  264. sessionStorage.setItem('directIssue_shouldRestore', 'true')
  265. this.$router.back()
  266. this.$message.success('已清空')
  267. })
  268. .catch(() => {})
  269. } else {
  270. // 设置标记,表示需要恢复directIssue页面的状态
  271. sessionStorage.setItem('directIssue_shouldRestore', 'true')
  272. this.$router.back()
  273. }
  274. },
  275. confirmIssue() {
  276. console.log('1231', localStorage.getItem('userName'))
  277. if (this.scannedLabels.length === 0) {
  278. this.$message.warning('请先扫描材料标签')
  279. return
  280. }
  281. const params = {
  282. site: this.site,
  283. workOrderNo: this.workOrderNo,
  284. componentPartNo: this.componentPartNo,
  285. operatorName: localStorage.getItem('userName'),
  286. itemNo: this.itemNo,
  287. releaseNo: this.issueInfo.releaseNo,
  288. sequenceNo: this.issueInfo.sequenceNo,
  289. isPartial: this.isPartial,
  290. selectedMaterials: this.scannedLabels.map((l, i) => ({
  291. labelCode: l.labelCode,
  292. issueQty: l.quantity,
  293. batchNo: l.batchNo,
  294. warehouseId: l.warehouseId,
  295. locationId: l.locationId,
  296. materialCode: l.materialCode,
  297. wdrNo: l.wdrNo,
  298. height: l.height,
  299. engChgLevel: l.engChgLevel,
  300. })),
  301. }
  302. this.loading = true
  303. confirmDirectIssue(params)
  304. .then(({ data }) => {
  305. if (data && data.code === 0) {
  306. this.$message.success('发料成功')
  307. // 设置标记,表示需要恢复directIssue页面的状态,并刷新材料列表
  308. sessionStorage.setItem('directIssue_shouldRestore', 'true')
  309. sessionStorage.setItem('directIssue_needRefresh', 'true')
  310. this.$router.back()
  311. } else {
  312. this.$message.error(data.msg || '发料失败')
  313. }
  314. })
  315. .catch(() => {
  316. this.$message.error('发料失败')
  317. })
  318. .finally(() => {
  319. this.loading = false
  320. })
  321. },
  322. initFromRoute() {
  323. this.workOrderNo = this.$route.query.workOrderNo
  324. this.componentPartNo = this.$route.query.partNo
  325. this.componentPartDesc = this.$route.query.partDesc || ''
  326. this.requiredQty = Number(this.$route.query.requiredQty || 0)
  327. this.issuedQty = Number(this.$route.query.issuedQty || 0)
  328. this.itemNo = this.$route.query.itemNo || ''
  329. this.site = this.$route.query.site || ''
  330. this.issueInfo = {
  331. releaseNo: this.$route.query.releaseNo,
  332. sequenceNo: this.$route.query.sequenceNo,
  333. requiredQty: Number(this.$route.query.requiredQty || 0),
  334. issuedQty: Number(this.$route.query.issuedQty || 0),
  335. partDesc: this.$route.query.partDesc || '',
  336. }
  337. /* if (!this.workOrderNo || !this.materialCode) {
  338. this.$message.error('参数错误')
  339. this.$router.back()
  340. } */
  341. },
  342. // 处理返回操作(头部返回按钮)
  343. handleBack() {
  344. // 设置标记,表示需要恢复directIssue页面的状态
  345. sessionStorage.setItem('directIssue_shouldRestore', 'true')
  346. this.$router.back()
  347. },
  348. // 处理标签点击事件
  349. handleLabelClick(label, index) {
  350. if (!this.isPartial) return
  351. this.currentEditLabel = { ...label }
  352. this.currentEditIndex = index
  353. this.editHeight = label.height
  354. this.editQuantity = label.quantity
  355. this.quantityDialogVisible = true
  356. },
  357. // 确认修改数量
  358. confirmQuantityChange() {
  359. if (this.editHeight < 0) {
  360. this.$message.warning('高度不能小于0')
  361. return
  362. }
  363. if (this.editQuantity <= 0) {
  364. this.$message.warning('数量必须大于0')
  365. return
  366. }
  367. if (
  368. this.currentEditIndex >= 0 &&
  369. this.currentEditIndex < this.scannedLabels.length
  370. ) {
  371. this.scannedLabels[this.currentEditIndex].quantity = this.editQuantity
  372. this.scannedLabels[this.currentEditIndex].height = this.editHeight
  373. this.$message.success('数量修改成功')
  374. this.quantityDialogVisible = false
  375. }
  376. },
  377. },
  378. mounted() {
  379. this.initFromRoute()
  380. this.$nextTick(() => {
  381. if (this.$refs.scanInput) {
  382. this.$refs.scanInput.focus()
  383. }
  384. })
  385. },
  386. }
  387. </script>
  388. <style scoped>
  389. .pda-container {
  390. width: 100vw;
  391. height: 100vh;
  392. display: flex;
  393. flex-direction: column;
  394. background: #f5f5f5;
  395. }
  396. .header-bar {
  397. display: flex;
  398. justify-content: space-between;
  399. align-items: center;
  400. padding: 8px 16px;
  401. background: #17b3a3;
  402. color: white;
  403. height: 40px;
  404. min-height: 40px;
  405. }
  406. .header-left {
  407. display: flex;
  408. align-items: center;
  409. cursor: pointer;
  410. font-size: 16px;
  411. font-weight: 500;
  412. }
  413. .header-left i {
  414. margin-right: 8px;
  415. font-size: 18px;
  416. }
  417. .header-right {
  418. cursor: pointer;
  419. font-size: 16px;
  420. font-weight: 500;
  421. }
  422. .search-container {
  423. padding: 12px 16px;
  424. background: white;
  425. display: flex;
  426. align-items: center;
  427. gap: 12px;
  428. }
  429. .search-container .el-input {
  430. width: 240px;
  431. margin-right: 12px;
  432. }
  433. .compact-input ::v-deep .el-input__inner {
  434. height: 36px;
  435. padding: 0 12px 0 35px;
  436. font-size: 14px;
  437. }
  438. .compact-input ::v-deep .el-input__prefix {
  439. left: 10px;
  440. }
  441. .compact-input ::v-deep .el-input__suffix {
  442. right: 30px;
  443. }
  444. .mode-switch {
  445. position: relative;
  446. display: inline-block;
  447. }
  448. .custom-switch {
  449. transform: scale(1.3);
  450. }
  451. .partial-checkbox-container {
  452. padding: 8px 16px;
  453. background: white;
  454. border-top: 1px solid #f0f0f0;
  455. display: flex;
  456. align-items: center;
  457. }
  458. .partial-checkbox-container ::v-deep .el-checkbox__label {
  459. font-size: 14px;
  460. color: #333;
  461. }
  462. .switch-text {
  463. position: absolute;
  464. left: 25%;
  465. transform: translateX(-50%);
  466. top: 50%;
  467. transform: translateY(-50%) translateX(-50%);
  468. font-size: 12px;
  469. font-weight: 500;
  470. color: #606266;
  471. white-space: nowrap;
  472. pointer-events: none;
  473. z-index: 1;
  474. top: 53%;
  475. transform: translate(-50%, -50%);
  476. font-size: 12px;
  477. font-weight: bold;
  478. color: white;
  479. pointer-events: none;
  480. z-index: 2;
  481. }
  482. .switch-text2 {
  483. position: absolute;
  484. left: 75%;
  485. transform: translateX(-50%);
  486. top: 50%;
  487. transform: translateY(-50%) translateX(-50%);
  488. font-size: 12px;
  489. font-weight: 500;
  490. color: #606266;
  491. white-space: nowrap;
  492. pointer-events: none;
  493. z-index: 1;
  494. top: 53%;
  495. transform: translate(-50%, -50%);
  496. font-size: 12px;
  497. font-weight: bold;
  498. color: white;
  499. pointer-events: none;
  500. z-index: 2;
  501. }
  502. /* 调整 switch 尺寸以便容纳文字 */
  503. .custom-switch ::v-deep .el-switch__core {
  504. width: 60px;
  505. height: 28px;
  506. }
  507. /* 统一滚动容器 */
  508. .scrollable-content {
  509. flex: 1;
  510. overflow-y: auto;
  511. min-height: 0;
  512. }
  513. /* 工单列表 */
  514. .work-order-list {
  515. padding: 12px 16px;
  516. }
  517. /* 工单卡片 */
  518. .work-order-card {
  519. background: white;
  520. border-radius: 8px;
  521. padding: 16px;
  522. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  523. cursor: pointer;
  524. transition: all 0.2s ease;
  525. border: 2px solid transparent;
  526. }
  527. .work-order-card:hover {
  528. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  529. transform: translateY(-1px);
  530. }
  531. .work-order-card.selected {
  532. border-color: #17b3a3;
  533. background: #f0fffe;
  534. }
  535. .work-order-card:active {
  536. transform: translateY(0);
  537. }
  538. /* 卡片标题 */
  539. .card-title {
  540. margin-bottom: 12px;
  541. }
  542. .title-label {
  543. font-size: 12px;
  544. color: #666;
  545. display: block;
  546. margin-bottom: 4px;
  547. }
  548. .title-value {
  549. font-size: 16px;
  550. font-weight: bold;
  551. color: #333;
  552. margin-left: 20px;
  553. }
  554. .section-title {
  555. display: flex;
  556. align-items: center;
  557. justify-content: space-between;
  558. padding: 6px 8px;
  559. background: white;
  560. margin: 0 8px;
  561. margin-top: 4px;
  562. border-radius: 8px 8px 0 0;
  563. border-bottom: 2px solid #17b3a3;
  564. }
  565. /* 物料描述行 */
  566. .part-desc-row {
  567. margin-bottom: 12px;
  568. padding: 0 4px;
  569. }
  570. .desc-text {
  571. font-size: 12px;
  572. color: #666;
  573. line-height: 1.3;
  574. word-break: break-all;
  575. }
  576. /* 卡片详情 */
  577. .card-details {
  578. display: flex;
  579. justify-content: space-between;
  580. align-items: flex-start;
  581. gap: 4px;
  582. }
  583. .detail-item {
  584. flex: 1;
  585. text-align: center;
  586. min-width: 50px;
  587. max-width: 70px;
  588. }
  589. .detail-label {
  590. font-size: 11px;
  591. color: #666;
  592. margin-bottom: 4px;
  593. line-height: 1.2;
  594. margin-left: -12px;
  595. }
  596. .detail-value {
  597. font-size: 13px;
  598. color: #333;
  599. line-height: 1.2;
  600. margin-left: -12px;
  601. }
  602. .label-list {
  603. background: white;
  604. margin: 0 16px 12px;
  605. border-radius: 8px;
  606. overflow: hidden;
  607. display: flex;
  608. flex-direction: column;
  609. }
  610. .list-header {
  611. display: flex;
  612. background: #f8f9fa;
  613. padding: 12px 8px;
  614. border-bottom: 1px solid #e0e0e0;
  615. font-size: 12px;
  616. color: #666;
  617. font-weight: 500;
  618. flex-shrink: 0;
  619. }
  620. .list-body {
  621. flex: 1;
  622. min-height: 0;
  623. }
  624. .list-item {
  625. display: flex;
  626. padding: 12px 8px;
  627. border-bottom: 1px solid #f0f0f0;
  628. font-size: 12px;
  629. color: #333;
  630. align-items: flex-start;
  631. min-height: 40px;
  632. transition: background-color 0.2s;
  633. }
  634. .list-item:last-child {
  635. border-bottom: none;
  636. }
  637. .list-item.clickable {
  638. cursor: pointer;
  639. }
  640. .list-item.clickable:hover {
  641. background-color: #f5f5f5;
  642. }
  643. .list-item.clickable:active {
  644. background-color: #e8e8e8;
  645. }
  646. .col-no {
  647. width: 10px;
  648. text-align: center;
  649. }
  650. .col-label {
  651. flex: 1;
  652. text-align: center;
  653. word-break: break-all;
  654. white-space: normal;
  655. line-height: 1.2;
  656. }
  657. .col-batch {
  658. flex: 1;
  659. text-align: center;
  660. }
  661. .col-qty {
  662. flex: 0.6;
  663. width: 60px;
  664. text-align: center;
  665. }
  666. .empty-labels {
  667. padding: 40px 20px;
  668. text-align: center;
  669. color: #999;
  670. }
  671. .bottom-actions {
  672. display: flex;
  673. padding: 16px;
  674. gap: 20px;
  675. background: white;
  676. margin-top: auto;
  677. }
  678. .action-btn {
  679. flex: 1;
  680. padding: 12px;
  681. border: 1px solid #17b3a3;
  682. background: white;
  683. color: #17b3a3;
  684. border-radius: 20px;
  685. font-size: 14px;
  686. cursor: pointer;
  687. transition: all 0.2s ease;
  688. }
  689. .action-btn:hover {
  690. background: #17b3a3;
  691. color: white;
  692. }
  693. .action-btn:active {
  694. transform: scale(0.98);
  695. }
  696. /* 编辑弹框样式 */
  697. .edit-overlay {
  698. position: fixed;
  699. top: 0;
  700. left: 0;
  701. right: 0;
  702. bottom: 0;
  703. background: rgba(0, 0, 0, 0.5);
  704. z-index: 9999;
  705. display: flex;
  706. align-items: center;
  707. justify-content: center;
  708. padding: 20px;
  709. }
  710. .edit-modal {
  711. background: white;
  712. border-radius: 12px;
  713. width: 100%;
  714. max-width: 400px;
  715. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  716. overflow: hidden;
  717. display: flex;
  718. flex-direction: column;
  719. }
  720. .edit-modal .modal-header {
  721. background: #17b3a3;
  722. color: white;
  723. padding: 12px 16px;
  724. display: flex;
  725. justify-content: space-between;
  726. align-items: center;
  727. }
  728. .edit-modal .modal-title {
  729. font-size: 16px;
  730. font-weight: 500;
  731. margin: 0;
  732. }
  733. .edit-modal .close-btn {
  734. font-size: 16px;
  735. cursor: pointer;
  736. color: white;
  737. transition: color 0.2s ease;
  738. padding: 4px;
  739. display: flex;
  740. align-items: center;
  741. justify-content: center;
  742. }
  743. .edit-modal .close-btn:hover {
  744. color: #e0e0e0;
  745. }
  746. .edit-modal .modal-body {
  747. padding: 20px;
  748. }
  749. .edit-modal .form-group {
  750. margin-bottom: 16px;
  751. }
  752. .edit-modal .form-group:last-child {
  753. margin-bottom: 0;
  754. }
  755. .edit-modal .form-label {
  756. display: block;
  757. font-size: 14px;
  758. color: #333;
  759. margin-bottom: 6px;
  760. font-weight: 500;
  761. }
  762. .edit-modal .required {
  763. color: #ff4949;
  764. }
  765. .edit-modal .form-input {
  766. width: 100%;
  767. }
  768. .edit-modal .form-input ::v-deep .el-input__inner {
  769. height: 40px;
  770. border: 2px solid #dcdfe6;
  771. border-radius: 6px;
  772. font-size: 14px;
  773. padding: 0 12px;
  774. }
  775. .edit-modal .form-input ::v-deep .el-input__inner:focus {
  776. border-color: #17b3a3;
  777. outline: none;
  778. }
  779. .edit-modal .form-input ::v-deep .el-input__inner:disabled {
  780. background: #f5f7fa;
  781. color: #c0c4cc;
  782. border-color: #e4e7ed;
  783. }
  784. .edit-modal .form-input ::v-deep .el-input-number {
  785. width: 100%;
  786. }
  787. .edit-modal .form-input ::v-deep .el-input-number .el-input__inner {
  788. height: 40px;
  789. border: 2px solid #dcdfe6;
  790. border-radius: 6px;
  791. font-size: 14px;
  792. padding: 0 12px;
  793. }
  794. .edit-modal .form-input ::v-deep .el-input-number .el-input__inner:focus {
  795. border-color: #17b3a3;
  796. outline: none;
  797. }
  798. .edit-modal .modal-footer {
  799. padding: 16px 20px;
  800. display: flex;
  801. gap: 12px;
  802. justify-content: flex-end;
  803. border-top: 1px solid #f0f0f0;
  804. }
  805. .edit-modal .btn-cancel {
  806. padding: 10px 20px;
  807. border-radius: 6px;
  808. font-size: 14px;
  809. cursor: pointer;
  810. transition: all 0.2s;
  811. border: 1px solid #dcdfe6;
  812. background: white;
  813. color: #606266;
  814. }
  815. .edit-modal .btn-cancel:hover {
  816. background: #f5f7fa;
  817. border-color: #c0c4cc;
  818. }
  819. .edit-modal .btn-confirm {
  820. padding: 10px 20px;
  821. border-radius: 6px;
  822. font-size: 14px;
  823. cursor: pointer;
  824. transition: all 0.2s;
  825. border: 1px solid #17b3a3;
  826. background: #17b3a3;
  827. color: white;
  828. }
  829. .edit-modal .btn-confirm:hover {
  830. background: #13998c;
  831. border-color: #13998c;
  832. }
  833. @media (max-width: 360px) {
  834. .header-bar {
  835. padding: 8px 12px;
  836. }
  837. .search-container {
  838. padding: 8px 12px;
  839. }
  840. .work-order-list {
  841. padding: 8px 12px;
  842. }
  843. .work-order-card {
  844. padding: 12px;
  845. }
  846. .card-details {
  847. flex-wrap: wrap;
  848. gap: 6px;
  849. }
  850. .detail-item {
  851. flex: 0 0 48%;
  852. margin-bottom: 6px;
  853. min-width: 50px;
  854. }
  855. .label-list {
  856. margin: 0 8px 8px;
  857. }
  858. }
  859. </style>