|
|
@ -1,45 +1,213 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="common-list-contain">
|
|
|
|
<div class="common-list-contain">
|
|
|
|
<div class="common-form">
|
|
|
|
<div class="common-form">
|
|
|
|
<van-form ref="form" :show-error-message="false" validate-trigger="" :submit-on-enter="false" label-width="8rem">
|
|
|
|
<van-form
|
|
|
|
|
|
|
|
ref="form"
|
|
|
|
|
|
|
|
:show-error-message="false"
|
|
|
|
|
|
|
|
validate-trigger=""
|
|
|
|
|
|
|
|
:submit-on-enter="false"
|
|
|
|
|
|
|
|
label-width="8rem"
|
|
|
|
|
|
|
|
>
|
|
|
|
<div class="section"><span class="line"> </span> 基本信息</div>
|
|
|
|
<div class="section"><span class="line"> </span> 基本信息</div>
|
|
|
|
<div class="trips-box">
|
|
|
|
<div class="trips-box">
|
|
|
|
<div class="item-box">
|
|
|
|
<div class="item-box">
|
|
|
|
<van-field v-model="form.vendorReceiptNo" v-if="form.vendorReceiptNo" disabled label="单号" clear-trigger="always" input-align="right" />
|
|
|
|
<van-field
|
|
|
|
<van-field v-model="cn" disabled label="公司名称" clear-trigger="always" input-align="right" />
|
|
|
|
v-model="form.vendorReceiptNo"
|
|
|
|
<van-field v-model="form.projectName" :disabled="disabled" label="项目名称" clear-trigger="always" placeholder="请输入" input-align="right" />
|
|
|
|
v-if="form.vendorReceiptNo"
|
|
|
|
<van-field v-model="userInfo.nickname" disabled label="申请人" clear-trigger="always" input-align="right" maxlength="50" placeholder="请输入" />
|
|
|
|
disabled
|
|
|
|
<van-field v-model="userInfo.dept.name" disabled label="申请部门" clear-trigger="always" input-align="right" maxlength="50" placeholder="请输入" />
|
|
|
|
label="单号"
|
|
|
|
<RePick v-model="form.accountType" :disabled="disabled" label="账户类型" name="accountType" :list="accountList" title="账户类型" titleKey="label" idKey="value" isCell clearable />
|
|
|
|
clear-trigger="always"
|
|
|
|
<RePick v-model="form.currency" :disabled="disabled" label="收取币种" name="currency" :list="moneyList" title="收取币种" titleKey="label" idKey="value" isCell clearable />
|
|
|
|
input-align="right"
|
|
|
|
<van-field v-model="form.amount" type="number" name="amount" :disabled="disabled" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '收款金额格式错误',validator: VerifyFunc.validatorMoney }]" label="收款金额" />
|
|
|
|
/>
|
|
|
|
<van-field v-model="form.projectManager" :disabled="disabled" label="项目负责人" :rules="[{ required: true, message: '请输入' }]" required placeholder="请输入" clear-trigger="always" input-align="right" />
|
|
|
|
<van-field
|
|
|
|
<RePick v-model="form.vendorIds" isRequrie :rules="[{ required: true, message: '请选择' }]" required :disabled="disabled" label="关联供应商" name="vendorIds" isShowSearch :list="allGysList" title="关联供应商" :isUseLimitPage="allGysList.length > 300" isCell clearable />
|
|
|
|
v-model="cn"
|
|
|
|
<RePick v-model="form.receiptBankIds" isRequrie :rules="[{ required: true, message: '请选择' }]" required :disabled="disabled" label="关收款账户" name="currency" isShowSearch :list="allBankList" title="关收款账户" :isUseLimitPage="allBankList.length > 300" isCell clearable />
|
|
|
|
disabled
|
|
|
|
<van-field v-model="form.reason" laceholder="请输入" :disabled="disabled" autosize rows="1" type="textarea" :rules="[{ required: true, message: '请输入' }]" label="申请事由" required clear-trigger="always" input-align="right" />
|
|
|
|
label="公司名称"
|
|
|
|
<van-field v-model="form.remark" placeholder="请输入" :disabled="disabled" autosize rows="1" type="textarea" label="备注信息" clear-trigger="always" input-align="right" />
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<van-field
|
|
|
|
|
|
|
|
v-model="form.projectName"
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
label="项目名称"
|
|
|
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<van-field
|
|
|
|
|
|
|
|
v-model="form.createName"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
label="申请人"
|
|
|
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
maxlength="50"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<!-- <van-field
|
|
|
|
|
|
|
|
v-model="userInfo.dept.name"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
label="申请部门"
|
|
|
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
maxlength="50"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
/> -->
|
|
|
|
|
|
|
|
<van-field
|
|
|
|
|
|
|
|
v-model="form.deptName"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
label="申请部门"
|
|
|
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
maxlength="50"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<RePick
|
|
|
|
|
|
|
|
v-model="form.accountType"
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
label="账户类型"
|
|
|
|
|
|
|
|
name="accountType"
|
|
|
|
|
|
|
|
:list="accountList"
|
|
|
|
|
|
|
|
title="账户类型"
|
|
|
|
|
|
|
|
titleKey="label"
|
|
|
|
|
|
|
|
idKey="value"
|
|
|
|
|
|
|
|
isCell
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<RePick
|
|
|
|
|
|
|
|
v-model="form.currency"
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
label="收取币种"
|
|
|
|
|
|
|
|
name="currency"
|
|
|
|
|
|
|
|
:list="moneyList"
|
|
|
|
|
|
|
|
title="收取币种"
|
|
|
|
|
|
|
|
titleKey="label"
|
|
|
|
|
|
|
|
idKey="value"
|
|
|
|
|
|
|
|
isCell
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<van-field
|
|
|
|
|
|
|
|
v-model="form.amount"
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
name="amount"
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
required
|
|
|
|
|
|
|
|
:rules="[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
message: '收款金额格式错误',
|
|
|
|
|
|
|
|
validator: VerifyFunc.validatorMoney,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]"
|
|
|
|
|
|
|
|
label="收款金额"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<van-field
|
|
|
|
|
|
|
|
v-model="form.projectManager"
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
label="项目负责人"
|
|
|
|
|
|
|
|
:rules="[{ required: true, message: '请输入' }]"
|
|
|
|
|
|
|
|
required
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<RePick
|
|
|
|
|
|
|
|
v-model="form.vendorIds"
|
|
|
|
|
|
|
|
isRequrie
|
|
|
|
|
|
|
|
:rules="[{ required: true, message: '请选择' }]"
|
|
|
|
|
|
|
|
required
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
label="关联供应商"
|
|
|
|
|
|
|
|
name="vendorIds"
|
|
|
|
|
|
|
|
isShowSearch
|
|
|
|
|
|
|
|
:list="allGysList"
|
|
|
|
|
|
|
|
title="关联供应商"
|
|
|
|
|
|
|
|
:isUseLimitPage="allGysList.length > 300"
|
|
|
|
|
|
|
|
isCell
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<RePick
|
|
|
|
|
|
|
|
v-model="form.receiptBankIds"
|
|
|
|
|
|
|
|
isRequrie
|
|
|
|
|
|
|
|
:rules="[{ required: true, message: '请选择' }]"
|
|
|
|
|
|
|
|
required
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
label="关收款账户"
|
|
|
|
|
|
|
|
name="currency"
|
|
|
|
|
|
|
|
isShowSearch
|
|
|
|
|
|
|
|
:list="allBankList"
|
|
|
|
|
|
|
|
title="关收款账户"
|
|
|
|
|
|
|
|
:isUseLimitPage="allBankList.length > 300"
|
|
|
|
|
|
|
|
isCell
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<van-field
|
|
|
|
|
|
|
|
v-model="form.reason"
|
|
|
|
|
|
|
|
laceholder="请输入"
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
autosize
|
|
|
|
|
|
|
|
rows="1"
|
|
|
|
|
|
|
|
type="textarea"
|
|
|
|
|
|
|
|
:rules="[{ required: true, message: '请输入' }]"
|
|
|
|
|
|
|
|
label="申请事由"
|
|
|
|
|
|
|
|
required
|
|
|
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<van-field
|
|
|
|
|
|
|
|
v-model="form.remark"
|
|
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
|
|
:disabled="disabled"
|
|
|
|
|
|
|
|
autosize
|
|
|
|
|
|
|
|
rows="1"
|
|
|
|
|
|
|
|
type="textarea"
|
|
|
|
|
|
|
|
label="备注信息"
|
|
|
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
|
|
|
input-align="right"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="section mt5"><span class="line"> </span>附件</div>
|
|
|
|
<div class="section mt5"><span class="line"> </span>附件</div>
|
|
|
|
<div class="trips-box">
|
|
|
|
<div class="trips-box">
|
|
|
|
<div class="item-box">
|
|
|
|
<div class="item-box">
|
|
|
|
<UploadFile :typeStr="typeStr" @onConfirm="handleUpload" :fileList="fileList" />
|
|
|
|
<UploadFile
|
|
|
|
|
|
|
|
:typeStr="typeStr"
|
|
|
|
|
|
|
|
@onConfirm="handleUpload"
|
|
|
|
|
|
|
|
:fileList="fileList"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section mt5" v-if="['show'].includes(typeStr)">
|
|
|
|
|
|
|
|
<span class="line"> </span>审批流程
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="section mt5" v-if="['show'].includes(typeStr)"> <span class="line"> </span>审批流程</div>
|
|
|
|
<ApprovalProcess
|
|
|
|
<ApprovalProcess v-if="['show'].includes(typeStr)" :processInstanceId="form.processInstanceId" @onSetId="handleSetAccessId" />
|
|
|
|
v-if="['show'].includes(typeStr)"
|
|
|
|
|
|
|
|
:processInstanceId="form.processInstanceId"
|
|
|
|
|
|
|
|
@onSetId="handleSetAccessId"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</van-form>
|
|
|
|
</van-form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<BottomBtn ref="BottomBtn" :isAuthorised="isAuthorised" @onBtConfirm="handleBtConfirm" :accessId="accessId" />
|
|
|
|
<BottomBtn
|
|
|
|
|
|
|
|
ref="BottomBtn"
|
|
|
|
|
|
|
|
:isAuthorised="isAuthorised"
|
|
|
|
|
|
|
|
@onBtConfirm="handleBtConfirm"
|
|
|
|
|
|
|
|
:accessId="accessId"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { createVendorReceipt, getVendorReceipt, updateVendorReceipt } from "@/api/bs/vendorReceipt";
|
|
|
|
import {
|
|
|
|
|
|
|
|
createVendorReceipt,
|
|
|
|
|
|
|
|
getVendorReceipt,
|
|
|
|
|
|
|
|
updateVendorReceipt,
|
|
|
|
|
|
|
|
} from '@/api/bs/vendorReceipt'
|
|
|
|
import VerifyFunc from '@/utils/verify'
|
|
|
|
import VerifyFunc from '@/utils/verify'
|
|
|
|
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
|
|
|
|
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
|
|
|
|
import { getVendorPage } from "@/api/bs/vendor";
|
|
|
|
import { getVendorPage } from '@/api/bs/vendor'
|
|
|
|
import { getBankAccountInfoPage } from "@/api/bs/bankAccountInfo";
|
|
|
|
import { getBankAccountInfoPage } from '@/api/bs/bankAccountInfo'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
//import引入组件才能使用
|
|
|
|
//import引入组件才能使用
|
|
|
|
props: {},
|
|
|
|
props: {},
|
|
|
@ -52,16 +220,24 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 生命周期,创建完成时(可以访问当前this实例)
|
|
|
|
// 生命周期,创建完成时(可以访问当前this实例)
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
|
|
|
|
this.isApproval = this.$route.query.isApproval == 'true' ? true : false
|
|
|
|
this.handleInitList().then(() => {
|
|
|
|
this.handleInitList().then(() => {
|
|
|
|
this.handleInitForm()
|
|
|
|
this.handleInitForm()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 生命周期:挂载完成时(可以访问DOM元素)
|
|
|
|
// 生命周期:挂载完成时(可以访问DOM元素)
|
|
|
|
mounted() {
|
|
|
|
mounted() {},
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
form: {},
|
|
|
|
isApproval: false,
|
|
|
|
|
|
|
|
form: {
|
|
|
|
|
|
|
|
createName: JSON.parse(
|
|
|
|
|
|
|
|
window.localStorage.getItem('userInfo') || { dept: {} }
|
|
|
|
|
|
|
|
).nickname,
|
|
|
|
|
|
|
|
deptName: JSON.parse(
|
|
|
|
|
|
|
|
window.localStorage.getItem('userInfo') || { dept: {} }
|
|
|
|
|
|
|
|
).dept.name,
|
|
|
|
|
|
|
|
},
|
|
|
|
allBankList: [],
|
|
|
|
allBankList: [],
|
|
|
|
allGysList: [],
|
|
|
|
allGysList: [],
|
|
|
|
isAuthorised: false,
|
|
|
|
isAuthorised: false,
|
|
|
@ -71,12 +247,12 @@ export default {
|
|
|
|
typeStr: null, // show: 查看 edit: 编辑: 其他新增
|
|
|
|
typeStr: null, // show: 查看 edit: 编辑: 其他新增
|
|
|
|
fileList: [],
|
|
|
|
fileList: [],
|
|
|
|
btnList: [
|
|
|
|
btnList: [
|
|
|
|
{ title: '暂存', icon: 'star-o', color: "#909399", key: 0 },
|
|
|
|
{ title: '暂存', icon: 'star-o', color: '#909399', key: 0 },
|
|
|
|
{ title: '提交', icon: 'edit', color: "#ff9900", key: 1 },
|
|
|
|
{ title: '提交', icon: 'edit', color: '#ff9900', key: 1 },
|
|
|
|
{ title: '同意', icon: 'certificate', color: "#19be6b", key: 2 },
|
|
|
|
{ title: '同意', icon: 'certificate', color: '#19be6b', key: 2 },
|
|
|
|
{ title: '驳回', icon: 'exchange', color: "#fa3534", key: 3 },
|
|
|
|
{ title: '驳回', icon: 'exchange', color: '#fa3534', key: 3 },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
};
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 计算属性
|
|
|
|
// 计算属性
|
|
|
|
// bs_fee_type
|
|
|
|
// bs_fee_type
|
|
|
@ -104,7 +280,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
disabled() {
|
|
|
|
disabled() {
|
|
|
|
return ['show'].includes(this.$route.query.type)
|
|
|
|
return ['show'].includes(this.$route.query.type)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 方法集合
|
|
|
|
// 方法集合
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -112,43 +288,55 @@ export default {
|
|
|
|
this.fileList = list
|
|
|
|
this.fileList = list
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleBtConfirm(key, ignoreFeeTip) {
|
|
|
|
handleBtConfirm(key, ignoreFeeTip) {
|
|
|
|
|
|
|
|
console.log(key, 1)
|
|
|
|
if (key == 2 || key == 3) {
|
|
|
|
if (key == 2 || key == 3) {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(key, 2)
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs.form.validate().then(() => {
|
|
|
|
this.$refs.form
|
|
|
|
|
|
|
|
.validate()
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
|
|
|
|
console.log(key, 3)
|
|
|
|
// 添加/修改的提交
|
|
|
|
// 添加/修改的提交
|
|
|
|
let newForm = {
|
|
|
|
let newForm = {
|
|
|
|
...this.form,
|
|
|
|
...this.form,
|
|
|
|
files: this.fileList,
|
|
|
|
files: this.fileList,
|
|
|
|
receiptBankIds: [this.form.receiptBankIds],
|
|
|
|
receiptBankIds: [this.form.receiptBankIds],
|
|
|
|
vendorIds: [this.form.vendorIds],
|
|
|
|
vendorIds: [this.form.vendorIds],
|
|
|
|
status: key
|
|
|
|
status: key,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$loading(true, 'form')
|
|
|
|
this.$loading(true, 'form')
|
|
|
|
let api = newForm.id ? updateVendorReceipt : createVendorReceipt
|
|
|
|
let api = newForm.id ? updateVendorReceipt : createVendorReceipt
|
|
|
|
api(newForm).then(() => {
|
|
|
|
api(newForm)
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
this.$loading(false, 'form')
|
|
|
|
this.$loading(false, 'form')
|
|
|
|
this.$sm(`${this.form.id ? '修改成功!' : '新增成功!'}`)
|
|
|
|
this.$sm(`${this.form.id ? '修改成功!' : '新增成功!'}`)
|
|
|
|
// 清楚缓存
|
|
|
|
// 清楚缓存
|
|
|
|
if (!newForm.id) {
|
|
|
|
if (!newForm.id) {
|
|
|
|
this.$EventBus.$emit('handleResetLive', 'contract-corporateReceipts')
|
|
|
|
this.$EventBus.$emit(
|
|
|
|
|
|
|
|
'handleResetLive',
|
|
|
|
|
|
|
|
'contract-corporateReceipts'
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
history.back()
|
|
|
|
history.back()
|
|
|
|
}).catch(() => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {
|
|
|
|
this.$loading(false, 'form')
|
|
|
|
this.$loading(false, 'form')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
}).catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
|
this.$loading(false, 'form')
|
|
|
|
this.$loading(false, 'form')
|
|
|
|
if (err && err.length > 0 && err[0].name) {
|
|
|
|
if (err && err.length > 0 && err[0].name) {
|
|
|
|
if (err[0].name === 'amount') {
|
|
|
|
if (err[0].name === 'amount') {
|
|
|
|
this.$fm(err[0].message)
|
|
|
|
this.$fm(err[0].message)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const fieldElement = this.$refs.form.$el.querySelector(`[name="${err[0].name}"]`);
|
|
|
|
const fieldElement = this.$refs.form.$el.querySelector(
|
|
|
|
const fieldHeight = fieldElement.offsetHeight;
|
|
|
|
`[name="${err[0].name}"]`
|
|
|
|
const scrollHeight = fieldHeight + 50; // 假设添加了 50px 的额外高度
|
|
|
|
)
|
|
|
|
this.$refs.form.scrollToField(err[0].name, scrollHeight);
|
|
|
|
const fieldHeight = fieldElement.offsetHeight
|
|
|
|
|
|
|
|
const scrollHeight = fieldHeight + 50 // 假设添加了 50px 的额外高度
|
|
|
|
|
|
|
|
this.$refs.form.scrollToField(err[0].name, scrollHeight)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -163,18 +351,27 @@ export default {
|
|
|
|
if (this.$route.query.id) {
|
|
|
|
if (this.$route.query.id) {
|
|
|
|
this.$loading(true, 'loadingSb')
|
|
|
|
this.$loading(true, 'loadingSb')
|
|
|
|
let api = getVendorReceipt
|
|
|
|
let api = getVendorReceipt
|
|
|
|
api(this.$route.query.id).then((res) => {
|
|
|
|
api({ id: this.$route.query.id, isApproval: this.isApproval })
|
|
|
|
|
|
|
|
.then((res) => {
|
|
|
|
this.form = {
|
|
|
|
this.form = {
|
|
|
|
...(res.data || {}),
|
|
|
|
...(res.data || {}),
|
|
|
|
receiptBankIds: Array.isArray(res.data.receiptBankIds) && res.data.receiptBankIds.length ? Number(res.data.receiptBankIds[0]) : null,
|
|
|
|
receiptBankIds:
|
|
|
|
vendorIds: Array.isArray(res.data.vendorIds) && res.data.vendorIds.length ? Number(res.data.vendorIds[0]) : null
|
|
|
|
Array.isArray(res.data.receiptBankIds) &&
|
|
|
|
|
|
|
|
res.data.receiptBankIds.length
|
|
|
|
|
|
|
|
? Number(res.data.receiptBankIds[0])
|
|
|
|
|
|
|
|
: null,
|
|
|
|
|
|
|
|
vendorIds:
|
|
|
|
|
|
|
|
Array.isArray(res.data.vendorIds) && res.data.vendorIds.length
|
|
|
|
|
|
|
|
? Number(res.data.vendorIds[0])
|
|
|
|
|
|
|
|
: null,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.fileList = res.data.files || []
|
|
|
|
this.fileList = res.data.files || []
|
|
|
|
this.isAuthorised = res.data.isAuthorised
|
|
|
|
this.isAuthorised = res.data.isAuthorised
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs.BottomBtn.handleFilterBtnList()
|
|
|
|
this.$refs.BottomBtn.handleFilterBtnList()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).finally(() => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.finally(() => {
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
this.$loading(false, 'loadingSb')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -185,28 +382,30 @@ export default {
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
Promise.all([
|
|
|
|
Promise.all([
|
|
|
|
getVendorPage({ pageNo: 1, pageSize: 999 }),
|
|
|
|
getVendorPage({ pageNo: 1, pageSize: 999 }),
|
|
|
|
getBankAccountInfoPage({ pageNo: 1, pageSize: 999 })
|
|
|
|
getBankAccountInfoPage({ pageNo: 1, pageSize: 999 }),
|
|
|
|
]).then(responses => {
|
|
|
|
])
|
|
|
|
|
|
|
|
.then((responses) => {
|
|
|
|
// 处理每个请求的结果
|
|
|
|
// 处理每个请求的结果
|
|
|
|
this.allGysList = (responses[0].data.list || []).map(item => {
|
|
|
|
this.allGysList = (responses[0].data.list || []).map((item) => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
id: item.id,
|
|
|
|
id: item.id,
|
|
|
|
title: item.vendorName
|
|
|
|
title: item.vendorName,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
this.allBankList = (responses[1].data.list || []).map(item => {
|
|
|
|
this.allBankList = (responses[1].data.list || []).map((item) => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
id: item.id,
|
|
|
|
id: item.id,
|
|
|
|
title: `${item.bankName}-收款账户:${item.bankAccount}`
|
|
|
|
title: `${item.bankName}-收款账户:${item.bankAccount}`,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
resolve()
|
|
|
|
resolve()
|
|
|
|
}).catch(error => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch((error) => {
|
|
|
|
// 处理错误情况
|
|
|
|
// 处理错误情况
|
|
|
|
console.error('Error:', error);
|
|
|
|
console.error('Error:', error)
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|