Compare commits

3 Commits

3 changed files with 27 additions and 6 deletions

View File

@ -366,6 +366,7 @@ class MaterialBaseService:
desc(warning_level), desc(warning_level),
desc(red_shortage), desc(red_shortage),
asc(yellow_distance), asc(yellow_distance),
desc(inv_val),
desc(MaterialBase.id) desc(MaterialBase.id)
) )
elif order_by_column: elif order_by_column:

View File

@ -76,3 +76,21 @@ html, body {
因为你的项目中引入了 Element Plus 因为你的项目中引入了 Element Plus
保留原生 button 样式会和 Element Plus 组件产生冲突。 保留原生 button 样式会和 Element Plus 组件产生冲突。
*/ */
/* -------------------------------------------------
移动端/平板端触控优化
移除300ms延迟防止双击放大但保留双指缩放
-------------------------------------------------
*/
a,
button,
input,
textarea,
select,
.el-button,
.el-checkbox,
.el-switch,
.el-table__row,
.el-pagination {
touch-action: manipulation;
}

View File

@ -508,11 +508,11 @@
<el-switch v-model="warningForm.isEnabled" /> <el-switch v-model="warningForm.isEnabled" />
</el-form-item> </el-form-item>
<el-form-item label="红色阈值" prop="redThreshold" v-if="warningForm.isEnabled"> <el-form-item label="红色阈值" prop="redThreshold" v-if="warningForm.isEnabled">
<el-input-number v-model="warningForm.redThreshold" :min="0" :precision="2" placeholder="库存此值为红色预警" style="width: 100%" /> <el-input-number v-model="warningForm.redThreshold" :min="0" :precision="0" step="1" placeholder="库存此值为红色预警" style="width: 100%" />
<div class="form-tip">库存数量 ≤ 此值时显示红色预警</div> <div class="form-tip">库存数量 ≤ 此值时显示红色预警</div>
</el-form-item> </el-form-item>
<el-form-item label="黄色阈值" prop="yellowThreshold" v-if="warningForm.isEnabled"> <el-form-item label="黄色阈值" prop="yellowThreshold" v-if="warningForm.isEnabled">
<el-input-number v-model="warningForm.yellowThreshold" :min="0" :precision="2" placeholder="库存此值为黄色预警" style="width: 100%" /> <el-input-number v-model="warningForm.yellowThreshold" :min="0" :precision="0" step="1" placeholder="库存此值为黄色预警" style="width: 100%" />
<div class="form-tip">红色阈值 &lt; 库存 ≤ 此值时显示黄色预警</div> <div class="form-tip">红色阈值 &lt; 库存 ≤ 此值时显示黄色预警</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -1426,15 +1426,17 @@ onMounted(() => {
.file-preview-cell { display: flex; align-items: center; justify-content: center; position: relative; } .file-preview-cell { display: flex; align-items: center; justify-content: center; position: relative; }
.more-badge { position: absolute; top: -5px; right: -5px; background: #909399; color: #fff; border-radius: 10px; padding: 0 4px; font-size: 10px; transform: scale(0.9); } .more-badge { position: absolute; top: -5px; right: -5px; background: #909399; color: #fff; border-radius: 10px; padding: 0 4px; font-size: 10px; transform: scale(0.9); }
/* 预警行样式 */ /* 预警行样式 - 加深颜色 */
:deep(.warning-row-red) { :deep(.warning-row-red) {
background-color: rgba(245, 108, 108, 0.15) !important; --el-table-tr-bg-color: #ffcdd2 !important;
background-color: #ffcdd2 !important;
} }
:deep(.warning-row-red td) { :deep(.warning-row-red td) {
background-color: transparent !important; background-color: transparent !important;
} }
:deep(.warning-row-yellow) { :deep(.warning-row-yellow) {
background-color: rgba(230, 162, 60, 0.15) !important; --el-table-tr-bg-color: #fff59d !important;
background-color: #fff59d !important;
} }
:deep(.warning-row-yellow td) { :deep(.warning-row-yellow td) {
background-color: transparent !important; background-color: transparent !important;