手机端除了元素管理的其他已经完成

main-20240105
赵夫琳 8 months ago
parent aeeb8ceeaf
commit a4cd469679

@ -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
})
}
// 取消确认

@ -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 && itemData.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 && itemData.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,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()
})

Loading…
Cancel
Save