手机端添加收付款账户显示

main-20240105
赵夫琳 8 months ago
parent 8e5da8c9a4
commit 0a4373fba9

@ -39,8 +39,7 @@
import { createVendorPayment, getVendorPayment, updateVendorPayment } from "@/api/bs/vendorPayment"; import { createVendorPayment, getVendorPayment, updateVendorPayment } from "@/api/bs/vendorPayment";
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 { vendorBankPage } from "@/api/bs/vendor";
import { getBankAccountInfoPage } from "@/api/bs/bankAccountInfo";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
export default { export default {
//import使 //import使
@ -216,13 +215,13 @@ export default {
this.$loading(true, 'demo1') this.$loading(true, 'demo1')
return new Promise((resolve) => { return new Promise((resolve) => {
Promise.all([ Promise.all([
getVendorPage({ pageNo: 1, pageSize: 999 }), vendorBankPage({ 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}-付款账户:${item.bankNumber}`
} }
}); });
this.$loading(false, 'demo1') this.$loading(false, 'demo1')

@ -197,7 +197,7 @@ export default {
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()

@ -7,8 +7,8 @@
<div class="item-box"> <div class="item-box">
<van-field v-model="form.contractNumber" @blur="handleCtBlur" placeholder="请输入" :disabled="['edit','show'].includes(this.$route.query.type)" :rules="[{ required: true, message: '请输入' }]" required label="合同编号" clear-trigger="always" input-align="right" /> <van-field v-model="form.contractNumber" @blur="handleCtBlur" placeholder="请输入" :disabled="['edit','show'].includes(this.$route.query.type)" :rules="[{ required: true, message: '请输入' }]" required label="合同编号" clear-trigger="always" input-align="right" />
<van-field v-model="form.contractName" required placeholder="请输入" :disabled="disabled" :rules="[{ required: true, message: '请输入' }]" label="合同名称" clear-trigger="always" input-align="right" /> <van-field v-model="form.contractName" required placeholder="请输入" :disabled="disabled" :rules="[{ required: true, message: '请输入' }]" label="合同名称" clear-trigger="always" input-align="right" />
<!-- <van-field :value="form.time" label="合同起止时间" :disabled="disabled ||oaListIsDisabled " :class="disabled ? 'actived-disabled':''" placeholder="请选择" required :rules="[{ required: true, message: '请选择' }]" @click="handleDateShow(1)" :right-icon="form.time ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea">--> <!-- <van-field :value="form.time" label="合同起止时间" :disabled="disabled ||oaListIsDisabled " :class="disabled ? 'actived-disabled':''" placeholder="请选择" required :rules="[{ required: true, message: '请选择' }]" @click="handleDateShow(1)" :right-icon="form.time ? '' :'arrow' " input-align="right" readonly autosize rows="1" type="textarea">-->
<!-- </van-field>--> <!-- </van-field>-->
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.startTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startTime1" @click="handleDateShow('startTime')" label="合同开始时间" clear-trigger="always" input-align="right" /> <van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.startTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startTime1" @click="handleDateShow('startTime')" label="合同开始时间" clear-trigger="always" input-align="right" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.endTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.endTime1" @click="handleDateShow('endTime')" label="合同结束时间" clear-trigger="always" input-align="right" /> <van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled ||oaListIsDisabled" :class="form.endTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.endTime1" @click="handleDateShow('endTime')" label="合同结束时间" clear-trigger="always" input-align="right" />
<RePick v-model="form.supplierId" :disabled="disabled ||oaListIsDisabled " titleKey="companyName" idKey="id" label="供应商名称" name="supplierId" :list="supplierList" isRequrie isCell clearable /> <RePick v-model="form.supplierId" :disabled="disabled ||oaListIsDisabled " titleKey="companyName" idKey="id" label="供应商名称" name="supplierId" :list="supplierList" isRequrie isCell clearable />
@ -29,19 +29,19 @@
<van-field v-model="form.dealContent" :disabled="disabled" name="reason" autosize rows="2" label="交易内容" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" /> <van-field v-model="form.dealContent" :disabled="disabled" name="reason" autosize rows="2" label="交易内容" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" />
<RePick v-model="form.capitalSource" :disabled="disabled" titleKey="label" idKey="value" label="资金来源" name="capitalSource" :list="capitalSource" isCell clearable /> <RePick v-model="form.capitalSource" :disabled="disabled" titleKey="label" idKey="value" label="资金来源" name="capitalSource" :list="capitalSource" isCell clearable />
<van-field v-model="form.proposerPerson" :disabled="disabled" name="proposerPerson" type="number" placeholder="请输入" input-align="right" label="申请人" /> <van-field v-model="form.proposerPerson" :disabled="disabled" name="proposerPerson" type="number" placeholder="请输入" input-align="right" label="申请人" />
<!-- <van-field v-model="form.taxAmount" :disabled="disabled" name="taxAmount" type="number" placeholder="请输入" input-align="right" label="合同金额(含税)" />--> <!-- <van-field v-model="form.taxAmount" :disabled="disabled" name="taxAmount" type="number" placeholder="请输入" input-align="right" label="合同金额(含税)" />-->
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.proposerTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.proposerTime1" @click="handleDateShow('proposerTime')" label="申请时间" clear-trigger="always" input-align="right" /> <van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.proposerTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.proposerTime1" @click="handleDateShow('proposerTime')" label="申请时间" clear-trigger="always" input-align="right" />
<van-field v-model="form.taxForeheads" :disabled="disabled" name="taxForeheads" type="number" placeholder="请输入" input-align="right" label="税额" /> <van-field v-model="form.taxForeheads" :disabled="disabled" name="taxForeheads" type="number" placeholder="请输入" input-align="right" label="税额" />
<van-field v-model="form.taxRate" :disabled="disabled" name="taxRate" type="number" placeholder="请输入" input-align="right" label="税率" /> <van-field v-model="form.taxRate" :disabled="disabled" name="taxRate" type="number" placeholder="请输入" input-align="right" label="税率" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.dateSigning ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.dateSigning1" @click="handleDateShow('dateSigning')" label="签订时间" clear-trigger="always" input-align="right" /> <van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="disabled" :class="form.dateSigning ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.dateSigning1" @click="handleDateShow('dateSigning')" label="签订时间" clear-trigger="always" input-align="right" />
<van-field v-model="form.other" :disabled="disabled" name="reason" autosize rows="2" label="合同简述" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" /> <van-field v-model="form.other" :disabled="disabled" name="reason" autosize rows="2" label="合同简述" required :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" />
<!-- 元素控制--> <!-- 元素控制-->
<template v-for="(item,index) in form.fieldTemplateList"> <template v-for="(item,index) in form.fieldTemplateList">
<van-field v-if="item.type == '1'" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" :required="item.required" v-model="item.value" :label="item.label" :disabled="disabled || oaListIsDisabled" :name="item.field" placeholder="请输入" input-align="right"></van-field> <van-field v-if="item.type == '1'" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" :required="item.required" v-model="item.value" :label="item.label" :disabled="disabled || oaListIsDisabled" :name="item.field" placeholder="请输入" input-align="right"></van-field>
<van-field v-if="item.type == '2'" :label="item.label" required :name="item.field" :disabled="disabled || oaListIsDisabled" input-align="right" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" label-width="9em"> <van-field v-if="item.type == '2'" :label="item.label" required :name="item.field" :disabled="disabled || oaListIsDisabled" input-align="right" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" label-width="9em">
<template #input> <template #input>
<van-switch v-model="item.value" :disabled="disabled || oaListIsDisabled"/> <van-switch v-model="item.value" :disabled="disabled || oaListIsDisabled" />
</template> </template>
</van-field> </van-field>
<van-field v-if="item.type == '3'" right-icon="arrow" :required="item.required" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" :disabled="disabled || oaListIsDisabled" :class="item.value ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.fieldTemplateList[index][`${item.field}1`]" @click="handleDateShow(item.field,index)" :label="item.label" clear-trigger="always" input-align="right" /> <van-field v-if="item.type == '3'" right-icon="arrow" :required="item.required" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" :disabled="disabled || oaListIsDisabled" :class="item.value ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.fieldTemplateList[index][`${item.field}1`]" @click="handleDateShow(item.field,index)" :label="item.label" clear-trigger="always" input-align="right" />
@ -108,7 +108,7 @@ import {
listUser, listUser,
} from "@/api/system/user"; } from "@/api/system/user";
import { getCustomerContractTypeListAll } from '@/api/bs/contractType' import { getCustomerContractTypeListAll } from '@/api/bs/contractType'
import {getProjectPage} from "@/api/bs/project"; import { getProjectPage } from "@/api/bs/project";
import { queryFieldTemplate } from '@/api/bs/template' import { queryFieldTemplate } from '@/api/bs/template'
export default { export default {
//import使 //import使
@ -160,8 +160,8 @@ export default {
isRereset: false, isRereset: false,
VerifyFunc, VerifyFunc,
typeList: [], typeList: [],
capitalSource:[], capitalSource: [],
projectList:[], projectList: [],
signatoryList: [], signatoryList: [],
departmentList: [], departmentList: [],
dayjs, dayjs,
@ -190,9 +190,9 @@ export default {
other: null, other: null,
}, },
oaReimburseFeeitemList: [], oaReimburseFeeitemList: [],
dateType:'', dateType: '',
fieldType:'', fieldType: '',
fieldTemplateList:[] fieldTemplateList: []
}; };
}, },
@ -393,6 +393,10 @@ export default {
}), }),
// proposerPerson:this.userInfo.id // proposerPerson:this.userInfo.id
} }
if (!this.oaReimburseFeeitemList.length) {
this.$loading(false, 'form')
return this.$fm('暂无付款计划,无法提交!')
}
this.$loading(true, 'form') this.$loading(true, 'form')
createSupplierContract(newForm).then((res) => { createSupplierContract(newForm).then((res) => {
this.$loading(false, 'form') this.$loading(false, 'form')
@ -405,10 +409,6 @@ export default {
this.$loading(false, 'form') this.$loading(false, 'form')
}) })
// }) // })
if (!this.oaReimburseFeeitemList.length) {
this.$loading(false, 'form')
return this.$fm('暂无付款计划,无法提交!')
}
}).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) {
@ -463,23 +463,23 @@ export default {
this.$set(this.form, 'proposerTime1', `${dayjs(this.form.proposerTime).format('YYYY/MM/DD')}`) this.$set(this.form, 'proposerTime1', `${dayjs(this.form.proposerTime).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime1', `${dayjs(this.form.startTime).format('YYYY/MM/DD')}`) this.$set(this.form, 'startTime1', `${dayjs(this.form.startTime).format('YYYY/MM/DD')}`)
this.$set(this.form, 'endTime1', `${dayjs(this.form.endTime).format('YYYY/MM/DD')}`) this.$set(this.form, 'endTime1', `${dayjs(this.form.endTime).format('YYYY/MM/DD')}`)
res.data.fieldTemplateList.forEach(function (item){ res.data.fieldTemplateList.forEach(function (item) {
if(item.type == 3){ if (item.type == 3) {
_this.$set(item, `${item.field}1`, `${dayjs(item.value).format('YYYY/MM/DD')}`) _this.$set(item, `${item.field}1`, `${dayjs(item.value).format('YYYY/MM/DD')}`)
} }
if(item.type == 2){ if (item.type == 2) {
item.value =item.value? Boolean(item.value):false item.value = item.value ? Boolean(item.value) : false
} }
}) })
console.log('this.form..', this.form); console.log('this.form..', this.form);
}).finally(() => { }).finally(() => {
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
}) })
}else { } else {
queryFieldTemplate(2).then((res) => { queryFieldTemplate(2).then((res) => {
res.data.forEach(function (item){ res.data.forEach(function (item) {
if(item.type == 6){ if (item.type == 6) {
item.value = item.value?item.value:[] item.value = item.value ? item.value : []
} }
}) })
this.fieldTemplateList = res.data this.fieldTemplateList = res.data
@ -566,8 +566,10 @@ export default {
}).then((res) => { }).then((res) => {
this.typeList = res.data || [] this.typeList = res.data || []
}) })
getProjectPage({type:2,pageNo: 1, getProjectPage({
pageSize: 500}).then(res=>{ type: 2, pageNo: 1,
pageSize: 500
}).then(res => {
this.projectList = res.data.list || [] this.projectList = res.data.list || []
}) })
listData({ listData({
@ -579,12 +581,12 @@ export default {
}); });
}) })
}, },
handleDateShow(dateType,type) { handleDateShow(dateType, type) {
let _this = this let _this = this
if (this.disabled) return if (this.disabled) return
_this.dateType = dateType _this.dateType = dateType
_this.fieldType = type _this.fieldType = type
if(type){ if (type) {
_this.$nextTick(() => { _this.$nextTick(() => {
let date = _this.form.fieldTemplateList[type][dateType] || '' let date = _this.form.fieldTemplateList[type][dateType] || ''
_this.$refs.vanCalendar && _this.$refs.vanCalendar.reset() _this.$refs.vanCalendar && _this.$refs.vanCalendar.reset()
@ -594,9 +596,9 @@ export default {
_this.defaultDate = new Date(time) _this.defaultDate = new Date(time)
} }
}) })
}else { } else {
_this.$nextTick(() => { _this.$nextTick(() => {
let date = dateType == 'dateSigning'?_this.form.dateSigning:dateType=='proposerTime'?_this.form.proposerTime:dateType=='startTime'?_this.form.startTime:dateType=='endTime'?_this.form.endTime:'' let date = dateType == 'dateSigning' ? _this.form.dateSigning : dateType == 'proposerTime' ? _this.form.proposerTime : dateType == 'startTime' ? _this.form.startTime : dateType == 'endTime' ? _this.form.endTime : ''
_this.$refs.vanCalendar && _this.$refs.vanCalendar.reset() _this.$refs.vanCalendar && _this.$refs.vanCalendar.reset()
_this.dateShow = true _this.dateShow = true
if (date) { if (date) {
@ -608,25 +610,25 @@ export default {
}, },
handleDateSelect(val) { handleDateSelect(val) {
if(this.fieldType){ if (this.fieldType) {
this.$set(this.form.fieldTemplateList[this.fieldType], `${this.dateType}1`, `${dayjs(val).format('YYYY/MM/DD')}`) this.$set(this.form.fieldTemplateList[this.fieldType], `${this.dateType}1`, `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form.fieldTemplateList[this.fieldType], 'value', `${dayjs(val).valueOf()}`) this.$set(this.form.fieldTemplateList[this.fieldType], 'value', `${dayjs(val).valueOf()}`)
this.dateShow = false this.dateShow = false
return; return;
} }
if(this.dateType == 'dateSigning'){ if (this.dateType == 'dateSigning') {
this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`) this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`) this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`)
} }
if(this.dateType == 'proposerTime'){ if (this.dateType == 'proposerTime') {
this.$set(this.form, 'proposerTime1', `${dayjs(val).format('YYYY/MM/DD')}`) this.$set(this.form, 'proposerTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'proposerTime', `${dayjs(val).valueOf()}`) this.$set(this.form, 'proposerTime', `${dayjs(val).valueOf()}`)
} }
if(this.dateType == 'startTime'){ if (this.dateType == 'startTime') {
this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`) this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`) this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`)
} }
if(this.dateType == 'endTime'){ if (this.dateType == 'endTime') {
this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`) this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`) this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
} }

Loading…
Cancel
Save