Kaynağa Gözat

审批接口

wulanhaote
庞东旭 3 yıl önce
ebeveyn
işleme
dcb5ac627d
3 değiştirilmiş dosya ile 127 ekleme ve 219 silme
  1. +8
    -0
      src/api/onlineHome/bankAgriculture/paymentApproval.js
  2. +58
    -5
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue
  3. +61
    -214
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess.vue

+ 8
- 0
src/api/onlineHome/bankAgriculture/paymentApproval.js Dosyayı Görüntüle

@@ -100,3 +100,11 @@ export function getCashProcess(id) {
method: 'get'
})
}

export function getAccount(query){
return request({
url: '/cashier/account/list',
method: 'get',
params: query
})
}

+ 58
- 5
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue Dosyayı Görüntüle

@@ -12,9 +12,28 @@
</van-nav-bar>
<p class="main_title">基础信息</p>
<div class="main_box">
<van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>
<!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>-->
<van-field
readonly
clickable
label="付款方"
placeholder="请选择付款方"
v-model="form.payer"
@click="showpayer = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
/>
<van-popup v-model="showpayer" position="bottom">
<van-picker
show-toolbar
:columns="payerOptions"
@confirm="onConfirmPayer"
@cancel="showpayer = false"
/>
</van-popup>
<van-field label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field label="支出总金额" v-model="form.expenditureAmount" placeholder="根据下方收款金额自动核算" input-align="right" label-width="auto"/>
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" placeholder="根据下方收款金额自动核算" input-align="right" label-width="auto"/>
<van-field
readonly
clickable
@@ -138,7 +157,7 @@
</van-popup>
<van-field v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
<van-field v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto"/>
<van-field v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
<van-field
readonly
clickable
@@ -175,7 +194,7 @@
</template>

