From c04e415644601fccad6c8539bef8f8cc5634de1e Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 10 Dec 2025 11:31:13 +0800 Subject: [PATCH] up --- .env.development | 2 +- src/views/AccompanyOrder/AccompanyOrder.vue | 36 +++++++--- .../AccompanyOrder/components/Assign.vue | 66 ++++++++++++++++--- 3 files changed, 86 insertions(+), 18 deletions(-) diff --git a/.env.development b/.env.development index bcf1ae3..0f1bfbf 100644 --- a/.env.development +++ b/.env.development @@ -3,5 +3,5 @@ ENV='development' # base api VUE_APP_BASE_API=https://yikangyang-test.ali251.langye.net -VUE_APP_UPLOAD_API=https://yikangyangyikangyang-test.ali251.langye.net/api/admin/upload-file +VUE_APP_UPLOAD_API=https://yikangyang-test.ali251.langye.net/api/admin/upload-file VUE_APP_PREVIEW_API=http://view.ali251.langye.net:8012/onlinePreview diff --git a/src/views/AccompanyOrder/AccompanyOrder.vue b/src/views/AccompanyOrder/AccompanyOrder.vue index 1fa5247..5386a1e 100644 --- a/src/views/AccompanyOrder/AccompanyOrder.vue +++ b/src/views/AccompanyOrder/AccompanyOrder.vue @@ -101,6 +101,12 @@ :formatter="({ cellValue }) => (status.get(cellValue))" :edit-render="{ name: 'VxeTreeSelect', options: Array.from(status), props: { multiple: false }, optionProps: { value: '0', label: '1' } }" /> + - + /> --> + +
+
+ + + + + +
+ { this.$refs['table'].clearRadioRow() + this.resetForm() done() }) .catch((_) => {}) }, + resetForm() { + if (this.$refs['salaryForm']) { + this.$refs['salaryForm'].resetFields() + } + this.form.nurse_salary = null + }, submit() { - this.$confirm('确定分配?') - .then((_) => { - if (this.row.id && this.$refs['table'].getRadioRecord(true)) { + // 验证表单 + this.$refs['salaryForm'].validate((valid) => { + if (!valid) { + return false + } + + // 检查是否选择了护工 + if (!this.row.id || !this.$refs['table'].getRadioRecord(true)) { + this.$message.warning('请先选择护工') + return false + } + + this.$confirm('确定分配?') + .then((_) => { save({ id: this.row.id, nurse_id: this.$refs['table'].getRadioRecord(true).id, + nurse_salary: this.form.nurse_salary, status: 0 }).then((_) => { this.$message.success('分配成功!') - this.$emit('update:visible', false) + this.resetForm() + this.visible = false this.$emit('refresh') }) - } - }) - .catch((_) => {}) + }) + .catch((_) => {}) + }) } } } @@ -293,7 +340,8 @@ export default { display: flex; flex-direction: column; - &__form { + &__form-salary { + margin-bottom: 20px; } &__footer {