master
xy 1 year ago
parent ade23bd0ef
commit 54cf970de9

@ -195,13 +195,19 @@
<script> <script>
import { deepCopy } from "@/utils"; import { deepCopy } from "@/utils";
import { save, show } from "@/api/away" import { save, show, index } from "@/api/away"
import {getBudget} from "@/api/budget/budget"; import {getBudget} from "@/api/budget/budget";
import {listdeptNoAuth} from "@/api/system/department"; import {listdeptNoAuth} from "@/api/system/department";
import {getparameterTree} from "@/api/system/dictionary"; import {getparameterTree} from "@/api/system/dictionary";
export default { export default {
data() { data() {
return { return {
window: {
width: 0,
height: 0,
top: 0,
left: 0,
},
planTypes: [], planTypes: [],
departments: [], departments: [],
@ -343,6 +349,23 @@ export default {
} }
}, },
methods: { methods: {
goAway (row) {
const baseInfo = {
"flow_title": row.title,
"chuchaikaishiriqi": row.start_date,
"chuchaijieshuriqi": row.end_date,
"chuchaishiyou": row.title,
};
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/58?auth_token=${this.$store.getters.oa_token}&out_away_id=${
row.id
}&default_json=${JSON.stringify(baseInfo)}`;
window.open(
url,
"buyProcess",
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
);
},
forwardStep () { forwardStep () {
this.step = this.step > 1 ? this.step - 1 : this.step; this.step = this.step > 1 ? this.step - 1 : this.step;
}, },
@ -441,12 +464,18 @@ export default {
if (valid) { if (valid) {
// this.form.use_car_status = this.form.use_car ? 1 : ""; // this.form.use_car_status = this.form.use_car ? 1 : "";
// this.form.subsidize_status = this.form.is_subsidize ? 1 : ""; // this.form.subsidize_status = this.form.is_subsidize ? 1 : "";
save(this.form,true).then(res => { save(this.form,true).then(async(res) => {
this.loading = false this.loading = false
this.$message({ this.$message({
message: '提交成功', message: '提交成功',
type:'success' type:'success'
}) })
const list = await index({
page: 1,
page_size: 1,
sort_name: 'created_at'
})
this.goAway(list.data[0])
setTimeout(() => { setTimeout(() => {
this.$router.push("/contract/away") this.$router.push("/contract/away")
},500) },500)
@ -466,6 +495,10 @@ export default {
}, },
}, },
created() { created() {
this.window.width = screen.availWidth * 0.95;
this.window.height = screen.availHeight * 0.95;
this.window.top = (window.screen.height - 30 - this.window.height) / 2;
this.window.left = (window.screen.width - 10 - this.window.width) / 2;
this.init(); this.init();
} }
} }

@ -2969,7 +2969,6 @@ export default {
} }
}) })
.catch((error) => {}); .catch((error) => {});
this.select.is_myself = this.$route.path.split('_')[1] ? Number(this.$route.path.split('_')[1]) : 0
this.getContracts(); this.getContracts();
// //
window.onfocus = async () => { window.onfocus = async () => {

Loading…
Cancel
Save