master
xy 1 year ago
parent bc7464d673
commit 5d4b6094ca

@ -63,9 +63,7 @@
}
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
async logout() {
await this.$store.dispatch('user/logout')
this.$router.push(`/login?redirect=${this.$route.fullPath}`)

@ -207,6 +207,7 @@
import examineAway from "@/views/away/component/examineAway.vue";
import addAway from "@/views/away/component/addAway.vue"
import { index, destroy, save } from "@/api/away";
import {getToken} from "@/utils/auth";
export default {
components: {
@ -418,28 +419,19 @@ export default {
},
async toOaDetail (tbname,row) {
let url = `${process.env.VUE_APP_OUT_URL}/flow/view/`
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
switch (tbname) {
case "useCar":
url += row.use_car_flow_id
break;
case "subsidize":
url += row.subsidize_flow_id
break;
case "away":
url += row.away_flow_id
break;
case "expense":
case 'expense':
url += row.expense_flow_id
break;
default:
url = `${process.env.VUE_APP_OUT_URL}/admin/flow/list/todo`
url = `${process.env.VUE_APP_OUT_URL}/flow/list/todo`
}
window.open(
`${url}?&auth_token=${this.$store.getters.oa_token}`,
"_blank",
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
);
this.oaUrl = url
this.isShowOaModal = true
},
goUseCar (row) {
const baseInfo = {
@ -472,54 +464,41 @@ export default {
);
},
goAway (row) {
// 70
const baseInfo = {
"flow_title": row.title,
"chuchaikaishiriqi": row.start_date,
"chuchaijieshuriqi": row.end_date,
"kaishi": row.start_date,
"jieshu": 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`
);
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=70&out_away_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
console.log('url',url)
this.oaUrl = url
this.isShowOaModal = true
},
goExpense (row) {
let url;
if (row) {
const baseInfo = {
"flow_title": row.title,
"totalAmt": row.expense,
"65af3a106d973": row.title,
"chuchaishiyou": 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`
);
url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=78&out_away_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
} 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(),
"totalAmt": row.reduce((pre, cur) => pre + Number(row.expense??0),0),
"chuchaishiyou": 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`
);
url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=78&out_away_id=${rows.map(i => i.id)?.toString()}&default_json=${JSON.stringify(baseInfo)}`;
}
console.log('url',url)
this.oaUrl = url
this.isShowOaModal = true
},
async getList (isFirst) {

@ -718,7 +718,7 @@ import {
addContrant,
delContract,
checkContractName,
updateStatus,
updateStatus, detailContract,
} from "@/api/contract/contract";
import { getparameter } from "@/api/system/dictionary";
import { listdeptNoAuth } from "@/api/system/department";
@ -737,6 +737,7 @@ import contractPaymentRegistration from "@/views/contract/components/contractPay
import biddingUpload from "./components/biddingUpload.vue";
import oaFiles from './components/oaFiles.vue';
import addContractLedger from '@/views/contract/components/addContractLedger.vue'
import {show} from "@/api/away";
let iframe;
export default {
components: {
@ -1744,7 +1745,6 @@ export default {
},
async toOaDetail (tbname,row) {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
//let url = `${process.env.VUE_APP_OUT_URL}?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&`
switch (tbname) {
case "caigou":
let caigou = row.flow_list.find(i => i.tag === 'caigou')?.detail
@ -1910,11 +1910,6 @@ export default {
}
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=${row.flow_mod_id}&out_contract_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
console.log('url',url)
// let buyProcess = window.open(
// url,
// "buyProcess",
// `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
// );
this.oaUrl = url
this.isShowOaModal = true
},
@ -1937,38 +1932,32 @@ export default {
},
//
async paying(row) {
let typeMap = new Map([
['货物','货物采购'],
['服务','服务采购'],
['其他','其他项目']
])
// 75
let contract;
if (row.contract_id) {
contract = await detailContract({ id: row.contract_id });
} else {
contract = await show({ id: row.away_id });
}
let baseInfo = {
"flow_title": row.name || "",
title: row?.name,
xiangmuleibie: typeMap.get(this.type.find((item) => {
return item.value === row.type;
})?.label),
things: row?.name,
"658a6f87c4a75": row?.number,
"contractno": row?.number,
out_pay_id: row?.out_pay_id,
"658a70251f0f4": row?.reason,
"658a71e9395b2": row?.yizhifucishu,
"658a70750b3cf": row?.yizhifujine,
"658a7036916f6": row?.zongjia,
"658a7059b6531": row?.zhifucishu,
total: row?.total,
"658a6fafb27ac": row?.applyMoney
//"\\":row.supply
"xiangxishuoming": row?.reason,
"cishu": row?.yizhifucishu,
"yifujine": row?.yizhifujine,
"xiangmuzonge": row?.zongjia,
"zhifucishu": row?.zhifucishu,
"amt": row?.applyMoney,
"liezhiqudao": contract?.plans.map(i => i.name)?.toString()
};
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/18?auth_token=${this.$store.getters.oa_token}&out_pay_id=${
row?.out_pay_id
}&default_json=${JSON.stringify(baseInfo)}`;
let signProcess = window.open(
url,
"signProcess",
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
);
this.$router.push('/contract/contract/paymentRegistrationList_1')
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=75&out_away_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
this.oaUrl = url;
this.isShowOaModal = true;
this.$router.push('/contract/paymentRegistrationList_1')
},
//
async askProcess(row) {

@ -155,6 +155,21 @@
ref="detailPaymentRegistration"
@success="getFundLogs"
></detailPaymentRegistration>
<!-- oa办理-->
<Modal
:width="86"
class-name="oa-modal"
title="流程办理"
fullscreen
:mask-closable="false"
v-model="isShowOaModal"
footer-hide
>
<div style="width: 100%;height: 100%;">
<iframe style="width: 100%;height: 100%;border-radius: 0 0 6px 6px;" :src="oaUrl" frameborder="0"></iframe>
</div>
</Modal>
</div>
</template>
@ -168,6 +183,7 @@ import { show } from "@/api/away"
import printRegistration from "./components/printRegistration";
import detailPaymentRegistration from "./components/detailPaymentRegistration";
import {getToken} from "@/utils/auth";
export default {
components: {
printRegistration,
@ -175,12 +191,8 @@ export default {
},
data() {
return {
window: {
width: 0,
height: 0,
top: 0,
left: 0,
},
isShowOaModal: false,
oaUrl: '',
selectDate: "",
keywords: "",
list: [],
@ -365,51 +377,22 @@ export default {
})
)?.data || [];
console.log(contract);
let typeMap = new Map([
["货物", "货物采购"],
["服务", "服务采购"],
["其他", "其他项目"],
]);
let baseInfo = {
"flow_title": row.contract.name || "",
xiangmuleibie: typeMap.get(
[
{
label: "服务",
value: 1,
},
{
label: "货物",
value: 2,
},
{
label: "工程",
value: 3,
},
].find((item) => {
return item.value === contract.type;
})?.label
),
"658a6f87c4a75": row?.contract?.number,
"658a6f6243d9f": row?.contract?.name,
"oaUrl": row?.contract?.number,
"title": row?.contract?.name,
out_pay_id: row?.id,
"658a70251f0f4": row?.remark,
"658a71e9395b2": actNumsTotal(),
"658a70750b3cf": totalMoney(),
"658a7036916f6": contract?.money,
"658a7059b6531": payments.length,
"658a6fafb27ac": row?.apply_money,
"658a726fb727a": contract?.plans.map(i => i.name)?.toString()
//"\\":row.supply
"xiangxishuoming": row?.remark,
"yifujine": actNumsTotal(),
"xiangmuzonge": totalMoney(),
"cishu": payments.length,
"amt": row?.apply_money,
"liezhiqudao": contract?.plans.map(i => i.name)?.toString()
};
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/18?auth_token=${this.$store.getters.oa_token}&out_pay_id=${
row?.id
}&default_json=${JSON.stringify(baseInfo)}`;
let signProcess = window.open(
url,
"signProcess",
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
);
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=75&out_away_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
this.oaUrl = url;
this.isShowOaModal = true;
},
pageSizeChange(e) {
@ -451,11 +434,6 @@ export default {
},
},
mounted() {
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.contractId = this.$route.query.contractId;
this.getFundLogs();

Loading…
Cancel
Save