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

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

@ -39,8 +39,7 @@
import { createVendorPayment, getVendorPayment, updateVendorPayment } from "@/api/bs/vendorPayment";
import VerifyFunc from '@/utils/verify'
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getVendorPage } from "@/api/bs/vendor";
import { getBankAccountInfoPage } from "@/api/bs/bankAccountInfo";
import { vendorBankPage } from "@/api/bs/vendor";
import { listUser } from "@/api/system/user";
export default {
//import使
@ -216,13 +215,13 @@ export default {
this.$loading(true, 'demo1')
return new Promise((resolve) => {
Promise.all([
getVendorPage({ pageNo: 1, pageSize: 999 }),
vendorBankPage({ pageNo: 1, pageSize: 999 }),
]).then(responses => {
//
this.allGysList = (responses[0].data.list || []).map(item => {
return {
id: item.id,
title: item.vendorName
title: `${item.vendorName}-付款账户:${item.bankNumber}`
}
});
this.$loading(false, 'demo1')

@ -197,7 +197,7 @@ export default {
this.allBankList = (responses[1].data.list || []).map(item => {
return {
id: item.id,
title: `${item.bankName}-${item.bankAccount}`
title: `${item.bankName}-收款账户:${item.bankAccount}`
}
});
resolve()

@ -7,8 +7,8 @@
<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.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>-->
<!-- <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 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" />
<RePick v-model="form.supplierId" :disabled="disabled ||oaListIsDisabled " titleKey="companyName" idKey="id" label="供应商名称" name="supplierId" :list="supplierList" isRequrie isCell clearable />
@ -28,23 +28,23 @@
<van-field v-model="form.managerPhone" :disabled="disabled" name="managerPhone" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.rePhone }]" label="经办人电话" />
<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 />
<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.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 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.taxRate" :disabled="disabled" name="taxRate" 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 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" />
<!-- 元素控制-->
<!-- 元素控制-->
<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 == '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>
<van-switch v-model="item.value" :disabled="disabled || oaListIsDisabled"/>
<van-switch v-model="item.value" :disabled="disabled || oaListIsDisabled" />
</template>
</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" />
<van-field v-if="item.type == '4'" type="number" :required="item.required" :rules="[{ message: `${item.label}不能为空`, required: item.required}]" v-model="item.value" :label="item.label" :disabled="disabled || oaListIsDisabled" :name="item.field" placeholder="请输入" input-align="right"></van-field>
<RePick v-if="item.type == '5'" :isRequrie="item.required" v-model="item.value" :disabled="disabled || oaListIsDisabled" titleKey="label" idKey="value" :label="item.label" :name="item.field" :list="item.map" isCell clearable />
<RePick v-if="item.type == '6'" :isRequrie="item.required" v-model="item.value" :disabled="disabled || oaListIsDisabled" titleKey="label" idKey="value" :label="item.label" :name="item.field" :list="item.map" multiple isCell clearable />
@ -108,7 +108,7 @@ import {
listUser,
} from "@/api/system/user";
import { getCustomerContractTypeListAll } from '@/api/bs/contractType'
import {getProjectPage} from "@/api/bs/project";
import { getProjectPage } from "@/api/bs/project";
import { queryFieldTemplate } from '@/api/bs/template'
export default {
//import使
@ -160,8 +160,8 @@ export default {
isRereset: false,
VerifyFunc,
typeList: [],
capitalSource:[],
projectList:[],
capitalSource: [],
projectList: [],
signatoryList: [],
departmentList: [],
dayjs,
@ -190,9 +190,9 @@ export default {
other: null,
},
oaReimburseFeeitemList: [],
dateType:'',
fieldType:'',
fieldTemplateList:[]
dateType: '',
fieldType: '',
fieldTemplateList: []
};
},
@ -393,6 +393,10 @@ export default {
}),
// proposerPerson:this.userInfo.id
}
if (!this.oaReimburseFeeitemList.length) {
this.$loading(false, 'form')
return this.$fm('暂无付款计划,无法提交!')
}
this.$loading(true, 'form')
createSupplierContract(newForm).then((res) => {
this.$loading(false, 'form')
@ -405,10 +409,6 @@ export default {
this.$loading(false, 'form')
})
// })
if (!this.oaReimburseFeeitemList.length) {
this.$loading(false, 'form')
return this.$fm('暂无付款计划,无法提交!')
}
}).catch((err) => {
this.$loading(false, 'form')
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, 'startTime1', `${dayjs(this.form.startTime).format('YYYY/MM/DD')}`)
this.$set(this.form, 'endTime1', `${dayjs(this.form.endTime).format('YYYY/MM/DD')}`)
res.data.fieldTemplateList.forEach(function (item){
if(item.type == 3){
res.data.fieldTemplateList.forEach(function (item) {
if (item.type == 3) {
_this.$set(item, `${item.field}1`, `${dayjs(item.value).format('YYYY/MM/DD')}`)
}
if(item.type == 2){
item.value =item.value? Boolean(item.value):false
if (item.type == 2) {
item.value = item.value ? Boolean(item.value) : false
}
})
console.log('this.form..', this.form);
}).finally(() => {
this.$loading(false, 'loadingSb')
})
}else {
} else {
queryFieldTemplate(2).then((res) => {
res.data.forEach(function (item){
if(item.type == 6){
item.value = item.value?item.value:[]
res.data.forEach(function (item) {
if (item.type == 6) {
item.value = item.value ? item.value : []
}
})
this.fieldTemplateList = res.data
@ -566,8 +566,10 @@ export default {
}).then((res) => {
this.typeList = res.data || []
})
getProjectPage({type:2,pageNo: 1,
pageSize: 500}).then(res=>{
getProjectPage({
type: 2, pageNo: 1,
pageSize: 500
}).then(res => {
this.projectList = res.data.list || []
})
listData({
@ -579,12 +581,12 @@ export default {
});
})
},
handleDateShow(dateType,type) {
handleDateShow(dateType, type) {
let _this = this
if (this.disabled) return
_this.dateType = dateType
_this.fieldType = type
if(type){
if (type) {
_this.$nextTick(() => {
let date = _this.form.fieldTemplateList[type][dateType] || ''
_this.$refs.vanCalendar && _this.$refs.vanCalendar.reset()
@ -594,9 +596,9 @@ export default {
_this.defaultDate = new Date(time)
}
})
}else {
} else {
_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.dateShow = true
if (date) {
@ -608,25 +610,25 @@ export default {
},
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], 'value', `${dayjs(val).valueOf()}`)
this.dateShow = false
return;
}
if(this.dateType == 'dateSigning'){
if (this.dateType == 'dateSigning') {
this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
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, '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, '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, 'endTime', `${dayjs(val).valueOf()}`)
}

Loading…
Cancel
Save