Browse Source

问题修改

wulanhaote
庞东旭 3 years ago
parent
commit
976a726c56
7 changed files with 108 additions and 49 deletions
  1. +7
    -0
      src/api/onlineHome/bankAgriculture/paymentApproval.js
  2. +1
    -1
      src/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountDetail.vue
  3. +14
    -10
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue
  4. +2
    -2
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval.vue
  5. +22
    -3
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalList.vue
  6. +61
    -32
      src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify.vue
  7. +1
    -1
      src/views/onlineHome/done.vue

+ 7
- 0
src/api/onlineHome/bankAgriculture/paymentApproval.js View File

@@ -125,3 +125,10 @@ export function approval(data) {
params:data
})
}
// 删除银行转账
export function delTransfer(id) {
return request({
url: '/yinnong/transfer/remove/' + id,
method: 'get'
})
}

+ 1
- 1
src/views/onlineHome/bankAgriculture/paymentAccount/paymentAccountDetail.vue View File

@@ -7,7 +7,7 @@
@click-left="$router.back(-1)"
>
<template #title>
<p style="font-weight: bold;">出纳账户查看</p>
<p style="font-weight: bold;">付款账户查看</p>
</template>
</van-nav-bar>
<p class="main_title">基础信息</p>


+ 14
- 10
src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd.vue View File

@@ -223,11 +223,11 @@
<van-row>
<van-col span="12" align="center">
<!-- @click="goUpdate"-->
<van-button type="info" native-type="submit" ref="submit" name="aaa" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
<van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
</van-col>
<van-col span="12" align="center">
<!-- @click="goAdd"-->
<van-button type="info" native-type="submit" ref="submit" name="bbb" class="submitButton">保存并提交</van-button>
<van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button>
</van-col>
</van-row>
<div class="clear"></div>
@@ -250,6 +250,8 @@
showFundType:false,
showpayer:false,

buttonType:'a',

