Commit 1882f514 authored by 张耀's avatar 张耀

fix:

修复工单管理编辑bug
parent 0ceda97b
......@@ -9,7 +9,7 @@
</div>
<div class="add-btns">
<el-button size="default" @click="Cancle">取消</el-button>
<el-button type="primary" size="default" @click="Save">保存</el-button>
<el-button type="primary" size="default" @click="SaveSubmit">保存</el-button>
<el-button type="success" size="default" @click="Distribute">立即下发</el-button>
</div>
</div>
......@@ -23,6 +23,7 @@ import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import addForm from "../modules/add-form.vue";
import axios from "@/request/http.js";
import { ElMessage } from "element-plus";
import { Save } from "../modules/interface.js";
const router = useRouter();
const route = useRoute();
const { id } = route.query;
......@@ -31,10 +32,10 @@ const Cancle = () => {
router.go(-1);
};
const add_form = ref(null);
const Save = async () => {
const SaveSubmit = async () => {
let res = await add_form.value.Submit();
if (!res) return;
Save({ res, is_push: 0 }, { url: "/v1/api/work_order/work_order_manage/edit" }, () => {
Save({ res, is_push: 0 }, { id, url: "/v1/api/work_order/work_order_manage/edit" }, () => {
Cancle();
});
};
......@@ -59,7 +60,7 @@ const getInfoData = () => {
time: data.timing_weekly?.point_time || "",
},
3: {
lists: data.timing_custom?.map((e) => {
lists: data.timing_rule?.map((e) => {
return {
date: [e.date_from, e.date_to],
time: e.point_time,
......@@ -87,7 +88,7 @@ const getInfoData = () => {
ticket_desc: data.order_desc,
timing_rules: +data.timing_type,
rules: {
...ruleObj,
...ruleObj[data.timing_type],
},
};
} else {
......
......@@ -41,7 +41,7 @@ const setParams = ({ res, is_push }, { id }) => {
...ruleObj[res.timing_rules]
}
if (id) {
params.id = id
params.id = +id
}
return params;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment