From 06e376d130d0fc87adbf0e0addbcb4c8db52e0f4 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 13 四月 2026 13:32:03 +0800
Subject: [PATCH] fix: 发货状态判断错误
---
src/views/productionManagement/productionProcess/Edit.vue | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/src/views/productionManagement/productionProcess/Edit.vue b/src/views/productionManagement/productionProcess/Edit.vue
index f979d51..c2c4186 100644
--- a/src/views/productionManagement/productionProcess/Edit.vue
+++ b/src/views/productionManagement/productionProcess/Edit.vue
@@ -25,8 +25,35 @@
<el-form-item label="宸ュ簭缂栧彿" prop="no">
<el-input v-model="formState.no" />
</el-form-item>
- <el-form-item label="宸ヨ祫瀹氶" prop="salaryQuota">
- <el-input v-model="formState.salaryQuota" type="number" :step="0.001" />
+ <el-form-item
+ label="宸ュ簭绫诲瀷"
+ prop="type"
+ :rules="[
+ {
+ required: true,
+ message: '璇烽�夋嫨宸ュ簭绫诲瀷',
+ }
+ ]"
+ >
+ <el-select v-model="formState.type" placeholder="璇烽�夋嫨宸ュ簭绫诲瀷">
+ <el-option label="璁℃椂" :value="0" />
+ <el-option label="璁′欢" :value="1" />
+ </el-select>
+ </el-form-item>
+ <el-form-item
+ label="宸ヨ祫瀹氶"
+ prop="salaryQuota"
+ :rules="[
+ {
+ validator: validateSalaryQuota,
+ trigger: ['blur', 'change']
+ }
+ ]"
+ >
+ <el-input v-model="formState.salaryQuota" type="number" :step="0.001" :min="0" />
+ </el-form-item>
+ <el-form-item label="鏄惁璐ㄦ" prop="isQuality">
+ <el-switch v-model="formState.isQuality" :active-value="true" inactive-value="false"/>
</el-form-item>
<el-form-item label="澶囨敞" prop="remark">
<el-input v-model="formState.remark" type="textarea" />
@@ -64,9 +91,11 @@
const formState = ref({
id: props.record.id,
name: props.record.name,
+ type: props.record.type,
no: props.record.no,
remark: props.record.remark,
salaryQuota: props.record.salaryQuota,
+ isQuality: props.record.isQuality,
});
const isShow = computed({
@@ -85,8 +114,10 @@
id: newRecord.id,
name: newRecord.name || '',
no: newRecord.no || '',
+ type: newRecord.type,
remark: newRecord.remark || '',
salaryQuota: newRecord.salaryQuota || '',
+ isQuality: props.record.isQuality,
};
}
}, { immediate: true, deep: true });
@@ -98,14 +129,28 @@
id: props.record.id,
name: props.record.name || '',
no: props.record.no || '',
+ type: props.record.type,
remark: props.record.remark || '',
salaryQuota: props.record.salaryQuota || '',
+ isQuality: props.record.isQuality,
};
}
});
let { proxy } = getCurrentInstance()
+const validateSalaryQuota = (rule, value, callback) => {
+ if (value === '' || value === null || value === undefined) {
+ callback();
+ return;
+ }
+ if (Number(value) < 0) {
+ callback(new Error('宸ヨ祫瀹氶涓嶈兘灏忎簬0'));
+ return;
+ }
+ callback();
+};
+
const closeModal = () => {
isShow.value = false;
};
--
Gitblit v1.9.3