minDate: new Date(),
maxDate: new Date(2025, 10, 1),
currentDate: new Date(),
@@ -366,8 +368,14 @@
}
},
getChange(){
console.log(this.$refs.submit)

console.log(this.buttonType)
if(this.buttonType == 'update'){
console.log('update')
this.goUpdate();
}else if(this.buttonType == 'add'){
console.log('add')
this.goAdd();
}
},
getDictionaries(){
this.getDicts("capital_expenditure_type").then((res) => {
@@ -521,8 +529,6 @@
this.$set(this.form, "expenditureAmount", total);
},
goAdd(){
console.log('aaa');
return;
if(this.chargeItme.length<1){
this.$notify({ type: 'danger', message: '请添加收款方信息' });
return;
@@ -568,8 +574,6 @@
});
},
goUpdate(){
console.log('aaa');
return;
if(this.chargeItme.length<1){
this.$notify({ type: 'danger', message: '请添加收款方信息' });
return;
@@ -598,13 +602,13 @@
this.$set(this.projectForm, "ynType", '1');
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('修改成功');
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}else{
this.$toast.success('修改成功');
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)


+ 2
- 2
src/views/onlineHome/bankAgriculture/paymentApproval/approvalApproval.vue View File

@@ -58,7 +58,7 @@
</div>
</div>

<div class="main_box examine_box">
<div class="main_box examine_box" v-if="this.$route.query.type != 'done'">
<van-row type="flex" justify="space-between" align="center">
<van-col span="5">审批<br/>意见</van-col>
<van-col span="19">
@@ -71,7 +71,7 @@
</van-row>
</div>

<div style="margin: 16px 2%;">
<div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'">
<van-row>
<van-col span="24" align="center">
<van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button>


+ 22
- 3
src/views/onlineHome/bankAgriculture/paymentApproval/approvalList.vue View File

@@ -35,6 +35,9 @@
<van-col>
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="修改" type="info" :to="{name:'approvalModify', query: {id:item.id}}" class="delete-button" />
</van-col>
<van-col>
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" color="#FFA63E" square text="提交" type="info" @click="onSubmit(item.id)" class="delete-button" />
</van-col>
<van-col>
<van-button v-if="item.auditStatus=='草稿'||item.auditStatus=='驳回'" square text="删除" type="danger" @click="deleteList(item.id,index)" class="delete-button" />
</van-col>
@@ -46,7 +49,7 @@
</template>

<script>
import { listTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval";
import { listTransfer , customSubmit , delTransfer } from "@/api/onlineHome/bankAgriculture/paymentApproval";
export default {
name: "approvalList",
data() {
@@ -92,12 +95,12 @@ export default {
},
deleteList(id,index){
this.$dialog.confirm({
message: '您确认删除申请草稿?',
message: '您确认删除草稿?',
})
.then(() => {
// on confirm
this.applicationList.splice(index,1)
removeList(id).then(res => {
delTransfer(id).then(res => {
if(res.code = 200){
this.$toast.success('删除成功');
}
@@ -106,6 +109,22 @@ export default {
.catch(() => {
// on cancel
});
},
onSubmit(id){
this.$dialog.confirm({
message: '您确认提交草稿?',
})
.then(() => {
customSubmit(id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(0)
},2000)
})
})
.catch(() => {
// on cancel
});
}
},
}


+ 61
- 32
src/views/onlineHome/bankAgriculture/paymentApproval/approvalModify.vue View File

@@ -10,14 +10,14 @@
<p style="font-weight: bold;">修改付款申请</p>
</template>
</van-nav-bar>
<van-form>
<van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first>
<p class="main_title">基础信息</p>
<div class="main_box">
<van-field
readonly
clickable
required
:rules="[{ required: true }]"
:rules="[{ required: true , message:'请选择申请时间' }]"
v-model="form.applyDate"
label="申请时间"
placeholder="请选择申请时间"
@@ -39,7 +39,7 @@
readonly
clickable
required
:rules="[{ required: true }]"
:rules="[{ required: true , message:'请选择资金支出类别' }]"
label="资金支出类别"
placeholder="请选择"
v-model="capitalExpenditureType"
@@ -78,12 +78,12 @@
rows="3"
label-width="auto"
required
:rules="[{ required: true }]"
:rules="[{ required: true , message:'请输入付款事由' }]"
/>
</div>

<div class="main_box" style="margin-top: 10px;">
<van-field required :rules="[{ required: true }]" label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/>
<van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/>
</div>

<p class="main_title" v-if="capitalExpenditureOpen">关联项目</p>
@@ -97,6 +97,8 @@
@click="showproject = true"
input-align="right"
right-icon="arrow-down"
required
:rules="[{ required: true , message:'请选择项目名称' }]"
/>
<van-popup v-model="showproject" position="bottom">
<van-picker
@@ -106,8 +108,8 @@
@cancel="showproject = false"
/>
</van-popup>
<van-field v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
<van-field v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入合同价款(元)' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
<van-field
readonly
clickable
@@ -117,6 +119,8 @@
@click="showFundType = true"
input-align="right"
right-icon="arrow-down"
required
:rules="[{ required: true , message:'请选择工程款类型' }]"
/>
<van-popup v-model="showFundType" position="bottom">
<van-picker
@@ -126,7 +130,7 @@
@cancel="showFundType = false"
/>
</van-popup>
<van-field v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/>
</div>
<p class="main_title">付款方信息</p>
<div class="main_box">
@@ -142,7 +146,7 @@
right-icon="arrow-down"
label-width="auto"
required
:rules="[{ required: true }]"
:rules="[{ required: true , message:'请选择付款方' }]"
/>
<van-popup v-model="showpayer" position="bottom">
<van-picker
@@ -152,7 +156,7 @@
@cancel="showpayer = false"
/>
</van-popup>
<van-field :rules="[{ required: true }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field :rules="[{ required: true , message:'请输入账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
</div>

<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p>
@@ -180,7 +184,7 @@
input-align="right"
right-icon="arrow-down"
required
:rules="[{ required: true }]"
:rules="[{ required: true , message:'请选择收款方' }]"
/>
<van-popup v-model="item.showPayee" position="bottom">
<van-picker
@@ -190,9 +194,9 @@
@cancel="item.showPayee = false"
/>
</van-popup>
<van-field required :rules="[{ required: true }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
<van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
<van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
<van-field
readonly
clickable
@@ -203,7 +207,7 @@
input-align="right"
right-icon="arrow-down"
required
:rules="[{ required: true }]"
:rules="[{ required: true , message:'请选择所属银行' }]"
/>
<van-popup v-model="item.showbankType" position="bottom">
<van-picker
@@ -215,18 +219,19 @@
</van-popup>
</div>
</div>

<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
</van-col>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button>
</van-col>
</van-row>
<div class="clear"></div>
</div>
</van-form>
<div style="padding: 16px 0;">
<van-row>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" @click="goUpdate" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
</van-col>
<van-col span="12" align="center">
<van-button type="info" native-type="submit" @click="goAdd" class="submitButton">保存并提交</van-button>
</van-col>
</van-row>
<div class="clear"></div>
</div>
</div>
</template>

@@ -253,6 +258,8 @@
payee:'',
bankType:'',

buttonType:'a',

wfydlxDictionaries:[],
jglxDictionaries:[],
sysDictionaries:[],
@@ -361,6 +368,20 @@
this.getPayeeList();
});
},
getChange(){
console.log(this.buttonType)
if(this.buttonType == 'update'){
console.log('update')
this.goUpdate();
}else if(this.buttonType == 'add'){
console.log('add')
this.goAdd();
}
},
getError(e){
console.log(e)
this.$notify({ type: 'danger', message: e.errors[0].message });
},
addChargeItme(index){
if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){
this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' });
@@ -497,17 +518,21 @@
this.$set(this.form, "expenditureAmount", total);
},
goAdd(){
if(this.chargeItme.length<1){
this.$notify({ type: 'danger', message: '请添加收款方信息' });
return;
}
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
this.$toast.error("付款事由禁止包含|。");
this.$notify({ type: 'danger', message: '付款事由禁止包含!' });
return;
}
if(this.form.capitalExpenditureType==2){
if(this.projectForm.projectName==""||this.projectForm.projectName==null){
this.$toast.error('请选择项目名称!');
this.$notify({ type: 'danger', message: '请选择项目名称!' });
return;
}
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
this.$toast.error('请输入工程发票号!');
this.$notify({ type: 'danger', message: '请输入工程发票号!' });
return;
}
}
@@ -541,17 +566,21 @@
});
},
goUpdate(){
if(this.chargeItme.length<1){
this.$notify({ type: 'danger', message: '请添加收款方信息' });
return;
}
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
this.$toast.error("付款事由禁止包含|。");
this.$notify({ type: 'danger', message: '付款事由禁止包含!' });
return;
}
if(this.form.capitalExpenditureType==2){
if(this.projectForm.projectName==""||this.projectForm.projectName==null){
this.$toast.error('请选择项目名称!');
this.$notify({ type: 'danger', message: '请选择项目名称!' });
return;
}
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
this.$toast.error('请输入工程发票号!');
this.$notify({ type: 'danger', message: '请输入工程发票号!' });
return;
}
}


+ 1
- 1
src/views/onlineHome/done.vue View File

@@ -130,7 +130,7 @@
this.$router.push({name:'approvalForm',query: {id:item.formData.id}})
break;
case 'yinnong_transfer':
this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId}})
this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
break;
}
}


Loading…
Cancel
Save