<template>
|
<view>
|
<view class="form-container">
|
<form :modelValue="formData">
|
<view class="form-group">
|
<label class="form-label">检验单号:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.releaseNo" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">创建人:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.createBy" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">创建时间:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.createDate" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">客户名称:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.customerName"/>
|
</view>
|
<view class="form-group">
|
<label class="form-label">退货单号:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.returnOrderNo" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">退货数量:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.returnQty" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">退货原因:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.returnReason" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">物料编码:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.itemNo" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">物料名称:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.itemName" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">检验人:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.statusUser" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">检验状态:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.result" />
|
</view>
|
<view class="form-group">
|
<label class="form-label">不合格描述:</label>
|
<input class="form-input" disabled="true" type="text" v-model="formData.remarks" />
|
</view>
|
|
|
|
</form>
|
</view>
|
|
|
<view class="container">
|
<view class="tab-bar">
|
<view class="tab-item active">
|
检验项目明细
|
</view>
|
</view>
|
|
<!-- 内容区域 -->
|
<scroll-view class="content">
|
<view class="tab-content">
|
<view class="list-container">
|
<uni-table ref="table" border emptyText="暂无更多数据">
|
<uni-tr>
|
<uni-th align="center" class="th" style="color: #FFFFFF;">检验项目</uni-th>
|
<uni-th align="center" class="th" style="color: #FFFFFF">是否合格</uni-th>
|
<uni-th align="center" class="th" style="color: #FFFFFF">记录(点击)</uni-th>
|
</uni-tr>
|
<uni-tr v-for="(item, index) in tableData" :key="index">
|
<uni-td align="center">
|
<input class="form-input" disabled="true" type="text" v-model="item.projName" />
|
</uni-td>
|
<uni-td align="center">
|
<input class="form-input" disabled="true" type="text" v-model="item.result" />
|
</uni-td>
|
<uni-td>
|
<view class="uni-group">
|
<button v-if="(item.isCheck || 0) >= (item.levelNum || 0)" type="default"
|
@click="toDetail(item)">
|
{{ (item.levelNum || 0) + '/' + (item.isCheck || 0) }}
|
</button>
|
<button v-else type="warn" @click="toDetail(item)">
|
{{ (item.levelNum || 0) + '/' + (item.isCheck || 0) }}</button>
|
</view>
|
</uni-td>
|
</uni-tr>
|
</uni-table>
|
</view>
|
|
|
|
|
<view class="plus-button">
|
<button type="warn" v-if="!isUpdate && !isShowTable" @click="getTable">获取检验项目</button>
|
</view>
|
|
|
|
<view class="plus-button">
|
<button type="warn" v-if="!isUpdate && isShowTable" @click="toImage">上传/查看图片</button>
|
</view>
|
|
<view class="plus-button">
|
<button type="warn" v-if="!isUpdate && isShowTable" @click="getTable">重新获取检验项目</button>
|
</view>
|
|
|
<view class="plus-button">
|
<button type="warn" v-if="!isUpdate && isShowTable" @click="saveRemarks">添加不合格描述</button>
|
</view>
|
|
<view class="plus-button">
|
<button type="primary" v-if="!isUpdate && isShowTable" @click="submitTHJResult" :disabled="isSubmitting">
|
{{ isSubmitting ? '提交中...' : '提交检验结果' }}
|
</button>
|
</view>
|
|
|
|
<view v-if="remarksPopup" class="overlay">
|
<view class="popup">
|
<h3>修改不合格描述</h3>
|
<form>
|
<view class="form-group">
|
<label class="form-label">不合格描述:</label>
|
<input class="form-input" type="text" v-model="remarks" />
|
</view>
|
<button type="warn" @click="editRemarks">修改</button>
|
<button @click="remarksPopup = !remarksPopup">取消</button>
|
</form>
|
</view>
|
</view>
|
</view>
|
|
<!-- <view v-if="currentTab === 1" class="tab-content">
|
<view class="list-container">
|
<uni-table ref="table" border emptyText="暂无更多数据">
|
<uni-tr>
|
<uni-th align="center" class="th" style="color: #FFFFFF;">退货单号</uni-th>
|
<uni-th align="center" class="th" style="color: #FFFFFF">产品名称</uni-th>
|
<uni-th align="center" class="th" style="color: #FFFFFF">退货数量</uni-th>
|
<uni-th align="center" class="th" style="color: #FFFFFF;">退货原因</uni-th>
|
</uni-tr>
|
<uni-tr v-for="(item, index) in tableReturnData" :key="index">
|
<uni-td align="center">
|
<input class="form-input" disabled="true" type="text"
|
v-model="item.returnOrderNo" />
|
</uni-td>
|
<uni-td align="center">
|
<input class="form-input" disabled="true" type="text" v-model="item.itemName" />
|
</uni-td>
|
<uni-td align="center">
|
<input class="form-input" disabled="true" type="text" v-model="item.returnQty" />
|
</uni-td>
|
<uni-td align="center">
|
<input class="form-input" disabled="true" type="text" v-model="item.returnReason" />
|
</uni-td>
|
</uni-tr>
|
</uni-table>
|
</view>
|
|
<view class="plus-button-row">
|
<button type="warn" v-if="isUpdate && !isShowTable" @click="addReturnRow">新增</button>
|
<button type="warn" v-if="isUpdate && !isShowTable" @click="delReturnRow">删除</button>
|
</view>
|
|
<view class="plus-button">
|
<button type="warn" v-if="isUpdate && !isShowTable" @tap="saveReturnTable">保存</button>
|
</view>
|
|
<view class="plus-button">
|
<button type="warn" v-if="isUpdate && !isShowTable" @tap="showReturnSelect">批量选择</button>
|
</view>
|
|
<multiple-select v-model="show" :data="returnOrderList" :default-selected="defaultSelected"
|
@confirm="confirmReturn"></multiple-select>
|
|
|
</view> -->
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
<script>
|
import multipleSelect from "@/components/momo-multipleSelect/momo-multipleSelect";
|
export default {
|
components: {
|
multipleSelect,
|
},
|
data() {
|
return {
|
formData: {
|
show: false,
|
id: "",
|
releaseNo: "", // 检验单号
|
returnNo: "", // 退货编号(用于参数传递)
|
createBy: "",
|
createDate: "",
|
customerNo: "", // 客户编号(兼容保留)
|
customerName: "", // 客户名称
|
returnOrderNo: "", // 退货单号
|
returnQty: "", // 退货数量
|
returnReason: "", // 退货原因
|
inspectStatus: "",
|
itemNo: "",
|
itemName: "", // 物料名称
|
statusUser: "", // 检验人
|
remarks: ""
|
},
|
tableReturnData: [],
|
returnOrderList: [],
|
defaultSelected: [],
|
isShowTable: false,
|
tableData: [],
|
isSubmit: true,
|
isUpdate: true,
|
remarks: "",
|
currentTab: 0,
|
remarksPopup: false,
|
show: false,
|
isSubmitting: false,
|
};
|
},
|
onLoad(options) {
|
//options中包含了url附带的参数
|
let params = options;
|
|
// 监听检验数据更新事件
|
uni.$on('inspectionDataUpdated', (data) => {
|
if (this.formData.id && data.id && this.formData.id == data.id) {
|
// 如果当前页面的检验单ID与更新通知的ID匹配,则刷新数据
|
// 延迟一点时间确保后端数据已更新
|
setTimeout(() => {
|
this.init();
|
}, 300);
|
}
|
});
|
|
if (params["id"]) {
|
this.isUpdate = false;
|
this.formData.id = params["id"];
|
this.formData.returnNo = params["returnNo"];
|
this.init();
|
} else {
|
//初始化检验单号
|
this.$post({
|
url: "/THJ/getMaxReleaseNo",
|
data: {
|
type: "return"
|
}
|
}).then(res => {
|
this.formData.releaseNo = res.data.tbBillList; // 检验单号
|
this.formData.returnNo = res.data.tbBillList; // 退货编号(保持兼容)
|
this.formData.createBy = this.$loginInfo.account;
|
this.formData.statusUser = this.$loginInfo.account; // 设置检验人为当前用户
|
this.formData.createDate = this.$getDate("yyyy-mm-dd");
|
});
|
|
//获取退货单列表
|
this.$post({
|
url: "/THJ/getReturnOrders"
|
}).then(res => {
|
this.returnOrderList = res.data.tbBillList.map(item => {
|
return {
|
value: item.returnOrderNo,
|
label: item.returnOrderNo,
|
itemName: item.itemName,
|
returnQty: item.returnQty,
|
returnReason: item.returnReason
|
};
|
});
|
});
|
|
this.currentTab = 1;
|
}
|
},
|
methods: {
|
|
|
|
changeTab(index) {
|
|
this.currentTab = index;
|
},
|
|
|
|
|
init() {
|
return this.$post({
|
url: "/THJ/getPage",
|
data: {
|
id: this.formData.id,
|
pageIndex: 1,
|
limit: 1,
|
}
|
}).then(res => {
|
let data = res.data.tbBillList[0];
|
if (data) {
|
|
Object.assign(this.formData, data);
|
|
|
this.$post({
|
url: "/THJ/getQSItems",
|
data: {
|
pid: this.formData.id,
|
id: this.formData.id
|
}
|
}).then(res1 => {
|
|
let tableData = res1.data.tbBillList
|
|
//当已检验个数都不为空时按照检测结构排序
|
tableData.sort((a, b) => {
|
if (a.result === '未完成' && b.result === '合格') {
|
return -1;
|
} else if (a.result === '合格' && b.result === '未完成') {
|
return 1;
|
} else {
|
return 0;
|
}
|
});
|
this.tableData = tableData;
|
|
if (this.tableData.length === 0) {
|
this.isShowTable = false;
|
} else {
|
this.isShowTable = true;
|
}
|
})
|
|
//获取对应退货明细信息
|
this.$post({
|
url: "/THJ/getReturnDetails",
|
data: {
|
pid: this.formData.id
|
}
|
}).then(res => {
|
this.tableReturnData = res.data.tbBillList;
|
|
// 同步退货明细信息到表单
|
if (this.tableReturnData && this.tableReturnData.length > 0) {
|
const firstDetail = this.tableReturnData[0];
|
|
// 直接使用后端返回的字段名
|
const returnType = firstDetail.returntype || '';
|
const returnNo = firstDetail.returnno || '';
|
const returnQty = firstDetail.quantity || '';
|
const returnReason = firstDetail.remarks || '';
|
const itemName = firstDetail.itemname || '';
|
const itemNo = firstDetail.itemno || '';
|
|
// 组合退货单号:单别-单号
|
const fullReturnOrderNo = returnType && returnNo ?
|
`${returnType}-${returnNo}` : returnNo;
|
|
// 更新表单数据
|
this.formData.returnOrderNo = fullReturnOrderNo;
|
this.formData.returnQty = returnQty;
|
this.formData.returnReason = returnReason;
|
this.formData.itemName = itemName;
|
this.formData.itemNo = itemNo;
|
}
|
})
|
|
|
|
} else {
|
|
}
|
}).catch(err => {
|
this.$showMessage("获取数据失败");
|
throw err; // 重新抛出错误,确保Promise链正确处理
|
});
|
},
|
toDetail(item) {
|
|
if (this.isUpdate) {
|
uni.showToast({
|
icon: "none",
|
title: "请先生成检验项目",
|
duration: 2000,
|
});
|
} else {
|
uni.navigateTo({
|
url: '/pages/QC/THJ/detail?id=' + item.id + '&returnNo=' + this.formData.returnNo + '&gid=' + this
|
.formData
|
.id
|
});
|
}
|
},
|
saveRemarks() {
|
this.remarksPopup = !this.remarksPopup;
|
this.remarks = this.formData.remarks;
|
},
|
|
editRemarks() {
|
// 允许清空不合格描述:后端接收空字符串
|
this.$post({
|
url: "/THJ/saveRemarksGid",
|
data: {
|
gid: this.formData.id,
|
remarks: this.remarks || ""
|
}
|
}).then(res => {
|
if (res.data.tbBillList > 0) {
|
this.formData.remarks = this.remarks || "";
|
this.remarksPopup = !this.remarksPopup;
|
this.$showMessage("保存成功");
|
}
|
})
|
},
|
toImage() {
|
uni.navigateTo({
|
url: '/pages/QC/THJ/ImageItem?id=' + this.formData.id
|
});
|
},
|
getTable() {
|
this.$post({
|
url: "/THJ/setInspectItem",
|
data: {
|
gid: this.formData.id,
|
updateBy: this.$loginInfo.account
|
}
|
}).then(res => {
|
this.init().then(() => {
|
this.$showMessage("检验项目已更新");
|
}).catch(error => {
|
this.$showMessage("检验项目已更新,但刷新数据失败");
|
}).finally(() => {
|
// 确保状态正确重置
|
this.isSubmitting = false;
|
this.$forceUpdate();
|
});
|
}).catch(error => {
|
// 存储过程执行失败,显示错误信息
|
this.$showMessage(error.message || "获取检验项目失败");
|
// 不改变 isShowTable 状态,保持按钮可见
|
this.tableData = [];
|
// 确保状态正确重置
|
this.isSubmitting = false;
|
this.$forceUpdate();
|
});
|
},
|
|
// ========== 销售退货检验相关方法 ==========
|
|
|
confirmReturn(data) {
|
this.tableReturnData = data.map(el => {
|
return {
|
returnOrderNo: el.label,
|
itemName: el.itemName,
|
returnQty: el.returnQty,
|
returnReason: el.returnReason
|
}
|
|
});
|
|
// 立即更新表单中的退货信息
|
if (this.tableReturnData.length > 0) {
|
const firstDetail = this.tableReturnData[0];
|
this.formData.returnOrderNo = firstDetail.returnOrderNo;
|
this.formData.returnQty = firstDetail.returnQty;
|
this.formData.returnReason = firstDetail.returnReason;
|
this.formData.itemName = firstDetail.itemName;
|
|
|
}
|
|
this.returnOrderList = this.returnOrderList
|
this.returnOrderList = this.returnOrderList.filter(item => !this.tableReturnData.some(row => String(row
|
.returnOrderNo) === String(item)));
|
|
|
|
},
|
|
saveReturnTable() {
|
if (this.tableReturnData.length === 0) {
|
this.$showMessage("退货明细单据不能为空,请选择数据");
|
return;
|
};
|
|
if (this.tableReturnData.length > 0 &&
|
this.tableReturnData[this.tableReturnData.length - 1].returnOrderNo.trim() == '' &&
|
String(this.tableReturnData[this.tableReturnData.length - 1].returnQty).trim() == '0') {
|
|
//保存时最后一行空白默认删除
|
const lastIndex = this.tableReturnData.length - 1;
|
this.tableReturnData.splice(lastIndex, 1)
|
|
}
|
|
// 直接从退货明细数据中获取信息填充表单
|
if (this.tableReturnData.length > 0) {
|
// 获取第一个有效的退货明细
|
const firstDetail = this.tableReturnData.find(item => item.returnOrderNo && item.returnOrderNo
|
.trim() !== '');
|
if (firstDetail) {
|
this.formData.returnOrderNo = firstDetail.returnOrderNo;
|
this.formData.returnQty = firstDetail.returnQty;
|
this.formData.returnReason = firstDetail.returnReason;
|
this.formData.itemNo = firstDetail.itemNo || '';
|
|
|
}
|
}
|
|
//表单中的部分字段赋值
|
this.$post({
|
url: "/THJ/SaveReturnDetails",
|
data: {
|
returnDetails: this.tableReturnData
|
|
}
|
}).then(res => {
|
let data = res.data.tbBillList[0];
|
|
if (!data) {
|
|
this.formData.customerName = "";
|
// 保持退货明细中的信息,不从后端覆盖
|
// this.formData.returnOrderNo = "";
|
// this.formData.returnQty = "";
|
// this.formData.returnReason = "";
|
this.formData.itemNo = "";
|
this.tableData = [];
|
return;
|
}
|
//不为空时赋值
|
this.formData.customerName = data.customerName || this.formData.customerName;
|
// 如果后端返回了更完整的信息,则使用后端的
|
if (data.returnOrderNo) this.formData.returnOrderNo = data.returnOrderNo;
|
if (data.returnQty) this.formData.returnQty = data.returnQty;
|
if (data.returnReason) this.formData.returnReason = data.returnReason;
|
if (data.itemNo) this.formData.itemNo = data.itemNo;
|
|
|
this.$post({
|
url: "/THJ/setInspectItem",
|
data: {
|
gid: this.formData.id,
|
updateBy: this.$loginInfo.account
|
}
|
}).then(res => {
|
if (res.data.tbBillList.length > 0) {
|
this.tableData = res.data.tbBillList; // 在箭头函数中,this 指向外层作用域的 this
|
this.isSubmit = false;
|
} else {
|
this.isSubmit = true;
|
this.tableData = [];
|
}
|
});
|
|
});
|
|
this.currentTab = 0;
|
|
},
|
|
// 提交检验结果
|
submitTHJResult() {
|
// 检查是否有检验项目
|
if (!this.tableData || this.tableData.length === 0) {
|
this.$showMessage("请先生成检验项目");
|
return;
|
}
|
|
// 检查是否所有检验项目都已完成
|
const uncompletedItems = this.tableData.filter(item => item.result === '未完成');
|
if (uncompletedItems.length > 0) {
|
this.$showMessage("请完成所有检验项目后再提交");
|
return;
|
}
|
|
// 确认提交
|
uni.showModal({
|
title: '确认提交',
|
content: '确定要提交检验结果吗?提交后将无法修改。',
|
success: (res) => {
|
if (res.confirm) {
|
this.performSubmit();
|
}
|
}
|
});
|
},
|
|
// 执行提交
|
performSubmit() {
|
this.isSubmitting = true;
|
|
// 获取当前用户,如果获取不到则使用默认值
|
const currentUser = this.$loginInfo?.account || this.formData.createBy || "系统用户";
|
|
// 直接使用API调用,不使用Promise.race
|
const resetTimer = setTimeout(() => {
|
this.isSubmitting = false;
|
this.$forceUpdate();
|
}, 1000);
|
this.$post({
|
url: "/THJ/submitTHJResultByProcedure",
|
data: {
|
releaseNo: this.formData.releaseNo,
|
userNo: currentUser
|
}
|
}).then(res => {
|
|
// 检查多种可能的响应格式
|
let status = res.status;
|
let message = res.message;
|
|
// 如果外层没有status,检查data中的status
|
if (status === undefined && res.data) {
|
status = res.data.status;
|
message = res.data.message || res.message;
|
}
|
|
|
if (status === 0) {
|
this.$showMessage("提交成功");
|
// 成功立即复位
|
this.isSubmitting = false;
|
this.$forceUpdate();
|
} else {
|
this.$showMessage("提交失败:" + (message || "未知错误"));
|
// 失败即时复位提交状态,避免按钮一直显示提交中
|
this.isSubmitting = false;
|
this.$forceUpdate();
|
}
|
}).catch(error => {
|
|
let errorMessage = "未知错误";
|
if (error.message) {
|
errorMessage = error.message;
|
} else if (typeof error === 'string') {
|
errorMessage = error;
|
} else if (error.response) {
|
errorMessage = `服务器错误: ${error.response.status}`;
|
}
|
|
this.$showMessage("提交失败:" + errorMessage);
|
// 异常时也立即复位
|
this.isSubmitting = false;
|
this.$forceUpdate();
|
// 即使出现异常也刷新页面数据
|
this.init().catch(error => {
|
});
|
}).finally(() => {
|
clearTimeout(resetTimer);
|
this.isSubmitting = false;
|
// 强制更新视图
|
this.$forceUpdate();
|
|
});
|
},
|
},
|
onShow() {
|
//每次进入页面都会执行的方法
|
// 重置提交状态,防止状态卡住
|
this.isSubmitting = false;
|
|
// 如果formData.id为空,尝试从URL参数中获取
|
if (!this.formData.id) {
|
// 尝试从当前页面URL中获取id参数
|
const pages = getCurrentPages();
|
const currentPage = pages[pages.length - 1];
|
const options = currentPage.options;
|
|
if (options && options.id) {
|
this.formData.id = options.id;
|
this.formData.returnNo = options.returnNo;
|
this.isUpdate = false;
|
}
|
}
|
|
if (this.formData.id) {
|
// 如果有检验单ID,每次都重新初始化以获取最新数据
|
// 确保能获取到最新的检验状态
|
this.init();
|
}
|
},
|
onUnload() {
|
// 页面卸载时移除事件监听
|
uni.$off('inspectionDataUpdated');
|
}
|
};
|
</script>
|
|
<style>
|
.form-group {
|
display: flex;
|
align-items: center;
|
border-bottom: 1px solid #c9c9c9;
|
}
|
|
.form-label {
|
margin-bottom: 0;
|
padding: 5px;
|
}
|
|
.form-input {
|
flex: 1;
|
margin-bottom: 0;
|
padding: 5px;
|
}
|
|
.container {
|
display: flex;
|
flex-direction: column;
|
}
|
|
.picker {
|
flex: 1;
|
margin-bottom: 0;
|
padding: 5px;
|
font-size: 12px;
|
}
|
|
.uni-form-item {
|
display: flex;
|
border-bottom: 1px solid #c9c9c9;
|
}
|
|
.edit {
|
background-color: white;
|
}
|
|
.tab-bar {
|
display: flex;
|
justify-content: space-around;
|
background-color: #f5f5f5;
|
padding: 10px;
|
border-bottom: 1px solid #ccc;
|
}
|
|
.tab-item {
|
flex: 1;
|
text-align: center;
|
padding: 10px;
|
border-radius: 5px;
|
background-color: #fff;
|
color: #007aff;
|
cursor: pointer;
|
font-size: 16px;
|
transition: background-color 0.3s, color 0.3s;
|
}
|
|
.tab-item.active {
|
background-color: #007aff;
|
color: #fff;
|
font-weight: bold;
|
}
|
|
/* 默认样式 */
|
.list-container {
|
height: 60vh;
|
/* 设置列表容器的高度为剩余空间,并减去表单容器的高度 */
|
overflow-y: auto;
|
/* 允许列表容器垂直滚动 */
|
padding: 10px;
|
/* 可选:添加一些内边距,使列表内容更美观 */
|
}
|
|
/* 在小屏幕设备上,重置高度为适应屏幕 */
|
@media (max-width: 768px) {
|
.list-container {
|
height: calc(100vh - 505px);
|
/* 适当调整高度 */
|
}
|
}
|
|
|
.form-container {
|
padding: 10px;
|
/* 可选:添加一些内边距,使表单内容更美观 */
|
}
|
|
.th {
|
background-color: lightskyblue;
|
color: #FFFFFF;
|
}
|
|
|
.plus-button {
|
line-height: 59px;
|
font-size: 24px;
|
cursor: pointer;
|
z-index: 1000;
|
margin-bottom: 10px;
|
}
|
|
.plus-button-row {
|
display: flex;
|
align-items: center;
|
margin-bottom: -10px;
|
}
|
|
.plus-button-row button {
|
flex-grow: 1;
|
/* 使按钮填充可用空间 */
|
margin-right: 10px;
|
/* 按钮之间的间隔 */
|
padding: 0px 20px;
|
/* 根据需要调整内边距 */
|
font-size: 18px;
|
/* 根据需要调整字体大小 */
|
}
|
|
.overlay {
|
position: fixed;
|
top: 0;
|
left: 0;
|
width: 100%;
|
height: 100%;
|
background-color: rgba(0, 0, 0, 0.5);
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.popup {
|
background-color: #fff;
|
padding: 20px;
|
border: 1px solid #ccc;
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
width: 68vw;
|
/* 设置宽度为视口宽度的80% */
|
height: 25vh;
|
/* 设置高度为视口高度的80% */
|
}
|
</style>
|