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

fix:

修复工单管理编辑bug
parent 0ceda97b
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</div> </div>
<div class="add-btns"> <div class="add-btns">
<el-button size="default" @click="Cancle">取消</el-button> <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> <el-button type="success" size="default" @click="Distribute">立即下发</el-button>
</div> </div>
</div> </div>
...@@ -23,6 +23,7 @@ import bgBreadcrumb from "@/components/bg-breadcrumb.vue"; ...@@ -23,6 +23,7 @@ import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import addForm from "../modules/add-form.vue"; import addForm from "../modules/add-form.vue";
import axios from "@/request/http.js"; import axios from "@/request/http.js";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { Save } from "../modules/interface.js";
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const { id } = route.query; const { id } = route.query;
...@@ -31,10 +32,10 @@ const Cancle = () => { ...@@ -31,10 +32,10 @@ const Cancle = () => {
router.go(-1); router.go(-1);
}; };
const add_form = ref(null); const add_form = ref(null);
const Save = async () => { const SaveSubmit = async () => {
let res = await add_form.value.Submit(); let res = await add_form.value.Submit();
if (!res) return; 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(); Cancle();
}); });
}; };
...@@ -59,7 +60,7 @@ const getInfoData = () => { ...@@ -59,7 +60,7 @@ const getInfoData = () => {
time: data.timing_weekly?.point_time || "", time: data.timing_weekly?.point_time || "",
}, },
3: { 3: {
lists: data.timing_custom?.map((e) => { lists: data.timing_rule?.map((e) => {
return { return {
date: [e.date_from, e.date_to], date: [e.date_from, e.date_to],
time: e.point_time, time: e.point_time,
...@@ -87,7 +88,7 @@ const getInfoData = () => { ...@@ -87,7 +88,7 @@ const getInfoData = () => {
ticket_desc: data.order_desc, ticket_desc: data.order_desc,
timing_rules: +data.timing_type, timing_rules: +data.timing_type,
rules: { rules: {
...ruleObj, ...ruleObj[data.timing_type],
}, },
}; };
} else { } else {
......
...@@ -41,7 +41,7 @@ const setParams = ({ res, is_push }, { id }) => { ...@@ -41,7 +41,7 @@ const setParams = ({ res, is_push }, { id }) => {
...ruleObj[res.timing_rules] ...ruleObj[res.timing_rules]
} }
if (id) { if (id) {
params.id = id params.id = +id
} }
return params; 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