页面集成

master
lion 4 months ago
parent 5e19a7ebd8
commit d7ea9ff5c4

@ -131,7 +131,7 @@
</div> </div>
<div class="expense-info-item"> <div class="expense-info-item">
<span class="expense-info-label">已确认金额</span> <span class="expense-info-label">已确认金额</span>
<span class="expense-info-value"></span> <span class="expense-info-value">{{confirmedAmount}}</span>
</div> </div>
<!-- <div class="expense-info-item"> <!-- <div class="expense-info-item">
<span class="expense-info-label">当前状态</span> <span class="expense-info-label">当前状态</span>
@ -484,7 +484,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -576,6 +575,14 @@ export default {
if (files && files.length > 0) return '已上传' if (files && files.length > 0) return '已上传'
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 // detail.is_purchase

@ -16,14 +16,37 @@
style="width: 100%" style="width: 100%"
/> />
</el-form-item> </el-form-item>
<el-form-item prop="meeting_flow_id" label="资金上会流程"> <el-form-item
<el-select v-model="form.meeting_flow_id" style="width: 100%"> 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 <el-option
v-for="item in shList" v-for="item in shList"
:key="item.id" :key="item.id"
:value="item.id" :value="item.id"
:label="item.title" :label="item.data.yiti+'-'+item.title"
></el-option> >
<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-select>
</el-form-item> </el-form-item>
@ -966,6 +989,26 @@ export default {
}, },
trigger: 'change' 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: [ 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() { created() {
this.getSh() this.getSh()
}, },
methods: { methods: {
// OA
viewOaFlow(flowId) {
// toOaDetail
this.$parent.toOaDetail('other', null, flowId)
},
// //
async getSh(){ async getSh(){
const res = await getShList({ const res = await getShList({
page:1, page:1,
page_size:999, page_size:999,
custom_model_id:103, custom_model_id:103,
field_id:1225, sort_name:'created_at',
operator:'eq', sort_type:'DESC'
field_keyword:'采购事项'
}) })
this.shList = res.data.data this.shList = res.data.data
}, },
@ -1152,6 +1214,15 @@ export default {
}, },
submit() { submit() {
this.$refs['elForm'].validate().then(_ => { 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 => { this.form.contract_to_contracts = this.selections.map(i => {
return { return {
contract_id: this.contrantId, contract_id: this.contrantId,

@ -23,20 +23,31 @@
<div class="payment-registration-row-content">{{ moneyFormat(form.contract.money) }} </div> <div class="payment-registration-row-content">{{ moneyFormat(form.contract.money) }} </div>
</div> </div>
<div class="payment-registration-row" style="align-items: center; margin-bottom: 5px"> <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"> <div class="payment-registration-row-content">
<el-select <el-select
v-model="form.meeting_flow_id" v-model="form.meeting_flow_id"
placeholder="请选择资金上会流程" placeholder="请选择资金上会流程"
clearable clearable
:disabled="isMeetingFlowDisabled"
style="width: 320px" style="width: 320px"
filterable
> >
<el-option <el-option
v-for="item in shList" v-for="item in shList"
:key="item.id" :key="item.id"
:value="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> </el-select>
</div> </div>
</div> </div>
@ -178,6 +189,21 @@
<!-- </div>--> <!-- </div>-->
</template> </template>
</xy-dialog> </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> </div>
</template> </template>
@ -200,6 +226,7 @@ import {
Message Message
} from 'element-ui' } from 'element-ui'
import { getparameter } from '@/api/system/dictionary' import { getparameter } from '@/api/system/dictionary'
import { getToken } from '@/utils/auth'
export default { export default {
data() { data() {
return { return {
@ -295,8 +322,25 @@ export default {
type: [{ type: [{
required: true, required: true,
message: '必选' 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: { computed: {
@ -304,6 +348,16 @@ export default {
return function(money) { return function(money) {
return moneyFormatter(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() { mounted() {
@ -311,6 +365,13 @@ export default {
this.getSh() this.getSh()
}, },
methods: { 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(){ async getSh(){
const { getShList } = await import('@/api/oatoken') const { getShList } = await import('@/api/oatoken')
@ -319,9 +380,8 @@ export default {
page: 1, page: 1,
page_size: 999, page_size: 999,
custom_model_id: 103, custom_model_id: 103,
field_id: 1225, sort_name: 'created_at',
operator: 'eq', sort_type: 'DESC'
field_keyword: '采购事项'
}) })
this.shList = res?.data?.data || [] this.shList = res?.data?.data || []
} catch (e) { } catch (e) {
@ -364,6 +424,15 @@ export default {
}, },
editor() { editor() {
//
if (this.isMeetingFlowRequired && !this.form.meeting_flow_id) {
Message({
type: 'warning',
message: '资金上会流程为必选项'
})
return
}
editorFundLog(this.form).then(res => { editorFundLog(this.form).then(res => {
this.$emit('success') this.$emit('success')
this.isShow = false this.isShow = false

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save