master
xy 10 months ago
parent fd2d351951
commit 8d19882289

@ -2,8 +2,8 @@
ENV = 'development'
# base api
VUE_APP_BASE_API='http://192.167.20.118:8080/'
#VUE_APP_BASE_API='https://cz-hjjc-test.115.langye.net'
#VUE_APP_BASE_API='http://192.167.20.118:8080/'
VUE_APP_BASE_API='https://cz-hjjc-test.115.langye.net'
VUE_APP_UPLOAD_API='https://cz-hjjc-test.115.langye.net/api/upload-file'
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview
VUE_APP_OUT_OLD=https://cz-hjjc-test.115.langye.net/oa

@ -1,11 +1,36 @@
import request from '@/utils/request';
function customParamsSerializer(params) {
let result = '';
for (let key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key]) && params[key].length > 0) {
params[key].forEach((item,index) => {
if (item instanceof Array) {
item.forEach((item1, index1) => {
result += `${key}[${index}][${index1}]=${item1}&`
})
} else if (typeof item === 'object') {
for (let key1 in item) {
result += `${key}[${index}][${key1}]=${item[key1]}&`
}
}
// result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
});
} else {
result += `${key}=${params[key]}&`;
}
}
}
return result.slice(0, -1);
}
export function index(params,noloading=false) {
return request({
method: "get",
url: "/api/ht/away/index",
params,
noloading
noloading,
paramsSerializer: customParamsSerializer
})
}

@ -1,11 +1,35 @@
import request from "@/utils/request";
function customParamsSerializer(params) {
let result = '';
for (let key in params) {
if (params.hasOwnProperty(key)) {
if (Array.isArray(params[key])) {
params[key].forEach((item,index) => {
if (item instanceof Array) {
item.forEach((item1, index1) => {
result += `${key}[${index}][${index1}]=${item1}&`
})
} else if (typeof item === 'object') {
for (let key1 in item) {
result += `${key}[${index}][${key1}]=${item[key1]}&`
}
}
// result += `${key}[${index}][key]=${item.key}&${key}[${index}][op]=${item.op}&${key}[${index}][value]=${item.value}&`;
});
} else {
result += `${key}=${params[key]}&`;
}
}
}
return result.slice(0, -1);
}
export function getContract(params,noloading = false){
return request({
method:'get',
url:'/api/ht/contract/index',
params,
noloading
noloading,
paramsSerializer: customParamsSerializer
})
}

