master
xy 1 year ago
parent 5d4b6094ca
commit d1e57ad10f

@ -3,7 +3,7 @@ ENV = 'development'
# base api
VUE_APP_BASE_API='https://cz-hjjc.115.langye.net'
VUE_APP_UPLOAD_API='https://cz-hjjc.115.langye.net/api/admin/upload-file'
VUE_APP_UPLOAD_API='https://cz-hjjc.115.langye.net/api/upload-file'
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview
VUE_APP_OUT_OLD=https://cz-hjjc.115.langye.net/oa
VUE_APP_OUT_URL=https://cz-hjjc.115.langye.net/oa

@ -3,7 +3,7 @@ ENV = 'production'
# base api
VUE_APP_BASE_API='https://cz-hjjc.115.langye.net'
VUE_APP_UPLOAD_API='https://cz-hjjc.115.langye.net/api/admin/upload-file'
VUE_APP_UPLOAD_API='https://cz-hjjc.115.langye.net/api/upload-file'
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview
VUE_APP_OUT_OLD = https://cz-hjjc.115.langye.net/oa
VUE_APP_OUT_URL = https://cz-hjjc.115.langye.net/oa

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

@ -19,6 +19,7 @@ router.beforeEach(async(to, from, next) => {
if(to.query.auth_token) {
setToken(window.decodeURIComponent(to.query.auth_token))
}
// determine whether the user has logged in
const hasToken = getToken()
if (hasToken) {
@ -29,7 +30,11 @@ router.beforeEach(async(to, from, next) => {
} else {
if (store.state.permission.addRoutes && store.state.permission.addRoutes instanceof Array && store.state.permission.addRoutes.length > 0) {
next()
if (to.query.to && /^\/.*/.test(to.query.to)) {
next(to.query.to)
} else {
next()
}
} else {
try {
// get user info
@ -40,7 +45,11 @@ router.beforeEach(async(to, from, next) => {
// hack method to ensure that addRoutes is complete
// set the replace: true, so the navigation will not leave a history record
next({ ...to, replace: true })
if (to.query.to && /^\/.*/.test(to.query.to)) {
next({ ...to, replace: true, path: to.query.to })
} else {
next({ ...to, replace: true })
}
} catch (error) {
// remove token and go to login page to re-login
await store.dispatch('user/resetToken')

@ -240,14 +240,10 @@
parseTime,
moneyFormatter
} from "@/utils"
import { getOutDetail, httpCurl } from '@/api/out'
import { getparameter } from "@/api/system/dictionary"
import detailContractSign from "@/views/contract/components/detailContractSign";
import {
getOatoken
} from "@/api/oatoken";
import axios from "axios";
import {getToken} from "@/utils/auth";
export default {
components: {
detailContractSign
@ -536,14 +532,33 @@
},
async getOutContract() {
let url = `${process.env.VUE_APP_OUT_URL}/flow/view/${this.form.join_last_flow_id}`
const res = await httpCurl({ auth_token: this.$store.getters.oa_token ,get_raw:1 },true,"/Api/flowDetail", "GET",url)
console.log(res)
if (res.flow["合同编号"]) this.form.number = "HT-"+res.flow["合同编号"]
if (res.flow["合同金额"]) this.form.money = Number(res.flow["合同金额"])
if (res.flow["合同乙方"]) this.form.supply = res.flow["合同乙方"]
//if (res.flow.dept_name) this.form.carryDepartment = res.flow?.dept_name
if (res.flow["合同主要内容"]) this.form.content = res.flow["合同主要内容"]
// let url = `${process.env.VUE_APP_OUT_URL}/flow/view/${this.form.join_last_flow_id}`
// const res = await httpCurl({ auth_token: this.$store.getters.oa_token ,get_raw:1 },true,"/Api/flowDetail", "GET",url)
try {
let oaId = this.contract.flow_list.find(i => i.tag === 'contract')?.detail.id
const response = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/flow/view/${oaId}`,{
headers: {
Authorization: `Bearer ${getToken()}`
}
})
if (response.status === 200) {
if (response.data.code) {
this.$message.warning(response.data.msg)
return
}
const data = response.data.data.flow.data
if (data["bianhao"]) this.form.number = "HT-"+data["bianhao"]
if (data["amt"]) this.form.money = Number(data["amt"])
if (data["yifang"]) this.form.supply = data["yifang"]
if (data["zhuyaoneirong"]) this.form.content = data["zhuyaoneirong"]
}
} catch (err) {
console.error(err)
}
// if (res.flow[""]) this.form.number = "HT-"+res.flow[""]
// if (res.flow[""]) this.form.money = Number(res.flow[""])
// if (res.flow[""]) this.form.supply = res.flow[""]
// if (res.flow[""]) this.form.content = res.flow[""]
},
//oa
// async getOaContractInfo() {

@ -552,7 +552,8 @@ export default {
zhifucishu: this.contract?.sign_plan?.length || 0,
total: data.apply_money,
out_pay_id: res,
applyMoney: data.apply_money
applyMoney: data.apply_money,
contract_id: this.contract.id,
});
this.isShowPaymentRegistration = false;
Message({

@ -337,7 +337,7 @@
</Button>
</template>
</template>
<template v-if="scope.row.FLOWSTATUS['qianding'].isEnabled()">
<template v-if="scope.row.FLOWSTATUS['qianding'].executable && scope.row.FLOWSTATUS['qianding'].status === 1">
<Button
class="slot-btns-item"
size="small"
@ -1275,7 +1275,7 @@ export default {
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.shenpi.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.shenpi.getStatus()) }</span>
<br/>
{
(row.FLOWSTATUS.shenpi.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a> : ''
(row.FLOWSTATUS.shenpi.getStatus() !== 2 && row.FLOWSTATUS.shenpi.getStatus() !== -2) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a> : ''
}
</div>
)
@ -1752,7 +1752,9 @@ export default {
url += caigou?.id
break;
case "hetong":
url += row.join_last_flow_id
let contract = row.flow_list.find(i => i.tag === 'contract')?.detail
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += contract?.id
break;
case "other":
url += row.other_flow_id
@ -1878,13 +1880,11 @@ export default {
switch (row.flow_mod_id) {
case 12:
baseInfo = {
"flow_title": row.name || "",
"6583b42c5c29a": row.name,
}
break;
case 5:
baseInfo = {
"flow_title": row.name || "",
"65b37c797845d": row.name,
"65b37c8facfc9": row.content,
}
@ -1892,7 +1892,7 @@ export default {
case 29:
case 71:
baseInfo = {
"flow_title": row.name || "",
"caigouxiangmuleixing": row.type_name,
"caigouxiangmu": row.name || "",
"caigoufangshi": this.purchaseWay.find(i => i.id === row.purchase_way_id)?.value || "",
"zijinlaiyuan": row?.plans.reduce((pre,cur,index)=>(index === 0 ? cur?.name : pre+cur?.name+""),"") || "",
@ -1918,7 +1918,6 @@ export default {
// 72
this.setNowContract(row, "hetong");
let baseInfo = {
"flow_title": row.name || "",
"hetongmingcheng": row?.name,
"amt": Number(row?.money) || row?.plan_price,
out_contract_id: row.id,
@ -1940,7 +1939,6 @@ export default {
contract = await show({ id: row.away_id });
}
let baseInfo = {
"flow_title": row.name || "",
title: row?.name,
things: row?.name,
"contractno": row?.number,
@ -2419,11 +2417,11 @@ export default {
}
}
if (item.is_end === 0) {
flowStatus["zhifu"].setStatus(1)
flowStatus["zhifu"].setStatus(2)
//
if ((item.is_purchase === 0 && item.other_flow_status === 3) || (!item.is_contract && !item.is_substitute && item.purchase_status === 3) || (item.purchase_way?.value === "网上商城" && item.purchase_status === 3) ||
if ((item.is_purchase === 0 && item.other_flow_status === 3) || (!item.is_contract && !item.is_substitute && caigou?.status === 1) || (item.purchase_way?.value === "网上商城" && caigou?.status === 1) ||
item.status === 2 ||
(!item.is_contract && item.is_simple) || (item.is_contract && item.is_substitute && item.join_status === 3)) {
(!item.is_contract && item.is_simple) || (item.is_contract && item.is_substitute && shenpi?.status === 1)) {
//
flowStatus["zhifu"].setExecutable(true)
}

@ -112,7 +112,7 @@
>打印</Button
>
<Button
v-if="!scope.row.flow_id"
v-if="authOa(scope.row)"
size="small"
type="primary"
style="margin-left: 10px; margin-bottom: 4px"
@ -268,15 +268,15 @@ export default {
},
},
{
prop: 'flow_status',
prop: 'flow_list',
label: '流程状态',
formatter: (cell, data, value) => {
let map = new Map([
[1,'待申请'],
[2,'流转中'],
[3,'已完成']
[-1, "已退回"],
[0, "办理中"],
[1, "已完成"],
])
return map.get(value)
return map.get(value.find(i => i.tag === 'pay')?.detail?.status)
}
},
{
@ -378,7 +378,6 @@ export default {
)?.data || [];
console.log(contract);
let baseInfo = {
"flow_title": row.contract.name || "",
"oaUrl": row?.contract?.number,
"title": row?.contract?.name,
out_pay_id: row?.id,
@ -389,7 +388,7 @@ export default {
"amt": row?.apply_money,
"liezhiqudao": contract?.plans.map(i => i.name)?.toString()
};
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)}`;
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=75&out_pay_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
this.oaUrl = url;
this.isShowOaModal = true;
@ -433,6 +432,13 @@ export default {
});
},
},
computed: {
authOa () {
return function (row) {
return !row.flow_list.find(i => i.tag === 'pay')?.detail
}
}
},
mounted() {
this.getFundLogs();

Loading…
Cancel
Save