master
xy 2 years ago
parent 5b8a864180
commit bb1d56390d

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

Loading…
Cancel
Save