From d7d0736be6251ef5ea7c5d6cf15b429d20591771 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期六, 18 四月 2026 15:17:44 +0800
Subject: [PATCH] 新增销售和采购订单扫码出库功能,包括合格和不合格出库的API接口及前端页面支持
---
src/pages/inventoryManagement/scanOut/index.vue | 1237 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 1,079 insertions(+), 158 deletions(-)
diff --git a/src/pages/inventoryManagement/scanOut/index.vue b/src/pages/inventoryManagement/scanOut/index.vue
index fadc34a..bcbe216 100644
--- a/src/pages/inventoryManagement/scanOut/index.vue
+++ b/src/pages/inventoryManagement/scanOut/index.vue
@@ -1,339 +1,1260 @@
<template>
+
<view class="scan-container">
+
<PageHeader title="鎵爜鍑哄簱"
+
@back="goBack" />
+
<view class="module-selector"
+
v-if="!showForm">
+
<view class="module-card"
+
@click="startScan('qualified')">
+
<view class="module-icon qualified">
+
<u-icon name="checkbox-mark"
+
color="#fff"
+
size="40"></u-icon>
+
</view>
+
<view class="module-info">
+
<text class="module-label">鍚堟牸鍑哄簱</text>
+
<text class="module-desc">鎵弿鍚堟牸鍝佽繘琛岄鐢ㄥ嚭搴�</text>
+
</view>
+
</view>
+
<view class="module-card"
+
@click="startScan('unqualified')">
+
<view class="module-icon unqualified">
+
<u-icon name="close"
+
color="#fff"
+
size="40"></u-icon>
+
</view>
+
<view class="module-info">
+
<text class="module-label">涓嶅悎鏍煎嚭搴�</text>
+
<text class="module-desc">璁板綍涓嶅悎鏍煎搧鐨勫嚭搴撴祦鍚�</text>
+
</view>
+
</view>
+
</view>
- <view class="form-content"
- v-if="showForm">
- <u-form ref="formRef"
- :model="form"
- :rules="formRules"
- label-width="100px">
- <u-form-item label="鍑哄簱绫诲瀷"
- border-bottom>
- <u-tag :text="type === 'qualified' ? '鍚堟牸鍑哄簱' : '涓嶅悎鏍煎嚭搴�'"
- :type="type === 'qualified' ? 'success' : 'error'"></u-tag>
- </u-form-item>
- <u-form-item label="浜у搧鍚嶇О"
- border-bottom>
- <u-input v-model="form.productName"
- readonly
- border="none"></u-input>
- </u-form-item>
- <u-form-item label="瑙勬牸鍨嬪彿"
- border-bottom>
- <u-input v-model="form.model"
- readonly
- border="none"></u-input>
- </u-form-item>
- <u-form-item label="鍙敤搴撳瓨"
- border-bottom>
- <u-input v-model="form.unLockedQuantity"
- readonly
- border="none"></u-input>{{form.unit}}
- </u-form-item>
- <u-form-item label="鍑哄簱鏁伴噺"
- prop="qualitity"
- required
- border-bottom>
- <u-number-box v-model="form.qualitity"
- :min="1"
- :max="form.unLockedQuantity"
- :step="1"></u-number-box>
- <text class="limit-tip">鏈�澶у彲棰嗙敤: {{form.unLockedQuantity}}</text>
- </u-form-item>
- <u-form-item label="澶囨敞"
- prop="remark"
- border-bottom>
- <u-textarea v-model="form.remark"
- placeholder="璇疯緭鍏ュ娉�"
- count></u-textarea>
- </u-form-item>
- </u-form>
+
+ <scroll-view v-if="showForm"
+
+ scroll-y
+
+ class="detail-scroll">
+
+ <view class="detail-card"
+
+ v-for="(item, idx) in recordList"
+
+ :key="idx">
+
+ <view class="detail-card-title"
+
+ :class="{
+
+ 'detail-card-title--collapsible': recordList.length > 1,
+
+ 'is-collapsed': recordList.length > 1 && !isCardExpanded(idx),
+
+ }"
+
+ @click="recordList.length > 1 && toggleCardDetail(idx)">
+
+ <view class="detail-card-title-text">
+
+ <text class="detail-card-title-no">{{ cardTitleMain }}</text>
+
+ <text v-if="recordList.length > 1"
+
+ class="detail-card-title-seq">锛坽{ idx + 1 }}/{{ recordList.length }}锛�</text>
+
+ </view>
+
+ <u-icon v-if="recordList.length > 1"
+
+ :name="isCardExpanded(idx) ? 'arrow-up' : 'arrow-down'"
+
+ color="#999"
+
+ size="18"></u-icon>
+
+ </view>
+
+ <view v-show="recordList.length > 1 && !isCardExpanded(idx)"
+
+ class="detail-card-summary"
+
+ @click="toggleCardDetail(idx)">
+
+ <view class="kv-row kv-row--summary"
+
+ v-for="row in summaryFieldRows"
+
+ :key="'sum-' + row.key">
+
+ <text class="kv-label">{{ row.label }}</text>
+
+ <view class="kv-value kv-value--tag"
+
+ v-if="row.key === 'approveStatus'">
+
+ <u-tag :type="approveStatusTagType(item)"
+
+ size="small">{{ formatApproveStatus(item) }}</u-tag>
+
+ </view>
+
+ <view class="kv-value kv-value--tag"
+
+ v-else-if="row.key === 'productStockStatus'">
+
+ <u-tag :type="productStockStatusTagType(item.productStockStatus)"
+
+ size="small">{{ formatProductStockStatus(item.productStockStatus) }}</u-tag>
+
+ </view>
+
+ <text class="kv-value"
+
+ v-else>{{ formatCell(item, row, idx) }}</text>
+
+ </view>
+
+ <text class="summary-tip">鐐瑰嚮鏌ョ湅鍏ㄩ儴</text>
+
+ </view>
+
+ <view v-show="isCardExpanded(idx)"
+
+ class="detail-card-body">
+
+ <view class="kv-row"
+
+ v-for="row in detailFieldRows"
+
+ :key="row.key">
+
+ <text class="kv-label">{{ row.label }}</text>
+
+ <view class="kv-value kv-value--tag"
+
+ v-if="row.key === 'approveStatus'">
+
+ <u-tag :type="approveStatusTagType(item)"
+
+ size="small">{{ formatApproveStatus(item) }}</u-tag>
+
+ </view>
+
+ <view class="kv-value kv-value--tag"
+
+ v-else-if="row.key === 'productStockStatus'">
+
+ <u-tag :type="productStockStatusTagType(item.productStockStatus)"
+
+ size="small">{{ formatProductStockStatus(item.productStockStatus) }}</u-tag>
+
+ </view>
+
+ <text class="kv-value"
+
+ v-else>{{ formatCell(item, row, idx) }}</text>
+
+ </view>
+
+ </view>
+
+ <view v-if="!isFullyStocked(item)"
+
+ class="stocked-qty-block">
+
+ <view class="kv-row stocked-qty-row">
+
+ <text class="kv-label">鍑哄簱鏁伴噺</text>
+
+ <view class="kv-value stocked-qty-input-wrap">
+
+ <up-input :key="'stocked-' + idx"
+
+ v-model="item.stockedQuantity"
+
+ type="number"
+
+ placeholder="璇疯緭鍏ュ嚭搴撴暟閲�"
+
+ clearable
+
+ border="surround"
+
+ @blur="onStockedQtyBlur(item)" />
+
+ </view>
+
+ </view>
+
+ </view>
+
+ </view>
+
<view class="footer-btns">
- <u-button class="cancel-btn"
- @click="cancelForm">鍙栨秷</u-button>
- <u-button class="save-btn"
- @click="handleSubmit"
- :loading="loading">纭鍑哄簱</u-button>
+
+ <u-button class="footer-cancel-btn"
+
+ @click="cancelForm">杩斿洖</u-button>
+
+ <u-button class="footer-confirm-btn"
+
+ :loading="submitLoading"
+
+ @click="confirmOutbound">纭</u-button>
+
</view>
- </view>
+
+ </scroll-view>
+
</view>
+
</template>
+
+
<script setup>
- import { ref, reactive } from "vue";
+
+ import { ref, computed } from "vue";
+
import PageHeader from "@/components/PageHeader.vue";
- import {
- subtractStockInventory,
- getStockInventoryListPage,
- } from "@/api/inventoryManagement/stockInventory.js";
- import {
- subtractStockUnInventory,
- getStockUninventoryListPage,
- } from "@/api/inventoryManagement/stockUninventory.js";
+
+ import { productList as salesProductList } from "@/api/salesManagement/salesLedger";
+
import modal from "@/plugins/modal";
- const showForm = ref(false);
- const type = ref("qualified"); // qualified | unqualified
- const loading = ref(false);
- const formRef = ref(null);
+ import { QUALITY_TYPE, CONTRACT_KIND } from "./scanOut.constants";
+ import { useScanOutFieldRows } from "./scanOut.fields";
+ import {
+ parseOptionalNumber,
+ defaultStockedQuantityFromRow,
+ resolveQrContractKind,
+ resolveListTypeForDetail,
+ resolveContractNo,
+ buildSalesLedgerProductList,
+ hasAnyPositiveStockedQty,
+ resolveSubmitSceneKey,
+ } from "./scanOut.logic";
+ import { createSubmitConfig } from "./scanOut.submit";
- const form = ref({
- id: undefined,
- productId: undefined,
- productModelId: undefined,
- productName: "",
- model: "",
- unit: "",
- qualitity: 1,
- unLockedQuantity: 0,
- remark: "",
+ const showForm = ref(false);
+
+ const type = ref(QUALITY_TYPE.qualified);
+
+ const recordList = ref([]);
+
+ const expandedByIndex = ref({});
+
+ const scanContractNo = ref("");
+
+ /** 鎵爜鍚堝悓绫诲瀷锛氶攢鍞彴璐� / 閲囪喘鍙拌处 */
+ const contractKind = ref(CONTRACT_KIND.sales);
+
+ /** 浜岀淮鐮佷腑鐨勫彴璐︿富閿� id */
+ const scanLedgerId = ref(null);
+
+ const submitLoading = ref(false);
+
+ const submitConfigByScene = createSubmitConfig(scanLedgerId);
+
+ const cardTitleMain = computed(() => {
+
+ const no = scanContractNo.value?.trim();
+
+ return no || "鈥�";
+
});
- const formRules = {
- qualitity: [
- {
- required: true,
- type: "number",
- message: "璇疯緭鍏ュ嚭搴撴暟閲�",
- trigger: ["blur", "change"],
- },
- {
- validator: (rule, value, callback) => {
- if (value > form.value.unLockedQuantity) {
- callback(new Error("涓嶈兘瓒呰繃鍙敤搴撳瓨"));
- } else {
- callback();
- }
- },
- trigger: ["blur", "change"],
- },
- ],
+
+
+ const isCardExpanded = idx => {
+
+ if (recordList.value.length <= 1) return true;
+
+ return !!expandedByIndex.value[idx];
+
};
+
+
+
+ const toggleCardDetail = idx => {
+
+ if (recordList.value.length <= 1) return;
+
+ expandedByIndex.value = {
+
+ ...expandedByIndex.value,
+
+ [idx]: !expandedByIndex.value[idx],
+
+ };
+
+ };
+
+
+
+ const { detailFieldRows, summaryFieldRows } = useScanOutFieldRows(contractKind);
+
+
+
+ const emptyDash = v => {
+
+ if (v === null || v === undefined || v === "") return "-";
+
+ return v;
+
+ };
+
+
+
+ const formatApproveStatus = row => {
+
+ const a = row.approveStatus;
+
+ const noShipInfo = !row.shippingDate || !row.shippingCarNumber;
+
+ const hasShipInfo = !!(row.shippingDate || row.shippingCarNumber);
+
+ if ((a === 1 || a === "1") && noShipInfo) return "鍏呰冻";
+
+ if ((a === 0 || a === "0") && hasShipInfo) return "宸插嚭搴�";
+
+ return "涓嶈冻";
+
+ };
+
+
+
+ const formatProductStockStatus = v => {
+
+ if (v == 1) return "閮ㄥ垎鍏ュ簱";
+
+ if (v == 2) return "宸插叆搴�";
+
+ if (v == 0) return "鏈嚭搴�";
+
+ return "涓嶈冻";
+
+ };
+
+
+
+ const approveStatusTagType = row => {
+
+ const a = row.approveStatus;
+
+ const noShipInfo = !row.shippingDate || !row.shippingCarNumber;
+
+ const hasShipInfo = !!(row.shippingDate || row.shippingCarNumber);
+
+ if ((a === 1 || a === "1") && noShipInfo) return "success";
+
+ if ((a === 0 || a === "0") && hasShipInfo) return "success";
+
+ return "error";
+
+ };
+
+
+
+ const productStockStatusTagType = v => {
+
+ if (v == 1) return "warning";
+
+ if (v == 2) return "success";
+
+ if (v == 0) return "info";
+
+ return "error";
+
+ };
+
+
+
+ const formatHeavyBox = v => {
+
+ if (v === 1 || v === true || v === "1") return "鏄�";
+
+ if (v === 0 || v === false || v === "0") return "鍚�";
+
+ return emptyDash(v);
+
+ };
+
+
+
+ const isFullyStocked = item => {
+
+ const s = item?.productStockStatus;
+
+ return s == 2 || s === "2";
+
+ };
+
+
+
+ const parseOptionalNumberLocal = raw => {
+
+ if (raw === null || raw === undefined || raw === "") return null;
+
+ const n = Number(String(raw).trim());
+
+ return Number.isNaN(n) ? null : n;
+
+ };
+
+
+
+ const parseRemainingQuantityLocal = row => {
+
+ const remRaw =
+
+ row?.remainingQuantity ??
+
+ row?.remaining_quantity ??
+
+ row?.remainQuantity ??
+
+ row?.remain_quantity;
+
+ return parseOptionalNumberLocal(remRaw);
+
+ };
+
+
+
+ const defaultStockedQuantityFromRowLocal = row => {
+
+ const rem = parseRemainingQuantityLocal(row);
+
+ if (rem !== null) return String(Math.max(0, rem));
+
+ const avail = parseOptionalNumberLocal(
+
+ row?.availableQuality ?? row?.availableQuantity
+
+ );
+
+ if (avail !== null) return String(Math.max(0, avail));
+
+ const qty = parseOptionalNumberLocal(row?.quantity);
+
+ if (qty !== null) return String(Math.max(0, qty));
+
+ return "0";
+
+ };
+
+
+
+ const onStockedQtyBlur = item => {
+
+ if (isFullyStocked(item)) return;
+
+ const raw = item.stockedQuantity;
+
+ if (raw === null || raw === undefined || String(raw).trim() === "") {
+
+ item.stockedQuantity = "0";
+
+ return;
+
+ }
+
+ const n = Number(String(raw).trim());
+
+ if (Number.isNaN(n)) {
+
+ item.stockedQuantity = defaultStockedQuantityFromRow(item);
+
+ return;
+
+ }
+
+ item.stockedQuantity = String(Math.max(0, n));
+
+ };
+
+
+
+ const formatCell = (item, row, idx) => {
+
+ if (row.key === "index") {
+
+ const v = item.index;
+
+ if (v !== null && v !== undefined && v !== "") return String(v);
+
+ return String(idx + 1);
+
+ }
+
+ if (row.key === "approveStatus") return formatApproveStatus(item);
+
+ if (row.key === "productStockStatus")
+
+ return formatProductStockStatus(item.productStockStatus);
+
+ if (row.key === "heavyBox") return formatHeavyBox(item.heavyBox);
+
+ if (row.key === "remainingQuantity") {
+
+ const v =
+
+ item.remainingQuantity ??
+
+ item.remaining_quantity ??
+
+ item.remainQuantity ??
+
+ item.remain_quantity;
+
+ return emptyDash(v);
+
+ }
+
+ if (row.key === "availableQuality") {
+
+ const v = item.availableQuality ?? item.availableQuantity;
+
+ return emptyDash(v);
+
+ }
+
+ if (row.key === "returnQuality") {
+
+ const v = item.returnQuality ?? item.returnQuantity;
+
+ return emptyDash(v);
+
+ }
+
+ return emptyDash(item[row.key]);
+
+ };
+
+
+
+ const resetDetailView = () => {
+
+ showForm.value = false;
+
+ scanContractNo.value = "";
+
+ contractKind.value = CONTRACT_KIND.sales;
+
+ scanLedgerId.value = null;
+
+ expandedByIndex.value = {};
+
+ recordList.value = [];
+
+ };
+
+
+
+ /** 缁勮鎻愪氦鐢ㄧ殑浜у搧琛岋紙鍚暟鍊煎寲鍑哄簱鏁伴噺 stockedQuantity锛� */
+ const buildSalesLedgerProductListLocal = () => {
+
+ return recordList.value.map(item => {
+
+ const n = parseOptionalNumber(item.stockedQuantity);
+
+ const qty = n !== null && !Number.isNaN(n) ? Math.max(0, n) : 0;
+
+ const { stockedQuantity: _sq, ...rest } = item;
+
+ return { ...rest, stockedQuantity: qty };
+
+ });
+
+ };
+
+
+
+ const confirmOutbound = async () => {
+
+ if (scanLedgerId.value == null || scanLedgerId.value === "") {
+
+ modal.msgError("缂哄皯璁㈠崟淇℃伅锛岃閲嶆柊鎵爜");
+
+ return;
+
+ }
+
+ const salesLedgerProductList = buildSalesLedgerProductList(recordList.value);
+
+ if (!hasAnyPositiveStockedQty(salesLedgerProductList)) {
+
+ modal.msgError("璇疯嚦灏戝~鍐欎竴琛屽ぇ浜� 0 鐨勫嚭搴撴暟閲�");
+
+ return;
+
+ }
+
+ const sceneKey = resolveSubmitSceneKey(contractKind.value, type.value);
+
+ const currentSubmitConfig = submitConfigByScene[sceneKey];
+
+ if (!currentSubmitConfig) {
+ modal.msgError("鏆備笉鏀寔褰撳墠鍑哄簱鍦烘櫙");
+ return;
+ }
+
+ const runApi = currentSubmitConfig.runApi;
+ const payload = currentSubmitConfig.payloadBuilder(salesLedgerProductList);
+
+ try {
+
+ submitLoading.value = true;
+
+ modal.loading("鎻愪氦涓�...");
+
+ const res = await runApi(payload);
+
+ modal.closeLoading();
+
+ if (res.code === 200) {
+
+ modal.msgSuccess("鎻愪氦鎴愬姛");
+
+ resetDetailView();
+
+ } else {
+
+ modal.msgError(res.msg || "鎻愪氦澶辫触");
+
+ }
+
+ } catch (e) {
+
+ modal.closeLoading();
+
+ console.error("鎵爜鍑哄簱鎻愪氦澶辫触", e);
+
+ } finally {
+
+ submitLoading.value = false;
+
+ }
+
+ };
+
+
const goBack = () => {
+
if (showForm.value) {
- showForm.value = false;
+
+ resetDetailView();
+
} else {
+
uni.navigateBack();
+
}
+
};
+
+
const cancelForm = () => {
- showForm.value = false;
+
+ resetDetailView();
+
};
+
+
const startScan = scanType => {
+
type.value = scanType;
+
uni.scanCode({
+
success: res => {
+
handleScanResult(res.result);
+
},
- fail: err => {
+
+ fail: () => {
+
modal.msgError("鎵爜澶辫触");
+
},
+
});
+
+ };
+
+
+
+ /** 鏍规嵁浜岀淮鐮� JSON 鍒ゆ柇閿�鍞�(XS)/閲囪喘(CG)锛屼笌鎺ュ彛 type锛�1 閿�鍞��2 閲囪喘 瀵瑰簲 */
+ const resolveQrContractKindLocal = scanData => {
+
+ const t = scanData?.type;
+
+ const ts =
+
+ t !== null && t !== undefined && t !== ""
+
+ ? String(t).trim().toUpperCase()
+
+ : "";
+
+ if (ts === "CG" || t === 2 || t === "2") return CONTRACT_KIND.purchase;
+
+ if (ts === "XS" || t === 1 || t === "1") return CONTRACT_KIND.sales;
+
+ const pc = scanData?.purchaseContractNumber;
+
+ const sc = scanData?.salesContractNo;
+
+ if (
+
+ pc != null &&
+
+ String(pc).trim() !== "" &&
+
+ (sc == null || String(sc).trim() === "")
+
+ )
+
+ return CONTRACT_KIND.purchase;
+
+ return CONTRACT_KIND.sales;
+
};
const handleScanResult = async result => {
+
try {
- // 瑙f瀽浜岀淮鐮佹暟鎹�
+
const scanData = JSON.parse(result);
+
if (!scanData.id) {
+
modal.msgError("鏃犳晥鐨勪簩缁寸爜鏁版嵁");
+
return;
+
}
- // 鑾峰彇瀹炴椂搴撳瓨璇︽儏
- modal.loading("鑾峰彇浜у搧搴撳瓨璇︽儏...");
- const apiCall =
- type.value === "qualified"
- ? getStockInventoryListPage
- : getStockUninventoryListPage;
+ const kind = resolveQrContractKind(scanData);
- const res = await apiCall({ productModelId: scanData.id });
+ contractKind.value = kind;
+
+ scanLedgerId.value = scanData.id;
+
+ scanContractNo.value = resolveContractNo(scanData, kind);
+
+ const listType = resolveListTypeForDetail(kind);
+
+ modal.loading("鑾峰彇浜у搧搴撳瓨璇︽儏...");
+
+ const res = await salesProductList({
+
+ salesLedgerId: scanData.id,
+
+ type: listType,
+
+ });
+
modal.closeLoading();
- if (res.code === 200 && res.data.records && res.data.records.length > 0) {
- const detail = res.data.records[0];
- form.value.id = detail.id;
- form.value.productId = detail.productId;
- form.value.productName = detail.productName;
- form.value.productModelId = detail.productModelId;
- form.value.model = detail.model;
- form.value.unit = detail.unit;
- form.value.unLockedQuantity = detail.unLockedQuantity;
- form.value.qualitity = 1;
- form.value.remark = "";
- if (form.value.unLockedQuantity <= 0) {
- modal.msgError("褰撳墠搴撳瓨涓嶈冻锛屾棤娉曞嚭搴�");
- return;
- }
+
+ if (res.code === 200 && res.data && res.data.length > 0) {
+
+ recordList.value = res.data.map(row => ({
+
+ ...row,
+
+ stockedQuantity: defaultStockedQuantityFromRow(row),
+
+ }));
+
+ expandedByIndex.value = {};
showForm.value = true;
+
} else {
- modal.msgError("鏈壘鍒拌浜у搧鍨嬪彿鐨勫簱瀛樿褰�");
+
+ scanLedgerId.value = null;
+
+ modal.msgError("鏈煡璇㈠埌鏄庣粏鏁版嵁");
+
}
+
} catch (error) {
+
modal.closeLoading();
+
+ scanLedgerId.value = null;
+
console.error("澶勭悊鎵爜缁撴灉澶辫触", error);
+
modal.msgError("鎵爜澶勭悊澶辫触锛岃閲嶈瘯");
+
}
+
};
- const handleSubmit = async () => {
- try {
- const valid = await formRef.value.validate();
- if (!valid) return;
-
- loading.value = true;
- const apiCall =
- type.value === "qualified"
- ? subtractStockInventory
- : subtractStockUnInventory;
-
- const res = await apiCall(form.value);
- if (res.code === 200) {
- modal.msgSuccess("鍑哄簱鎴愬姛");
- setTimeout(() => {
- showForm.value = false;
- }, 1500);
- }
- } catch (error) {
- console.error("鎻愪氦澶辫触", error);
- } finally {
- loading.value = false;
- }
- };
</script>
+
+
<style scoped lang="scss">
+
.scan-container {
+
min-height: 100vh;
+
background-color: #f5f7fa;
+
}
+
+
.module-selector {
+
display: flex;
+
flex-direction: column;
+
padding: 40rpx;
+
height: 80vh;
+
justify-content: center;
+
}
+
+
.module-card {
+
display: flex;
+
align-items: center;
+
background-color: #fff;
+
padding: 80rpx 50rpx;
+
border-radius: 32rpx;
+
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.05);
+
margin-bottom: 50rpx;
+
transition: all 0.3s ease;
+
border: 2rpx solid transparent;
+
+
&:active {
+
transform: scale(0.98);
+
background-color: #f9f9f9;
+
}
+
}
+
+
.module-icon {
+
width: 140rpx;
+
height: 140rpx;
+
border-radius: 32rpx;
+
display: flex;
+
justify-content: center;
+
align-items: center;
+
margin-right: 40rpx;
+
+
&.qualified {
+
background: linear-gradient(135deg, #52c41a, #73d13d);
+
box-shadow: 0 10rpx 20rpx rgba(82, 196, 26, 0.2);
+
}
+
+
&.unqualified {
+
background: linear-gradient(135deg, #ff4d4f, #ff7875);
+
box-shadow: 0 10rpx 20rpx rgba(255, 77, 79, 0.2);
+
}
+
}
+
+
.module-info {
+
display: flex;
+
flex-direction: column;
+
}
+
+
.module-label {
+
font-size: 40rpx;
+
font-weight: 700;
+
color: #1a1a1a;
+
margin-bottom: 12rpx;
+
}
+
+
.module-desc {
+
font-size: 28rpx;
+
color: #999;
+
}
- .form-content {
+
+
+ .detail-scroll {
+
+ max-height: calc(100vh - 120rpx);
+
+ box-sizing: border-box;
+
+ }
+
+
+
+ .detail-card {
+
background-color: #fff;
+
margin: 20rpx;
- padding: 30rpx;
+
+ padding: 28rpx;
+
border-radius: 16rpx;
+
+ box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
+
}
- .limit-tip {
- font-size: 24rpx;
- color: #999;
- margin-left: 20rpx;
+
+
+ .detail-card-title {
+
+ font-size: 30rpx;
+
+ font-weight: 600;
+
+ color: #333;
+
+ margin-bottom: 20rpx;
+
+ padding-bottom: 16rpx;
+
+ border-bottom: 1rpx solid #eee;
+
}
+
+
+
+ .detail-card-title--collapsible {
+
+ display: flex;
+
+ flex-direction: row;
+
+ justify-content: space-between;
+
+ align-items: center;
+
+ }
+
+
+
+ .detail-card-title--collapsible.is-collapsed {
+
+ margin-bottom: 0;
+
+ padding-bottom: 0;
+
+ border-bottom: none;
+
+ }
+
+
+
+ .detail-card-title-text {
+
+ flex: 1;
+
+ min-width: 0;
+
+ margin-right: 16rpx;
+
+ display: flex;
+
+ flex-wrap: wrap;
+
+ align-items: baseline;
+
+ }
+
+
+
+ .detail-card-title-no {
+
+ word-break: break-all;
+
+ line-height: 1.4;
+
+ }
+
+
+
+ .detail-card-title-seq {
+
+ flex-shrink: 0;
+
+ font-size: 26rpx;
+
+ font-weight: 500;
+
+ color: #888;
+
+ margin-left: 8rpx;
+
+ }
+
+
+
+ .detail-card-body {
+
+ padding-top: 4rpx;
+
+ }
+
+
+
+ .detail-card-summary {
+
+ padding-top: 8rpx;
+
+ }
+
+
+
+ .kv-row--summary {
+
+ padding: 12rpx 0;
+
+ font-size: 26rpx;
+
+ }
+
+
+
+ .summary-tip {
+
+ display: block;
+
+ font-size: 24rpx;
+
+ color: #999;
+
+ text-align: center;
+
+ padding: 20rpx 0 8rpx;
+
+ }
+
+
+
+ .kv-row {
+
+ display: flex;
+
+ align-items: flex-start;
+
+ padding: 16rpx 0;
+
+ border-bottom: 1rpx solid #f0f0f0;
+
+ font-size: 28rpx;
+
+ }
+
+
+
+ .kv-label {
+
+ flex-shrink: 0;
+
+ width: 220rpx;
+
+ color: #888;
+
+ line-height: 1.5;
+
+ }
+
+
+
+ .kv-value {
+
+ flex: 1;
+
+ color: #1a1a1a;
+
+ line-height: 1.5;
+
+ word-break: break-all;
+
+ text-align: right;
+
+ }
+
+
+
+ .kv-value--tag {
+
+ display: flex;
+
+ justify-content: flex-end;
+
+ align-items: center;
+
+ }
+
+
+
+ .stocked-qty-block {
+
+ margin-top: 8rpx;
+
+ padding-top: 8rpx;
+
+ border-top: 1rpx solid #f0f0f0;
+
+ }
+
+
+
+ .stocked-qty-row {
+
+ border-bottom: none;
+
+ align-items: center;
+
+ }
+
+
+
+ .stocked-qty-input-wrap {
+
+ min-width: 0;
+
+ }
+
+
.footer-btns {
- margin-top: 60rpx;
+
display: flex;
+
justify-content: space-between;
- padding-bottom: 40rpx;
+
+ align-items: center;
+
+ gap: 24rpx;
+
+ padding: 20rpx 40rpx 60rpx;
+
}
- .cancel-btn {
- width: 30%;
+
+
+ .footer-cancel-btn {
+
+ flex: 1;
+
background-color: #f5f5f5;
+
color: #666;
+
border: none;
+
}
- .save-btn {
- width: 65%;
+
+
+ .footer-confirm-btn {
+
+ flex: 1;
+
background: linear-gradient(140deg, #00baff 0%, #006cfb 100%);
+
color: #fff;
+
border: none;
+
}
+
</style>
+
--
Gitblit v1.9.3