master
xy 1 year ago
parent cb9b9f1e6e
commit 8d04cc548b

@ -2,10 +2,10 @@
ENV = 'production'
# base api
VUE_APP_BASE_API='http://192.168.16.110:8080:8080'
VUE_APP_UPLOAD_API='http://192.168.16.110/api/upload-file'
VUE_APP_BASE_API=''
VUE_APP_UPLOAD_API='/api/upload-file'
VUE_APP_PREVIEW=//view.langye.net/preview/onlinePreview
VUE_APP_OUT_OLD = http://192.168.16.110:8080/oa
VUE_APP_OUT_URL = http://192.168.16.110:8080/oa
VUE_APP_OUT_OLD = /oa
VUE_APP_OUT_URL = /oa
VUE_APP_MODULE_NAME=ht

@ -22,3 +22,10 @@ export function listCommonuser(params) {
noloading: true
})
}
export function flowStatusConfig() {
return request({
url: '/api/ht/other/config',
method: 'get',
noloading: true
})
}

@ -572,7 +572,7 @@ export default {
},
async deleteAway (id) {
await destrxoy({ id });
await destroy({ id });
await this.getList();
},

@ -121,6 +121,27 @@
</div>
</div>
</template>
<template #group_type v-if="!detail.is_simple">
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>组织形式
</div>
<div class="xy-table-item-content">
<el-select
clearable
placeholder="请选择组织形式"
v-model="detail.group_type"
style="width: 300px;"
>
<el-option
v-for="item in groupType"
:label="item.value"
:value="item.id"
></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:fundingChannels>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -174,75 +195,68 @@
</div>
</template>
<!-- <template v-slot:req_status v-if="adminEdit">-->
<!-- <div class="xy-table-item">-->
<!-- <div class="xy-table-item-label" style="width: 200px">请示流程-->
<!-- </div>-->
<!-- <div class="xy-table-item-content">-->
<!-- <el-select v-model="detail.req_status" placeholder="请选择">-->
<!-- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<template v-slot:join_status>
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">
<div class="xy-table-item-label">
组织形式
</div>
<div class="xy-table-item-content">
<el-select v-model="detail.group_type" placeholder="请选择">
<el-select v-model="detail.group_type" placeholder="请选择" style="width: 300px;">
<el-option v-for="item in groupType" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:other_flow_status v-if="adminEdit">
<template #flow_list v-if="adminEdit">
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">事前流程
<div class="xy-table-item-label">流程状态
</div>
<div class="xy-table-item-content">
<el-select v-model="detail.other_flow_status" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:purchase_status v-if="adminEdit">
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">采购流程
</div>
<div class="xy-table-item-content">
<el-select v-model="detail.purchase_status" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<el-button size="small" type="primary" @click="detail.flow_list.push({flow_id: '',flow_status: '',custom_model_id: '',flow_title: ''})">新增记录</el-button>
<xy-table :list="detail.flow_list"
style="width: 500px;"
:show-index="false"
:height="400"
:table-item="statusTable">
<template #btns></template>
</xy-table>
</div>
</div>
</template>
<!-- <template v-slot:purchase_status v-if="adminEdit">-->
<!-- <div class="xy-table-item">-->
<!-- <div class="xy-table-item-label" style="width: 200px">采购流程-->
<!-- </div>-->
<!-- <div class="xy-table-item-content">-->
<!-- <el-select v-model="detail.purchase_status" placeholder="请选择">-->
<!-- <el-option v-for="item in Array.from(flowStatus)" :key="item[0]" :label="item[1]" :value="item[0]">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-slot:join_status v-if="adminEdit">-->
<!-- <div class="xy-table-item">-->
<!-- <div class="xy-table-item-label" style="width: 200px">-->
<!-- 合同审批流程-->
<!-- </div>-->
<!-- <div class="xy-table-item-content">-->
<!-- <el-select v-model="detail.join_status" placeholder="请选择">-->
<!-- <el-option v-for="item in Array.from(flowStatus)" :key="item[0]" :label="item[1]" :value="item[0]">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<template v-slot:invite_status v-if="adminEdit">
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">招标流程
</div>
<div class="xy-table-item-content">
<el-select v-model="detail.invite_status" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:join_status v-if="adminEdit">
<div class="xy-table-item">
<div class="xy-table-item-label" style="width: 200px">
合同审批流程
<div class="xy-table-item-label">招标流程
</div>
<div class="xy-table-item-content">
<el-select v-model="detail.join_status" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
<el-select v-model="detail.invite_status" placeholder="请选择" style="width: 300px;">
<el-option v-for="item in Array.from(flowStatus)" :key="item[0]" :label="item[1]" :value="item[0]">
</el-option>
</el-select>
</div>
@ -348,6 +362,7 @@
</template>
<script>
import { flowStatusConfig } from '@/api/common'
import {
editorContract,
detailContract,
@ -444,7 +459,65 @@ import { resetSelect } from '@/utils'
}
}
return {
userList: ["ma_sm", "admin", "yu_l","wang_yx","li_f","chen_y"],
flowConfig: [],
flowStatus: new Map([
[2, "待申请"],
[-1, "已退回"],
[-2, "-"],
[0, "流转中"],
[1, "已办结"]
]),
statusTable: [
{
prop: 'flow_id',
label: '流程id',
customFn: (row) => {
return (
<el-input size="small" vModel={row.flow_id}></el-input>
)
}
},
{
prop: 'flow_status',
label: '状态',
customFn: (row) => {
return (
<el-select size="small" vModel={row.flow_status} placeholder="请选择">
{
Array.from(this.flowStatus).map(item => (
<el-option label={item[1]} value={item[0]}></el-option>
))
}
</el-select>
)
}
},
{
prop: 'custom_model_id',
label: '流程',
customFn: (row) => {
return (
<el-select size="small" vModel={row.custom_model_id} placeholder="请选择">
{
this.flowIds.map(item => (
<el-option label={item.name} value={item.id}></el-option>
))
}
</el-select>
)
}
},
{
prop: 'flow_title',
label: '标题',
customFn: (row) => {
return (
<el-input size="small" vModel={row.flow_title}></el-input>
)
}
}
],
userList: ['admin','xiaoyi'],
user: null,
adminEdit: false,
isFocus: false,
@ -759,6 +832,7 @@ import { resetSelect } from '@/utils'
purchase_status: res.purchase_status,
join_status: res.join_status,
invite_status: res.invite_status,
flow_list: res.flow_list,
supply:res?.supply,
type: res.type,
group_type: res.group_type,
@ -824,7 +898,11 @@ import { resetSelect } from '@/utils'
to_contract_id: i.id,
use_money: i.money
}
})
}),
contract_flow_links: this.detail.flow_list.map(i => ({
...i,
tag: this.flowConfig.find(j => j.custom_model_id == i.custom_model_id)?.tag
}))
}).then(res => {
this.isShowEditor = false
Message({
@ -862,6 +940,14 @@ import { resetSelect } from '@/utils'
}
})
},
async getFlowConfig() {
try {
const res = await flowStatusConfig()
this.flowConfig = res.map(i => JSON.parse(i.value))
} catch (err) {
this.flowConfig = []
}
}
},
computed: {
@ -882,6 +968,7 @@ import { resetSelect } from '@/utils'
}
},
mounted() {
this.getFlowConfig()
let that = this;
getInfo().then(response => {
console.log(response)

@ -867,44 +867,7 @@ export default {
data() {
return {
//
flowIds: [
{
id: 5,
name: "办公用品采购",
type: 2 //
},
{
id: 12,
name: "物资购置",
type: 2
},
{
id: 19,
name: "政府采购流转",
type: 2
},
{
id: 29,
name: "政府小额采购",
type: 2
},
{
id: 22,
name: "公务接待",
type: 1
},
{
id: 23,
name: "会议费用",
type: 1
},
{
id: 28,
name: "培训费",
type: 1
}
],
flowIds: [{"name":"政府采购流转","id":71,"type":2},{"name":"公务接待","id":86,"type":1},{"name":"会议费用","id":87,"type":1},{"name":"培训费","id":88,"type":1},{"name":"用印","id":76,"type":1},{"name":"仪器设备维修流转","id":84,"type":1},{"name":"请休假","id":68,"type":1},{"name":"仪器设备购置流转","id":82,"type":1},{"name":"安装、维修流转","id":96,"type":1},{"name":"车船维修保养流转","id":97,"type":1}],
window: {
width: 0,
height: 0,
@ -1399,15 +1362,24 @@ export default {
const res = await getparameter({
number: "flow_ids"
})
console.log(345, res?.detail?.filter(i => i.status)?.map(i => {
let data = JSON.parse(i.remark)
return {
name: i.value,
...data
}
}))
try {
this.flowIds = res?.detail?.map(i => {
this.flowIds = res?.detail?.filter(i => i.status)?.map(i => {
let data = JSON.parse(i.remark)
return {
name: i.value,
...data
}
})
console.log(333, this.flowIds)
}catch (e) {
console.log(e)
this.flowIds = copy
}
},

@ -841,44 +841,8 @@ export default {
isShowOaModal: false,
oaUrl: "",
//
flowIds: [
{
id: 5,
name: "办公用品采购",
type: 1 //
},
{
id: 12,
name: "物资购置",
type: 1
},
{
id: 19,
name: "政府采购流转",
type: 2
},
{
id: 29,
name: "政府小额采购",
type: 2
},
{
id: 22,
name: "公务接待",
type: 1
},
{
id: 23,
name: "会议费用",
type: 1
},
{
id: 28,
name: "培训费",
type: 1
}
flowIds: [{"name":"政府采购流转","id":71,"type":2},{"name":"公务接待","id":86,"type":1},{"name":"会议费用","id":87,"type":1},{"name":"培训费","id":88,"type":1},{"name":"用印","id":76,"type":1},{"name":"仪器设备维修流转","id":84,"type":1},{"name":"请休假","id":68,"type":1},{"name":"仪器设备购置流转","id":82,"type":1},{"name":"安装、维修流转","id":96,"type":1},{"name":"车船维修保养流转","id":97,"type":1}],
],
isShowIsFramework: true,
userList: ["ma_sm", "admin", "yu_l","wang_yx","li_f","chen_y"],
nowContract: {},
@ -1747,14 +1711,14 @@ 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')?.detail
let caigou = row.flow_list.find(i => i.tag === 'caigou')
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += caigou?.id
url += caigou?.flow_id
break;
case "hetong":
let contract = row.flow_list.find(i => i.tag === 'contract')?.detail
let contract = row.flow_list.find(i => i.tag === 'contract')
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += contract?.id
url += contract?.flow_id
break;
case "other":
url += row.other_flow_id
@ -2006,20 +1970,29 @@ export default {
);
},
//
async getFlowIds () {``
async getFlowIds () {
let copy = deepCopy(this.flowIds)
const res = await getparameter({
number: "flow_ids"
})
console.log(345, res?.detail?.filter(i => i.status)?.map(i => {
let data = JSON.parse(i.remark)
return {
name: i.value,
...data
}
}))
try {
this.flowIds = res?.detail?.map(i => {
this.flowIds = res?.detail?.filter(i => i.status)?.map(i => {
let data = JSON.parse(i.remark)
return {
name: i.value,
...data
}
})
console.log(333, this.flowIds)
}catch (e) {
console.log(e)
this.flowIds = copy
}
},
@ -2370,13 +2343,13 @@ export default {
"zhifu": new Flow(),
"other": new Flow()
}
const caigou = item.flow_list.find(i => i.tag === 'caigou')?.detail
const shenpi = item.flow_list.find(i => i.tag === 'contract')?.detail
const caigou = item.flow_list.find(i => i.tag === 'caigou')
const shenpi = item.flow_list.find(i => i.tag === 'contract')
if (item.is_purchase) {
//
if (item.is_simple !== 1 && !item.is_substitute) {
//
flowStatus["caigou"].setStatus(caigou?.status ?? 2)
flowStatus["caigou"].setStatus(caigou?.flow_status ?? 2)
if (!caigou) {
//
if (item.is_plan === 1) {
@ -2387,23 +2360,23 @@ export default {
if (item.purchase_way?.value !== '网上商城' && item.is_contract && item.purchase_way?.remark === 'true' && !item.is_substitute) {
// \
flowStatus["zhaobiao"].setStatus(item.invite_status ?? 2)
if ((!item.invite_status || item.invite_status === 2) && caigou?.status === 1) {
if ((!item.invite_status || item.invite_status === 2) && caigou?.flow_status === 1) {
//
flowStatus["zhaobiao"].setExecutable(true)
}
}
if (item.is_contract && item.purchase_way?.value !== "网上商城") {
//
flowStatus["shenpi"].setStatus(shenpi?.status ?? 2)
if ((!shenpi?.status || shenpi?.status === 2) && (item.invite_status === 1 ||
((item.purchase_way?.remark === 'false' || item.flow_mod_id === 5 || item.flow_mod_id === 29) && caigou?.status === 1))) {
flowStatus["shenpi"].setStatus(shenpi?.flow_status ?? 2)
if ((!shenpi?.flow_status || shenpi?.flow_status === 2) && (item.invite_status === 1 ||
((item.purchase_way?.remark === 'false' || item.flow_mod_id === 5 || item.flow_mod_id === 29) && caigou?.flow_status === 1))) {
//
flowStatus["shenpi"].setExecutable(true)
}
}
if (item.is_contract && item.purchase_way?.value !== "网上商城" && !item.is_substitute) {
flowStatus["qianding"].setStatus(item.status)
if (shenpi?.status === 1 && item.status === 1) {
if (shenpi?.flow_status === 1 && item.flow_status === 1) {
flowStatus["qianding"].setExecutable(true)
}
}
@ -2419,9 +2392,9 @@ export default {
if (item.is_end === 0) {
flowStatus["zhifu"].setStatus(2)
//
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) ||
if ((item.is_purchase === 0 && item.other_flow_status === 3) || (!item.is_contract && !item.is_substitute && caigou?.flow_status === 1) || (item.purchase_way?.value === "网上商城" && caigou?.flow_status === 1) ||
item.status === 2 ||
(!item.is_contract && item.is_simple) || (item.is_contract && item.is_substitute && shenpi?.status === 1)) {
(!item.is_contract && item.is_simple) || (item.is_contract && item.is_substitute && shenpi?.flow_status === 1)) {
//
flowStatus["zhifu"].setExecutable(true)
}

@ -276,7 +276,7 @@ export default {
[0, "办理中"],
[1, "已完成"],
])
return map.get(value.find(i => i.tag === 'pay')?.detail?.status)
return map.get(value.find(i => i.tag === 'pay')?.flow_status)
}
},
{
@ -435,7 +435,7 @@ export default {
computed: {
authOa () {
return function (row) {
return !row.flow_list.find(i => i.tag === 'pay')?.detail
return !row.flow_list.find(i => i.tag === 'pay')?.flow_id
}
}
},

Loading…
Cancel
Save