@ -541,7 +541,7 @@ export default {
async getOutAway() {
try {
let oaId = this.contract.flow_list.find(i => i.tag === 'chuchaibaoxiao')?.flow_id
let oaId = this.contract.away_flow_links.find(i => i.tag === 'chuchaibaoxiao')?.flow_id
const response = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/flow/view/${oaId}`,{
headers: {
Authorization: `Bearer ${getToken()}`

@ -52,12 +52,38 @@
<span>数据类型</span>
<span>
<Select v-model="select.auth_type" style="width:70px">
<Option :value="1">自己</Option>
<Option :value="2">部门</Option>
<Option v-for="item in auths" :key="item.value" :value="item.value">{{ item.label }}</Option>
</Select>
</span>
</div>
<el-popover
placement="bottom"
title="流程状态"
width="440"
trigger="click">
<template #default>
<div>
<div style="display: flex;align-items: center;margin-top: 4px;" v-for="(item, index) in select.flow_link">
<el-select size="small" v-model="item.custom_model_id" placeholder="流程选择">
<el-option v-for="flow in flowConfig.filter(j => ['chuchai', 'chuchaibaoxiao'].indexOf(j.tag) !== -1)" :value="flow.custom_model_id" :label="flow.name"></el-option>
</el-select>
<el-select style="margin-left: 6px;" size="small" v-model="item.flow_status" placeholder="状态选择">
<el-option value="" label="待申请"></el-option>
<el-option :value="0" label="流转中"></el-option>
<el-option :value="1" label="已办结"></el-option>
</el-select>
<el-button style="margin-left: 6px;" size="small" circle icon="el-icon-delete" type="danger" @click="select.flow_link.splice(index, 1)"></el-button>
</div>
<div style="display: flex;justify-content: center;margin-top: 4px;">
<el-button type="primary" size="small" round icon="el-icon-plus" @click="select.flow_link.push({ custom_model_id: '',flow_status: '' })"></el-button>
</div>
</div>
</template>
<div slot="reference" style="margin-right: 6px;">
<el-button size="small" type="primary">流程状态</el-button>
</div>
</el-popover>
<div>
<Button
type="primary"
@ -91,8 +117,8 @@
width="220"
>
<template #default="{ row }" v-if="!/Finance/g.test($route.path)">
<Button v-if="row.flow_list.find(i => i.tag === 'chuchai')" style="margin: 2px;" size="small" type="primary" @click="printFlow(row)"></Button>
<template v-if="row.flow_list.length === 0">
<Button v-if="row.away_flow_links.find(i => i.tag === 'chuchai')" style="margin: 2px;" size="small" type="primary" @click="printFlow(row)"></Button>
<template v-if="row.away_flow_links.length === 0">
<Poptip
:transfer="true"
confirm
@ -232,6 +258,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";
import {flowStatusConfig} from "@/api/common";
export default {
components: {
@ -240,9 +267,9 @@ export default {
},
data() {
return {
flowConfig: [],
isShowOaModal: false,
oaUrl: '',
expenseUser: ["admin","panjiajia","huyangcui","wanghui"],
window: {
width: 0,
height: 0,
@ -255,7 +282,8 @@ export default {
end_year: "",
auth_type: 1,
page: 1,
page_size: 10
page_size: 10,
flow_link: []
},
total: 0,
list: [],
@ -433,9 +461,19 @@ export default {
}
},
methods: {
async getFlowConfig() {
try {
const res = await flowStatusConfig()
this.flowConfig = res.map(i => JSON.parse(i.value))
console.log( this.flowConfig)
} catch (err) {
this.flowConfig = []
}
},
printFlow (row) {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
url += row.flow_list.find(i => i.tag === 'chuchai')?.flow_id
url += row.away_flow_links.find(i => i.tag === 'chuchai')?.flow_id
this.oaUrl = url
this.isShowOaModal = true
},
@ -444,10 +482,10 @@ export default {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
switch (tbname) {
case "away":
url += row.flow_list.find(i => i.tag === 'chuchai')?.flow_id
url += row.away_flow_links.find(i => i.tag === 'chuchai')?.flow_id
break;
case 'expense':
url += row.flow_list.find(i => i.tag === 'chuchaibaoxiao')?.flow_id
url += row.away_flow_links.find(i => i.tag === 'chuchaibaoxiao')?.flow_id
break;
default:
url = `${process.env.VUE_APP_OUT_URL}/flow/list/todo`
@ -503,7 +541,7 @@ export default {
const baseInfo = {
"totalAmt": row.expense,
"chuchaishiyou": row.title,
"xiangguanchuchaishenpidan": [row.flow_list.find(i => i.tag === 'chuchai')?.flow_id].toString(),
"xiangguanchuchaishenpidan": [row.away_flow_links.find(i => i.tag === 'chuchai')?.flow_id].toString(),
};
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 {
@ -511,7 +549,7 @@ export default {
const baseInfo = {
"totalAmt": rows.reduce((pre, cur) => pre + Number(row?.expense??0),0),
"chuchaishiyou": rows.map(row => row.title).toString(),
"xiangguanchuchaishenpidan": rows.map(row => row.flow_list.find(i => i.tag === 'chuchai')?.flow_id)?.filter(i => i)?.toString()
"xiangguanchuchaishenpidan": rows.map(row => row.away_flow_links.find(i => i.tag === 'chuchai')?.flow_id)?.filter(i => i)?.toString()
};
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)}`;
}
@ -563,8 +601,8 @@ export default {
"expense": new Flow(),
"financial": new Flow()
}
const chuchai = item.flow_list.find(i => i.tag === 'chuchai')
const chuchaibaoxiao = item.flow_list.find(i => i.tag === 'chuchaibaoxiao')
const chuchai = item.away_flow_links.find(i => i.tag === 'chuchai')
const chuchaibaoxiao = item.away_flow_links.find(i => i.tag === 'chuchaibaoxiao')
flowStatus.away.setStatus(chuchai?.flow_status ?? 2)
if (!chuchai || chuchai?.flow_status === 2) {
flowStatus.away.setExecutable(true)
@ -611,6 +649,35 @@ export default {
},
},
computed: {
auths() {
if (/Finance/g.test(this.$route.path)) {
return [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '自己'
},
{
value: 2,
label: '部门'
},
]
} else {
return [
{
value: 1,
label: '自己'
},
{
value: 2,
label: '部门'
},
]
}
},
isAuthEdit () {
return function (row) {
return !(row.FLOWSTATUS.useCar.getStatus() > 1 || row.FLOWSTATUS.subsidize.getStatus() > 1 || row.FLOWSTATUS.away.getStatus() > 1 || row.FLOWSTATUS.financial.getStatus() > 1)
@ -618,7 +685,7 @@ export default {
},
isAuthCanExpense () {
return function (row) {
return (this.$moment().diff(this.$moment(row.end_date),"days") > 30) && this.expenseUser.indexOf(this.$store.state.user.username) !== -1 && !row.can_expenses
return (this.$moment().diff(this.$moment(row.end_date),"days") > 30) && this.$store.state.user.adminId === 1 && !row.can_expenses
}
}
},
@ -632,16 +699,23 @@ export default {
}
},
created() {
this.getFlowConfig();
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.select.id = this.$route.query.awayId;
this.select.id = this.$route.query.awayId ?? '';
this.getList(true)
window.onfocus = () => {
this.getList()
}
if (/Finance/g.test(this.$route.path)) {
this.select.auth_type = 0
} else {
this.select.auth_type = 1
}
},
destroyed() {
window.onfocus = null;

@ -193,11 +193,11 @@
></InputNumber>
</el-form-item>
<el-form-item label="流程状态" v-if="userList.indexOf($store.state.user.username) !== -1" :class="device === 'desktop' ? 'span2' : ''">
<el-form-item label="流程状态" v-if="$store.state.user.adminId === 1" :class="device === 'desktop' ? 'span2' : ''">
<div>
<el-button size="small" type="primary" icon="el-icon-plus" @click="form.flow_list.push({flow_id: '',flow_status: '',custom_model_id: '',flow_title: ''})">新增记录</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" @click="form.contract_flow_links.push({flow_id: '',flow_status: '',custom_model_id: '',flow_title: ''})">新增记录</el-button>
<xy-table :list="form.flow_list"
<xy-table :list="form.contract_flow_links"
style="width: 100%;margin-top: 10px;"
:show-index="false"
:height="400"
@ -512,13 +512,15 @@ export default {
departments: {
type: Array,
default: () => []
},
flowConfig: {
type: Array,
default: () => []
}
},
data() {
return {
// flow_list
userList: ['admin','xiaoyi'],
flowConfig: [],
flowStatus: new Map([
[2, "待申请"],
[-1, "已退回"],
@ -721,7 +723,7 @@ export default {
remark: '',
is_common_purchase: 0,
common_type: '',
flow_list: []
contract_flow_links: []
},
rules: {
name: [
@ -957,14 +959,6 @@ export default {
console.error(err)
}
},
async getFlowConfig() {
try {
const res = await flowStatusConfig()
this.flowConfig = res.map(i => JSON.parse(i.value))
} catch (err) {
this.flowConfig = []
}
},
async getPlan() {
try {
let res = await getBudget(this.planSelect)
@ -1029,7 +1023,7 @@ export default {
use_money: i.money
}
})
this.form.contract_flow_links = this.form.flow_list.map(i => ({
this.form.contract_flow_links = this.form.contract_flow_links.map(i => ({
...i,
tag: this.flowConfig.find(j => j.custom_model_id == i.custom_model_id)?.tag
}))

@ -533,7 +533,7 @@
// 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')?.flow_id
let oaId = this.contract.contract_flow_links.find(i => i.tag === 'contract')?.flow_id
const response = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/flow/view/${oaId}`,{
headers: {
Authorization: `Bearer ${getToken()}`

@ -649,7 +649,7 @@ export default {
watch: {
isShowDetail(val) {
if (val) {
let contractId = this.detail?.flow_list?.find(i => i.tag === 'contract')?.flow_id
let contractId = this.detail?.contract_flow_links?.find(i => i.tag === 'contract')?.flow_id
axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/flow/view/${contractId}`,{
headers: {
Authorization: `Bearer ${getToken()}`
@ -662,7 +662,7 @@ export default {
this.outContractDetail = res.data.data?.flow
}
})
let caigouId = this.detail?.flow_list?.find(i => i.tag === 'caigou')?.flow_id
let caigouId = this.detail?.contract_flow_links?.find(i => i.tag === 'caigou')?.flow_id
axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/flow/view/${caigouId}`,{
headers: {
Authorization: `Bearer ${getToken()}`

@ -1,3 +1,4 @@
<!--弃用-->
<template>
<div>
<!-- 编辑-->

@ -327,7 +327,7 @@
<Button ghost size="small" type="primary">更多</Button>
<div slot="content">
<template
v-if="scope.row.flow_list.length === 0"
v-if="scope.row.contract_flow_links.length === 0"
>
<Poptip
:transfer="true"

@ -19,6 +19,31 @@
/>
</span>
</div>
<el-popover
placement="bottom"
title="流程状态"
width="440"
trigger="click">
<template #default>
<div>
<div style="display: flex;align-items: center;margin-top: 4px;" v-for="(item, index) in select.flow_link">
<el-select size="small" v-model="item.custom_model_id" placeholder="流程选择">
<el-option v-for="flow in flowConfig.filter(j => ['chuchai', 'pay', 'chuchaibaoxiao'].indexOf(j.tag) === -1)" :value="flow.custom_model_id" :label="flow.name"></el-option>
</el-select>
<el-select style="margin-left: 6px;" size="small" v-model="item.flow_status" placeholder="状态选择">
<el-option value="" label="待申请"></el-option>
<el-option :value="0" label="流转中"></el-option>
<el-option :value="1" label="已办结"></el-option>
</el-select>
<el-button style="margin-left: 6px;" size="small" circle icon="el-icon-delete" type="danger" @click="select.flow_link.splice(index, 1)"></el-button>
</div>
<div style="display: flex;justify-content: center;margin-top: 4px;">
<el-button type="primary" size="small" round icon="el-icon-plus" @click="select.flow_link.push({ custom_model_id: '',flow_status: '' })"></el-button>
</div>
</div>
</template>
<el-button slot="reference" style="margin-left: 10px" size="small" type="primary">流程状态</el-button>
</el-popover>
<xy-selectors style="margin-left: 10px;" @search="getContracts" @reset="reset">
<div class="select-content">
<div>
@ -254,7 +279,7 @@
@click="new RegExp(/contractLedger/g).test($route.path) ? ($refs['addContractLedger'].setType('add'),$refs['addContractLedger'].show()) : $router.push('/contract/contractEdit')"
>新增</Button
>
<Button style="margin-left: 10px" type="primary" @click="select.pageIndex=1,getContracts()"
<Button style="margin-left: 10px" type="primary" @click="select.page=1,getContracts()"
>查询</Button
>
<Button type="primary" @click="toExport()" style="margin-left: 10px"
@ -376,7 +401,7 @@
<Button ghost size="small" type="primary">更多</Button>
<div slot="content">
<template
v-if="scope.row.flow_list.length === 0"
v-if="scope.row.contract_flow_links.length === 0"
>
<Poptip
:transfer="true"
@ -530,6 +555,7 @@
:purchase-way="purchaseWay"
:common-purchase-type="commonPurchaseType"
:types="type"
:flow-config="flowConfig"
:departments="departments"
:is-show.sync="isShowEdit"
@refresh="getContracts" />
@ -601,6 +627,7 @@ import oaFiles from './components/oaFiles.vue';
import addContractLedger from '@/views/contract/components/addContractLedger.vue'
import EditContract from './components/EditContract.vue'
import { show } from "@/api/away";
import {flowStatusConfig} from "@/api/common";
let iframe;
export default {
components: {
@ -656,14 +683,10 @@ export default {
select: {
keyword: "",
showDatePicker: "",
pageIndex: 1,
pageSize: 10,
startDate: "",
endDate: "",
page: 1,
page_size: 10,
type: "",
department_id: "",
purchaseModality: "",
purchaseMethods: "",
status: "",
year: "",
plan_id: "",
@ -673,18 +696,15 @@ export default {
end_plan_price: undefined,
is_myself: 0,
is_purchase: 1,
flow_link: []
},
selectCopy: {
keyword: "",
showDatePicker: "",
pageIndex: 1,
pageSize: 10,
startDate: "",
endDate: "",
page: 1,
page_size: 10,
type: "",
department_id: "",
purchaseModality: "",
purchaseMethods: "",
status: "",
year: "",
plan_id: "",
@ -694,6 +714,7 @@ export default {
end_plan_price: undefined,
is_myself: 0,
is_purchase: 1,
flow_link: []
},
type: [
{
@ -721,7 +742,7 @@ export default {
ledgerTable: [
{
label: "项目名称",
width: 380,
width: 300,
prop: "name",
fixed: "left",
align: "left",
@ -798,11 +819,13 @@ export default {
label: "业务科室",
width: 140,
prop: "department.name",
fixed: "left"
},
{
label: "经办人",
width: 140,
prop: "admin.name",
fixed: "left"
},
{
label: "合同服务日期",
@ -898,7 +921,7 @@ export default {
table: [
{
label: "项目名称",
width: 380,
width: 300,
prop: "name",
fixed: "left",
align: "left",
@ -1213,11 +1236,13 @@ export default {
label: "业务科室",
width: 140,
prop: "department.name",
fixed: "left"
},
{
label: "经办人",
width: 140,
prop: "admin.name",
fixed: "left"
},
{
label: "合同服务日期",
@ -1436,6 +1461,7 @@ export default {
],
selections: [], //
flowConfig: [],
isShowEditor: false,
};
},
@ -1470,12 +1496,12 @@ export default {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
switch (tbname) {
case "caigou":
let caigou = row.is_common_purchase ? row.flow_list.find(i => i.tag === 'common_purchase') : row.flow_list.find(i => i.custom_model_id === row.flow_mod_id)
let caigou = row.is_common_purchase ? row.contract_flow_links.find(i => i.tag === 'common_purchase') : row.contract_flow_links.find(i => i.custom_model_id === row.flow_mod_id)
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += caigou?.flow_id
break;
case "hetong":
let contract = row.flow_list.find(i => i.tag === 'contract')
let contract = row.contract_flow_links.find(i => i.tag === 'contract')
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += contract?.flow_id
break;
@ -1640,7 +1666,7 @@ export default {
out_contract_id: row.id,
"zhuyaoneirong": row.content,
"jiafang": row.supply,
"xiangguanliucheng": [row.flow_list?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id]
"xiangguanliucheng": [row.contract_flow_links?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id]
};
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=72&out_contract_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
@ -1688,7 +1714,7 @@ export default {
//
pageChange(e) {
this.select.pageIndex = e;
this.select.page = e;
this.getContracts();
},
planPageChange(e) {
@ -1723,6 +1749,16 @@ export default {
1
);
},
async getFlowConfig() {
try {
const res = await flowStatusConfig()
this.flowConfig = res.map(i => JSON.parse(i.value))
console.log( this.flowConfig)
} catch (err) {
this.flowConfig = []
}
},
//
async getFlowIds () {
let copy = deepCopy(this.flowIds)
@ -1807,8 +1843,8 @@ export default {
).detail;
},
pageSizeChange(e) {
this.select.pageSize = e;
this.select.pageIndex = 1;
this.select.page_size = e;
this.select.page = 1;
this.getContracts();
},
//
@ -1831,8 +1867,6 @@ export default {
this.select.is_contract = ""
}
const res = await getContract({
page_size: this.select.pageSize,
page: this.select.pageIndex,
is_auth: 1,
...this.select,
},noloading);
@ -2066,10 +2100,10 @@ export default {
"zhifu": new Flow(),
"other": new Flow()
}
const common_purchase = item.flow_list.find(i => i.tag === 'common_purchase')
const caigou = item.flow_list.find(i => i.custom_model_id === item.flow_mod_id)
const shenpi = item.flow_list.find(i => i.tag === 'contract')
const other = item.flow_list.find(i => i.custom_model_id === item.flow_mod_id)
const common_purchase = item.contract_flow_links.find(i => i.tag === 'common_purchase')
const caigou = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
const shenpi = item.contract_flow_links.find(i => i.tag === 'contract')
const other = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
if (item.is_purchase) {
//
if (!item.is_common_purchase) {
@ -2203,6 +2237,7 @@ export default {
};
},
created() {
this.getFlowConfig();
this.getCommonPurchaseType();
this.getPurchaseType();
this.getDepartment();

@ -978,11 +978,11 @@ export default {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
switch (tbname) {
case "caigou":
let caigou = row.flow_list.find(i => i.tag === 'caigou')
let caigou = row.contract_flow_links.find(i => i.tag === 'caigou')
url += caigou?.flow_id
break;
case "hetong":
let contract = row.flow_list.find(i => i.tag === 'contract')
let contract = row.contract_flow_links.find(i => i.tag === 'contract')
url += contract?.flow_id
break;
case "other":
@ -1292,8 +1292,8 @@ export default {
"zhifu": new Flow(),
"other": new Flow()
}
const caigou = item.flow_list.find(i => i.tag === 'caigou')
const shenpi = item.flow_list.find(i => i.tag === 'contract')
const caigou = item.contract_flow_links.find(i => i.tag === 'caigou')
const shenpi = item.contract_flow_links.find(i => i.tag === 'contract')
if (item.is_purchase) {
//
if (item.is_simple !== 1 && !item.is_substitute) {

@ -72,7 +72,7 @@
header-align="center"
>
<template slot-scope="scope">
<template v-if="scope.row.status === 0 && type == 1 && scope.row.flow_list.length === 0">
<template v-if="scope.row.status === 0 && type == 1 && scope.row.fund_log_flow_links.length === 0">
<Poptip
placement="bottom"
confirm
@ -129,7 +129,7 @@
>
资产申请
</Button>
<Button v-if="scope.row.flow_list.find(i => i.tag === 'pay') ? scope.row.flow_list.find(i => i.tag === 'pay').flow_status === 1 : false"
<Button v-if="scope.row.fund_log_flow_links.find(i => i.tag === 'pay') ? scope.row.fund_log_flow_links.find(i => i.tag === 'pay').flow_status === 1 : false"
size="small"
type="primary"
style="margin-left: 10px; margin-bottom: 4px"
@ -268,7 +268,7 @@ export default {
},
},
{
prop: 'flow_list',
prop: 'fund_log_flow_links',
label: '流程状态',
formatter: (cell, data, value) => {
let map = new Map([
@ -327,7 +327,7 @@ export default {
methods: {
async toOaDetail (row) {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
let pay = row.flow_list.find(i => i.tag === 'pay')
let pay = row.fund_log_flow_links.find(i => i.tag === 'pay')
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += pay?.flow_id
this.oaUrl = url
@ -381,7 +381,7 @@ export default {
"amt": row?.apply_money,
"liezhiqudao": contract?.plans.map(i => i.name)?.toString(),
"contractno": contract?.number,
"guanlianliucheng": contract?.flow_list?.map(i => i.flow_id)
"guanlianliucheng": contract?.fund_log_flow_links?.map(i => i.flow_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_pay_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
@ -430,7 +430,7 @@ export default {
computed: {
authOa () {
return function (row) {
return !row.flow_list.find(i => i.tag === 'pay')?.flow_id
return !row.fund_log_flow_links.find(i => i.tag === 'pay')?.flow_id
}
}
},

@ -1276,12 +1276,12 @@ export default {
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
switch (tbname) {
case "caigou":
let caigou = row.is_common_purchase ? row.flow_list.find(i => i.tag === 'common_purchase') : row.flow_list.find(i => i.custom_model_id === row.flow_mod_id)
let caigou = row.is_common_purchase ? row.contract_flow_links.find(i => i.tag === 'common_purchase') : row.contract_flow_links.find(i => i.custom_model_id === row.flow_mod_id)
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += caigou?.flow_id
break;
case "hetong":
let contract = row.flow_list.find(i => i.tag === 'contract')
let contract = row.contract_flow_links.find(i => i.tag === 'contract')
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += contract?.flow_id
break;
@ -1446,7 +1446,7 @@ export default {
out_contract_id: row.id,
"zhuyaoneirong": row.content,
"jiafang": row.supply,
"xiangguanliucheng": [row.flow_list?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id]
"xiangguanliucheng": [row.contract_flow_links?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id]
};
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=72&out_contract_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
@ -1872,10 +1872,10 @@ export default {
"zhifu": new Flow(),
"other": new Flow()
}
const common_purchase = item.flow_list.find(i => i.tag === 'common_purchase')
const caigou = item.flow_list.find(i => i.custom_model_id === item.flow_mod_id)
const shenpi = item.flow_list.find(i => i.tag === 'contract')
const other = item.flow_list.find(i => i.custom_model_id === item.flow_mod_id)
const common_purchase = item.contract_flow_links.find(i => i.tag === 'common_purchase')
const caigou = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
const shenpi = item.contract_flow_links.find(i => i.tag === 'contract')
const other = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
if (item.is_purchase) {
//
if (!item.is_common_purchase) {

@ -58,6 +58,16 @@
{{ item.label }}
</Option>
</Select>
<span style="padding: 0 6px; word-break: keep-all">流转状态</span>
<el-select style="width: 100px" size="small" clearable v-model="select.flow_status" placeholder="状态选择">
<el-option value="" label="待申请"></el-option>
<el-option :value="0" label="流转中"></el-option>
<el-option :value="1" label="已办结"></el-option>
</el-select>
<span style="padding: 0 6px; word-break: keep-all">部门</span>
<el-select style="width: 140px" size="small" clearable v-model="select.department_id" placeholder="部门选择">
<el-option v-for="dept in departments" :value="dept.id" :label="dept.name"></el-option>
</el-select>
<Button type="primary" style="margin-left: 10px" ghost>重置</Button>
<Button type="primary" style="margin-left: 10px" @click="doSearch()"
>查询</Button
@ -189,12 +199,14 @@ import { Message } from "element-ui";
import { getBudget } from "@/api/budget/budget";
import { getparameter } from "@/api/system/dictionary";
import examineRegistration from "./components/examineRegistration";
import {listdeptNoAuth} from "@/api/system/department";
export default {
components: {
examineRegistration,
},
data() {
return {
departments: [],
moneyWay: [],
plan: [],
planTableSearch: [
@ -242,10 +254,19 @@ export default {
select: {
plan_id: "",
plan_name: "",
flow_status: "",
department_id: ""
},
selectDate: "",
list: [],
total: 0,
flowStatus: new Map([
[2, "待申请"],
[-1, "已退回"],
[-2, "-"],
[0, "流转中"],
[1, "已办结"]
]),
pageIndex: 1,
pageSize: 10,
table: [
@ -316,15 +337,10 @@ export default {
},
},
{
prop: 'flow_status',
prop: 'fund_log_flow_links',
label: '流程状态',
formatter: (cell, data, value) => {
let map = new Map([
[1,'待申请'],
[2,'流转中'],
[3,'已完成']
])
return map.get(value)
return this.flowStatus.get(value.find(i => i.tag === 'pay')?.flow_status)
}
},
{
@ -377,6 +393,10 @@ export default {
this.plansPageIndex = e;
this.getBudgets();
},
//
async getDepartment() {
this.departments = (await listdeptNoAuth())?.data;
},
//
async getMoneyWay() {
this.moneyWay = (
@ -488,7 +508,10 @@ export default {
date: this.selectDate,
status: this.status,
act_plan_link_id: this.select.plan_id,
show_type: 1
show_type: 1,
"flow_link[0][custom_model_id]": 75,
"flow_link[0][flow_status]": this.select.flow_status,
department_id: this.select.department_id
}).then((res) => {
let tokens = getToken();
if (is_export) {
@ -540,11 +563,12 @@ export default {
computed: {
authOa () {
return function (row) {
return row.flow_list.find(i => i.tag === 'pay')?.flow_status === 1
return row.fund_log_flow_links.find(i => i.tag === 'pay')?.flow_status === 1
}
}
},
mounted() {
this.getDepartment();
this.getMoneyWay();
this.getFundLogs();
},

Loading…
Cancel
Save