master
xy 1 year ago
parent bc7464d673
commit 5d4b6094ca

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

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

@ -718,7 +718,7 @@ import {
addContrant, addContrant,
delContract, delContract,
checkContractName, checkContractName,
updateStatus, updateStatus, detailContract,
} from "@/api/contract/contract"; } from "@/api/contract/contract";
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import { listdeptNoAuth } from "@/api/system/department"; import { listdeptNoAuth } from "@/api/system/department";
@ -737,6 +737,7 @@ import contractPaymentRegistration from "@/views/contract/components/contractPay
import biddingUpload from "./components/biddingUpload.vue"; import biddingUpload from "./components/biddingUpload.vue";
import oaFiles from './components/oaFiles.vue'; import oaFiles from './components/oaFiles.vue';
import addContractLedger from '@/views/contract/components/addContractLedger.vue' import addContractLedger from '@/views/contract/components/addContractLedger.vue'
import {show} from "@/api/away";
let iframe; let iframe;
export default { export default {
components: { components: {
@ -1744,7 +1745,6 @@ export default {
}, },
async toOaDetail (tbname,row) { 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}/#/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) { switch (tbname) {
case "caigou": case "caigou":
let caigou = row.flow_list.find(i => i.tag === 'caigou')?.detail 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)}`; 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) 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.oaUrl = url
this.isShowOaModal = true this.isShowOaModal = true
}, },
@ -1937,38 +1932,32 @@ export default {
}, },
// //
async paying(row) { 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 = { let baseInfo = {
"flow_title": row.name || "", "flow_title": row.name || "",
title: row?.name, title: row?.name,
xiangmuleibie: typeMap.get(this.type.find((item) => {
return item.value === row.type;
})?.label),
things: row?.name, things: row?.name,
"658a6f87c4a75": row?.number, "contractno": row?.number,
out_pay_id: row?.out_pay_id, out_pay_id: row?.out_pay_id,
"658a70251f0f4": row?.reason, "xiangxishuoming": row?.reason,
"658a71e9395b2": row?.yizhifucishu, "cishu": row?.yizhifucishu,
"658a70750b3cf": row?.yizhifujine, "yifujine": row?.yizhifujine,
"658a7036916f6": row?.zongjia, "xiangmuzonge": row?.zongjia,
"658a7059b6531": row?.zhifucishu, "zhifucishu": row?.zhifucishu,
total: row?.total, "amt": row?.applyMoney,
"658a6fafb27ac": row?.applyMoney "liezhiqudao": contract?.plans.map(i => i.name)?.toString()
//"\\":row.supply
}; };
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/18?auth_token=${this.$store.getters.oa_token}&out_pay_id=${ 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)}`;
row?.out_pay_id
}&default_json=${JSON.stringify(baseInfo)}`; this.oaUrl = url;
let signProcess = window.open( this.isShowOaModal = true;
url, this.$router.push('/contract/paymentRegistrationList_1')
"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')
}, },
// //
async askProcess(row) { async askProcess(row) {

@ -155,6 +155,21 @@
ref="detailPaymentRegistration" ref="detailPaymentRegistration"
@success="getFundLogs" @success="getFundLogs"
></detailPaymentRegistration> ></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> </div>
</template> </template>
@ -168,6 +183,7 @@ import { show } from "@/api/away"
import printRegistration from "./components/printRegistration"; import printRegistration from "./components/printRegistration";
import detailPaymentRegistration from "./components/detailPaymentRegistration"; import detailPaymentRegistration from "./components/detailPaymentRegistration";
import {getToken} from "@/utils/auth";
export default { export default {
components: { components: {
printRegistration, printRegistration,
@ -175,12 +191,8 @@ export default {
}, },
data() { data() {
return { return {
window: { isShowOaModal: false,
width: 0, oaUrl: '',
height: 0,
top: 0,
left: 0,
},
selectDate: "", selectDate: "",
keywords: "", keywords: "",
list: [], list: [],
@ -365,51 +377,22 @@ export default {
}) })
)?.data || []; )?.data || [];
console.log(contract); console.log(contract);
let typeMap = new Map([
["货物", "货物采购"],
["服务", "服务采购"],
["其他", "其他项目"],
]);
let baseInfo = { let baseInfo = {
"flow_title": row.contract.name || "", "flow_title": row.contract.name || "",
xiangmuleibie: typeMap.get( "oaUrl": row?.contract?.number,
[ "title": row?.contract?.name,
{
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,
out_pay_id: row?.id, out_pay_id: row?.id,
"658a70251f0f4": row?.remark, "xiangxishuoming": row?.remark,
"658a71e9395b2": actNumsTotal(), "yifujine": actNumsTotal(),
"658a70750b3cf": totalMoney(), "xiangmuzonge": totalMoney(),
"658a7036916f6": contract?.money, "cishu": payments.length,
"658a7059b6531": payments.length, "amt": row?.apply_money,
"658a6fafb27ac": row?.apply_money, "liezhiqudao": contract?.plans.map(i => i.name)?.toString()
"658a726fb727a": contract?.plans.map(i => i.name)?.toString()
//"\\":row.supply
}; };
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/18?auth_token=${this.$store.getters.oa_token}&out_pay_id=${ 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)}`;
row?.id
}&default_json=${JSON.stringify(baseInfo)}`; this.oaUrl = url;
let signProcess = window.open( this.isShowOaModal = true;
url,
"signProcess",
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
);
}, },
pageSizeChange(e) { pageSizeChange(e) {
@ -451,11 +434,6 @@ export default {
}, },
}, },
mounted() { 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(); this.getFundLogs();

Loading…
Cancel
Save