master
xy 1 year ago
parent 5b8a864180
commit bb1d56390d

@ -56,6 +56,13 @@
<div>
<Button type="primary" @click="getList"></Button>
</div>
<div>
<Button
type="primary"
@click="goExpense()"
>出差报销
</Button>
</div>
</div>
</slot>
</lx-header>
@ -237,6 +244,13 @@ export default {
[3, "rgb(147, 201, 134)"]
]),
table: [
{
type: 'selection',
width: 54,
reserveSelection: true,
selectable: row => row.away_flow_id,
fixed: "left"
},
{
label: "出差事由",
prop: "title",
@ -474,21 +488,38 @@ export default {
);
},
goExpense (row) {
const baseInfo = {
"flow_title": row.title,
"totalAmt": row.expense,
"65af591780427[65b1ff2a2546a][]": row.start_date,
"65af591780427[65b1ff3f243d0][]": row.end_date,
"65af3a106d973": row.title
};
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/26?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`
);
if (row) {
const baseInfo = {
"flow_title": row.title,
"totalAmt": row.expense,
"65af3a106d973": row.title,
"65af398d89e75": row.away_flow_id,
};
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/26?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`
);
} else {
let rows = this.$refs['xyTable'].getSelection()
const baseInfo = {
"flow_title": rows.map(row => row.title).toString() ,
//"totalAmt": row.expense,
"65af3a106d973": rows.map(row => row.title).toString(),
"65af398d89e75": rows.map(row => row.away_flow_id).toString(),
};
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/26?auth_token=${this.$store.getters.oa_token}&out_away_id=${
rows.map(i => i.id)?.toString()
}&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`
);
}
},
async getList (isFirst) {

Loading…
Cancel
Save