提交
This commit is contained in:
1 parent
2020f371f4
commit
f1f5d24eff
31 files changed
+13600
-13813
No files matched your search
@@ -381,11 +381,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="isEdit" label="状态" prop="productStatus">
|
||||
<el-select
|
||||
v-model="formData.productStatus"
|
||||
style="width: 100%"
|
||||
:disabled="formData.productStatus !== 'frozen'"
|
||||
>
|
||||
<el-select v-model="formData.productStatus" style="width: 100%">
|
||||
<el-option
|
||||
v-for="opt in editStatusOptions"
|
||||
:key="opt.value"
|
||||
@@ -1152,9 +1148,7 @@
|
||||
productImages: formData.productImages?.trim() || undefined,
|
||||
remark: formData.remark?.trim() || undefined
|
||||
}
|
||||
// 仅「已冻存」可变更状态;生产中/已复苏等系统态勿提交,避免后端校验失败
|
||||
const editableStatuses = ['frozen', 'sold', 'used', 'voided']
|
||||
if (!isEdit.value || editableStatuses.includes(formData.productStatus)) {
|
||||
if (isEdit.value) {
|
||||
shared.productStatus = formData.productStatus || undefined
|
||||
}
|
||||
if (isEdit.value && editingId.value) {
|
||||
|
||||
@@ -248,6 +248,8 @@
|
||||
const map: Record<string, string> = {
|
||||
frozen: 'success',
|
||||
in_production: 'warning',
|
||||
sold: 'warning',
|
||||
used: 'info',
|
||||
voided: 'danger',
|
||||
thawed: 'info'
|
||||
}
|
||||
@@ -258,6 +260,8 @@
|
||||
const map: Record<string, string> = {
|
||||
frozen: '已冻存',
|
||||
in_production: '生产中',
|
||||
sold: '已售卖',
|
||||
used: '已使用',
|
||||
voided: '已作废',
|
||||
thawed: '已复苏'
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user