<script>
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount} from "@/api/onlineHome/bankAgriculture/paymentApproval";
export default {
name: "approvalModify",
data() {
@@ -186,6 +205,7 @@
showbankType:false,
showproject:false,
showFundType:false,
showpayer:false,

minDate: new Date(),
maxDate: new Date(2025, 10, 1),
@@ -205,6 +225,7 @@
projectFundTypeOptions:[],
projectFundTypeDictionaries:[],
projectListShow:[],
payerOptions:[],

chargeItme:[],
chargeItmeShow:[],
@@ -249,6 +270,15 @@
}
this.projectFundTypeDictionaries = response.data;
});
let params1={
accountType: "102",
status: "N",
}
getAccount(params1).then((response) => {
for (var i = 0; i < response.rows.length; i++) {
this.payerOptions.push({text: response.rows[i].accountName, value: response.rows[i].id})
}
});
this.getDictionaries();
},
methods: {
@@ -304,6 +334,10 @@
this.getPayeeList();
},
addChargeItme(index){
if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){
this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' });
return;
}
this.chargeItme.splice(index + 1, 0, {
payeeId: "", //收款方ID
payee: "", //收款方
@@ -367,9 +401,9 @@
},
onConfirmPayee(data){
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text;
console.log(this.chargeItme.length)
this.chargeItme[this.chargeItme.length-1].payee = data.text;
this.chargeItme[this.chargeItme.length-1].payeeId = data.value;
console.log(this.chargeItme)
this.showpayee = false;
},
onConfirmBankType(data){
@@ -378,6 +412,11 @@
this.chargeItme[this.chargeItme.length-1].bankType = data.value;
this.showbankType = false;
},
onConfirmPayer(data){
this.form.payer = data.text;
this.form.cashierId = data.value;
this.showpayer = false;
},
onConfirmLasj(data){
this.form.applyDate = this.getNowFormatDate(data).substr(0,10);
this.showlasj = false;
@@ -393,6 +432,20 @@
}
});
},
// 钱计算
moneyChange(input) {
console.log(input)
let obj = {};
obj = this.chargeItme.find((account) => {
//model就是上面的数据源
return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据
});
let total = 0;
this.chargeItme.forEach((money) => {
total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2)
});
this.$set(this.form, "expenditureAmount", total);
},
goAdd(){
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
this.$toast.error("付款事由禁止包含|。");


+ 61
- 214
src/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess.vue Dosyayı Görüntüle

@@ -32,18 +32,20 @@
</van-col>
<van-col span="18">
<p v-show="processList.乡镇审批==1">乡镇审批</p>
<p v-show="processList.乡镇审批==2">乡镇审批</p>
<p v-show="processList.乡镇审批==3">乡镇审批</p>
<p v-show="processList.乡镇审批==2" class="textBlue">乡镇审批</p>
<p v-show="processList.乡镇审批==3" class="textRed">乡镇审批</p>
<van-row>
<van-col span="10" style="padding: 0;" v-if="processList.待申请==2">
<van-col span="24" style="padding: 0;" v-if="processList.待申请==2">
<p v-show="processList.乡镇审批==1">审批人:{{processList.乡镇审批人}}</p>
<p v-show="processList.乡镇审批==2">审批人:{{processList.乡镇审批人}}</p>
<p v-show="processList.乡镇审批==3">审批人:{{processList.乡镇审批人}}</p>
<p v-show="processList.乡镇审批==2" class="textBlue">审批人:{{processList.乡镇审批人}}</p>
<p v-show="processList.乡镇审批==3" class="textRed">审批人:{{processList.乡镇审批人}}</p>
</van-col>
<van-col span="14" style="padding: 0;" v-if="processList.待申请==2">
</van-row>
<van-row>
<van-col span="24" style="padding: 0;" v-if="processList.待申请==2">
<p v-show="processList.乡镇审批==1">审批时间:{{processList.乡镇审批时间}}</p>
<p v-show="processList.乡镇审批==2">审批时间:{{processList.乡镇审批时间}}</p>
<p v-show="processList.乡镇审批==3">审批时间:{{processList.乡镇审批时间}}</p>
<p v-show="processList.乡镇审批==2" class="textBlue">审批时间:{{processList.乡镇审批时间}}</p>
<p v-show="processList.乡镇审批==3" class="textRed">审批时间:{{processList.乡镇审批时间}}</p>
</van-col>
</van-row>
</van-col>
@@ -56,18 +58,21 @@
</van-col>
<van-col span="18">
<p v-show="processList.区县审批==1">区县审批</p>
<p v-show="processList.区县审批==2">区县审批</p>
<p v-show="processList.区县审批==3">区县审批</p>
<p v-show="processList.区县审批==2" class="textBlue">区县审批</p>
<p v-show="processList.区县审批==3" class="textRed">区县审批</p>
<van-row>
<van-col span="10" style="padding: 0;">
<van-col span="24" style="padding: 0;">
<p v-show="processList.区县审批==1">审批人:{{processList.区县审批人}}</p>
<p v-show="processList.区县审批==2">审批人:{{processList.区县审批人}}</p>
<p v-show="processList.区县审批==3">审批人:{{processList.区县审批人}}</p>
<p v-show="processList.区县审批==2" class="textBlue">审批人:{{processList.区县审批人}}</p>
<p v-show="processList.区县审批==3" class="textRed">审批人:{{processList.区县审批人}}</p>
</van-col>
<van-col span="14" style="padding: 0;">
</van-row>
<van-row>

<van-col span="24" style="padding: 0;">
<p v-show="processList.区县审批==1">审批时间:{{processList.区县审批时间}}</p>
<p v-show="processList.区县审批==2">审批时间:{{processList.区县审批时间}}</p>
<p v-show="processList.区县审批==3">审批时间:{{processList.区县审批时间}}</p>
<p v-show="processList.区县审批==2" class="textBlue">审批时间:{{processList.区县审批时间}}</p>
<p v-show="processList.区县审批==3" class="textRed">审批时间:{{processList.区县审批时间}}</p>
</van-col>
</van-row>
</van-col>
@@ -80,8 +85,8 @@
</van-col>
<van-col span="18">
<p v-show="processList.支付状态==1">待支付</p>
<p v-show="processList.支付状态==2">支付成功</p>
<p v-show="processList.支付状态==3">支付异常</p>
<p v-show="processList.支付状态==2" class="textBlue">支付成功</p>
<p v-show="processList.支付状态==3" class="textRed">支付异常</p>
<van-row>
<van-col span="24" style="padding: 0;">
<p v-show="processList.支付状态==2||processList.支付状态==3">支付时间:{{processList.支付时间}}</p>
@@ -97,8 +102,8 @@
</van-col>
<van-col span="18">
<p v-show="processList.入账状态==1">未入账</p>
<p v-show="processList.入账状态==2">入账成功</p>
<p v-show="processList.入账状态==3">入账异常</p>
<p v-show="processList.入账状态==2" class="textBlue">入账成功</p>
<p v-show="processList.入账状态==3" class="textRed">入账异常</p>
<van-row>
<van-col span="24" style="padding: 0;">
<p v-show="processList.入账状态==2||processList.入账状态==3">入账时间:{{processList.入账时间}}</p>
@@ -113,224 +118,66 @@
<script>
import {
getTransferProcess,
getTransfer,
getProjectto,
getCashProcess
queryTransferDetail
} from "@/api/onlineHome/bankAgriculture/paymentApproval";
export default {
name: "approvalProcess",
data() {
return {
// 工程项目关联信息
capitalExpenditureOpen:false,
isAudit:false,
//收款方记录
chargeItme: [],
// 资金支出类别
capitalExpenditureTypeOptions: [],
bankTypeList: [],
accountTypeList: [],
transferTypeList:[],
projectFundTypeOptions:[],
expands: [],
// 审核意见默认值
pass: "true",
comment: "同意",
getRowKeys(row) {
return row.id;
},
// 表单参数
form: {
id: null,
orderId: null,
payer: null,
payerAccount: null,
expenditureAmount: null,
remark: null,
transferStatus: "0",
auditStatus: "0",
paymentState: "1",
bankPriority: "0",
clientPriority: "0",
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
},
// 关联工程项目信息
projectForm:{
projectId:null,
projectName:null,
projectContractor:null,
projectAmount:null,
projectBillNum:null,
projectFundType:null,
outId:null,
ynType:'1'
},
auditStatus:false,
processList:{},
form:{}
};
},
created() {
this.getDicts("capital_expenditure_type").then(response => {
this.capitalExpenditureTypeOptions = response.data;
for(let j of this.capitalExpenditureTypeOptions){
if(j.dictValue==this.form.capitalExpenditureType){
this.form.capitalExpenditureType = j.dictLabel
}
}
});
this.getDicts("bank_type").then(response => {
this.bankTypeList = response.data;
for(let i of this.chargeItme){
for(let j of this.bankTypeList){
if(j.dictValue==i.bankType){
i.bankType = j.dictLabel
}
}
}
});
this.getDicts("bank_account_type").then(response => {
this.accountTypeList = response.data;
});
this.getDicts("transfer_type").then(response => {
this.transferTypeList = response.data;
for(let j of this.transferTypeList){
if(j.dictValue==this.form.transferType){
this.form.transferType = j.dictLabel
}
}
});
this.form = this.formList;
if(this.form.cashType==1){
this.form.cashType = "现金提现"
}else if(this.form.cashType==2){
this.form.cashType = "现金使用"
}else if(this.form.cashType==3){
this.form.cashType = "汇票支出"
}

this.chargeItme = this.lists;
if (this.formType == "audit") {
// 如果是审核表单
this.auditStatus=true;
this.isAudit=true;
}else{
this.isAudit=false;
if(this.form.transferType!=null){
this.getTransferProcess(this.form.id)
}else{
this.getCashProcess(this.form.id)
}
}

if(this.form.capitalExpenditureType==2){
this.capitalExpenditureOpen=true
let params
if(this.form.transferType!=null){
params = {
'outId':this.form.id,
'ynType':'1'
}
}else {
params = {
'outId':this.form.id,
'ynType':'2'
}
}
getProjectto(params).then(res => {
this.projectForm = res.data
this.getDicts("project_fund_type").then(response => {
this.projectFundTypeOptions = response.data;
for(let j of this.projectFundTypeOptions){
if(j.dictValue==this.projectForm.projectFundType){
this.projectForm.projectFundType = j.dictLabel
}
}
});
})
}else{
this.capitalExpenditureOpen=false
}
// this.getCashProcess(this.form.id)
this.handleUpdate(this.$route.query.id);
},
methods: {
//查询审批进程
getTransferProcess(id){
getTransferProcess(id).then(res => {
this.processList = res.data.processSchedule
console.log(res.data.processSchedule)
this.processList.乡镇审批时间 = this.processList.乡镇审批时间?this.format(this.processList.乡镇审批时间, "yyyy-MM-dd HH:mm:ss"):""
this.processList.区县审批时间 = this.processList.区县审批时间?this.format(this.processList.区县审批时间, "yyyy-MM-dd HH:mm:ss"):""
this.processList.支付状态时间 = this.processList.支付状态时间?this.format(this.processList.支付状态时间, "yyyy-MM-dd HH:mm:ss"):""
this.processList.入账状态时间 = this.processList.入账状态时间?this.format(this.processList.入账状态时间, "yyyy-MM-dd HH:mm:ss"):""
})
},
//查询审批进程
getCashProcess(id){
getCashProcess(id).then(res => {
this.processList = res.data.processSchedule
this.processList.乡镇审批时间 = this.processList.乡镇审批时间?this.format(this.processList.乡镇审批时间, "yyyy-MM-dd HH:mm:ss"):""
this.processList.区县审批时间 = this.processList.区县审批时间?this.format(this.processList.区县审批时间, "yyyy-MM-dd HH:mm:ss"):""
this.processList.支付状态时间 = this.processList.支付状态时间?this.format(this.processList.支付状态时间, "yyyy-MM-dd HH:mm:ss"):""
this.processList.入账状态时间 = this.processList.入账状态时间?this.format(this.processList.入账状态时间, "yyyy-MM-dd HH:mm:ss"):""
})
},
// 取消按钮
cancel() {
this.recordOpen = false;
this.reset();
this.$emit("refreshList");
},
// 表单重置
reset() {
this.form = {
id: null,
orderId: null,
payer: null,
payerAccount: null,
expenditureAmount: null,
remark: null,
transferStatus: "0",
auditStatus: "0",
paymentState: "1",
bankPriority: "0",
clientPriority: "0",
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 提交按钮 */
submitForm() {
const data = {
taskId: this.form.taskId,
instanceId: this.form.instanceId,
variables: JSON.stringify({
comment: this.comment,
pass: this.pass,
//"formData": this.row,
}),
};
return request({
url: "/activiti/process/complete",
method: "post",
params: data,
}).then((response) => {
if(response.code==200 && response.msg=="操作成功"){
this.msgSuccess("操作成功");
} else{
this.msgSuccess("操作失败");
handleUpdate(id) {
getTransfer(id).then((response) => {
this.form = response.data;
this.processList = {}
this.getTransferProcess(this.$route.query.id);
if(this.form.capitalExpenditureType==2){
this.capitalExpenditureOpen = true
let param={
'outId' : this.form.id,
'ynType' : '1'
}
getProjectto(param).then(res => {
this.projectForm = res.data
this.projectForm.projectFundType+=""
queryTransferDetail(id).then((r) => {
this.chargeItme = r.rows;
this.length = this.chargeItme.length;
this.detailTotal = r.total;
this.loading = false;
});
})
}else{
this.capitalExpenditureOpen = false
queryTransferDetail(id).then((r) => {
this.chargeItme = r.rows;
this.length = this.chargeItme.length;
this.detailTotal = r.total;
this.loading = false;
});
}
this.$emit("getList");
this.$emit("refreshList");

});
},
},
watch: {
pass: function (val) {
this.comment = val === "true" ? "同意" : "驳回";

},
},
}


Yükleniyor…
İptal
Kaydet