页面集成

master
lion 4 months ago
parent 5e19a7ebd8
commit d7ea9ff5c4

@ -131,7 +131,7 @@
</div>
<div class="expense-info-item">
<span class="expense-info-label">已确认金额</span>
<span class="expense-info-value"></span>
<span class="expense-info-value">{{confirmedAmount}}</span>
</div>
<!-- <div class="expense-info-item">
<span class="expense-info-label">当前状态</span>
@ -484,7 +484,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@ -576,6 +575,14 @@ export default {
if (files && files.length > 0) return '已上传'
return '待上传'
},
// fundLogsstatus=1act_money
confirmedAmount() {
if (!this.fundLogs || !this.fundLogs.length) return 0
const total = this.fundLogs
.filter(item => item.status === 1)
.reduce((sum, item) => sum + (parseFloat(item.act_money) || 0), 0)
return total.toFixed(2)
},
// /
// - =>
// detail.is_purchase

@ -16,14 +16,37 @@
style="width: 100%"
/>
</el-form-item>
<el-form-item prop="meeting_flow_id" label="资金上会流程">
<el-select v-model="form.meeting_flow_id" style="width: 100%">
<el-form-item
prop="meeting_flow_id"
:label="'资金上会流程' + (isMeetingFlowRequired ? ' *' : '')"
>
<!-- 调试信息 -->
<div style="font-size: 12px; color: #999; margin-bottom: 5px;">
调试: is_common_purchase={{form.is_common_purchase}},
total_money={{form.total_money}},
disabled={{isMeetingFlowDisabled}},
required={{isMeetingFlowRequired}}
</div>
<el-select
v-model="form.meeting_flow_id"
style="width: 100%"
:disabled="isMeetingFlowDisabled"
placeholder="请选择资金上会流程"
filterable
clearable
>
<el-option
v-for="item in shList"
:key="item.id"
:value="item.id"
:label="item.title"
></el-option>
:label="item.data.yiti+'-'+item.title"
>
<span style="float: left">{{ item.data.yiti }}-{{ item.title }}</span>
<span
style="float: right; color: #8492a6; font-size: 13px; cursor: pointer;"
@click.stop="viewOaFlow('other',item.id)"
>查看</span>
</el-option>
</el-select>
</el-form-item>
@ -966,6 +989,26 @@ export default {
},
trigger: 'change'
}
],
meeting_flow_id: [
{
validator: (rule, value, callback) => {
//
if (this.form.is_common_purchase) {
callback()
return
}
// 10
if (this.form.total_money && Number(this.form.total_money) >= 100000) {
if (!value) {
callback(new Error('资金上会流程为必选项'))
return
}
}
callback()
},
trigger: 'change'
}
]
},
contractTypes: [
@ -1022,21 +1065,40 @@ export default {
}
}
},
//
isMeetingFlowRequired() {
return !this.form.is_common_purchase && this.form.total_money && Number(this.form.total_money) >= 100000
},
//
isMeetingFlowDisabled() {
//
if (this.form.is_common_purchase) {
return false
}
// 10
return this.form.total_money && Number(this.form.total_money) < 100000
}
},
//
created() {
this.getSh()
},
methods: {
// OA
viewOaFlow(flowId) {
// toOaDetail
this.$parent.toOaDetail('other', null, flowId)
},
//
async getSh(){
const res = await getShList({
page:1,
page_size:999,
custom_model_id:103,
field_id:1225,
operator:'eq',
field_keyword:'采购事项'
sort_name:'created_at',
sort_type:'DESC'
})
this.shList = res.data.data
},
@ -1152,6 +1214,15 @@ export default {
},
submit() {
this.$refs['elForm'].validate().then(_ => {
//
if (this.isMeetingFlowRequired && !this.form.meeting_flow_id) {
this.$message({
type: 'warning',
message: '资金上会流程为必选项'
})
return
}
this.form.contract_to_contracts = this.selections.map(i => {
return {
contract_id: this.contrantId,

@ -23,20 +23,31 @@
<div class="payment-registration-row-content">{{ moneyFormat(form.contract.money) }} </div>
</div>
<div class="payment-registration-row" style="align-items: center; margin-bottom: 5px">
<div class="payment-registration-row-title">资金上会流程</div>
<div class="payment-registration-row-title">
资金上会流程
<span v-if="isMeetingFlowRequired" style="color: red; font-weight: 600; padding-right: 4px">*</span>
</div>
<div class="payment-registration-row-content">
<el-select
v-model="form.meeting_flow_id"
placeholder="请选择资金上会流程"
clearable
:disabled="isMeetingFlowDisabled"
style="width: 320px"
filterable
>
<el-option
v-for="item in shList"
:key="item.id"
:value="item.id"
:label="item.title"
/>
:label="item.data.yiti+'-'+item.title"
>
<span style="float: left">{{ item.data.yiti }}-{{ item.title }}</span>
<span
style="float: right; color: #8492a6; font-size: 13px; cursor: pointer;"
@click.stop="viewOaFlow(item.id)"
>查看</span>
</el-option>
</el-select>
</div>
</div>
@ -178,6 +189,21 @@
<!-- </div>-->
</template>
</xy-dialog>
<!-- OA流程Modal -->
<Modal
v-model="isShowOaModal"
:width="86"
class-name="oa-modal"
title="流程办理"
fullscreen
:mask-closable="false"
footer-hide
>
<div style="width: 100%;height: 100%;">
<iframe style="width: 100%;height: 100%;border-radius: 0 0 6px 6px;" :src="oaUrl" frameborder="0" />
</div>
</Modal>
</div>
</template>
@ -200,6 +226,7 @@ import {
Message
} from 'element-ui'
import { getparameter } from '@/api/system/dictionary'
import { getToken } from '@/utils/auth'
export default {
data() {
return {
@ -295,8 +322,25 @@ export default {
type: [{
required: true,
message: '必选'
}],
meeting_flow_id: [{
required: true,
message: '资金上会流程为必选项',
validator: (rule, value, callback) => {
// 5
if (this.form.apply_money && Number(this.form.apply_money) >= 50000) {
if (!value) {
callback(new Error('资金上会流程为必选项'))
return
}
}
callback()
}
}]
}
},
// OA
oaUrl: '',
isShowOaModal: false
}
},
computed: {
@ -304,6 +348,16 @@ export default {
return function(money) {
return moneyFormatter(money)
}
},
//
isMeetingFlowRequired() {
return this.form.apply_money && Number(this.form.apply_money) >= 50000
},
//
isMeetingFlowDisabled() {
return this.form.apply_money && Number(this.form.apply_money) < 50000
}
},
mounted() {
@ -311,6 +365,13 @@ export default {
this.getSh()
},
methods: {
// OA
viewOaFlow(flowId) {
const url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=${flowId}`
this.oaUrl = url
this.isShowOaModal = true
},
//
async getSh(){
const { getShList } = await import('@/api/oatoken')
@ -319,9 +380,8 @@ export default {
page: 1,
page_size: 999,
custom_model_id: 103,
field_id: 1225,
operator: 'eq',
field_keyword: '采购事项'
sort_name: 'created_at',
sort_type: 'DESC'
})
this.shList = res?.data?.data || []
} catch (e) {
@ -364,6 +424,15 @@ export default {
},
editor() {
//
if (this.isMeetingFlowRequired && !this.form.meeting_flow_id) {
Message({
type: 'warning',
message: '资金上会流程为必选项'
})
return
}
editorFundLog(this.form).then(res => {
this.$emit('success')
this.isShow = false

@ -102,24 +102,35 @@
</div>
</div>
<!-- 是否有 -->
<div class="payment-registration-row" style="align-items: center;margin-bottom:5px">
<div class="payment-registration-row-title">资金上会流程</div>
<div class="payment-registration-row-content">
<el-select
v-model="paymentRegistrationForm.meeting_flow_id"
placeholder="请选择资金上会流程"
clearable
style="width: 320px"
>
<el-option
v-for="item in shList"
:key="item.id"
:value="item.id"
:label="item.title"
/>
</el-select>
</div>
</div>
<div class="payment-registration-row" style="align-items: center;margin-bottom:5px">
<div class="payment-registration-row-title">
资金上会流程
<span v-if="isMeetingFlowRequired" style="color: red; font-weight: 600; padding-right: 4px">*</span>
</div>
<div class="payment-registration-row-content">
<el-select
v-model="paymentRegistrationForm.meeting_flow_id"
placeholder="请选择资金上会流程"
clearable
:disabled="isMeetingFlowDisabled"
style="width: 320px"
filterable
>
<el-option
v-for="item in shList"
:key="item.id"
:value="item.id"
:label="item.data.yiti+'-'+item.title"
>
<span style="float: left">{{ item.data.yiti }}-{{ item.title }}</span>
<span
style="float: right; color: #8492a6; font-size: 13px; cursor: pointer;"
@click.stop="viewOaFlow(item.id)"
>查看</span>
</el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:applyMoney>
@ -381,6 +392,21 @@
</template>
</xy-dialog>
<!-- OA流程Modal -->
<Modal
v-model="isShowOaModal"
:width="86"
class-name="oa-modal"
title="流程办理"
fullscreen
:mask-closable="false"
footer-hide
>
<div style="width: 100%;height: 100%;">
<iframe style="width: 100%;height: 100%;border-radius: 0 0 6px 6px;" :src="oaUrl" frameborder="0" />
</div>
</Modal>
</div>
</template>
@ -408,6 +434,7 @@ import {
parseTime
} from '@/utils'
import { getShList } from '@/api/oatoken'
import { getToken } from '@/utils/auth'
export default {
data() {
@ -506,6 +533,20 @@ export default {
type: [{
required: true,
message: '必选'
}],
meeting_flow_id: [{
required: true,
message: '资金上会流程为必选项',
validator: (rule, value, callback) => {
// 5
if (this.paymentRegistrationForm.applyMoney && Number(this.paymentRegistrationForm.applyMoney) >= 50000) {
if (!value) {
callback(new Error('资金上会流程为必选项'))
return
}
}
callback()
}
}]
},
departments: [],
@ -626,7 +667,10 @@ export default {
align: 'right',
formatter: (v1, v2, value) =>
value ? `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',') : ''
}]
}],
// OA
oaUrl: '',
isShowOaModal: false
}
},
computed: {
@ -648,6 +692,16 @@ export default {
}
return '合同'
}
},
//
isMeetingFlowRequired() {
return this.paymentRegistrationForm.applyMoney && Number(this.paymentRegistrationForm.applyMoney) >= 50000
},
//
isMeetingFlowDisabled() {
return this.paymentRegistrationForm.applyMoney && Number(this.paymentRegistrationForm.applyMoney) < 50000
}
},
watch: {
@ -669,6 +723,13 @@ export default {
this.getDepartment()
},
methods: {
// OA
viewOaFlow(flowId) {
const url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=${flowId}`
this.oaUrl = url
this.isShowOaModal = true
},
//
async getSh(){
try {
@ -676,9 +737,8 @@ export default {
page: 1,
page_size: 999,
custom_model_id: 103,
field_id: 1225,
operator: 'eq',
field_keyword: '采购事项'
sort_name: 'created_at',
sort_type: 'DESC'
})
this.shList = res?.data?.data || []
} catch (e) {
@ -852,6 +912,15 @@ export default {
})
},
submit() {
//
if (this.isMeetingFlowRequired && !this.paymentRegistrationForm.meeting_flow_id) {
Message({
type: 'warning',
message: '资金上会流程为必选项'
})
return
}
const data = {
contract_id: this.contract.id,
apply_money: this.paymentRegistrationForm.applyMoney,

File diff suppressed because it is too large Load Diff

@ -1199,15 +1199,43 @@ export default {
width: 158,
prop: 'purchase_status',
customFn: row => {
return (
<div>
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.caigou.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) || '无' }</span>
<br/>
{
(row.FLOWSTATUS.caigou.getStatus() !== 2 && row.FLOWSTATUS.caigou.getStatus() !== -2) ? <a style='color: #333' on={{ 'click': () => this.toOaDetail('caigou', row) }}>查看</a> : ''
}
</div>
)
const flows = row.contract_flow_links.filter(i => i.custom_model_id === 99)
return (
flows.length > 0
? flows.map((item, index) => {
return (
<div>
<p style={{ 'text-align': 'left' }} >
<span>
{index + 1}
{
item.flow_title
}
</span>
{
row.is_purchase ? (<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.caigou.getStatus()) }}>[{ this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) ?? '待申请' }]</span>):'-'
}
{
(this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) ? <a style={{ 'color': 'blue', 'cursor': 'pointer', 'margin-left': '5px' }} on={{ 'click': () => this.toOaDetail('caigou', row, item.flow_id) }}>查看</a> : '')
}
</p>
</div>
)
})
: <div>
{'-'}
</div>
)
// return (
// <div>
// <span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.caigou.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) || '' }</span>
// <br/>
// {
// (row.FLOWSTATUS.caigou.getStatus() !== 2 && row.FLOWSTATUS.caigou.getStatus() !== -2) ? <a style='color: #333' on={{ 'click': () => this.toOaDetail('caigou', row) }}></a> : ''
// }
// </div>
// )
}
},
{
@ -1255,10 +1283,12 @@ export default {
width: 145,
prop: 'join_status',
customFn: row => {
const flows = row.contract_flow_links.filter(i => i.tag === 'contract')
return (
<div>
<div style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.shenpi.getStatus()), 'display': 'flex', 'align-items': 'center', 'justify-content': 'center' }}>
<span>{ this.flowStatus.get(row.FLOWSTATUS.shenpi.getStatus()) }</span>
<span>{ this.flowStatus.get(row.FLOWSTATUS.shenpi.getStatus())==='待申请'?'待申请':'-' }</span>
{
row.is_purchase ? (
<el-popover title='是否需要合同审批' placement='bottom-start' width='160'>
@ -1281,7 +1311,34 @@ export default {
}
</div>
{
(row.FLOWSTATUS.shenpi.getStatus() !== 2 && row.FLOWSTATUS.shenpi.getStatus() !== -2) ? <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> : ''
flows.length > 0
? flows.map((item, index) => {
return (
<div>
<p style={{ 'text-align': 'left' }} >
<span>
{index + 1}
{
item.flow_title
}
</span>
{
row.is_purchase ? (<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.shenpi.getStatus()) }}>[{ this.flowStatus.get(row.FLOWSTATUS.shenpi.getStatus()) ?? '待申请' }]</span>):''
}
{
(this.flowStatus.get(row.FLOWSTATUS.shenpi.getStatus()) ? <a style={{ 'color': 'blue', 'cursor': 'pointer', 'margin-left': '5px' }} on={{ 'click': () => this.toOaDetail('hetong', row, item.flow_id) }}>查看</a> : '')
}
</p>
</div>
)
})
: <div>
{''}
</div>
}
</div>
)

Loading…
Cancel
Save