<template>
|
<view class="container">
|
<!-- 头部 -->
|
<view class="header">
|
<view class="title">来料检验项目明细</view>
|
<view class="order-number">当前检验单号: {{formData.releaseNo}}</view>
|
</view>
|
|
<!-- 标签栏 -->
|
<view class="tabs">
|
<view v-for="(tab, index) in tabs" :key="index" class="tab" :class="{active: currentTab === index}"
|
@tap="switchTab(index,tab.id)">
|
{{ tab.fcheckItem }}
|
</view>
|
</view>
|
<view class="tab-content">
|
<!-- 基本信息 -->
|
<view class="section">
|
<view class="section-header">基本信息</view>
|
<view class="section-body">
|
<view class="info-grid">
|
<view class="info-item">
|
<view class="info-label">项目名称</view>
|
<view class="info-value">{{ formData.fcheckItem }}</view>
|
</view>
|
<view class="info-item">
|
<view class="info-label">检验工具</view>
|
<view class="info-value">{{ formData.fcheckTool }}</view>
|
</view>
|
<view class="info-item">
|
<view class="info-label">检验数量</view>
|
<view class="info-value">{{ formData.checkQyt }}</view>
|
</view>
|
<view class="info-item">
|
<view class="info-label">检验标准</view>
|
<view class="info-value">{{ formData.sampleSizeNo }}</view>
|
</view>
|
<view class="info-item">
|
<view class="info-label">检验水平</view>
|
<view class="info-value">{{ formData.fcheckLevel }}</view>
|
</view>
|
<view class="info-item">
|
<view class="info-label">接收水平</view>
|
<view class="info-value">{{ formData.facLevel }}</view>
|
</view>
|
<view v-if="formData.fdownAllow!=null" class="info-item">
|
<view class="info-label">下限</view>
|
<view class="info-value">{{ formData.fdownAllow }}</view>
|
</view>
|
<view v-if="formData.fstand!=null" class="info-item">
|
<view class="info-label">标准值</view>
|
<view class="info-value">{{ formData.fstand }}</view>
|
</view>
|
<view v-if="formData.fupAllow!=null" class="info-item">
|
<view class="info-label">上限</view>
|
<view class="info-value">{{ formData.fupAllow }}</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
|
<!-- 规格要求 -->
|
<view class="section">
|
<view class="section-header">规格要求</view>
|
<view class="section-body">
|
<text class="spec-text">{{ formData.fspecRequ }}</text>
|
</view>
|
</view>
|
<!-- 规格要求 -->
|
<view class="section">
|
<view class="section-header">检验描述</view>
|
<view class="section-body">
|
<text class="spec-text">{{ formData.fcheckItemDesc }}</text>
|
</view>
|
</view>
|
<!-- 检验结果 -->
|
<view class="section">
|
<view class="section-header">检验结果</view>
|
<view class="section-body">
|
<view class="info-grid">
|
<view class="info-item">
|
<view class="info-label">AC数</view>
|
<view class="info-value">{{formData.facQty}}</view>
|
</view>
|
<view class="info-item">
|
<view class="info-label">RE数</view>
|
<view class="info-value">{{formData.freQty}}</view>
|
</view>
|
<view class="info-item">
|
<view class="info-label">不合格数</view>
|
<view class="info-value">{{formData.fngQty}}</view>
|
</view>
|
</view>
|
|
<view v-if="formData.result!=null" class="result-preview">
|
<view class="info-label">预览结果</view>
|
<view class="info-value">{{formData.result}}</view>
|
</view>
|
|
<view v-if="formData.funit!=null" class="result-ng">
|
<view class="info-label">不良描述</view>
|
<view class="info-value danger">{{formData.funit}}</view>
|
</view>
|
<view class="result-ng">
|
<view class="info-label">备注</view>
|
<view class="info-value danger">{{formData.meom}}</view>
|
</view>
|
</view>
|
</view>
|
|
<!-- 结果录入 -->
|
<view class="section">
|
<view class="section-header">检验结果录入</view>
|
<view class="section-body">
|
<view class="input-group" v-if="tableData.length >= formData.checkQyt && formData.fstand == null">
|
<view class="input-wrapper">
|
<input v-model="batchInput" type="text" class="result-input"
|
placeholder="格式:OK-3 或 NG-3(请勿修改结果为数字的值)" placeholder-class="placeholder"
|
@input="validateBatchInput" @blur="validateBatchInput" />
|
<button :disabled="!isBatchInputValid" :class="{ 'btn-disabled': !isBatchInputValid }"
|
style="margin: 0px;background-color: #3498db;color:#ffffff ;" class="btn primary-btn"
|
@tap="batchUpdateResults">批量修改</button>
|
</view>
|
<view v-if="batchInputError" class="error-message">{{ batchInputError }}</view>
|
</view>
|
<view class="input-group input1">
|
<view class="input-wrapper">
|
|
<button class="btn upload-btn" @tap="chooseImage">
|
<uni-icons type="upload" size="16" color="#fff"></uni-icons>
|
上传/查看图片
|
</button>
|
<button v-if="this.current" class="btn upload-btn" @tap="upRemarks">
|
<uni-icons type="compose" size="16" color="#fff"></uni-icons>
|
不良描述
|
</button>
|
<button v-if="this.current" class="btn upload-btn" @tap="upMeom">
|
<uni-icons type="compose" size="16" color="#fff"></uni-icons>
|
备注
|
</button>
|
<input v-if="(tableData.length < formData.checkQyt)" @input="search($event)"
|
v-model="inputTxt" type="text" class="result-input" placeholder="请输入检验结果..."
|
placeholder-class="placeholder" />
|
<button v-if="(tableData.length < formData.checkQyt)"
|
style="margin: 0px;background-color: #3498db;color:#ffffff ;" class="btn primary-btn"
|
@tap="saveResult">保存结果</button>
|
</view>
|
</view>
|
|
<view class="input-group input2">
|
<view class="input-wrapper">
|
|
<button class="btn upload-btn" @tap="chooseImage">
|
<uni-icons type="upload" size="16" color="#fff"></uni-icons>
|
上传/查看图片
|
</button>
|
<button v-if="this.current" class="btn upload-btn" @tap="upRemarks">
|
<uni-icons type="compose" size="16" color="#fff"></uni-icons>
|
不良描述
|
</button>
|
<button v-if="this.current" class="btn upload-btn" @tap="upMeom">
|
<uni-icons type="compose" size="16" color="#fff"></uni-icons>
|
备注
|
</button>
|
|
</view>
|
|
<view class="input-wrapper" style="margin-top: 15px;">
|
|
<input v-if="(tableData.length < formData.checkQyt)" @input="search($event)"
|
v-model="inputTxt" type="text" class="result-input" placeholder="请输入检验结果..."
|
placeholder-class="placeholder" />
|
<button v-if="(tableData.length < formData.checkQyt)"
|
style="margin: 0px;background-color: #3498db;color:#ffffff ;" class="btn primary-btn"
|
@tap="saveResult">保存结果</button>
|
</view>
|
</view>
|
</view>
|
</view>
|
|
<!-- 结果表格 -->
|
<view v-if="tableData.length>0" class="table-container">
|
<view class="table-header">
|
<view class="th">编号</view>
|
<view class="th">检验结果<i style="color: rgb(0 212 68);"
|
v-if="!(tableData.length < formData.checkQyt)">(输入已完成)</i></view>
|
<view class="th" v-if="current">操作</view>
|
</view>
|
|
<view v-for="(item, index) in tableData" :key="index" class="table-row">
|
<view class="td">{{ index + 1 }}</view>
|
<view class="td">
|
<view :class="['result-badge', item.fcheckResu]">
|
{{ item.fcheckResu }}
|
</view>
|
</view>
|
<view class="td" v-if="current">
|
<button v-if="!isNumber" class="btn danger-btn" @tap="toggleResult(item)">
|
{{ editResult(item.fcheckResu) }}
|
</button>
|
<button v-if="isNumber" class="btn danger-btn" @tap="toDetail(item)">
|
修改
|
</button>
|
</view>
|
</view>
|
</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 class="updateBut" type="warn" @click="editRemarks">修改</button>
|
<button @click="remarksPopup = !remarksPopup">取消</button>
|
</form>
|
</view>
|
</view>
|
<view v-if="meomPopup" 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="meom" />
|
</view>
|
<button class="updateBut" type="warn" @click="editMeom">修改</button>
|
<button @click="meomPopup = !meomPopup">取消</button>
|
</form>
|
</view>
|
</view>
|
<view v-if="showMeom" class="overlay">
|
<view class="popup">
|
<h3>修改检验结果</h3>
|
<form :modelValue="editData">
|
<view class="form-group">
|
<label class="form-label">检验结果:</label>
|
<input class="form-input" type="text" v-model="editData.fcheckResu" />
|
</view>
|
<button type="warn" @click="eidt">修改</button>
|
<button @click="showMeom = !showMeom">取消</button>
|
</form>
|
</view>
|
</view>
|
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import {
|
compile
|
} from "vue";
|
|
export default {
|
data() {
|
return {
|
formData: {},
|
tableData: {},
|
mainId: '',
|
isNumber: false,
|
currentTab: 0,
|
tabs: [],
|
inputResult: '',
|
remarksPopup: false,
|
showPopup: false,
|
editData: {},
|
inputTxt: '',
|
formID: '',
|
releaseNo: '',
|
current: false,
|
batchInput: '',
|
batchInputError: '',
|
isBatchInputValid: false,
|
funit:'',
|
meomPopup: false,
|
showMeom:false,
|
meom: '',
|
}
|
},
|
methods: {
|
switchTab(index, mainIds) {
|
this.currentTab = index
|
this.mainId = mainIds;
|
this.refreshResult();
|
|
},
|
validateBatchInput() {
|
const input = this.batchInput.trim();
|
if (!input) {
|
this.batchInputError = '';
|
this.isBatchInputValid = false;
|
return;
|
}
|
|
// 验证格式:OK-数字 或 NG-数字
|
const match = input.match(/^(OK|NG)-(\d+)$/);
|
if (!match) {
|
this.batchInputError = '格式错误,请输入:OK-数字 或 NG-数字';
|
this.isBatchInputValid = false;
|
return;
|
}
|
|
const count = parseInt(match[2]);
|
if (count <= 0 || count > this.tableData.length) {
|
this.batchInputError = `数量必须在 1-${this.tableData.length} 之间`;
|
this.isBatchInputValid = false;
|
return;
|
}
|
|
|
this.batchInputError = '';
|
this.isBatchInputValid = true;
|
},
|
|
// 批量更新检验结果
|
batchUpdateResults() {
|
if (!this.isBatchInputValid) return;
|
|
const [status, countStr] = this.batchInput.split('-');
|
const count = parseInt(countStr);
|
|
if (this.tableData.length > 0) {
|
const firstItem = this.tableData[0];
|
const isNumber = /^-?\d+(\.\d+)?$/.test(firstItem.fcheckResu);
|
if (isNumber) {
|
this.$showMessage("不能批量修改数字类型的结果");
|
return;
|
}
|
}
|
let updatedCount = 0;
|
const requests = [];
|
for (let i = 0; i < count; i++) {
|
const item = this.tableData[i];
|
const fstand = status === 'OK' ? '√' : '×';
|
const fcheckResu = status;
|
|
requests.push(this.$post({
|
url: "/LLJ/UpdateQSItemDetail",
|
data: {
|
id: item.id,
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: fcheckResu,
|
updateBy: this.$loginInfo.account,
|
}
|
}));
|
}
|
|
Promise.all(requests)
|
.then(() => {
|
this.$showMessage(`成功将前${count}个结果修改为${status}`);
|
this.batchInput = '';
|
this.batchInputError = '';
|
this.isBatchInputValid = false;
|
this.refreshResult(); // 刷新结果
|
})
|
.catch(error => {
|
this.$showMessage(`批量修改失败: ${error.message}`);
|
});
|
},
|
//检测输入框的输入,并给变量赋值
|
search(event) {
|
this.formData.fcheckResu = event.detail.value;
|
},
|
toggleResult(item) {
|
let fstand = "√";
|
let fcheckResu = "OK";
|
|
if (item.fcheckResu == 'OK') {
|
fstand = "×";
|
fcheckResu = "NG";
|
}
|
|
this.$post({
|
url: "/LLJ/UpdateQSItemDetail",
|
data: {
|
id: item.id,
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: fcheckResu,
|
updateBy: this.$loginInfo.account,
|
}
|
}).then(res => {
|
this.$showMessage("修改成功");
|
this.refreshResult(); //刷新页面
|
})
|
},
|
chooseImage() {
|
uni.navigateTo({
|
url: 'ImageItem?id=' + this.formData.id
|
});
|
},
|
upRemarks() {
|
this.remarksPopup = true;
|
},
|
saveResult() {
|
|
let count = this.formData.checkQyt;
|
let fstand = "√";
|
|
//有最大值和最小值就根据是否符合标准值更新判定结果,没有最大值和最小值就根据是否通过检验判定结果
|
if (this.formData.fupAllow && this.formData.fdownAllow) {
|
|
if (!this.formData.fcheckResu) {
|
this.$showMessage("请输入正确的检验值");
|
return;
|
}
|
|
if (isNaN(parseFloat(this.formData.fcheckResu))) {
|
this.$showMessage("请输入正确的检验值");
|
return;
|
}
|
|
if (!/^-?\d+(\.\d+)?$/.test(this.formData.fcheckResu)) {
|
this.$showMessage("请输入正确的数值!");
|
return;
|
}
|
if (parseFloat(this.formData.fcheckResu) >= parseFloat(this.formData.fdownAllow) && parseFloat(this
|
.formData
|
.fcheckResu) <= parseFloat(this.formData.fupAllow)) {
|
fstand = "√"
|
} else {
|
fstand = "×";
|
}
|
count = 1;
|
} else {
|
|
if (!this.formData.fcheckResu) {
|
this.formData.fcheckResu = 1
|
}
|
|
if (this.formData.fcheckResu == 0 || this.formData.fcheckResu == 1) {
|
this.formData.isPass = this.formData.fcheckResu
|
} else {
|
this.$showMessage("无标准值时,检验结果只能为0或1!");
|
return;
|
}
|
count = count - this.tableData.length;
|
}
|
|
this.formData.updater = this.$loginInfo.account;
|
|
this.$post({
|
url: "/LLJ/SetQSItemDetail",
|
data: {
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: this.formData.fcheckResu,
|
LastupdateBy: this.$loginInfo.account,
|
count: count
|
}
|
}).then(res => {
|
this.formData.fcheckResu = null;
|
this.$showMessage("保存成功");
|
this.refreshResult();
|
this.inputTxt = '';
|
})
|
|
},
|
goBack() {
|
uni.navigateBack()
|
},
|
//获取检验单详情
|
refreshResult() {
|
this.$post({
|
url: "/LLJ/getXjDetail02ById",
|
data: {
|
id: this.mainId
|
}
|
}).then(res => {
|
this.formData = res.data.tbBillList.itemXj01;
|
|
this.tableData = res.data.tbBillList.itemXj02s;
|
|
if (this.formData.imageData) {
|
this.isShowImg = true;
|
this.base64Image = 'data:image/jpeg;base64,' + this.formData.imageData;
|
}
|
|
//fupAllow fdownAllow standardValue
|
if (this.formData.fupAllow && this.formData.fdownAllow && this.formData.fstand) {
|
this.isNumber = true;
|
} else {
|
this.isNumber = false;
|
}
|
|
})
|
},
|
editResult(fcheckResu) {
|
if (fcheckResu == 'OK') {
|
return "改为不合格";
|
} else {
|
return "改为合格";
|
}
|
},
|
toDetail(item) {
|
this.showPopup = !this.showPopup;
|
this.showMeom = !this.showMeom;
|
this.editData = item;
|
|
},
|
upMeom() {
|
this.meomPopup = true;
|
|
},
|
editMeom() {
|
// 保存备注信息
|
if (this.meom) {
|
this.$post({
|
url: "/LLJ/saveRemarksPid",
|
data: {
|
pid: this.formData.id,
|
meom: this.meom,
|
|
}
|
}).then(res => {
|
if (res.data.tbBillList > 0) {
|
this.formData.meom = this.meom;
|
this.meomPopup = !this.meomPopup;
|
this.$showMessage("保存成功");
|
}
|
})
|
} else {
|
this.$post({
|
url: "/LLJ/saveRemarksPid",
|
data: {
|
pid: this.formData.id,
|
meom: ''
|
}
|
}).then(res => {
|
if (res.data.tbBillList > 0) {
|
this.formData.meom = this.meom;
|
this.meomPopup = !this.meomPopup;
|
this.$showMessage("保存成功");
|
}
|
})
|
}
|
},
|
editRemarks() {
|
if (this.remarks) {
|
|
this.$post({
|
url: "/LLJ/saveRemarksPid",
|
data: {
|
pid: this.formData.id,
|
remarks: this.remarks
|
}
|
}).then(res => {
|
if (res.data.tbBillList > 0) {
|
this.formData.remarks = this.remarks;
|
this.remarksPopup = !this.remarksPopup;
|
this.$showMessage("保存成功");
|
}
|
})
|
} else {
|
this.$post({
|
url: "/LLJ/saveRemarksPid",
|
data: {
|
pid: this.formData.id,
|
remarks: ''
|
}
|
}).then(res => {
|
if (res.data.tbBillList > 0) {
|
this.formData.remarks = this.remarks;
|
this.remarksPopup = !this.remarksPopup;
|
this.$showMessage("保存成功");
|
}
|
})
|
}
|
},
|
eidt() {
|
|
if (!this.editData.fcheckResu) {
|
this.$showMessage("请输入检验结果");
|
}
|
|
if (this.formData.fcheckResu == this.editData.fcheckResu) {
|
this.$showMessage("修改成功");
|
return;
|
}
|
|
let fstand = "√";
|
|
if (this.formData.fupAllow && this.formData.fdownAllow) {
|
|
if (!this.editData.fcheckResu) {
|
this.$showMessage("请输入检验值");
|
return;
|
}
|
|
if (parseFloat(this.editData.fcheckResu) >= parseFloat(this.formData.fdownAllow) && parseFloat(this
|
.editData
|
.fcheckResu) <= parseFloat(this.formData.fupAllow)) {
|
this.editData.isPass = 1
|
} else {
|
this.editData.isPass = 0
|
fstand = "×";
|
}
|
} else {
|
|
if (!this.editData.fcheckResu) {
|
this.editData.fcheckResu = 1
|
}
|
|
if (this.editData.fcheckResu == 0 || this.editData.fcheckResu == 1) {
|
if (this.editData.fcheckResu == 0) {
|
fstand = "×";
|
}
|
} else {
|
this.$showMessage("无标准值时,检验结果只能为0或1!");
|
return;
|
}
|
}
|
|
this.editData.updater = this.$loginInfo.account;
|
|
this.$post({
|
url: "/LLJ/UpdateQSItemDetail",
|
data: {
|
id: this.editData.id,
|
mainId: this.formData.id,
|
releaseNo: this.formData.releaseNo,
|
fstand: fstand,
|
fcheckResu: this.editData.fcheckResu,
|
updateBy: this.$loginInfo.account,
|
}
|
}).then(res => {
|
this.showPopup = !this.showPopup;
|
this.$showMessage("修改成功");
|
this.refreshResult(); //刷新页面
|
})
|
},
|
},
|
onLoad(options) {
|
//options中包含了url附带的参数
|
let params = options;
|
this.mainId = params["mainId"];
|
this.refreshResult();
|
this.formID = params["formID"];
|
this.releaseNo = params["releaseNo"];
|
this.currentTab = parseInt(params["index"]);
|
this.current = params["current"] === 'true' ? true : false;
|
this.$post({
|
url: "/LLJ/getJYItem",
|
data: {
|
id: this.formID,
|
releaseNo: this.releaseNo,
|
|
}
|
}).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.tabs = tableData;
|
// if (this.tableData.length === 0) {
|
// this.isShowTable = true;
|
// }
|
this.tableData.forEach((item, index) => {
|
this.set(item, 'current', this.current);
|
});
|
console.log(this.tableData);
|
|
|
})
|
this.$nextTick(() => {
|
this.validateBatchInput();
|
});
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
$primary-color: #409EFF;
|
$success-color: #67C23A;
|
$danger-color: #F56C6C;
|
$border-color: #DCDFE6;
|
$bg-color: #f5f7fa;
|
|
.container {
|
padding: 20px;
|
background-color: #fff;
|
}
|
|
.header {
|
padding: 20px;
|
border-bottom: 1px solid $border-color;
|
background: linear-gradient(90deg, #f0f7ff, #e1f0ff);
|
|
.title {
|
font-size: 24px;
|
color: #333;
|
margin-bottom: 10px;
|
}
|
|
.order-number {
|
color: #666;
|
font-size: 14px;
|
}
|
}
|
|
.tabs {
|
display: flex;
|
background-color: $bg-color;
|
border-bottom: 1px solid $border-color;
|
|
.tab {
|
flex: 1;
|
text-align: center;
|
padding: 12px 0;
|
border-right: 1px solid $border-color;
|
color: #666;
|
transition: all 0.3s;
|
|
&:last-child {
|
border-right: none;
|
}
|
|
&.active {
|
background-color: #fff;
|
color: $primary-color;
|
font-weight: bold;
|
position: relative;
|
|
&::after {
|
content: '';
|
position: absolute;
|
bottom: 0;
|
left: 0;
|
right: 0;
|
height: 2px;
|
background-color: $primary-color;
|
}
|
}
|
}
|
}
|
|
.section {
|
margin: 20px 0;
|
border: 1px solid $border-color;
|
border-radius: 4px;
|
|
&-header {
|
padding: 12px 16px;
|
background-color: $bg-color;
|
border-bottom: 1px solid $border-color;
|
font-weight: bold;
|
}
|
|
&-body {
|
padding: 16px;
|
}
|
}
|
|
.info-grid {
|
display: grid;
|
grid-template-columns: repeat(3, 1fr);
|
gap: 16px;
|
|
.info-item {
|
margin-bottom: 12px;
|
|
.info-label {
|
color: #909399;
|
font-size: 14px;
|
margin-bottom: 4px;
|
}
|
|
.info-value {
|
color: #333;
|
font-weight: 500;
|
}
|
}
|
}
|
|
.input-group {
|
margin: 16px 0;
|
|
.input-wrapper {
|
display: flex;
|
gap: 12px;
|
|
.result-input {
|
flex: 1;
|
height: 45px;
|
padding: 0 12px;
|
border: 1px solid $border-color;
|
border-radius: 4px;
|
font-size: 14px;
|
}
|
|
.upload-btn {
|
background-color: #909399;
|
color: #fff;
|
padding: 0 10px;
|
margin: 0;
|
//height: 40rpx;
|
}
|
}
|
}
|
|
.table-container {
|
border: 1px solid $border-color;
|
border-radius: 4px;
|
margin-top: 20px;
|
|
.table-header {
|
display: flex;
|
background-color: $bg-color;
|
border-bottom: 1px solid $border-color;
|
|
.th {
|
flex: 1;
|
padding: 12px;
|
font-weight: bold;
|
}
|
}
|
|
.table-row {
|
display: flex;
|
border-bottom: 1px solid $border-color;
|
padding: 12px;
|
|
&:last-child {
|
border-bottom: none;
|
}
|
|
.td {
|
flex: 1;
|
display: flex;
|
align-items: center;
|
}
|
}
|
}
|
|
.result-badge {
|
display: inline-block;
|
padding: 4px 8px;
|
border-radius: 4px;
|
font-size: 12px;
|
font-weight: bold;
|
|
&.OK {
|
background-color: rgba($success-color, 0.1);
|
color: $success-color;
|
}
|
|
&.NG {
|
background-color: rgba($danger-color, 0.1);
|
color: $danger-color;
|
}
|
}
|
|
.action-buttons {
|
margin-top: 20px;
|
display: flex;
|
justify-content: flex-end;
|
gap: 12px;
|
|
.btn {
|
padding: 8px 20px;
|
border-radius: 4px;
|
|
&.primary-btn {
|
background-color: $primary-color;
|
color: #fff;
|
|
}
|
|
&.cancel-btn {
|
background-color: #909399;
|
color: #fff;
|
}
|
}
|
}
|
|
.danger {
|
color: $danger-color;
|
}
|
|
.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% */
|
}
|
|
.updateBut {
|
background-color: #3498db;
|
color: white;
|
}
|
|
.input1 {
|
display: block;
|
}
|
|
.input2 {
|
display: none;
|
}
|
|
/* 响应式设计 */
|
@media (max-width: 500px) {
|
.input1 {
|
display: none;
|
}
|
|
.input2 {
|
display: block;
|
}
|
}
|
|
.error-message {
|
color: $danger-color;
|
font-size: 12px;
|
margin-top: 4px;
|
}
|
|
.input-group:first-child {
|
.result-input {
|
border-color: $primary-color;
|
box-shadow: 0 0 0 2px rgba($primary-color, 0.2);
|
}
|
}
|
|
.btn-disabled {
|
opacity: 0.6;
|
cursor: not-allowed;
|
}
|
</style>
|