|
|
@@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|