|
|
|
@@ -0,0 +1,663 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<van-nav-bar |
|
|
|
left-arrow |
|
|
|
fixed |
|
|
|
placeholder |
|
|
|
@click-left="$router.back(-1)" |
|
|
|
> |
|
|
|
<template #title> |
|
|
|
<p style="font-weight: bold;">查看银行卡转账申请</p> |
|
|
|
</template> |
|
|
|
<template #right> |
|
|
|
<van-icon name="../../../../static/images/sunVillage_info/icon_flow.png" size="20" @click="goFlow"/> |
|
|
|
</template> |
|
|
|
</van-nav-bar> |
|
|
|
<div class="main_box"> |
|
|
|
<p class="main_title"><i></i>基础信息</p> |
|
|
|
<van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" /> |
|
|
|
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> |
|
|
|
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/> |
|
|
|
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> |
|
|
|
<template #input> |
|
|
|
<van-radio-group v-model="form.approvalMode" direction="horizontal"> |
|
|
|
<van-radio name="1">线上审批</van-radio> |
|
|
|
<van-radio name="2">线下审批</van-radio> |
|
|
|
</van-radio-group> |
|
|
|
</template> |
|
|
|
</van-field> |
|
|
|
<van-field v-if="form.approvalMode==1" readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_box" style="margin-top: 10px;"> |
|
|
|
<van-field readonly label="转账附言" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_box" style="margin-top: 10px;"> |
|
|
|
<van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_box" style="margin-top: 10px;"> |
|
|
|
<p class="main_title"><i></i>付款方信息</p> |
|
|
|
<van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="余额" v-model="form.balance" input-align="right" label-width="auto"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> |
|
|
|
<van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" /> |
|
|
|
<van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> |
|
|
|
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> |
|
|
|
</div> |
|
|
|
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> |
|
|
|
<van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" /> |
|
|
|
<van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_box" style="position:relative;margin-top: 10px;"> |
|
|
|
<p class="main_title"><i></i>收款方信息</p> |
|
|
|
<van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" /> |
|
|
|
<van-field readonly label="行内转账" v-if="form.bankType==2||form.bankType==3||form.bankType==4" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" /> |
|
|
|
<div style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength"> |
|
|
|
<van-field readonly label="收款方" v-model="item.payee" input-align="right" /> |
|
|
|
<van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/> |
|
|
|
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" /> |
|
|
|
<van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="转账状态" v-model="item.transferStatus" input-align="right" /> |
|
|
|
<van-field v-if="item.transferStatus=='成功'||item.transferStatus=='失败'" readonly label="交易结果描述" v-model="item.causeFailure" type="textarea" input-align="right" rows="3" label-width="auto" /> |
|
|
|
</div> |
|
|
|
<p class="main_more" v-if="chargeItme.length>1 && showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p> |
|
|
|
<p class="main_more" v-if="chargeItme.length>1 && !showbtn" @click="listLength = 1,showbtn=true">收起列表</p> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="main_box" style="padding: 5px 0 0 0;margin-top: 10px;"> |
|
|
|
<p class="main_title"><i></i>上传附件</p> |
|
|
|
<van-cell value="收据" /> |
|
|
|
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> |
|
|
|
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList1.length" style="margin-left:8px;"> |
|
|
|
<template #preview-cover="file"> |
|
|
|
<div class="preview-cover"> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</van-uploader> |
|
|
|
<van-cell value="发票" /> |
|
|
|
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> |
|
|
|
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList2.length" style="margin-left:8px;"> |
|
|
|
<template #preview-cover="file"> |
|
|
|
<div class="preview-cover"> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</van-uploader> |
|
|
|
<van-cell value="其他" /> |
|
|
|
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader> |
|
|
|
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" @click-preview="previewPreview" :max-count="fileList3.length" style="margin-left:8px;" > |
|
|
|
<template #preview-cover="file"> |
|
|
|
<div class="preview-cover"> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" /> |
|
|
|
<img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</van-uploader> |
|
|
|
</div> |
|
|
|
<div class="main_box" style="padding: 10px 10px;margin-top: 10px;" v-if="form.auditStatus=='3' && form.paymentState=='1'"> |
|
|
|
<div v-if="form.doubleConfirmationStatus == 'Y'"> |
|
|
|
<div v-if="form.doubleConfirmationUser == '' || form.doubleConfirmationUser == null"> |
|
|
|
<p style="text-align: center">等待领导复核中。。。</p> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<p style="text-align: center">{{ form.doubleConfirmationUser +'已于'+form.doubleConfirmationTime +'进行复核。'}}</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="form.doubleConfirmationStatus != 'Y' || !(form.doubleConfirmationUser == '' || form.doubleConfirmationUser == null)"> |
|
|
|
<div v-if="form.bankType == '1' || form.bankType == '2' || form.bankType == '3' || form.bankType == '5' || form.bankType == '9' || form.bankType == '10' || form.bankType == '18'"> |
|
|
|
<van-field label="支付口令" required :rules="[{ required: true , message:'请输入支付口令' }]" v-model="form.accountPassword" placeholder="请输入支付口令" |
|
|
|
input-align="right" label-width="auto"/> |
|
|
|
<div style="margin-top: 10xp;"> |
|
|
|
<van-col span="24" align="center"> |
|
|
|
<van-button type="info" :disabled="paySubmitDisabled1 || form.accountPassword == null || form.accountPassword == undefined || form.accountPassword == ''" |
|
|
|
@click="paySubmit">支<i style="margin-right: 1em;"></i>付</van-button> |
|
|
|
</van-col> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<van-field label="验证码" required :rules="[{ required: true , message:'请输入验证码' }]" v-model="form.alternateField1" placeholder="请输入验证码" input-align="right" label-width="auto"/> |
|
|
|
<template v-if="smsStatus"> |
|
|
|
<p style="color: red;font-size: 14PX;margin-right: 5px;text-align: center">*验证码三分钟内有效</p> |
|
|
|
</template> |
|
|
|
<van-row> |
|
|
|
<van-col span="12" align="center"> |
|
|
|
<van-button type="primary" :disabled="sms_disabled" @click="getSendSms">{{smsText}}</van-button> |
|
|
|
</van-col> |
|
|
|
<van-col span="12" align="center"> |
|
|
|
<van-button type="info" v-if="smsStatus" :disabled="paySubmitDisabled || form.alternateField1 == null || form.alternateField1 == undefined || form.alternateField1 == ''" |
|
|
|
@click="paySubmit">支<i style="margin-right: 1em;"></i>付</van-button> |
|
|
|
</van-col> |
|
|
|
</van-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { getCashierAccount,getTransfer ,pay, queryTransferDetail , listPayee , editDoubleConfirmationStatus , getProjectto , sendSms , addProjectto , customSubmit,getInfoto,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval"; |
|
|
|
import request from '@/utils/request' |
|
|
|
import { |
|
|
|
attachmentList, |
|
|
|
commonAttach, |
|
|
|
systemAttachment |
|
|
|
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; |
|
|
|
export default { |
|
|
|
name: "approvalDetail", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
clickOut:true, |
|
|
|
payStatus:false, |
|
|
|
smsStatus:false, |
|
|
|
sms_disabled:false, |
|
|
|
getPayStatus:false, |
|
|
|
smsText:'发送验证码', |
|
|
|
paySubmitDisabled:true, |
|
|
|
paySubmitDisabled1:false, |
|
|
|
|
|
|
|
showcapital:false, |
|
|
|
showpayee:false, |
|
|
|
showlasj:false, |
|
|
|
showbankType:false, |
|
|
|
showproject:false, |
|
|
|
showFundType:false, |
|
|
|
showbtn:true, |
|
|
|
|
|
|
|
listLength:1, |
|
|
|
|
|
|
|
minDate: new Date(), |
|
|
|
maxDate: new Date(2025, 10, 1), |
|
|
|
currentDate: new Date(), |
|
|
|
form:{}, |
|
|
|
fileList1:[], |
|
|
|
fileList2:[], |
|
|
|
fileList3:[], |
|
|
|
capitalExpenditureType:'', |
|
|
|
payee:'', |
|
|
|
bankType:'', |
|
|
|
|
|
|
|
wfydlxDictionaries:[], |
|
|
|
jglxDictionaries:[], |
|
|
|
sysDictionaries:[], |
|
|
|
capitalExpenditureTypeOptions:[], |
|
|
|
bankTypeDictionaries:[], |
|
|
|
projectList:[], |
|
|
|
projectFundTypeOptions:[], |
|
|
|
transferStatusOptions:[], |
|
|
|
projectFundTypeDictionaries:[], |
|
|
|
projectList:[], |
|
|
|
|
|
|
|
chargeItme:[], |
|
|
|
chargeItmeShow:[], |
|
|
|
|
|
|
|
payeeList:[], |
|
|
|
// 查询参数 |
|
|
|
queryParams: { |
|
|
|
transferType:"", |
|
|
|
orderByColumn: "id", |
|
|
|
isAsc: "desc", |
|
|
|
}, |
|
|
|
capitalExpenditureOpen:false, |
|
|
|
contractOpen:false, |
|
|
|
projectForm:{ |
|
|
|
projectId:null, |
|
|
|
projectName:null, |
|
|
|
projectContractor:null, |
|
|
|
projectAmount:null, |
|
|
|
projectBillNum:null, |
|
|
|
projectFundType:'1', |
|
|
|
outId:null, |
|
|
|
ynType:'1' |
|
|
|
}, |
|
|
|
infoForm:{ |
|
|
|
infoId:null, |
|
|
|
name:null, |
|
|
|
code:null, |
|
|
|
totalAmount:null, |
|
|
|
contractionId:null, |
|
|
|
transferId:null |
|
|
|
}, |
|
|
|
projectFundType:'', |
|
|
|
templateList:[], |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getDicts("project_fund_type").then((response) => { |
|
|
|
for (var i = 0; i < response.data.length; i++) { |
|
|
|
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); |
|
|
|
} |
|
|
|
this.projectFundTypeDictionaries = response.data; |
|
|
|
}); |
|
|
|
this.getDicts("transfer_status").then((response) => { |
|
|
|
this.transferStatusOptions = response.data; |
|
|
|
}); |
|
|
|
this.getDictionaries(); |
|
|
|
this.getFileList(); |
|
|
|
this.getTemplateList(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getTemplateList(){ |
|
|
|
let templateQueryParams = { |
|
|
|
// 分页 |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 999, |
|
|
|
}; |
|
|
|
listTemplate(templateQueryParams).then(response => { |
|
|
|
this.templateList = response.rows; |
|
|
|
}); |
|
|
|
}, |
|
|
|
paySubmit(){ |
|
|
|
this.diglogStatus = false; |
|
|
|
this.paySubmitDisabled = true; |
|
|
|
this.paySubmitDisabled1 = true; |
|
|
|
const id = this.form.id; |
|
|
|
this.queryParams.id = id; |
|
|
|
this.queryParams.alternateField1 = this.form.alternateField1; |
|
|
|
let queryParams = this.queryParams; |
|
|
|
var that = this; |
|
|
|
// that.payLoading = this.$loading({ |
|
|
|
// lock: true, |
|
|
|
// text: '正在支付', |
|
|
|
// spinner: 'el-icon-loading', |
|
|
|
// background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
// }); |
|
|
|
pay(queryParams).then((response) => { |
|
|
|
// that.payLoading.close(); |
|
|
|
this.$toast.success("支付成功,请等待银行进行处理,稍后可通过查询结果按钮查询银行处理结果。"); |
|
|
|
clearTimeout(this.sms_timer); |
|
|
|
this.open = false; |
|
|
|
this.smsStatus = false; |
|
|
|
this.sms_disabled = false; |
|
|
|
this.smsText = "发送验证码"; |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},1000) |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
// that.payLoading.close(); |
|
|
|
if(err.toString().indexOf('错误代码:-1') == -1 && err.toString().indexOf('错误代码:-2') == -1){ |
|
|
|
this.getList(); |
|
|
|
clearTimeout(this.sms_timer); |
|
|
|
this.open = false; |
|
|
|
this.smsStatus = false; |
|
|
|
this.sms_disabled = false; |
|
|
|
this.smsText = "发送验证码"; |
|
|
|
} |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(-1) |
|
|
|
},2000) |
|
|
|
}); |
|
|
|
}, |
|
|
|
getSendSms(){ |
|
|
|
clearTimeout(this.sms_timer); |
|
|
|
this.form.alternateField1 = ''; |
|
|
|
this.sms_time = 60; |
|
|
|
this.clickOut = false; |
|
|
|
this.sms_disabled = true; |
|
|
|
const id = this.form.id; |
|
|
|
const bankType = this.form.bankType; |
|
|
|
this.queryParams.id = id; |
|
|
|
this.queryParams.bankType = bankType; |
|
|
|
let queryParams = this.queryParams; |
|
|
|
sendSms(queryParams).then(res=>{ |
|
|
|
console.log(res.msg) |
|
|
|
if (res.msg.indexOf('短信发送失败') == -1){ |
|
|
|
this.paySubmitDisabled = false; |
|
|
|
this.$toast.success(res.msg); |
|
|
|
this.smsStatus = true; |
|
|
|
this.smsText = this.sms_time+'s后可重新发送'; |
|
|
|
this.sms_timer = setInterval(()=>{ |
|
|
|
this.sms_time--; |
|
|
|
this.smsText = this.sms_time+'s后可重新发送'; |
|
|
|
if (this.sms_time == 0){ |
|
|
|
clearInterval(this.sms_timer); |
|
|
|
this.sms_time = 60 ; |
|
|
|
this.smsText = '发送验证码'; |
|
|
|
this.sms_disabled = false; |
|
|
|
this.clickOut = true; |
|
|
|
} |
|
|
|
},1000) |
|
|
|
}else{ |
|
|
|
this.sms_disabled = false; |
|
|
|
console.log(res.msg) |
|
|
|
this.$toast.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
editDoubleConfirmationStatus(){ |
|
|
|
let id = this.form.id |
|
|
|
editDoubleConfirmationStatus(id).then(response => { |
|
|
|
if(res.code = 200){ |
|
|
|
this.$toast.success(response.msg); |
|
|
|
setTimeout(function(){ |
|
|
|
history.go(0) |
|
|
|
},2000) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
tempalteFormat(id){ |
|
|
|
let name = "" |
|
|
|
this.templateList.map(res => { |
|
|
|
if(res.id==id){ |
|
|
|
console.log(res.name) |
|
|
|
name = res.name |
|
|
|
} |
|
|
|
}) |
|
|
|
return name |
|
|
|
}, |
|
|
|
goFlow(){ |
|
|
|
window.location='approvalProcess?id='+this.$route.query.id+'&auditbatchNo='+this.$route.query.auditbatchNo; |
|
|
|
}, |
|
|
|
previewPreview(file, index, len) { |
|
|
|
const baseImgUrl = this.$store.getters.baseRoutingUrl; |
|
|
|
if (file.url) { |
|
|
|
//已上传文件 |
|
|
|
let fileName = file.file.name || file.url; |
|
|
|
let subIndex = fileName.lastIndexOf("."); |
|
|
|
let ext = fileName.substring(subIndex + 1, fileName.length); |
|
|
|
let imgi = file.listIndex |
|
|
|
//console.log(ext) |
|
|
|
let allUrl = file.url; |
|
|
|
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ |
|
|
|
const link = document.createElement("a"); |
|
|
|
link.style.display = "none"; |
|
|
|
link.target = "_blank" |
|
|
|
link.href = allUrl; |
|
|
|
document.body.appendChild(link); |
|
|
|
link.click(); |
|
|
|
document.body.removeChild(link); |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
//新上传文件 |
|
|
|
let fileName = file.file.name; |
|
|
|
// console.info(file.file.name) |
|
|
|
let subIndex = fileName.lastIndexOf("."); |
|
|
|
let ext = fileName.substring(subIndex + 1, fileName.length); |
|
|
|
if(ext !== 'jpg' && ext !== 'png' && ext !== 'gif' && ext !== 'svg' && ext !== 'ico' && ext !== 'bmp'){ |
|
|
|
let type = this.getfileType(ext); |
|
|
|
// 将文件转换为base64编码 |
|
|
|
this.fileToBase64(file.file, ext).then(res => { |
|
|
|
this.downloadFile(res, fileName, ext, type); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
getfileType(type) { |
|
|
|
switch (type) { |
|
|
|
case 'txt': |
|
|
|
return 'text/plain'; |
|
|
|
case 'doc': |
|
|
|
return 'application/msword'; |
|
|
|
case 'docx': |
|
|
|
return 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; |
|
|
|
case 'xls': |
|
|
|
return 'application/vnd.ms-excel'; |
|
|
|
case 'xlsx': |
|
|
|
return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; |
|
|
|
case 'pdf': |
|
|
|
return 'application/pdf'; |
|
|
|
case 'pptx': |
|
|
|
return 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; |
|
|
|
case 'png': |
|
|
|
return 'image/png'; |
|
|
|
case 'jpg': |
|
|
|
return 'image/jpeg'; |
|
|
|
case 'gif': |
|
|
|
return 'image/gif'; |
|
|
|
case 'svg': |
|
|
|
return 'image/svg+xml'; |
|
|
|
case 'ico': |
|
|
|
return 'image/x-icon'; |
|
|
|
case 'bmp': |
|
|
|
return 'image/bmp,'; |
|
|
|
} |
|
|
|
}, |
|
|
|
downloadFile(base64, fileName, fileType, mimetype) { |
|
|
|
const typeHeader = 'data:application/' + fileType + ';base64,'; |
|
|
|
const blob = this.base64ToBlob(base64, mimetype); |
|
|
|
this.downloadFileDownload(blob, fileName, fileType); |
|
|
|
}, |
|
|
|
base64ToBlob(base64, mime) { |
|
|
|
//解码base64得到二进制字符串 |
|
|
|
|
|
|
|
let raw = window.atob(base64.substring(base64.indexOf(',') + 1)); |
|
|
|
let rawLength = raw.length |
|
|
|
//创建8位无符号整数值的类型化数组 |
|
|
|
let uInt8Array = new Uint8Array(rawLength) |
|
|
|
for (let i = 0; i < rawLength; ++i) { |
|
|
|
uInt8Array[i] = raw.charCodeAt(i); |
|
|
|
} |
|
|
|
return new Blob([uInt8Array], {type: mime}) |
|
|
|
}, |
|
|
|
downloadFileDownload(blob, fileName, fileType) { |
|
|
|
const downloadElement = document.createElement('a'); |
|
|
|
let href = blob; |
|
|
|
if (typeof blob === 'string') { |
|
|
|
downloadElement.target = '_blank' |
|
|
|
} else { |
|
|
|
href = window.URL.createObjectURL(blob) |
|
|
|
} |
|
|
|
downloadElement.href = href; |
|
|
|
downloadElement.download = fileName + '.' + fileType;//下载后文件名 |
|
|
|
document.body.appendChild(downloadElement); |
|
|
|
downloadElement.click(); |
|
|
|
document.body.removeChild(downloadElement) |
|
|
|
if (typeof blob !== 'string') { |
|
|
|
window.URL.revokeObjectURL(href) |
|
|
|
} |
|
|
|
}, |
|
|
|
fileToBase64(file,fileType){ |
|
|
|
return new Promise((resolve,reject)=>{ |
|
|
|
//创建一个新的FileReader 对象 |
|
|
|
const reader = new FileReader(); |
|
|
|
//读取file对象 |
|
|
|
reader.readAsDataURL(file); |
|
|
|
reader.onload=function () { |
|
|
|
const base64String = reader.result.split(",")[1]; |
|
|
|
resolve('data:application/' + fileType + ';base64,'+base64String); |
|
|
|
} |
|
|
|
reader.onerror=function () { |
|
|
|
reject(new Error("Failed to load file") ) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getDictionaries(){ |
|
|
|
getTransfer(this.$route.query.id).then((response) => { |
|
|
|
getCashierAccount(response.data.cashierId).then(res => { |
|
|
|
this.form.balance = res.data.balance |
|
|
|
}) |
|
|
|
this.getDicts("capital_expenditure_type").then((res) => { |
|
|
|
for (var i = 0; i < res.data.length; i++) { |
|
|
|
this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); |
|
|
|
} |
|
|
|
this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType); |
|
|
|
}); |
|
|
|
if(response.data.capitalExpenditureType==2){ |
|
|
|
this.capitalExpenditureOpen = true |
|
|
|
let param={ |
|
|
|
'outId' : response.data.id, |
|
|
|
'ynType' : '1' |
|
|
|
} |
|
|
|
getProjectto(param).then(res => { |
|
|
|
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); |
|
|
|
this.projectForm = res.data |
|
|
|
}) |
|
|
|
}else if(response.data.capitalExpenditureType==4) { |
|
|
|
this.contractOpen = true |
|
|
|
let param = { |
|
|
|
'transferId': response.data.id |
|
|
|
} |
|
|
|
getInfoto(param).then(res => { |
|
|
|
this.infoForm = res.data |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
this.showproject = false |
|
|
|
} |
|
|
|
this.form = response.data; |
|
|
|
}); |
|
|
|
queryTransferDetail(this.$route.query.id).then((response) => { |
|
|
|
this.getDicts("bank_type_all").then(res => { |
|
|
|
for (var i = 0; i < res.data.length; i++) { |
|
|
|
this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue}); |
|
|
|
} |
|
|
|
for (var j = 0 ; j < response.rows.length ; j++){ |
|
|
|
response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType); |
|
|
|
response.rows[j].transferStatus = this.selectDictLabel(this.transferStatusOptions, response.rows[j].transferStatus); |
|
|
|
} |
|
|
|
this.chargeItme = response.rows; |
|
|
|
}); |
|
|
|
this.getPayeeList(); |
|
|
|
}); |
|
|
|
}, |
|
|
|
getPayeeList() { |
|
|
|
//普通转账 |
|
|
|
this.queryParams.accountType = this.form.accountType |
|
|
|
this.queryParams.status = "0" |
|
|
|
listPayee(this.queryParams).then((response) => { |
|
|
|
for (var i = 0; i < response.rows.length; i++) { |
|
|
|
this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
getFileList(){ |
|
|
|
let oData1= { |
|
|
|
tableId: this.$route.query.id, |
|
|
|
tableName: "t_yinnong_transfer", |
|
|
|
bizPath: "transfer", |
|
|
|
fileType: "1", |
|
|
|
} |
|
|
|
attachmentList(oData1).then(res => { |
|
|
|
res.rows.map(r => { |
|
|
|
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL |
|
|
|
let subIndex = r.fileName.lastIndexOf("."); |
|
|
|
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); |
|
|
|
this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
let oData2= { |
|
|
|
tableId: this.$route.query.id, |
|
|
|
tableName: "t_yinnong_transfer", |
|
|
|
bizPath: "transfer", |
|
|
|
fileType: "2", |
|
|
|
} |
|
|
|
attachmentList(oData2).then(res => { |
|
|
|
res.rows.map(r => { |
|
|
|
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL |
|
|
|
let subIndex = r.fileName.lastIndexOf("."); |
|
|
|
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); |
|
|
|
this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
let oData3= { |
|
|
|
tableId: this.$route.query.id, |
|
|
|
tableName: "t_yinnong_transfer", |
|
|
|
bizPath: "transfer", |
|
|
|
fileType: "3", |
|
|
|
} |
|
|
|
attachmentList(oData3).then(res => { |
|
|
|
res.rows.map(r => { |
|
|
|
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL |
|
|
|
let subIndex = r.fileName.lastIndexOf("."); |
|
|
|
let ext = r.fileName.substring(subIndex + 1, r.fileName.length); |
|
|
|
this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
goBack(){ |
|
|
|
window.history.go(-1) |
|
|
|
}, |
|
|
|
//删除家庭成员 |
|
|
|
deleteChargeItme(index){ |
|
|
|
this.chargeItme.splice(index,1) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
.app-container { |
|
|
|
padding: 2% 0; |
|
|
|
} |
|
|
|
/deep/ .van-nav-bar{ |
|
|
|
background: linear-gradient(to right , #9EF7FF , #2637D8); |
|
|
|
p,i{ |
|
|
|
color: #ffffff; |
|
|
|
} |
|
|
|
} |
|
|
|
.main_more{ |
|
|
|
width: 96%; |
|
|
|
margin: 0 auto; |
|
|
|
margin-top: 10px; |
|
|
|
border-radius: 6px; |
|
|
|
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); |
|
|
|
overflow: hidden; |
|
|
|
background-color: #FFF; |
|
|
|
text-align: center; |
|
|
|
padding: 10PX 0; |
|
|
|
} |
|
|
|
.main_title{ |
|
|
|
font-size: 0.45rem; |
|
|
|
color: #333333; |
|
|
|
margin: 0.4rem 3% 0.2rem; |
|
|
|
position: relative; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
i{ |
|
|
|
display: block; |
|
|
|
width: 3PX; |
|
|
|
height: 0.4rem; |
|
|
|
background-color: #4B72E4; |
|
|
|
margin-right: 10PX; |
|
|
|
} |
|
|
|
} |
|
|
|
.main_box{ |
|
|
|
width: 96%; |
|
|
|
margin: 0 auto; |
|
|
|
border-radius: 6px; |
|
|
|
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16); |
|
|
|
overflow: hidden; |
|
|
|
background-color: #FFF; |
|
|
|
} |
|
|
|
.submitButton{ |
|
|
|
width: 80%; |
|
|
|
margin: 0 auto; |
|
|
|
background-color: #1D6FE9; |
|
|
|
} |
|
|
|
|
|
|
|
.addFamily{ |
|
|
|
position: absolute; |
|
|
|
top: -2px; |
|
|
|
right: 0; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
.deleteFamily{ |
|
|
|
position: absolute; |
|
|
|
top: 0rem; |
|
|
|
right: 6%; |
|
|
|
z-index: 9; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
</style> |