|
@@ -457,8 +457,8 @@
|
|
<!-- 新增物料行:显示tooltip和必填红色边框 -->
|
|
<!-- 新增物料行:显示tooltip和必填红色边框 -->
|
|
<el-tooltip
|
|
<el-tooltip
|
|
v-if="row.isNew"
|
|
v-if="row.isNew"
|
|
- effect="warning"
|
|
|
|
- content="必填项"
|
|
|
|
|
|
+ effect=""
|
|
|
|
+ content=""
|
|
placement="top"
|
|
placement="top"
|
|
:disabled="row.materialName?.trim()"
|
|
:disabled="row.materialName?.trim()"
|
|
>
|
|
>
|
|
@@ -476,63 +476,75 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="单位" align="center" prop="unit" width="60px">
|
|
<el-table-column label="单位" align="center" prop="unit" width="60px">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
- <el-input
|
|
|
|
|
|
+ <el-tooltip
|
|
v-if="row.isNew"
|
|
v-if="row.isNew"
|
|
- v-model="row.unit"
|
|
|
|
- placeholder="单位"
|
|
|
|
- style="width: 100%"
|
|
|
|
- />
|
|
|
|
|
|
+ effect=""
|
|
|
|
+ content=""
|
|
|
|
+ placement=""
|
|
|
|
+ :disabled="row.unit?.trim()"
|
|
|
|
+ >
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="row.unit"
|
|
|
|
+ placeholder="单位(必填)"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :class="{
|
|
|
|
+ 'is-required-input': row.isNew && !row.unit?.trim()
|
|
|
|
+ }"
|
|
|
|
+ :disabled="isMaterialDisabled(row)"
|
|
|
|
+ />
|
|
|
|
+ </el-tooltip>
|
|
<span v-else>{{ row.unit }}</span>
|
|
<span v-else>{{ row.unit }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="单价(CNY/元)" align="center" prop="unitPrice" :formatter="erpPriceTableColumnFormatter" width="120px">
|
|
<el-table-column label="单价(CNY/元)" align="center" prop="unitPrice" :formatter="erpPriceTableColumnFormatter" width="120px">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
<div class="unit-price-container">
|
|
<div class="unit-price-container">
|
|
- <el-input-number
|
|
|
|
|
|
+ <!--
|
|
|
|
+ <el-tooltip
|
|
v-if="row.isNew || !row.unitPrice || row.unitPrice === 0"
|
|
v-if="row.isNew || !row.unitPrice || row.unitPrice === 0"
|
|
- v-model="row.unitPrice"
|
|
|
|
- :precision="2"
|
|
|
|
- :min="0"
|
|
|
|
- :controls="false"
|
|
|
|
- style="width: 100%"
|
|
|
|
- class="unit-price-input"
|
|
|
|
- :disabled="isMaterialDisabled(row)"
|
|
|
|
- />
|
|
|
|
|
|
+ effect=""
|
|
|
|
+ content=""
|
|
|
|
+ placement=""
|
|
|
|
+ :disabled="row.unitPrice > 0"
|
|
|
|
+ > -->
|
|
|
|
+ <el-input-number
|
|
|
|
+ v-if="row.isNew || !row.unitPrice || row.unitPrice === 0"
|
|
|
|
+ v-model="row.unitPrice"
|
|
|
|
+ :precision="2"
|
|
|
|
+ :min="0"
|
|
|
|
+ :controls="false"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ class="unit-price-input"
|
|
|
|
+ :class="{
|
|
|
|
+ 'is-required-input': (row.isNew || !row.unitPrice || row.unitPrice === 0) && row.unitPrice <= 0
|
|
|
|
+ }"
|
|
|
|
+ :disabled="isMaterialDisabled(row)"
|
|
|
|
+ />
|
|
|
|
+ <!-- </el-tooltip> -->
|
|
<span v-else class="unit-price-text">{{ row.unitPrice }}</span>
|
|
<span v-else class="unit-price-text">{{ row.unitPrice }}</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="消耗数量" align="center" prop="quantity" width="120px">
|
|
<el-table-column label="消耗数量" align="center" prop="quantity" width="120px">
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
- <!-- 新增物料行:显示tooltip、必填红色边框、禁止输入0 -->
|
|
|
|
|
|
+ <!-- 新增物料行:显示tooltip、必填红色边框、禁止输入0
|
|
<el-tooltip
|
|
<el-tooltip
|
|
- v-if="row.isNew"
|
|
|
|
- effect="warning"
|
|
|
|
- content="必填项,需大于0"
|
|
|
|
- placement="top"
|
|
|
|
|
|
+ effect=""
|
|
|
|
+ content=""
|
|
|
|
+ placement=""
|
|
:disabled="row.quantity > 0"
|
|
:disabled="row.quantity > 0"
|
|
- >
|
|
|
|
|
|
+ > -->
|
|
<el-input-number
|
|
<el-input-number
|
|
v-model="row.quantity"
|
|
v-model="row.quantity"
|
|
:precision="4"
|
|
:precision="4"
|
|
- :min="1"
|
|
|
|
|
|
+ :min="0"
|
|
:controls="false"
|
|
:controls="false"
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
- :class="{ 'is-required-input': row.isNew && row.quantity <= 0 }"
|
|
|
|
|
|
+ :class="{ 'is-required-input': row.quantity <= 0 }"
|
|
:disabled="isMaterialDisabled(row)"
|
|
:disabled="isMaterialDisabled(row)"
|
|
placeholder="请输入(必填)"
|
|
placeholder="请输入(必填)"
|
|
/>
|
|
/>
|
|
- </el-tooltip>
|
|
|
|
- <!-- 非新增行:正常显示 -->
|
|
|
|
- <el-input-number
|
|
|
|
- v-else
|
|
|
|
- v-model="row.quantity"
|
|
|
|
- :precision="4"
|
|
|
|
- :min="0"
|
|
|
|
- :controls="false"
|
|
|
|
- style="width: 100%"
|
|
|
|
- :disabled="isMaterialDisabled(row)"
|
|
|
|
- />
|
|
|
|
|
|
+ <!-- </el-tooltip> -->
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="库存数量" align="center" prop="totalInventoryQuantity" width="80px"/>
|
|
<el-table-column label="库存数量" align="center" prop="totalInventoryQuantity" width="80px"/>
|
|
@@ -2470,11 +2482,11 @@ const handleRowClick = (row) => {
|
|
/* 必填输入框红色边框样式(含hover状态) */
|
|
/* 必填输入框红色边框样式(含hover状态) */
|
|
:deep(.is-required-input .el-input__inner) {
|
|
:deep(.is-required-input .el-input__inner) {
|
|
border-color: #f56c6c !important; /* Element错误色 */
|
|
border-color: #f56c6c !important; /* Element错误色 */
|
|
- box-shadow: 0 0 0 1px rgba(227, 59, 59, 0.2) !important; /* 错误阴影 */
|
|
|
|
|
|
+ box-shadow: 0 0 0 1px rgba(245, 108, 108, 0.4) !important; /* 错误阴影 */
|
|
}
|
|
}
|
|
:deep(.is-required-input .el-input-number__input) {
|
|
:deep(.is-required-input .el-input-number__input) {
|
|
border-color: #f56c6c !important;
|
|
border-color: #f56c6c !important;
|
|
- box-shadow: 0 0 0 1px rgba(238, 85, 85, 0.2) !important;
|
|
|
|
|
|
+ box-shadow: 0 0 0 1px rgba(245, 108, 108, 0.4) !important;
|
|
}
|
|
}
|
|
|
|
|
|
/* 鼠标悬停时保持红色边框(覆盖Element默认hover样式) */
|
|
/* 鼠标悬停时保持红色边框(覆盖Element默认hover样式) */
|