Merge branch 'main-20240105' of http://139.224.253.31:3000/hym/lyr-one-mobile into main-20240105

main-20240105
123456 8 months ago
commit 8e5da8c9a4

@ -61,10 +61,11 @@ export function getByPlanDetail(id) {
}
// 确认申请
export function confirmApi(id) {
export function confirmApi(data) {
return request({
url: '/bs/payment-apply/paymentAffirm?id=' + id,
method: 'get',
url: '/bs/payment-apply/paymentAffirm',
method: 'post',
data
})
}
// 取消确认

@ -0,0 +1,37 @@
import request from '@/plugin/axios'
// 创建供应商合同
export function getFieldTemplate(type) {
return request({
url: '/bs/field-template/type/' + type,
method: 'get'
})
}
export function addFieldTemplate(data) {
return request({
url: '/bs/field-template/addField',
method: 'post',
data: data
})
}
export function deleteField(field,type) {
return request({
url: '/bs/field-template/'+field+'/'+type,
method: 'delete',
})
}
export function queryOption(field,type) {
return request({
url: '/bs/field-template/option/'+field+'/'+type,
method: 'get',
})
}
export function queryFieldTemplate(type) {
return request({
url: '/bs/field-template/type/'+type,
method: 'get',
})
}

@ -17,6 +17,9 @@
<div style="margin-top: 0.3rem;color:#333 ">
合同名称{{itemData.contractName}}
</div>
<div style="margin-top: 0.3rem;color:#333 ">
分期说明{{itemData.periodName}}
</div>
<div style="margin-top: 0.3rem;color:#333 ">
供应商名称{{itemData.supplierName}}
</div>
@ -43,17 +46,20 @@
<span class="icon-box" @click="handleEdit(itemData.id, itemData.status, itemData.creator)" v-hasPermi="['procurement:payApply:edit']" :style="`color:${!(!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator))) ?'#05A9FF':'#ccc'};`"></span>
<span class="icon-box" @click="handleDel(itemData.id, itemData.status, itemData.creator)" v-hasPermi="['bs:payment-apply:delete']" :style="`color:${!(!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator))) ?'#05A9FF':'#ccc'};`"></span>
<span class="icon-box" @click="handleConfirm(itemData)" v-hasPermi="['bs:payment-apply:paymentAffirm']" :style="`color:${!(itemData.status !== 2 || (itemData.status == 2 && itemData.payMentStatus == 1) ) ?'#05A9FF':'#ccc'};`"></span>
<!-- <span class="icon-box" @click="handleConfirm(itemData)" v-hasPermi="['bs:payment-apply:paymentAffirm']"></span> -->
<span class="icon-box" @click="handleCancelConfirm(itemData)" v-hasPermi="['bs:payment-apply:paymentCancel']" :style="`color:${!(itemData.status !== 2 || (itemData.status == 2 && itemData.payMentStatus !== 1)) ?'#05A9FF':'#ccc'};`"></span>
<span class="icon-box" @click="handleUpload(itemData,itemData.payMentStatus == 1 && itemData.status == 2 )" v-hasPermi="['procurement:payApply:upload']" :style="`color:#05A9FF`"> {{ itemData.payMentStatus == 1 && itemData.status == 2 ? '' : itemData.files.length ? '' : ''}}</span>
</div>
</div>
</div>
<!-- 付款计划确认 -->
<PayConfirmToast ref="PayConfirmToast" :isShow="isShow" @onShow="handleOnShow" @onClose="isShow = false" :pId="itemData.id" @onCompelete="handleConfirmToast" />
</div>
</template>
<script>
import { getDictDataLabel, handleFilterStatus } from "@/utils/dict";
import { deletePaymentApply, confirmApi, cancelConfirmApi } from "@/api/bs/paymentApply";
import { deletePaymentApply, cancelConfirmApi } from "@/api/bs/paymentApply";
import dayjs from 'dayjs'
import { Dialog } from 'vant'
export default {
@ -65,10 +71,11 @@ export default {
},
components: {
PayConfirmToast: () => import('@/components/PayConfirmToast'),
},
data() {
return {
isShow: false,
jumoStudentId: null
}
},
@ -86,6 +93,10 @@ export default {
},
},
methods: {
handleOnShow() {
this.jumoStudentId = null
// this.$emit('onShow')
},
handleUpload(row) {
this.$emit('onFile', row)
},
@ -103,19 +114,27 @@ export default {
})
})
},
handleConfirm(row) {
if (row.status !== 2 || (row.status == 2 && row.payMentStatus == 1)) {
return
}
Dialog.confirm({
title: '提示',
message: '您确认要确认付款吗??',
})
.then(() => {
confirmApi(row.id).then(() => {
handleConfirmToast() {
this.isShow = false
this.$nextTick(() => {
this.$refs.PayConfirmToast.newIsShow = false
this.$emit('onAllRefresh')
})
})
},
handleConfirm(row) {
// if (row.status !== 2 || (row.status == 2 && row.payMentStatus == 1)) {
// return
// }
// Dialog.confirm({
// title: '',
// message: '?',
// })
// .then(() => {
// confirmApi(row.id).then(() => {
// this.$emit('onAllRefresh')
// })
// })
this.isShow = true
},
handleMerge(id, status) {
if (status == 0) {

@ -0,0 +1,120 @@
<!-- 修改支付方式 -->
<template>
<div>
<van-popup v-model="newIsShow" position="bottom" :close-on-click-overlay="false" @close="hanleCancel" get-container="#app" closeable>
<div class="det-form-header">付款确认</div>
<div class="det-form">
<van-form ref="form" :show-error-message="false" validate-trigger="" :submit-on-enter="false">
<van-field label="是否核销" name="cancelAfterVerification" required input-align="right" label-width="9em" :rules="[{ required: true, message: '请选择是否核销' }]">
<template #input>
<van-radio-group v-model="form.cancelAfterVerification" direction="horizontal">
<van-radio :name="1"></van-radio>
<van-radio :name="0"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field label="附件" input-align="right" label-width="9em">
<template #input>
<UploadFile @onConfirm="handleUpload" @onShow="handleOnShow" typeStr="PayConfirmToast" :fileList="fileList" />
</template>
</van-field>
</van-form>
<div class="dept-form-footer">
<van-button class="btn" native-type="buttton" @click.stop="hanleCancel" :loading="loading">取消</van-button>
<van-button class="btn" type="info" native-type="buttton" @click.stop="handleSave" :loading="loading">确定</van-button>
</div>
</div>
</van-popup>
</div>
</template>
<script>
import { mapState } from 'vuex'
import { confirmApi } from "@/api/bs/paymentApply";
export default {
props: {
isShow: Boolean,
pId: [String, Number], // id,
},
name: '',
components: {
UploadFile: () => import('@/components/UploadFile')
},
activated() {
console.log('this.isShow...', this.isShow);
},
data() {
return {
loading: false,
form: {
cancelAfterVerification: null
},
fileList: [],
newIsShow: false
}
},
watch: {
isShow: {
handler(val) {
if (val) {
this.handleInitForm()
}
this.newIsShow = val
},
deep: true
}
},
computed: {
...mapState({
roleFlag: state => state.common.user.info.roleFlag
}),
},
methods: {
handleOnShow() {
this.$emit('onShow')
},
handleUpload(list) {
this.fileList = list
},
handleInitForm() {
this.$nextTick(() => {
this.form.cancelAfterVerification = null
this.fileList = []
this.$refs.form.resetValidation()
})
},
handleSave() {
this.$refs.form.validate().then(() => {
this.loading = true
let form = {
id: this.pId,
files: this.fileList
}
confirmApi(form).then(() => {
this.loading = false
this.$sm('付款确认成功!')
this.$emit('onCompelete')
}).catch(() => {
this.loading = false
})
}).catch((err) => {
if (err && err.length > 0 && err[0].name) {
if (err[0].name === 'cancelAfterVerification') {
this.$fm(err[0].message)
}
}
})
},
hanleCancel() {
this.$emit('onClose')
},
}
}
</script>
<style lang='scss' scoped>
// @import './index.scss';
@import '~@/assets/style/order/btnPublic.scss';
</style>

@ -1,13 +1,13 @@
<!-- 上传附件 -->
<template>
<div class="upload-box">
<div class="header-box">
<div :class="`header-box ${['PayConfirmToast'].includes(typeStr) && 'mrNone'}`">
<div class="header-item-box" v-for="(item,index) in list" :key="index" @click.stop="handleToShow(item)">
{{item.name }}
<van-icon name="cross" size="10" @click.stop="handleDel(index)" v-if="['edit','add'].includes(typeStr)" />
<van-icon name="cross" size="10" @click.stop="handleDel(index)" v-if="['edit','add','PayConfirmToast'].includes(typeStr)" />
</div>
</div>
<van-uploader accept="*" multiple :before-read="beforeRead" :after-read="handleAfterRead" v-if="['edit','add'].includes(typeStr)">
<van-uploader accept="*" multiple :before-read="beforeRead" :after-read="handleAfterRead" v-if="['edit','add','PayConfirmToast'].includes(typeStr)">
<van-button icon="plus" size="small" round type="info">上传文件</van-button>
</van-uploader>
</div>
@ -77,13 +77,13 @@ export default {
return true;
},
handleToShow(item) {
this.$emit('onShow')
this.$router.push({
path: '/fileShow',
query: {
url: item.url
}
})
console.log('val...', item);
},
handleDel(index) {
this.list.splice(index, 1)
@ -152,5 +152,9 @@ export default {
// border
}
}
.mrNone {
margin: 0;
justify-content: flex-end;
}
}
</style>

@ -780,7 +780,7 @@ export default {
getExpenseApplyMyPage({
pageNo: 1,
pageSize: 1000,
billType: 'CLSQ',
billType: this.$route.query.billType === 'RCBX' ? 'RCSQ' : 'CLSQ',
expenseFlag: 0,
ids: [],
sortingFieldStr: encodeURIComponent(JSON.stringify([{ field: 'id', order: "desc" }]))

@ -2,7 +2,7 @@
<div id="orderHeader">
<div class="hf-l-seacrch" v-if="isActSearch">
<form action="/">
<van-search v-model="listQuery.vendorPaymentNo" shape="round" show-action placeholder="请输入收款编号" :clearable="false" @search="onKeywordSearch" @cancel="onKeywordCancel" />
<van-search v-model="listQuery.vendorReceiptNo" shape="round" show-action placeholder="请输入收款编号" :clearable="false" @search="onKeywordSearch" @cancel="onKeywordCancel" />
</form>
</div>
<div class="header-filter" :style="isActSearch ? 'padding: 0 0 0 0.5rem' : ''">
@ -160,7 +160,7 @@ export default {
},
onKeywordCancel() {
this.listQuery.vendorPaymentNo = null
this.listQuery.vendorReceiptNo = null
this.isActSearch = false
this.isSearch = false
this.onKeywordSearch()
@ -218,12 +218,12 @@ export default {
//
handleSearch() {
this.handleInit()
this.listQuery.vendorPaymentNo = this.paramProp.vendorPaymentNo
this.listQuery.vendorReceiptNo = this.paramProp.vendorReceiptNo
this.isActSearch = true
},
handleSearchCancel() {
this.listQuery.vendorPaymentNo = null
this.listQuery.vendorReceiptNo = null
this.isActSearch = false
this.onKeywordSearch()
},

@ -66,7 +66,6 @@ export default {
businessStratDate: [],
businessEndDate: [],
capital: null,
address: null,
bankNumber: null,
bankOfDeposit: null,
isRegister: null,

@ -5,7 +5,7 @@
<div class="section"> <span class="line"> </span> 审批内容</div>
<div class="trips-box">
<div class="item-box">
<van-field v-model="form.contractNumber" :disabled="['edit','show'].includes(this.$route.query.type)" @blur="handleCtBlur" placeholder="请输入" :rules="[{ required: true, message: '请输入' }]" required label="合同编号" clear-trigger="always" input-align="right" />
<van-field v-model="form.contractNumber" :disabled="['edit','show'].includes(this.$route.query.type)" placeholder="请输入" :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 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" />
@ -29,12 +29,26 @@
<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.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 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'" :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>
<van-field v-if="item.type == '2'" :label="item.label" :required="item.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"/>
</template>
</van-field>
<van-field v-if="item.type == '3'" :required="item.required" right-icon="arrow" :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'" :required="item.required" type="number" :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 />
</template>
</div>
</div>
<div class="section mt5"> <span class="line"> </span>附件</div>
@ -95,6 +109,7 @@ import {
import { Dialog } from 'vant'
import {getCustomerContractTypeListAll} from "@/api/bs/contractType";
import {getProjectPage} from "@/api/bs/project";
import { queryFieldTemplate } from '@/api/bs/template'
export default {
//import使
name: 'contract-custom',
@ -171,7 +186,10 @@ export default {
dealContent: null,
other: null,
},
oaReimburseFeeitemList: []
oaReimburseFeeitemList: [],
dateType:'',
fieldType:'',
fieldTemplateList:[]
};
},
@ -276,7 +294,7 @@ export default {
amount: actualAmount,
startTime,
endTime,
managerPhone
managerPhone,
}
}
this.$loading(false)
@ -365,7 +383,8 @@ export default {
...item,
planTime: dayjs(item.planTime).valueOf()
}
})
}),
// proposerPerson:this.userInfo.id
}
this.$loading(true, 'form')
// this.handleCtBlur({
@ -405,6 +424,7 @@ export default {
})
},
handleInitForm() {
let _this = this
const { id, type } = this.$route.query || {}
this.typeStr = type
if (id) {
@ -437,10 +457,32 @@ export default {
this.$nextTick(() => {
this.$refs.BottomBtn.handleFilterBtnList()
})
this.$set(this.form, 'dateSigning1', `${dayjs(this.form.dateSigning).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, 'endTime1', `${dayjs(this.form.endTime).format('YYYY/MM/DD')}`)
this.form.fieldTemplateList.forEach(function (item,index){
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
}
})
console.log('this.form..', this.form);
}).finally(() => {
this.$loading(false, 'loadingSb')
})
}else {
queryFieldTemplate(1).then((res) => {
res.data.forEach(function (item){
if(item.type == 6){
item.value = item.value?item.value:[]
}
})
this.fieldTemplateList = res.data
this.$set(this.form, 'fieldTemplateList', res.data)
});
}
},
handleNewConfirmPo(arr, index) {
@ -540,20 +582,41 @@ export default {
this.capitalSource = res.data.list || [];
});
},
handleDateShow(dateType) {
handleDateShow(dateType,type) {
let _this = this
if (this.disabled) return
this.dateType = dateType
this.$nextTick(() => {
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
_this.dateType = dateType
_this.fieldType = type
if(type){
_this.$nextTick(() => {
let date = _this.form.fieldTemplateList[type][dateType] || ''
_this.$refs.vanCalendar && _this.$refs.vanCalendar.reset()
_this.dateShow = true
if (date) {
let time = dayjs(Number(date)).format('YYYY/MM/DD');
this.defaultDate = new Date(time)
_this.defaultDate = new Date(time)
}
})
}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:''
_this.$refs.vanCalendar && _this.$refs.vanCalendar.reset()
_this.dateShow = true
if (date) {
let time = dayjs(Number(date)).format('YYYY/MM/DD');
_this.defaultDate = new Date(time)
}
})
}
},
handleDateSelect(val) {
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'){
this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`)

@ -5,14 +5,26 @@
<div class="section"> <span class="line"> </span> 审批内容</div>
<div class="trips-box">
<div class="item-box">
<RePick v-model="form.contractNumber" :disabled="['show','edit'].includes(this.$route.query.type)" @change="handleCtBlur" titleKey="contractNumberTitle" :rules="[{ required: true, message: '请选择' }]" idKey="contractNumber" label="编号" required name="contractNumber" :list="contractNumberList" isRequrie isCell clearable />
<van-field v-model="form.contractName" required placeholder="请输入" :rules="[{ required: true, message: '请输入' }]" label="名称" clear-trigger="always" input-align="right" />
<RePick v-model="form.supplierId" titleKey="companyAme" idKey="id" label="供应商名称" name="supplierId" :list="supplierList" isRequrie isCell clearable />
<van-field v-model="form.amount" type="number" name="amount" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="总金额" />
<van-field v-model="form.paymentAffirmTime" v-if="disabled" label="付款确认时间" disabled placeholder="请输入" input-align="right" />
<RePick v-model="form.contractNumber" :disabled="['show','edit'].includes(this.$route.query.type)" @change="handleCtBlur" titleKey="contractNumberTitle" :rules="[{ required: true, message: '请选择' }]" idKey="contractNumber" label="合同编号" required name="contractNumber" :list="contractNumberList" isRequrie isCell clearable />
<van-field v-model="form.contractName" :disabled="disabled" required placeholder="请输入" :rules="[{ required: true, message: '请输入' }]" label="合同名称" clear-trigger="always" input-align="right" />
<van-field v-model="form.amount" :disabled="disabled" name="amount" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="总金额" />
<van-field v-model="form.projectName" :disabled="disabled" name="projectName" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '请输入' }]" label="项目名称" />
<RePick v-model="form.supplierId" :disabled="disabled" titleKey="companyName" idKey="id" label="供应商名称" name="supplierId" :list="supplierList" isRequrie isCell clearable />
<van-field v-model="form.receiptBankUserName" :disabled="disabled" name="receiptBankUserName" placeholder="请输入" input-align="right" label="收款银行账号" />
<van-field v-model="form.openingBankName" :disabled="disabled" name="openingBankName" placeholder="请输入" input-align="right" label="开户行名" />
<van-field label="是否收到发票" name="receiptOfInvoice" :disabled="disabled" input-align="right" label-width="9em">
<template #input>
<van-radio-group v-model="form.receiptOfInvoice" :disabled="disabled" direction="horizontal">
<van-radio :name="1"></van-radio>
<van-radio :name="0"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field v-model="form.receiptBankName" :disabled="disabled" name="receiptBankName" placeholder="请输入" input-align="right" label="收款银行户名" />
<!-- <van-field v-model="form.paymentAffirmTime" v-if="disabled" label="付款确认时间" disabled placeholder="请输入" input-align="right" />
<van-field v-model="form.actualAmount" v-if="disabled" label="付款金额" disabled placeholder="请输入" input-align="right" />
<van-field v-model="form.affirmPersionName" v-if="disabled" label="确认人" disabled placeholder="请输入" input-align="right" />
<van-field v-model="form.remark" :disabled="['show','edit'].includes(this.$route.query.type)" label="备注" placeholder="请输入" input-align="right" />
<van-field v-model="form.affirmPersionName" v-if="disabled" label="确认人" disabled placeholder="请输入" input-align="right" /> -->
<van-field v-model="form.remark" :disabled="disabled" label="备注" placeholder="请输入" input-align="right" />
</div>
</div>
<div class="section mt5" v-if="!disabled">
@ -22,11 +34,23 @@
<div class="trips-box">
<div class="item-box" v-for="(item,index) in oaReimburseFeeitemList" :key="index">
<van-field :value="index + 1" disabled label="序号" input-align="right" />
<van-field v-model="item.keyName" label="期限名称" input-align="right" required disabled />
<van-field v-model="item.planTime" label="计付款时间" input-align="right" required disabled />
<van-field v-model="item.keyName" label="计划名称" input-align="right" required disabled />
<van-field v-model="item.planTime" label="付款时间" input-align="right" required disabled />
<van-field v-model="item.percentage" label="比例" input-align="right" required disabled />
<van-field v-model="item.actualAmount" :disabled="disabled" name="actualAmount" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="实付金额" />
<!-- <UploadFile :typeStr="typeStr" @onConfirm="handleUpload" :fileList="fileList" /> -->
<van-field v-model="item.actualAmount" :disabled="disabled" name="actualAmount" type="number" placeholder="请输入" input-align="right" required :rules="[{ required: true, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="付款金额" />
<van-field v-model="item.applyForAmount" :disabled="disabled" name="applyForAmount" type="number" placeholder="请输入" input-align="right" label="申请金额" />
<van-field v-model="item.subjectsCode" label="科目代码" input-align="right" :disabled="disabled" placeholder="请输入" />
<van-field v-model="item.businessAccountingCode" label="核算代码" input-align="right" :disabled="disabled" placeholder="请输入" />
<van-field v-model="item.deductibleInvoiceAmount" :disabled="disabled" name="deductibleInvoiceAmount" type="number" placeholder="请输入" input-align="right" label="可抵扣发票含税金额" />
<van-field v-model="item.taxRate" label="税率" input-align="right" :disabled="disabled" placeholder="请输入" />
<van-field v-model="item.taxForeheads" :disabled="disabled" name="taxForeheads" type="number" placeholder="请输入" input-align="right" label="税额" />
<van-field v-model="item.remark" :disabled="disabled" name="remark" autosize rows="2" label="备注信息" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" />
</div>
</div>
<div class="section mt5"> <span class="line"> </span>附件</div>
<div class="trips-box">
<div class="item-box">
<UploadFile :typeStr="typeStr" @onConfirm="handleUpload" :fileList="fileList" />
</div>
</div>
<div class="section mt5" v-if="['show'].includes(typeStr)"> <span class="line"> </span>审批流程</div>
@ -57,6 +81,7 @@ export default {
name: 'contract-pay',
props: {},
components: {
UploadFile: () => import('@/components/UploadFile'),
RePick: () => import('@/components/ReComponents/RePick'),
ApprovalProcess: () => import('@/components/ApprovalProcess'),
SpList: () => import('./components/SpList'),
@ -144,11 +169,17 @@ export default {
this.oaReimburseFeeitemList = (newArr || []).map(item => {
return {
...item,
actualAmount: Math.floor(Number(item.actualAmount) * 100) / 100
actualAmount: Math.floor(Number(item.actualAmount) * 100) / 100,
applyForAmount: undefined,
subjectsCode: null,
businessAccountingCode: null,
deductibleInvoiceAmount: null,
taxRate: undefined,
taxForeheads: undefined,
remark: null,
}
})
this.isShow = false
console.log('arr', arr, this.oaReimburseFeeitemList);
},
handleGetPay() {
if (this.form.contractNumber) {
@ -219,14 +250,21 @@ export default {
// /
let newForm = []
this.oaReimburseFeeitemList.forEach(v => {
console.log('this.form..', this.form);
newForm.push({
...this.form,
actualAmount: v.actualAmount,
status: key,
percentage: v.percentage,
planTime: v.planTime,
paymentPlanDetailId: v.id
paymentPlanDetailId: v.id,
applyForAmount: v.applyForAmount,
subjectsCode: v.subjectsCode,
businessAccountingCode: v.businessAccountingCode,
deductibleInvoiceAmount: v.deductibleInvoiceAmount,
taxRate: v.taxRate,
taxForeheads: v.taxForeheads,
remark: v.remark,
files: this.fileList
})
})
this.$loading(true, 'form')
@ -269,6 +307,23 @@ export default {
this.$loading(true, 'loadingSb')
getPaymentApply(id).then((res) => {
this.form = res.data || {};
const { percentage, actualAmount, taxForeheads, remark, applyForAmount, subjectsCode, businessAccountingCode, taxRate, deductibleInvoiceAmount } = this.form
const { keyName, planTime } = this.form.paymentPlanDetailDO
console.log('keyName...', keyName);
this.oaReimburseFeeitemList = [{
percentage: percentage,
id: this.form.paymentPlanDetailId,
actualAmount: actualAmount,
keyName,
planTime,
applyForAmount,
subjectsCode,
businessAccountingCode,
deductibleInvoiceAmount,
taxRate,
taxForeheads,
remark,
}]
this.form = {
...this.form,
time: [this.form.startTime, this.form.endTime],
@ -281,19 +336,7 @@ export default {
this.handleChange(this.form.departmentId, 1)
this.fileList = res.data.files || []
this.isAuthorised = res.data.isAuthorised
// this.oaReimburseFeeitemList = [{
// percentage: this.form.percentage,
// id: this.form.paymentPlanDetailId,
// actualAmount: this.form.actualAmount,
// planTime: dayjs(this.form.planTime).format('YYYY/MM/DD HH:ss')
// }]
// this.oaReimburseFeeitemList = [{
// percentage: this.form.percentage,
// id: this.form.paymentPlanDetailId,
// actualAmount: this.form.actualAmount,
// planTime: dayjs(this.form.planTime).format('YYYY/MM/DD HH:ss')
// }]
this.oaReimburseFeeitemList = this.form.paymentPlanDetailDO
// this.oaReimburseFeeitemList = this.form.paymentPlanDetailDO
this.$nextTick(() => {
this.$refs.BottomBtn.handleFilterBtnList()
})

@ -11,7 +11,7 @@
<!-- </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="companyAme" 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 />
<RePick v-model="form.departmentId" :disabled="disabled" label="签约部门" @change="handleChange" :name="`departmentId`" :list="userDeptTree" isRequrie isCascader isShowSearch title="签约部门" titleKey="name" isCell clearable />
<RePick v-model="form.signatoryId" :disabled="disabled" titleKey="nickname" idKey="id" label="签约人员" name="signatoryId" :list="signatoryList" isRequrie isCell clearable />
<RePick v-model="form.contractType" :disabled="disabled" titleKey="contractName" idKey="id" label="合同类型" name="contractType" :list="typeList" isRequrie isCell clearable />
@ -29,12 +29,26 @@
<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.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 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">
<template #input>
<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 == '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 />
</template>
</div>
</div>
<div class="section mt5"> <span class="line"> </span>附件</div>
@ -95,6 +109,7 @@ import {
} from "@/api/system/user";
import { getCustomerContractTypeListAll } from '@/api/bs/contractType'
import {getProjectPage} from "@/api/bs/project";
import { queryFieldTemplate } from '@/api/bs/template'
export default {
//import使
name: 'contract-supplier',
@ -175,7 +190,9 @@ export default {
other: null,
},
oaReimburseFeeitemList: [],
dateType:''
dateType:'',
fieldType:'',
fieldTemplateList:[]
};
},
@ -373,7 +390,8 @@ export default {
...item,
planTime: dayjs(item.planTime).valueOf()
}
})
}),
// proposerPerson:this.userInfo.id
}
this.$loading(true, 'form')
createSupplierContract(newForm).then((res) => {
@ -408,6 +426,7 @@ export default {
})
},
handleInitForm() {
let _this = this
const { id, type } = this.$route.query || {}
this.typeStr = type
if (id) {
@ -440,10 +459,32 @@ export default {
this.$nextTick(() => {
this.$refs.BottomBtn.handleFilterBtnList()
})
this.$set(this.form, 'dateSigning1', `${dayjs(this.form.dateSigning).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, 'endTime1', `${dayjs(this.form.endTime).format('YYYY/MM/DD')}`)
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
}
})
console.log('this.form..', this.form);
}).finally(() => {
this.$loading(false, 'loadingSb')
})
}else {
queryFieldTemplate(2).then((res) => {
res.data.forEach(function (item){
if(item.type == 6){
item.value = item.value?item.value:[]
}
})
this.fieldTemplateList = res.data
this.$set(this.form, 'fieldTemplateList', res.data)
});
}
},
handleUpload(list) {
@ -538,31 +579,41 @@ export default {
});
})
},
handleDateShow(dateType) {
handleDateShow(dateType,type) {
let _this = this
if (this.disabled) return
this.dateType = dateType
this.$nextTick(() => {
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
_this.dateType = dateType
_this.fieldType = type
if(type){
_this.$nextTick(() => {
let date = _this.form.fieldTemplateList[type][dateType] || ''
_this.$refs.vanCalendar && _this.$refs.vanCalendar.reset()
_this.dateShow = true
if (date) {
let time = dayjs(Number(date)).format('YYYY/MM/DD');
this.defaultDate = new Date(time)
_this.defaultDate = new Date(time)
}
})
},
handlePDateShow(time, index) {
if (this.disabled) return
this.$nextTick(() => {
this.$refs.pVanCalendar && this.$refs.pVanCalendar.reset()
this.palnTimeShow = true
this.pIndex = index
if (time) {
this.pDefaultDate = dayjs(time).toDate()
}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:''
_this.$refs.vanCalendar && _this.$refs.vanCalendar.reset()
_this.dateShow = true
if (date) {
let time = dayjs(Number(date)).format('YYYY/MM/DD');
_this.defaultDate = new Date(time)
}
})
}
},
handleDateSelect(val) {
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'){
this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`)
@ -579,18 +630,20 @@ export default {
this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
}
// if (list && list.length) {
// this.$set(this.form, 'time', `${dayjs(list[0]).format('YY/MM/DD')}~${dayjs(list[1]).format('YY/MM/DD')}`)
// this.$set(this.form, 'startTime', dayjs(list[0]).valueOf())
// this.$set(this.form, 'endTime', dayjs(list[1]).valueOf())
// } else {
// this.$set(this.form, 'time', null)
// this.$set(this.form, 'startTime', null)
// this.$set(this.form, 'endTime', null)
// }
this.dateShow = false
},
handlePDateShow(time, index) {
if (this.disabled) return
this.$nextTick(() => {
this.$refs.pVanCalendar && this.$refs.pVanCalendar.reset()
this.palnTimeShow = true
this.pIndex = index
if (time) {
this.pDefaultDate = dayjs(time).toDate()
}
})
},
handlePlanDateSelect(date) {
if (date) {
let num = this.oaReimburseFeeitemList.length - 1

@ -169,7 +169,7 @@ export default {
}
this.moreLoading = true
this.$loading(true, 'tableLoading')
let filterArr = ['QUOTATION_SHEET']
let filterArr = ['QUOTATION_SHEET', 'SUPPLIER_CONTRACT_XD']
getMyNotifyMessagePage(query).then(res => {
let resList = (res.data && res.data.list || [])
if (['init', 'refresh'].includes(val)) {

Loading…
Cancel
Save