@@ -91,6 +91,14 @@ export function treeselectByUser(query) { | |||||
params: query | params: query | ||||
}) | }) | ||||
} | } | ||||
//获取区、镇、村地区 | |||||
export function bookListByDeptId(query) { | |||||
return request({ | |||||
url: '/finance/book/listByDeptId', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
//获取村的经纬度 | //获取村的经纬度 | ||||
@@ -89,7 +89,14 @@ export function listProject(query) { | |||||
params: query | params: query | ||||
}) | }) | ||||
} | } | ||||
// 通过外部信息查询合同信息 | |||||
export function getInfoto(query) { | |||||
return request({ | |||||
url: '/contraction/info/selectInfoByOutId/', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 新增工程项目关联关系 | // 新增工程项目关联关系 | ||||
export function addProjectto(data) { | export function addProjectto(data) { | ||||
return request({ | return request({ | ||||
@@ -98,7 +105,14 @@ export function addProjectto(data) { | |||||
data: data | data: data | ||||
}) | }) | ||||
} | } | ||||
// 新增关联合同 | |||||
export function addInfoto(data) { | |||||
return request({ | |||||
url: '/contraction/info/relationAdd', | |||||
method: 'post', | |||||
data: data | |||||
}) | |||||
} | |||||
// 提交审批 | // 提交审批 | ||||
export function customSubmit(id) { | export function customSubmit(id) { | ||||
return request({ | return request({ | ||||
@@ -286,7 +300,15 @@ export function listAccount(query) { | |||||
// 查询村虚拟出纳账户设置列表 | // 查询村虚拟出纳账户设置列表 | ||||
export function listAccount1(query) { | export function listAccount1(query) { | ||||
return request({ | return request({ | ||||
url: '/cashier/account/list1', | |||||
url: '/cashier/account/list', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} | |||||
// 查询合同信息列表 | |||||
export function listInfo(query) { | |||||
return request({ | |||||
url: '/contraction/info/list', | |||||
method: 'get', | method: 'get', | ||||
params: query | params: query | ||||
}) | }) | ||||
@@ -36,3 +36,11 @@ export function changeDept(query) { | |||||
params: query | params: query | ||||
}) | }) | ||||
} | } | ||||
// 切换账套 | |||||
export function changeBook(query) { | |||||
return request({ | |||||
url: '/system/user/changeBook', | |||||
method: 'get', | |||||
params: query | |||||
}) | |||||
} |
@@ -76,7 +76,9 @@ service.interceptors.response.use(res => { | |||||
window.location.href = '/authenticRight/login'; | window.location.href = '/authenticRight/login'; | ||||
} else if (window.location.href.indexOf('homesteadSurvey')!= -1) { | } else if (window.location.href.indexOf('homesteadSurvey')!= -1) { | ||||
window.location.href = '/homesteadLogin'; | window.location.href = '/homesteadLogin'; | ||||
} else { | |||||
} else if (window.location.href.indexOf('onlineHome')!= -1) { | |||||
window.location.href = '/onlineHomeLogin'; | |||||
}else { | |||||
// 农村宅基地调查 | // 农村宅基地调查 | ||||
window.location.href = '/homesteadLogin'; | window.location.href = '/homesteadLogin'; | ||||
@@ -295,7 +295,7 @@ | |||||
</van-field> | </van-field> | ||||
<van-field name="uploader" label="宅基地现场照片" autocomplete="off"> | <van-field name="uploader" label="宅基地现场照片" autocomplete="off"> | ||||
<template #input> | <template #input> | ||||
<van-uploader v-model="fileListzjd" :after-read="beforeReadzjd" multiple @delete="deleteFilezjd" :max-count="20"></van-uploader> | |||||
<van-uploader v-model="fileListzjd" :after-read="beforeReadzjd" multiple @delete="deleteFilezjd" :max-count="20" accept="image/*"></van-uploader> | |||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
<van-field | <van-field | ||||
@@ -3649,7 +3649,7 @@ | |||||
listNmfw(params).then(r => { | listNmfw(params).then(r => { | ||||
if(r.rows.length>0){ | if(r.rows.length>0){ | ||||
this.$toast({ | this.$toast({ | ||||
icon: 'erroe', // 找到自己需要的图标 | |||||
type: 'fail',// 找到自己需要的图标 | |||||
message: '无法删除,此自然幢下有房屋信息!', | message: '无法删除,此自然幢下有房屋信息!', | ||||
duration:"1000", | duration:"1000", | ||||
onClose:function(){ | onClose:function(){ | ||||
@@ -4357,8 +4357,9 @@ | |||||
}); | }); | ||||
}, | }, | ||||
showPopupnh(item){ | showPopupnh(item){ | ||||
this.shownh = true; | |||||
if(item==""){ | if(item==""){ | ||||
this.shownh = true; | |||||
let params = { | let params = { | ||||
"deptId" : this.item.deptId | "deptId" : this.item.deptId | ||||
} | } | ||||
@@ -4396,68 +4397,78 @@ | |||||
nhdm:item.nhdm | nhdm:item.nhdm | ||||
} | } | ||||
listNh(params).then((response) => { | listNh(params).then((response) => { | ||||
this.nhform = response.rows[0] | |||||
if(this.nhform.hzzjlx==null||this.nhform.hzzjlx==''){ | |||||
this.nhform.hzzjlx = '01' | |||||
this.nhform.hzzjlxName = '身份证' | |||||
} | |||||
if(this.nhform.hyzk==null||this.nhform.hyzk==''){ | |||||
this.nhform.hyzk = '02' | |||||
} | |||||
if(this.nhform.occupation==null||this.nhform.occupation==''){ | |||||
this.nhform.occupation = '1' | |||||
this.nhform.occupationName = '务农' | |||||
} | |||||
if(this.nhform.jzqk==null||this.nhform.jzqk==''){ | |||||
this.nhform.jzqk = '3' | |||||
this.nhform.jzqkName = '常年居住' | |||||
} | |||||
if(this.nhform.jzhcssfyzf==null||this.nhform.jzhcssfyzf==''){ | |||||
this.nhform.jzhcssfyzf = '1' | |||||
this.nhform.jzhcssfyzfName = '无住房' | |||||
} | |||||
if(this.nhform.zqtczsfyzf==null||this.nhform.zqtczsfyzf==''){ | |||||
this.nhform.zqtczsfyzf = 'Y' | |||||
} | |||||
if(this.nhform.sfbccm==null||this.nhform.sfbccm==''){ | |||||
this.nhform.sfbccm = 'Y' | |||||
} | |||||
if(this.nhform.sfpkh==null||this.nhform.sfpkh==''){ | |||||
this.nhform.sfpkh = 'N' | |||||
} | |||||
if(this.nhform.sfwbh==null||this.nhform.sfwbh==''){ | |||||
this.nhform.sfwbh = 'N' | |||||
} | |||||
if(this.nhform.sjly==null||this.nhform.sjly==''){ | |||||
this.nhform.sjly = '07' | |||||
this.nhform.sjlyName = '农村集体产权制度改革' | |||||
} | |||||
this.jzhcssfyzfOptions.map(res => { | |||||
if(res.dictValue == this.nhform.jzhcssfyzf){ | |||||
this.nhform.jzhcssfyzfName = res.dictLabel | |||||
} | |||||
}) | |||||
this.zjlxOptions.map(res => { | |||||
if(res.dictValue == this.nhform.hzzjlx){ | |||||
this.nhform.hzzjlxName = res.dictLabel | |||||
} | |||||
}) | |||||
this.occupationOptions.map(res => { | |||||
if(res.dictValue == this.nhform.occupation){ | |||||
this.nhform.occupationName = res.dictLabel | |||||
} | |||||
}) | |||||
this.jzqkOptions.map(res => { | |||||
if(res.dictValue == this.nhform.jzqk){ | |||||
this.nhform.jzqkName = res.dictLabel | |||||
} | |||||
}) | |||||
this.sjlyOptions.map(res => { | |||||
if(res.dictValue == this.nhform.sjly){ | |||||
this.nhform.sjlyName = res.dictLabel | |||||
} | |||||
}) | |||||
if(response.rows.length>0){ | |||||
this.nhform = response.rows[0] | |||||
this.shownh = true; | |||||
if(this.nhform.hzzjlx==null||this.nhform.hzzjlx==''){ | |||||
this.nhform.hzzjlx = '01' | |||||
this.nhform.hzzjlxName = '身份证' | |||||
} | |||||
if(this.nhform.hyzk==null||this.nhform.hyzk==''){ | |||||
this.nhform.hyzk = '02' | |||||
} | |||||
if(this.nhform.occupation==null||this.nhform.occupation==''){ | |||||
this.nhform.occupation = '1' | |||||
this.nhform.occupationName = '务农' | |||||
} | |||||
if(this.nhform.jzqk==null||this.nhform.jzqk==''){ | |||||
this.nhform.jzqk = '3' | |||||
this.nhform.jzqkName = '常年居住' | |||||
} | |||||
if(this.nhform.jzhcssfyzf==null||this.nhform.jzhcssfyzf==''){ | |||||
this.nhform.jzhcssfyzf = '1' | |||||
this.nhform.jzhcssfyzfName = '无住房' | |||||
} | |||||
if(this.nhform.zqtczsfyzf==null||this.nhform.zqtczsfyzf==''){ | |||||
this.nhform.zqtczsfyzf = 'Y' | |||||
} | |||||
if(this.nhform.sfbccm==null||this.nhform.sfbccm==''){ | |||||
this.nhform.sfbccm = 'Y' | |||||
} | |||||
if(this.nhform.sfpkh==null||this.nhform.sfpkh==''){ | |||||
this.nhform.sfpkh = 'N' | |||||
} | |||||
if(this.nhform.sfwbh==null||this.nhform.sfwbh==''){ | |||||
this.nhform.sfwbh = 'N' | |||||
} | |||||
if(this.nhform.sjly==null||this.nhform.sjly==''){ | |||||
this.nhform.sjly = '07' | |||||
this.nhform.sjlyName = '农村集体产权制度改革' | |||||
} | |||||
this.jzhcssfyzfOptions.map(res => { | |||||
if(res.dictValue == this.nhform.jzhcssfyzf){ | |||||
this.nhform.jzhcssfyzfName = res.dictLabel | |||||
} | |||||
}) | |||||
this.zjlxOptions.map(res => { | |||||
if(res.dictValue == this.nhform.hzzjlx){ | |||||
this.nhform.hzzjlxName = res.dictLabel | |||||
} | |||||
}) | |||||
this.occupationOptions.map(res => { | |||||
if(res.dictValue == this.nhform.occupation){ | |||||
this.nhform.occupationName = res.dictLabel | |||||
} | |||||
}) | |||||
this.jzqkOptions.map(res => { | |||||
if(res.dictValue == this.nhform.jzqk){ | |||||
this.nhform.jzqkName = res.dictLabel | |||||
} | |||||
}) | |||||
this.sjlyOptions.map(res => { | |||||
if(res.dictValue == this.nhform.sjly){ | |||||
this.nhform.sjlyName = res.dictLabel | |||||
} | |||||
}) | |||||
}else{ | |||||
this.$toast({ | |||||
type: 'fail', // 找到自己需要的图标 | |||||
message: '无对应农户信息,请先新增户主信息后再进行关联!', | |||||
duration:"3000", | |||||
onClose:function(){ | |||||
} | |||||
}) | |||||
} | |||||
}); | }); | ||||
} | } | ||||
@@ -60,7 +60,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <div class="main_box"> | ||||
@@ -256,7 +281,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow , attach} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow , attach ,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | ||||
import Dialog from "vant/lib/dialog"; | import Dialog from "vant/lib/dialog"; | ||||
@@ -264,6 +289,7 @@ | |||||
name: "approvalAdd", | name: "approvalAdd", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -292,7 +318,7 @@ | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
infoList:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -306,6 +332,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -316,22 +343,30 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.reset(); | this.reset(); | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.capitalExpenditureOpen = false | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -340,6 +375,7 @@ | |||||
}); | }); | ||||
let params1={ | let params1={ | ||||
accountType: "102", | accountType: "102", | ||||
"params":{townAccountType:'0'}, | |||||
status: "N", | status: "N", | ||||
} | } | ||||
getAccount(params1).then((response) => { | getAccount(params1).then((response) => { | ||||
@@ -353,6 +389,31 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
// 表单重置 | // 表单重置 | ||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
@@ -451,8 +512,9 @@ | |||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
if(res.payeeType==1||res.payeeType==2){ | |||||
this.payeeList[index].text = res.payee; | this.payeeList[index].text = res.payee; | ||||
this.payeeList[index].value = res.id; | |||||
this.payeeList[index].value = res.id;} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -467,11 +529,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -483,6 +553,17 @@ | |||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmProject(data){ | onConfirmProject(data){ | ||||
this.projectList.map(res => { | this.projectList.map(res => { | ||||
if(res.projectName==data.text){ | if(res.projectName==data.text){ | ||||
@@ -525,14 +606,17 @@ | |||||
accountTypeChange(e){ | accountTypeChange(e){ | ||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -540,13 +624,16 @@ | |||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | this.queryParams.isPeers = this.form.isPeers | ||||
this.queryParams.accountType = this.form.accountType | |||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -583,6 +670,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -595,6 +696,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
addTransfer(this.form).then(response => { | addTransfer(this.form).then(response => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -616,6 +718,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -634,6 +745,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -655,6 +775,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
addTransfer(this.form).then(response => { | addTransfer(this.form).then(response => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -676,6 +797,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -694,6 +824,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -727,16 +866,29 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
console.log(this.form) | |||||
addTransfer(this.form).then((response) => { | addTransfer(this.form).then((response) => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
@@ -754,6 +906,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -768,6 +927,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -921,12 +1087,9 @@ | |||||
fileType: "0", | fileType: "0", | ||||
} | } | ||||
attachmentList(oData).then(res => { | attachmentList(oData).then(res => { | ||||
console.log(res) | |||||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) | ||||
console.log(r) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,7 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -201,7 +225,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
addCash, | addCash, | ||||
@@ -214,6 +238,7 @@ | |||||
name: "approvalAdd10", | name: "approvalAdd10", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -239,9 +264,9 @@ | |||||
capitalExpenditureTypeOptions:[], | capitalExpenditureTypeOptions:[], | ||||
bankTypeDictionaries:[], | bankTypeDictionaries:[], | ||||
projectList:[], | projectList:[], | ||||
infoList:[], | |||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -255,6 +280,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -265,22 +291,29 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'2' | ynType:'2' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.reset(); | this.reset(); | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -304,6 +337,31 @@ | |||||
this.addChargeItme(); | this.addChargeItme(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
// 表单重置 | // 表单重置 | ||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
@@ -312,7 +370,7 @@ | |||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
cashierId: null, | cashierId: null, | ||||
transferType: '10', | |||||
cashType: '10', | |||||
accountType: '2', | accountType: '2', | ||||
explainSituation: null, | explainSituation: null, | ||||
succeedAmount: null, | succeedAmount: null, | ||||
@@ -409,18 +467,25 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
this.showcapital = false; | this.showcapital = false; | ||||
}, | }, | ||||
onConfirmFundType(data){ | onConfirmFundType(data){ | ||||
console.log(data) | |||||
this.projectForm.projectFundType = data.value; | this.projectForm.projectFundType = data.value; | ||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
@@ -436,6 +501,17 @@ | |||||
}) | }) | ||||
this.showproject = false; | this.showproject = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | for (var i = 0 ; i < this.chargeItme.length ; i++){ | ||||
this.chargeItme[i].showPayee = false; | this.chargeItme[i].showPayee = false; | ||||
@@ -489,7 +565,7 @@ | |||||
}); | }); | ||||
this.$set(this.form, "expenditureAmount", total); | this.$set(this.form, "expenditureAmount", total); | ||||
}, | }, | ||||
/*goAdd(){ | |||||
goAdd(){ | |||||
if(this.chargeItme.length<1){ | if(this.chargeItme.length<1){ | ||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | this.$notify({ type: 'danger', message: '请添加收款方信息' }); | ||||
return; | return; | ||||
@@ -508,48 +584,17 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
addCash(this.form).then(response => { | |||||
this.projectForm.outId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | } | ||||
}); | |||||
},*/ | |||||
goAdd(){ | |||||
if(this.chargeItme.length<1){ | |||||
this.$notify({ type: 'danger', message: '请添加收款方信息' }); | |||||
return; | |||||
} | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$notify({ type: 'danger', message: '请选择项目名称!' }); | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | return; | ||||
} | } | ||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
@@ -559,6 +604,7 @@ | |||||
message: '此申请单中未上传任何附件,是否确认提交?', | message: '此申请单中未上传任何附件,是否确认提交?', | ||||
}) | }) | ||||
.then(() => { | .then(() => { | ||||
console.log(this.form) | |||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
res.cashId = response.data.id | res.cashId = response.data.id | ||||
@@ -574,6 +620,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -614,6 +670,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -646,6 +712,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
@@ -660,6 +740,16 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -694,6 +784,16 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -755,9 +855,8 @@ | |||||
//model就是上面的数据源 | //model就是上面的数据源 | ||||
return account.id === select; //筛选出匹配数据 | return account.id === select; //筛选出匹配数据 | ||||
}); | }); | ||||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
obj.accountPassword != null && obj.accountPassword != ""){ | |||||
if(obj.accountPassword != null && obj.accountPassword != "" && | |||||
obj.bankType != null && obj.bankType != ""){ | |||||
this.$set(this.form, "bookId", obj.bookId); | this.$set(this.form, "bookId", obj.bookId); | ||||
this.$set(this.form, "deptId", obj.deptId); | this.$set(this.form, "deptId", obj.deptId); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
@@ -765,7 +864,22 @@ | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | this.$set(this.form, "payerAccount", obj.bankAccountNumber); | ||||
this.$set(this.form, "operatorCode", obj.operatorCode); | this.$set(this.form, "operatorCode", obj.operatorCode); | ||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | ||||
this.$set(this.form, "bankType", obj.bankType); | |||||
this.$set(this.form, "bankAccountType", obj.bankAccountType); | |||||
this.$set(this.form, "villageAccountType", obj.villageAccountType); | |||||
this.$set(this.form, "taccountId", obj.taccountId); | |||||
this.$set(this.form, "accountNo", obj.accountNo); | |||||
this.$set(this.form, "cifNo", obj.cifNo); | |||||
this.$set(this.form, "payerFrom", '1'); | this.$set(this.form, "payerFrom", '1'); | ||||
if(obj.bankType==1){ | |||||
this.form.accountType = "1" | |||||
this.form.isPeers = null | |||||
this.accountTypeChange(); | |||||
}else if(obj.bankType==2||obj.bankType==4){ | |||||
this.form.accountType = null | |||||
this.form.isPeers = "Y" | |||||
this.accountTypeChange1(); | |||||
} | |||||
}else{ | }else{ | ||||
if(obj.payerFrom==1){ | if(obj.payerFrom==1){ | ||||
this.diglogStatus = false; | this.diglogStatus = false; | ||||
@@ -793,6 +907,7 @@ | |||||
this.$set(this.form, "deptId", ''); | this.$set(this.form, "deptId", ''); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
this.$set(this.form, "payer", obj.accountName); | this.$set(this.form, "payer", obj.accountName); | ||||
this.$set(this.form, "bankType", obj.bankType); | |||||
if(obj.payerFrom==6){ | if(obj.payerFrom==6){ | ||||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | getQmyeFlow(obj.bankAccountNumber).then((response) => { | ||||
this.$set(this.form, "payerAccount", response.data); | this.$set(this.form, "payerAccount", response.data); | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <div class="main_box"> | ||||
@@ -201,7 +226,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit , getAccount ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
addCash, | addCash, | ||||
@@ -214,6 +239,7 @@ | |||||
name: "approvalAdd11", | name: "approvalAdd11", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -238,10 +264,10 @@ | |||||
sysDictionaries:[], | sysDictionaries:[], | ||||
capitalExpenditureTypeOptions:[], | capitalExpenditureTypeOptions:[], | ||||
bankTypeDictionaries:[], | bankTypeDictionaries:[], | ||||
projectList:[], | |||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
projectList:[], | |||||
infoList:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -250,11 +276,12 @@ | |||||
payeeList:[], | payeeList:[], | ||||
// 查询参数 | // 查询参数 | ||||
queryParams: { | queryParams: { | ||||
transferType:11, | |||||
cashType:11, | |||||
orderByColumn: "id", | orderByColumn: "id", | ||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -265,22 +292,29 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'2' | ynType:'2' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.reset(); | this.reset(); | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -288,24 +322,49 @@ | |||||
this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
}); | }); | ||||
let queryParamsOld={ | let queryParamsOld={ | ||||
pageNum: 1, | |||||
pageSize: 10, | |||||
accountType: "101", | accountType: "101", | ||||
status: "N", | status: "N", | ||||
} | } | ||||
listAccount(queryParamsOld).then((response) => { | listAccount(queryParamsOld).then((response) => { | ||||
this.payerOptions = response.rows; | |||||
response.rows.map((res,index) => { | |||||
res['payerFrom'] = '1' | |||||
console.log(res) | |||||
this.payerOptions[index].text = res.accountName; | |||||
this.payerOptions[index].value = res.id; | |||||
response.rows.map(res => { | |||||
res['accountName'] = this.$store.state.user.bookName | |||||
res['id'] = this.$store.state.user.loginBookId | |||||
res['text'] = this.$store.state.user.bookName | |||||
res['value'] = this.$store.state.user.loginBookId | |||||
res['bankAccountNumber'] = res.id | |||||
res['payerFrom'] = '6' | |||||
this.payerOptions.push(res) | |||||
}) | }) | ||||
}); | }); | ||||
this.getDictionaries(); | this.getDictionaries(); | ||||
this.addChargeItme(); | this.addChargeItme(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
// 表单重置 | // 表单重置 | ||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
@@ -314,7 +373,7 @@ | |||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
cashierId: null, | cashierId: null, | ||||
transferType: '11', | |||||
cashType: 11, | |||||
accountType: '2', | accountType: '2', | ||||
explainSituation: null, | explainSituation: null, | ||||
succeedAmount: null, | succeedAmount: null, | ||||
@@ -411,11 +470,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -427,6 +494,17 @@ | |||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmProject(data){ | onConfirmProject(data){ | ||||
this.projectList.map(res => { | this.projectList.map(res => { | ||||
if(res.projectName==data.text){ | if(res.projectName==data.text){ | ||||
@@ -537,6 +615,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -558,6 +650,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(response.data.id).then(res => { | cashSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -598,6 +700,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(response.data.id).then(res => { | cashSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -630,6 +742,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
@@ -644,6 +770,14 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -678,6 +812,14 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -739,17 +881,31 @@ | |||||
//model就是上面的数据源 | //model就是上面的数据源 | ||||
return account.id === select; //筛选出匹配数据 | return account.id === select; //筛选出匹配数据 | ||||
}); | }); | ||||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
obj.accountPassword != null && obj.accountPassword != ""){ | |||||
if(obj.accountPassword != null && obj.accountPassword != "" && | |||||
obj.bankType != null && obj.bankType != ""){ | |||||
this.$set(this.form, "bookId", obj.bookId); | this.$set(this.form, "bookId", obj.bookId); | ||||
this.$set(this.form, "deptId", obj.deptId); | this.$set(this.form, "deptId", obj.deptId); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
this.$set(this.form, "payer", obj.accountName); | this.$set(this.form, "payer", obj.accountName); | ||||
this.$set(this.form, "payerAccount", obj.balance); | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
this.$set(this.form, "operatorCode", obj.operatorCode); | this.$set(this.form, "operatorCode", obj.operatorCode); | ||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | ||||
this.$set(this.form, "bankType", obj.bankType); | |||||
this.$set(this.form, "bankAccountType", obj.bankAccountType); | |||||
this.$set(this.form, "villageAccountType", obj.villageAccountType); | |||||
this.$set(this.form, "taccountId", obj.taccountId); | |||||
this.$set(this.form, "accountNo", obj.accountNo); | |||||
this.$set(this.form, "cifNo", obj.cifNo); | |||||
this.$set(this.form, "payerFrom", '1'); | this.$set(this.form, "payerFrom", '1'); | ||||
if(obj.bankType==1){ | |||||
this.form.accountType = "1" | |||||
this.form.isPeers = null | |||||
this.accountTypeChange(); | |||||
}else if(obj.bankType==2||obj.bankType==4){ | |||||
this.form.accountType = null | |||||
this.form.isPeers = "Y" | |||||
this.accountTypeChange1(); | |||||
} | |||||
}else{ | }else{ | ||||
if(obj.payerFrom==1){ | if(obj.payerFrom==1){ | ||||
this.diglogStatus = false; | this.diglogStatus = false; | ||||
@@ -777,8 +933,14 @@ | |||||
this.$set(this.form, "deptId", ''); | this.$set(this.form, "deptId", ''); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
this.$set(this.form, "payer", obj.accountName); | this.$set(this.form, "payer", obj.accountName); | ||||
this.$set(this.form, "payerAccount", obj.balance); | |||||
this.$set(this.form, "bankType", obj.bankType); | |||||
if(obj.payerFrom==6){ | |||||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
this.$set(this.form, "payerAccount", response.data); | |||||
}); | |||||
}else { | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
} | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
@@ -60,7 +60,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -103,7 +103,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -132,6 +132,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">出票方信息</p> | <p class="main_title">出票方信息</p> | ||||
<div class="main_box"> | <div class="main_box"> | ||||
@@ -245,7 +270,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow ,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
addCash, | addCash, | ||||
@@ -258,6 +283,7 @@ | |||||
name: "approvalAdd12", | name: "approvalAdd12", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -285,7 +311,7 @@ | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
projectList:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -299,6 +325,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -309,6 +336,23 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
orderTypeName:'', | orderTypeName:'', | ||||
orderTypeOptions:[] | orderTypeOptions:[] | ||||
@@ -316,16 +360,7 @@ | |||||
}, | }, | ||||
created() { | created() { | ||||
this.reset(); | this.reset(); | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -352,6 +387,31 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
// 表单重置 | // 表单重置 | ||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
@@ -360,7 +420,7 @@ | |||||
downId: null, | downId: null, | ||||
orderId: null, | orderId: null, | ||||
cashierId: null, | cashierId: null, | ||||
transferType: '12', | |||||
cashType: '12', | |||||
accountType: '2', | accountType: '2', | ||||
explainSituation: null, | explainSituation: null, | ||||
succeedAmount: null, | succeedAmount: null, | ||||
@@ -451,11 +511,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -467,6 +535,17 @@ | |||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmProject(data){ | onConfirmProject(data){ | ||||
this.projectList.map(res => { | this.projectList.map(res => { | ||||
if(res.projectName==data.text){ | if(res.projectName==data.text){ | ||||
@@ -589,6 +668,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -610,6 +703,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(response.data.id).then(res => { | cashSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -650,6 +753,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(response.data.id).then(res => { | cashSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -682,6 +795,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
addCash(this.form).then((response) => { | addCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
@@ -696,6 +823,14 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -730,6 +865,14 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = response.data.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -141,7 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -249,7 +273,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | ||||
import Dialog from "vant/lib/dialog"; | import Dialog from "vant/lib/dialog"; | ||||
@@ -257,6 +281,7 @@ | |||||
name: "approvalAdd2", | name: "approvalAdd2", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -264,9 +289,7 @@ | |||||
showproject:false, | showproject:false, | ||||
showFundType:false, | showFundType:false, | ||||
showpayer:false, | showpayer:false, | ||||
buttonType:'a', | buttonType:'a', | ||||
minDate: new Date(2000, 1, 1), | minDate: new Date(2000, 1, 1), | ||||
maxDate: new Date(2050, 12, 31), | maxDate: new Date(2050, 12, 31), | ||||
currentDate: new Date(), | currentDate: new Date(), | ||||
@@ -275,7 +298,6 @@ | |||||
capitalExpenditureType:'', | capitalExpenditureType:'', | ||||
payee:'', | payee:'', | ||||
bankType:'', | bankType:'', | ||||
wfydlxDictionaries:[], | wfydlxDictionaries:[], | ||||
jglxDictionaries:[], | jglxDictionaries:[], | ||||
sysDictionaries:[], | sysDictionaries:[], | ||||
@@ -286,10 +308,8 @@ | |||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | projectListShow:[], | ||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
chargeItmeShow:[], | chargeItmeShow:[], | ||||
payeeList:[], | payeeList:[], | ||||
// 查询参数 | // 查询参数 | ||||
queryParams: { | queryParams: { | ||||
@@ -298,6 +318,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -308,22 +329,29 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.reset(); | this.reset(); | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -345,6 +373,31 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
// 表单重置 | // 表单重置 | ||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
@@ -440,7 +493,6 @@ | |||||
//信用卡转账 | //信用卡转账 | ||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
console.log(this.queryParams) | |||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
if(res.payeeType==4){ | if(res.payeeType==4){ | ||||
@@ -462,11 +514,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -477,6 +537,17 @@ | |||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmProject(data){ | onConfirmProject(data){ | ||||
this.projectList.map(res => { | this.projectList.map(res => { | ||||
if(res.projectName==data.text){ | if(res.projectName==data.text){ | ||||
@@ -521,7 +592,9 @@ | |||||
accountTypeChange(e){ | accountTypeChange(e){ | ||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.bankType = this.form.bankType | |||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
@@ -537,13 +610,16 @@ | |||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | this.queryParams.isPeers = this.form.isPeers | ||||
this.queryParams.accountType = this.form.accountType | |||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==4){ | |||||
res.text = res.payee | |||||
res.value = res.id | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -579,6 +655,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -591,6 +681,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
addTransfer(this.form).then(response => { | addTransfer(this.form).then(response => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -612,6 +703,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -630,6 +730,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -651,6 +760,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
addTransfer(this.form).then(response => { | addTransfer(this.form).then(response => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -672,6 +782,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -690,6 +809,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -723,16 +851,29 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
console.log(this.form) | |||||
addTransfer(this.form).then((response) => { | addTransfer(this.form).then((response) => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
@@ -750,6 +891,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -764,6 +912,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -777,9 +932,6 @@ | |||||
payeeSelectChange(select, i) { | payeeSelectChange(select, i) { | ||||
let obj = {}; | let obj = {}; | ||||
let fuzhitype = 0; | let fuzhitype = 0; | ||||
console.log(this.payeeList) | |||||
console.log(select,i) | |||||
console.log(this.chargeItme) | |||||
obj = this.payeeList.find((account) => { | obj = this.payeeList.find((account) => { | ||||
//model就是上面的数据源 | //model就是上面的数据源 | ||||
return account.id === select ; //筛选出匹配数据 | return account.id === select ; //筛选出匹配数据 | ||||
@@ -827,9 +979,8 @@ | |||||
//model就是上面的数据源 | //model就是上面的数据源 | ||||
return account.id === select; //筛选出匹配数据 | return account.id === select; //筛选出匹配数据 | ||||
}); | }); | ||||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
obj.accountPassword != null && obj.accountPassword != ""){ | |||||
if(obj.accountPassword != null && obj.accountPassword != "" && | |||||
obj.bankType != null && obj.bankType != ""){ | |||||
this.$set(this.form, "bookId", obj.bookId); | this.$set(this.form, "bookId", obj.bookId); | ||||
this.$set(this.form, "deptId", obj.deptId); | this.$set(this.form, "deptId", obj.deptId); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
@@ -837,7 +988,22 @@ | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | this.$set(this.form, "payerAccount", obj.bankAccountNumber); | ||||
this.$set(this.form, "operatorCode", obj.operatorCode); | this.$set(this.form, "operatorCode", obj.operatorCode); | ||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | ||||
this.$set(this.form, "bankType", obj.bankType); | |||||
this.$set(this.form, "bankAccountType", obj.bankAccountType); | |||||
this.$set(this.form, "villageAccountType", obj.villageAccountType); | |||||
this.$set(this.form, "taccountId", obj.taccountId); | |||||
this.$set(this.form, "accountNo", obj.accountNo); | |||||
this.$set(this.form, "cifNo", obj.cifNo); | |||||
this.$set(this.form, "payerFrom", '1'); | this.$set(this.form, "payerFrom", '1'); | ||||
if(obj.bankType==1){ | |||||
this.form.accountType = "1" | |||||
this.form.isPeers = null | |||||
this.accountTypeChange(); | |||||
}else if(obj.bankType==2||obj.bankType==4){ | |||||
this.form.accountType = null | |||||
this.form.isPeers = "Y" | |||||
this.accountTypeChange1(); | |||||
} | |||||
}else{ | }else{ | ||||
if(obj.payerFrom==1){ | if(obj.payerFrom==1){ | ||||
this.diglogStatus = false; | this.diglogStatus = false; | ||||
@@ -865,6 +1031,7 @@ | |||||
this.$set(this.form, "deptId", ''); | this.$set(this.form, "deptId", ''); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
this.$set(this.form, "payer", obj.accountName); | this.$set(this.form, "payer", obj.accountName); | ||||
this.$set(this.form, "bankType", obj.bankType); | |||||
if(obj.payerFrom==6){ | if(obj.payerFrom==6){ | ||||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | getQmyeFlow(obj.bankAccountNumber).then((response) => { | ||||
this.$set(this.form, "payerAccount", response.data); | this.$set(this.form, "payerAccount", response.data); | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <div class="main_box"> | ||||
@@ -248,7 +273,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow, attach ,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
commonAttach, listAccount1, | commonAttach, listAccount1, | ||||
@@ -261,6 +286,7 @@ | |||||
name: "approvalAdd4", | name: "approvalAdd4", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -288,7 +314,7 @@ | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
infoList:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -302,6 +328,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -312,22 +339,30 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
this.reset(); | this.reset(); | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.capitalExpenditureOpen = false | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -336,7 +371,7 @@ | |||||
}); | }); | ||||
let params1={ | let params1={ | ||||
villageAccountType:'1', | villageAccountType:'1', | ||||
"params":{townAccountType:'1'} | |||||
//"params":{townAccountType:'1'} | |||||
} | } | ||||
listAccount1(params1).then((response) => { | listAccount1(params1).then((response) => { | ||||
this.payerOptions = [] | this.payerOptions = [] | ||||
@@ -350,6 +385,29 @@ | |||||
this.getDictionaries(); | this.getDictionaries(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
// 表单重置 | // 表单重置 | ||||
reset() { | reset() { | ||||
this.form = { | this.form = { | ||||
@@ -448,13 +506,13 @@ | |||||
}, | }, | ||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.accountType = this.form.accountType | |||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id;} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -469,11 +527,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -485,6 +551,17 @@ | |||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmProject(data){ | onConfirmProject(data){ | ||||
this.projectList.map(res => { | this.projectList.map(res => { | ||||
if(res.projectName==data.text){ | if(res.projectName==data.text){ | ||||
@@ -528,14 +605,17 @@ | |||||
accountTypeChange(e){ | accountTypeChange(e){ | ||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -543,13 +623,16 @@ | |||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.isPeers = this.form.isPeers | this.queryParams.isPeers = this.form.isPeers | ||||
this.queryParams.accountType = this.form.accountType | |||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -586,6 +669,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -598,6 +695,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
addTransfer(this.form).then(response => { | addTransfer(this.form).then(response => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -619,6 +717,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -637,6 +744,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -658,6 +774,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
addTransfer(this.form).then(response => { | addTransfer(this.form).then(response => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -679,6 +796,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -697,6 +823,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(response.data.id).then(res => { | customSubmit(response.data.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -730,16 +865,29 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
console.log(this.form) | |||||
addTransfer(this.form).then((response) => { | addTransfer(this.form).then((response) => { | ||||
this.projectForm.outId = response.data.id | this.projectForm.outId = response.data.id | ||||
this.infoForm.transferId = response.data.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", response.data.id); | params.append("tableId", response.data.id); | ||||
@@ -757,6 +905,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -771,6 +926,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -20,7 +20,7 @@ | |||||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" 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> | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -49,6 +49,11 @@ | |||||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | ||||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
</div> | </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> | |||||
<p class="main_title">收款方信息</p> | <p class="main_title">收款方信息</p> | ||||
@@ -76,7 +81,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
@@ -111,7 +116,7 @@ | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
projectList:[], | |||||
chargeItme:[], | chargeItme:[], | ||||
chargeItmeShow:[], | chargeItmeShow:[], | ||||
@@ -124,6 +129,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -134,21 +140,18 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
projectFundType:'' | projectFundType:'' | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
console.log(response) | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -180,6 +183,14 @@ | |||||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
this.projectForm = res.data | 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{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -198,16 +209,6 @@ | |||||
this.getPayeeList(); | this.getPayeeList(); | ||||
}); | }); | ||||
}, | }, | ||||
addChargeItme(index){ | |||||
this.chargeItme.splice(index + 1, 0, { | |||||
payeeId: "", //收款方ID | |||||
payee: "", //收款方 | |||||
payeeAccount: "", //收款账户 | |||||
bankDeposit: "", //开户银行 | |||||
incomeAmount: "", //收入金额 | |||||
bankType: "", //所属银行 | |||||
}); | |||||
}, | |||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
@@ -218,173 +219,6 @@ | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
payeeDictLabel(datas, value) { | |||||
var actions = []; | |||||
Object.keys(datas).some((key) => { | |||||
if (datas[key].payeeId == ('' + value)) { | |||||
actions.push(datas[key].payee); | |||||
return true; | |||||
} | |||||
}) | |||||
return actions.join(''); | |||||
}, | |||||
onConfirmCapital(data){ | |||||
console.log(data) | |||||
if (data.value != 2){ | |||||
this.capitalExpenditureOpen = false; | |||||
this.projectForm = []; | |||||
}else{ | |||||
this.capitalExpenditureOpen = true; | |||||
} | |||||
this.capitalExpenditureType = data.text; | |||||
this.form.capitalExpenditureType = data.value; | |||||
this.showcapital = false; | |||||
}, | |||||
onConfirmFundType(data){ | |||||
console.log(data) | |||||
this.projectForm.projectFundType = data.value; | |||||
this.projectFundType = data.text; | |||||
this.showFundType = false; | |||||
}, | |||||
onConfirmProject(data){ | |||||
console.log(data) | |||||
this.projectList.map(res => { | |||||
console.log(res) | |||||
if(res.projectName==data.text){ | |||||
this.projectForm.projectId = res.id | |||||
this.projectForm.projectName = res.projectName | |||||
this.projectForm.projectContractor = res.projectContractor | |||||
this.projectForm.projectAmount = res.projectAmount | |||||
console.log(this.projectForm) | |||||
} | |||||
}) | |||||
this.showproject = false; | |||||
}, | |||||
onConfirmPayee(data){ | |||||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
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){ | |||||
console.log(this.chargeItme) | |||||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
this.showbankType = false; | |||||
}, | |||||
onConfirmLasj(data){ | |||||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
this.showlasj = false; | |||||
}, | |||||
accountTypeChange(e){ | |||||
console.log(e) | |||||
this.payeeList = []; | |||||
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}); | |||||
} | |||||
}); | |||||
}, | |||||
goAdd(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
console.log(this.form); | |||||
updateTransfer(this.form).then(response => { | |||||
console.log(response); | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
console.log(this.projectForm) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | |||||
}, | |||||
goUpdate(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
this.projectForm.outId = this.form.id | |||||
updateTransfer(this.form).then((response) => { | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | |||||
}, | |||||
beforeRead(file) { | |||||
this.uploadFiles.push(file.file); | |||||
}, | |||||
deleteFile(file){ | |||||
console.log(file) | |||||
this.uploadFiles.map((response,index) => { | |||||
if(file.file == response){ | |||||
this.uploadFiles.splice(index,1) | |||||
} | |||||
}) | |||||
if(file.id){ | |||||
systemAttachment(file.id).then((res) => { | |||||
}); | |||||
} | |||||
}, | |||||
getFileList(){ | getFileList(){ | ||||
let oData= { | let oData= { | ||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
@@ -393,12 +227,9 @@ | |||||
fileType: "0", | fileType: "0", | ||||
} | } | ||||
attachmentList(oData).then(res => { | attachmentList(oData).then(res => { | ||||
console.log(res) | |||||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | ||||
console.log(r) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -20,7 +20,7 @@ | |||||
<van-field readonly label="提现总金额" v-model="form.expenditureAmount" 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> | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -49,7 +49,11 @@ | |||||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | ||||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
</div> | </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> | |||||
<p class="main_title">收款方信息</p> | <p class="main_title">收款方信息</p> | ||||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | ||||
<div class="main_box" style="margin-bottom: 10px;position:relative;"> | <div class="main_box" style="margin-bottom: 10px;position:relative;"> | ||||
@@ -61,15 +65,20 @@ | |||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getCash , listCashdetailByCashId , listPayee , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject , addProjectto , customSubmit ,getInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import {attachmentList, commonAttach} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { | |||||
attachmentList, | |||||
commonAttach, | |||||
getCash, | |||||
listCashdetailByCashId | |||||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | |||||
export default { | export default { | ||||
name: "approvalDetail10", | name: "approvalDetail10", | ||||
data() { | data() { | ||||
@@ -111,6 +120,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -121,22 +131,19 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'2' | ynType:'2' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
console.log(response) | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -168,28 +175,24 @@ | |||||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
this.projectForm = res.data | 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{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
this.form = response.data; | this.form = response.data; | ||||
}); | }); | ||||
console.log(this.$route.query.id) | |||||
listCashdetailByCashId(this.$route.query.id).then((response) => { | listCashdetailByCashId(this.$route.query.id).then((response) => { | ||||
this.chargeItme = response.data; | this.chargeItme = response.data; | ||||
console.log(response.data) | |||||
this.getPayeeList(); | this.getPayeeList(); | ||||
}); | }); | ||||
}, | }, | ||||
addChargeItme(index){ | |||||
this.chargeItme.splice(index + 1, 0, { | |||||
payeeId: "", //收款方ID | |||||
payee: "", //收款方 | |||||
payeeAccount: "", //收款账户 | |||||
bankDeposit: "", //开户银行 | |||||
incomeAmount: "", //收入金额 | |||||
bankType: "", //所属银行 | |||||
}); | |||||
}, | |||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
@@ -200,168 +203,6 @@ | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
payeeDictLabel(datas, value) { | |||||
var actions = []; | |||||
Object.keys(datas).some((key) => { | |||||
if (datas[key].payeeId == ('' + value)) { | |||||
actions.push(datas[key].payee); | |||||
return true; | |||||
} | |||||
}) | |||||
return actions.join(''); | |||||
}, | |||||
onConfirmCapital(data){ | |||||
console.log(data) | |||||
if (data.value != 2){ | |||||
this.capitalExpenditureOpen = false; | |||||
this.projectForm = []; | |||||
}else{ | |||||
this.capitalExpenditureOpen = true; | |||||
} | |||||
this.capitalExpenditureType = data.text; | |||||
this.form.capitalExpenditureType = data.value; | |||||
this.showcapital = false; | |||||
}, | |||||
onConfirmFundType(data){ | |||||
console.log(data) | |||||
this.projectForm.projectFundType = data.value; | |||||
this.projectFundType = data.text; | |||||
this.showFundType = false; | |||||
}, | |||||
onConfirmProject(data){ | |||||
console.log(data) | |||||
this.projectList.map(res => { | |||||
console.log(res) | |||||
if(res.projectName==data.text){ | |||||
this.projectForm.projectId = res.id | |||||
this.projectForm.projectName = res.projectName | |||||
this.projectForm.projectContractor = res.projectContractor | |||||
this.projectForm.projectAmount = res.projectAmount | |||||
console.log(this.projectForm) | |||||
} | |||||
}) | |||||
this.showproject = false; | |||||
}, | |||||
onConfirmPayee(data){ | |||||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
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){ | |||||
console.log(this.chargeItme) | |||||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
this.showbankType = false; | |||||
}, | |||||
onConfirmLasj(data){ | |||||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
this.showlasj = false; | |||||
}, | |||||
accountTypeChange(e){ | |||||
console.log(e) | |||||
this.payeeList = []; | |||||
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}); | |||||
} | |||||
}); | |||||
}, | |||||
goAdd(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
console.log(this.form); | |||||
updateTransfer(this.form).then(response => { | |||||
console.log(response); | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
console.log(this.projectForm) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | |||||
}, | |||||
goUpdate(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
this.projectForm.outId = this.form.id | |||||
updateTransfer(this.form).then((response) => { | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | |||||
}, | |||||
beforeRead(file) { | |||||
this.uploadFiles.push(file.file); | |||||
}, | |||||
deleteFile(file){ | |||||
this.uploadFiles.map((response,index) => { | |||||
if(file.file == response){ | |||||
this.uploadFiles.splice(index,1) | |||||
} | |||||
}) | |||||
}, | |||||
getFileList(){ | getFileList(){ | ||||
let oData= { | let oData= { | ||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
@@ -20,7 +20,7 @@ | |||||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" 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> | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -49,7 +49,11 @@ | |||||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | ||||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
</div> | </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> | |||||
<p class="main_title">收款方信息</p> | <p class="main_title">收款方信息</p> | ||||
<div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index"> | ||||
@@ -62,13 +66,13 @@ | |||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
@@ -117,6 +121,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -127,20 +132,18 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
projectFundType:'' | projectFundType:'' | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -172,12 +175,19 @@ | |||||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
this.projectForm = res.data | 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{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
this.form = response.data; | this.form = response.data; | ||||
}); | }); | ||||
console.log(this.$route.query.id) | |||||
listCashdetailByCashId(this.$route.query.id).then((response) => { | listCashdetailByCashId(this.$route.query.id).then((response) => { | ||||
this.chargeItme = response.data; | this.chargeItme = response.data; | ||||
console.log(response) | console.log(response) | ||||
@@ -204,168 +214,6 @@ | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
payeeDictLabel(datas, value) { | |||||
var actions = []; | |||||
Object.keys(datas).some((key) => { | |||||
if (datas[key].payeeId == ('' + value)) { | |||||
actions.push(datas[key].payee); | |||||
return true; | |||||
} | |||||
}) | |||||
return actions.join(''); | |||||
}, | |||||
onConfirmCapital(data){ | |||||
console.log(data) | |||||
if (data.value != 2){ | |||||
this.capitalExpenditureOpen = false; | |||||
this.projectForm = []; | |||||
}else{ | |||||
this.capitalExpenditureOpen = true; | |||||
} | |||||
this.capitalExpenditureType = data.text; | |||||
this.form.capitalExpenditureType = data.value; | |||||
this.showcapital = false; | |||||
}, | |||||
onConfirmFundType(data){ | |||||
console.log(data) | |||||
this.projectForm.projectFundType = data.value; | |||||
this.projectFundType = data.text; | |||||
this.showFundType = false; | |||||
}, | |||||
onConfirmProject(data){ | |||||
console.log(data) | |||||
this.projectList.map(res => { | |||||
console.log(res) | |||||
if(res.projectName==data.text){ | |||||
this.projectForm.projectId = res.id | |||||
this.projectForm.projectName = res.projectName | |||||
this.projectForm.projectContractor = res.projectContractor | |||||
this.projectForm.projectAmount = res.projectAmount | |||||
console.log(this.projectForm) | |||||
} | |||||
}) | |||||
this.showproject = false; | |||||
}, | |||||
onConfirmPayee(data){ | |||||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
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){ | |||||
console.log(this.chargeItme) | |||||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
this.showbankType = false; | |||||
}, | |||||
onConfirmLasj(data){ | |||||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
this.showlasj = false; | |||||
}, | |||||
accountTypeChange(e){ | |||||
console.log(e) | |||||
this.payeeList = []; | |||||
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}); | |||||
} | |||||
}); | |||||
}, | |||||
goAdd(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
console.log(this.form); | |||||
updateTransfer(this.form).then(response => { | |||||
console.log(response); | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
console.log(this.projectForm) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | |||||
}, | |||||
goUpdate(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
this.projectForm.outId = this.form.id | |||||
updateTransfer(this.form).then((response) => { | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | |||||
}, | |||||
beforeRead(file) { | |||||
this.uploadFiles.push(file.file); | |||||
}, | |||||
deleteFile(file){ | |||||
this.uploadFiles.map((response,index) => { | |||||
if(file.file == response){ | |||||
this.uploadFiles.splice(index,1) | |||||
} | |||||
}) | |||||
}, | |||||
getFileList(){ | getFileList(){ | ||||
let oData= { | let oData= { | ||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
@@ -19,7 +19,7 @@ | |||||
<van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" /> | ||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -42,6 +42,11 @@ | |||||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | ||||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
</div> | </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> | |||||
<p class="main_title">出票方信息</p> | <p class="main_title">出票方信息</p> | ||||
<div class="main_box"> | <div class="main_box"> | ||||
@@ -113,13 +118,13 @@ | |||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit, getInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
@@ -168,6 +173,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -178,23 +184,20 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
orderTypeName:'', | orderTypeName:'', | ||||
orderTypeOptions:[] | orderTypeOptions:[] | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
console.log(response) | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -229,6 +232,14 @@ | |||||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
this.projectForm = res.data | 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{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -267,168 +278,6 @@ | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
payeeDictLabel(datas, value) { | |||||
var actions = []; | |||||
Object.keys(datas).some((key) => { | |||||
if (datas[key].payeeId == ('' + value)) { | |||||
actions.push(datas[key].payee); | |||||
return true; | |||||
} | |||||
}) | |||||
return actions.join(''); | |||||
}, | |||||
onConfirmCapital(data){ | |||||
console.log(data) | |||||
if (data.value != 2){ | |||||
this.capitalExpenditureOpen = false; | |||||
this.projectForm = []; | |||||
}else{ | |||||
this.capitalExpenditureOpen = true; | |||||
} | |||||
this.capitalExpenditureType = data.text; | |||||
this.form.capitalExpenditureType = data.value; | |||||
this.showcapital = false; | |||||
}, | |||||
onConfirmFundType(data){ | |||||
console.log(data) | |||||
this.projectForm.projectFundType = data.value; | |||||
this.projectFundType = data.text; | |||||
this.showFundType = false; | |||||
}, | |||||
onConfirmProject(data){ | |||||
console.log(data) | |||||
this.projectList.map(res => { | |||||
console.log(res) | |||||
if(res.projectName==data.text){ | |||||
this.projectForm.projectId = res.id | |||||
this.projectForm.projectName = res.projectName | |||||
this.projectForm.projectContractor = res.projectContractor | |||||
this.projectForm.projectAmount = res.projectAmount | |||||
console.log(this.projectForm) | |||||
} | |||||
}) | |||||
this.showproject = false; | |||||
}, | |||||
onConfirmPayee(data){ | |||||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
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){ | |||||
console.log(this.chargeItme) | |||||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
this.showbankType = false; | |||||
}, | |||||
onConfirmLasj(data){ | |||||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
this.showlasj = false; | |||||
}, | |||||
accountTypeChange(e){ | |||||
console.log(e) | |||||
this.payeeList = []; | |||||
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}); | |||||
} | |||||
}); | |||||
}, | |||||
goAdd(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
console.log(this.form); | |||||
updateTransfer(this.form).then(response => { | |||||
console.log(response); | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
console.log(this.projectForm) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | |||||
}, | |||||
goUpdate(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
this.projectForm.outId = this.form.id | |||||
updateTransfer(this.form).then((response) => { | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | |||||
}, | |||||
beforeRead(file) { | |||||
this.uploadFiles.push(file.file); | |||||
}, | |||||
deleteFile(file){ | |||||
this.uploadFiles.map((response,index) => { | |||||
if(file.file == response){ | |||||
this.uploadFiles.splice(index,1) | |||||
} | |||||
}) | |||||
}, | |||||
getFileList(){ | getFileList(){ | ||||
let oData= { | let oData= { | ||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
@@ -20,7 +20,7 @@ | |||||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" 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> | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -49,7 +49,11 @@ | |||||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | ||||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
</div> | </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> | |||||
<p class="main_title">列表信息</p> | <p class="main_title">列表信息</p> | ||||
<div class="main_box" style="margin-bottom: 15px;"> | <div class="main_box" style="margin-bottom: 15px;"> | ||||
@@ -67,13 +71,13 @@ | |||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
@@ -131,21 +135,19 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
contractOpen:false, | |||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
projectFundType:'' | projectFundType:'' | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
console.log(response) | |||||
this.projectList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (let i = 0; i < response.data.length; i++) { | for (let i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -177,6 +179,14 @@ | |||||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
this.projectForm = res.data | 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{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -195,16 +205,6 @@ | |||||
this.getPayeeList(); | this.getPayeeList(); | ||||
}); | }); | ||||
}, | }, | ||||
addChargeItme(index){ | |||||
this.chargeItme.splice(index + 1, 0, { | |||||
payeeId: "", //收款方ID | |||||
payee: "", //收款方 | |||||
payeeAccount: "", //收款账户 | |||||
bankDeposit: "", //开户银行 | |||||
incomeAmount: "", //收入金额 | |||||
bankType: "", //所属银行 | |||||
}); | |||||
}, | |||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
@@ -215,173 +215,6 @@ | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
payeeDictLabel(datas, value) { | |||||
var actions = []; | |||||
Object.keys(datas).some((key) => { | |||||
if (datas[key].payeeId == ('' + value)) { | |||||
actions.push(datas[key].payee); | |||||
return true; | |||||
} | |||||
}) | |||||
return actions.join(''); | |||||
}, | |||||
onConfirmCapital(data){ | |||||
console.log(data) | |||||
if (data.value != 2){ | |||||
this.capitalExpenditureOpen = false; | |||||
this.projectForm = []; | |||||
}else{ | |||||
this.capitalExpenditureOpen = true; | |||||
} | |||||
this.capitalExpenditureType = data.text; | |||||
this.form.capitalExpenditureType = data.value; | |||||
this.showcapital = false; | |||||
}, | |||||
onConfirmFundType(data){ | |||||
console.log(data) | |||||
this.projectForm.projectFundType = data.value; | |||||
this.projectFundType = data.text; | |||||
this.showFundType = false; | |||||
}, | |||||
onConfirmProject(data){ | |||||
console.log(data) | |||||
this.projectList.map(res => { | |||||
console.log(res) | |||||
if(res.projectName==data.text){ | |||||
this.projectForm.projectId = res.id | |||||
this.projectForm.projectName = res.projectName | |||||
this.projectForm.projectContractor = res.projectContractor | |||||
this.projectForm.projectAmount = res.projectAmount | |||||
console.log(this.projectForm) | |||||
} | |||||
}) | |||||
this.showproject = false; | |||||
}, | |||||
onConfirmPayee(data){ | |||||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
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){ | |||||
console.log(this.chargeItme) | |||||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
this.showbankType = false; | |||||
}, | |||||
onConfirmLasj(data){ | |||||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
this.showlasj = false; | |||||
}, | |||||
accountTypeChange(e){ | |||||
console.log(e) | |||||
this.payeeList = []; | |||||
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}); | |||||
} | |||||
}); | |||||
}, | |||||
goAdd(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
console.log(this.form); | |||||
updateTransfer(this.form).then(response => { | |||||
console.log(response); | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
console.log(this.projectForm) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | |||||
}, | |||||
goUpdate(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
this.projectForm.outId = this.form.id | |||||
updateTransfer(this.form).then((response) => { | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | |||||
}, | |||||
beforeRead(file) { | |||||
this.uploadFiles.push(file.file); | |||||
}, | |||||
deleteFile(file){ | |||||
console.log(file) | |||||
this.uploadFiles.map((response,index) => { | |||||
if(file.file == response){ | |||||
this.uploadFiles.splice(index,1) | |||||
} | |||||
}) | |||||
if(file.id){ | |||||
systemAttachment(file.id).then((res) => { | |||||
}); | |||||
} | |||||
}, | |||||
getFileList(){ | getFileList(){ | ||||
let oData= { | let oData= { | ||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
@@ -20,7 +20,7 @@ | |||||
<van-field readonly label="支出总金额" v-model="form.expenditureAmount" 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> | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -49,7 +49,11 @@ | |||||
<van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" /> | ||||
<van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/> | ||||
</div> | </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> | |||||
<p class="main_title">列表信息</p> | <p class="main_title">列表信息</p> | ||||
<div class="main_box" style="margin-bottom: 15px;"> | <div class="main_box" style="margin-bottom: 15px;"> | ||||
@@ -69,13 +73,13 @@ | |||||
</div> | </div> | ||||
<p class="main_title">上传附件</p> | <p class="main_title">上传附件</p> | ||||
<div class="main_box" style="padding: 5px 0 0 8px;"> | <div class="main_box" style="padding: 5px 0 0 8px;"> | ||||
<van-uploader v-model="fileList" :after-read="beforeRead" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,getInfoto } from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
@@ -123,6 +127,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -133,21 +138,18 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
projectFundType:'' | projectFundType:'' | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
console.log(response) | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -179,6 +181,14 @@ | |||||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
this.projectForm = res.data | 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{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -197,16 +207,6 @@ | |||||
this.getPayeeList(); | this.getPayeeList(); | ||||
}); | }); | ||||
}, | }, | ||||
addChargeItme(index){ | |||||
this.chargeItme.splice(index + 1, 0, { | |||||
payeeId: "", //收款方ID | |||||
payee: "", //收款方 | |||||
payeeAccount: "", //收款账户 | |||||
bankDeposit: "", //开户银行 | |||||
incomeAmount: "", //收入金额 | |||||
bankType: "", //所属银行 | |||||
}); | |||||
}, | |||||
getPayeeList() { | getPayeeList() { | ||||
//普通转账 | //普通转账 | ||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
@@ -217,173 +217,6 @@ | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
payeeDictLabel(datas, value) { | |||||
var actions = []; | |||||
Object.keys(datas).some((key) => { | |||||
if (datas[key].payeeId == ('' + value)) { | |||||
actions.push(datas[key].payee); | |||||
return true; | |||||
} | |||||
}) | |||||
return actions.join(''); | |||||
}, | |||||
onConfirmCapital(data){ | |||||
console.log(data) | |||||
if (data.value != 2){ | |||||
this.capitalExpenditureOpen = false; | |||||
this.projectForm = []; | |||||
}else{ | |||||
this.capitalExpenditureOpen = true; | |||||
} | |||||
this.capitalExpenditureType = data.text; | |||||
this.form.capitalExpenditureType = data.value; | |||||
this.showcapital = false; | |||||
}, | |||||
onConfirmFundType(data){ | |||||
console.log(data) | |||||
this.projectForm.projectFundType = data.value; | |||||
this.projectFundType = data.text; | |||||
this.showFundType = false; | |||||
}, | |||||
onConfirmProject(data){ | |||||
console.log(data) | |||||
this.projectList.map(res => { | |||||
console.log(res) | |||||
if(res.projectName==data.text){ | |||||
this.projectForm.projectId = res.id | |||||
this.projectForm.projectName = res.projectName | |||||
this.projectForm.projectContractor = res.projectContractor | |||||
this.projectForm.projectAmount = res.projectAmount | |||||
console.log(this.projectForm) | |||||
} | |||||
}) | |||||
this.showproject = false; | |||||
}, | |||||
onConfirmPayee(data){ | |||||
// this.chargeItme[this.chargeItme.length-1].payeeText = data.text; | |||||
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){ | |||||
console.log(this.chargeItme) | |||||
this.chargeItme[this.chargeItme.length-1].bankTypeText = data.text; | |||||
this.chargeItme[this.chargeItme.length-1].bankType = data.value; | |||||
this.showbankType = false; | |||||
}, | |||||
onConfirmLasj(data){ | |||||
this.form.applyDate = this.getNowFormatDate(data).substr(0,10); | |||||
this.showlasj = false; | |||||
}, | |||||
accountTypeChange(e){ | |||||
console.log(e) | |||||
this.payeeList = []; | |||||
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}); | |||||
} | |||||
}); | |||||
}, | |||||
goAdd(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
console.log(this.form); | |||||
updateTransfer(this.form).then(response => { | |||||
console.log(response); | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
console.log(this.projectForm) | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
} | |||||
}); | |||||
}, | |||||
goUpdate(){ | |||||
if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ | |||||
this.$toast.error("付款事由禁止包含|。"); | |||||
return; | |||||
} | |||||
if(this.form.capitalExpenditureType==2){ | |||||
if(this.projectForm.projectName==""||this.projectForm.projectName==null){ | |||||
this.$toast.error('请选择项目名称!'); | |||||
return; | |||||
} | |||||
if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ | |||||
this.$toast.error('请输入工程发票号!'); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | |||||
this.$set(this.form, "bankTypeList", this.chargeItme); | |||||
this.$set(this.form, "accountTypeList", this.chargeItme); | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | |||||
this.projectForm.outId = this.form.id | |||||
updateTransfer(this.form).then((response) => { | |||||
this.projectForm.outId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | |||||
if(this.form.capitalExpenditureType==2){ | |||||
addProjectto(this.projectForm).then(res => { | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | |||||
this.$toast.success('修改成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
} | |||||
}); | |||||
}, | |||||
beforeRead(file) { | |||||
this.uploadFiles.push(file.file); | |||||
}, | |||||
deleteFile(file){ | |||||
console.log(file) | |||||
this.uploadFiles.map((response,index) => { | |||||
if(file.file == response){ | |||||
this.uploadFiles.splice(index,1) | |||||
} | |||||
}) | |||||
if(file.id){ | |||||
systemAttachment(file.id).then((res) => { | |||||
}); | |||||
} | |||||
}, | |||||
getFileList(){ | getFileList(){ | ||||
let oData= { | let oData= { | ||||
tableId: this.$route.query.id, | tableId: this.$route.query.id, | ||||
@@ -8,7 +8,7 @@ | |||||
@click-right="goAdd()" | @click-right="goAdd()" | ||||
> | > | ||||
<template #title> | <template #title> | ||||
<p style="font-weight: bold;">信用卡转账申请列表</p> | |||||
<p style="font-weight: bold;">公务卡转账申请列表</p> | |||||
</template> | </template> | ||||
<template #right> | <template #right> | ||||
<van-icon name="add" size="18"/> | <van-icon name="add" size="18"/> | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -171,7 +196,7 @@ | |||||
<p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p> | ||||
<div class="main_box" style="margin-bottom: 15px;"> | <div class="main_box" style="margin-bottom: 15px;"> | ||||
<van-cell title="收款账户类型"> | |||||
<van-cell title="收款账户类型" v-if="form.bankType==1"> | |||||
<template #right-icon> | <template #right-icon> | ||||
<van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange"> | ||||
<van-radio name="1">公户</van-radio> | <van-radio name="1">公户</van-radio> | ||||
@@ -181,7 +206,7 @@ | |||||
</van-cell> | </van-cell> | ||||
<van-cell title="是否与付款方同行" v-if="form.bankType==2||form.bankType==4"> | <van-cell title="是否与付款方同行" v-if="form.bankType==2||form.bankType==4"> | ||||
<template #right-icon> | <template #right-icon> | ||||
<van-radio-group direction="horizontal" v-model="form.isPeers"> | |||||
<van-radio-group direction="horizontal" v-model="form.isPeers" @change="accountTypeChange"> | |||||
<van-radio name="Y">是</van-radio> | <van-radio name="Y">是</van-radio> | ||||
<van-radio name="N">否</van-radio> | <van-radio name="N">否</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -254,7 +279,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow ,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
commonAttach, | commonAttach, | ||||
@@ -266,6 +291,7 @@ | |||||
name: "approvalModify", | name: "approvalModify", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -290,10 +316,10 @@ | |||||
sysDictionaries:[], | sysDictionaries:[], | ||||
capitalExpenditureTypeOptions:[], | capitalExpenditureTypeOptions:[], | ||||
bankTypeDictionaries:[], | bankTypeDictionaries:[], | ||||
infoList:[], | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -307,6 +333,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -317,6 +344,22 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | fileList:[], | ||||
uploadFiles:[], | uploadFiles:[], | ||||
@@ -329,8 +372,16 @@ | |||||
} | } | ||||
listProject(queryParams).then(response => { | listProject(queryParams).then(response => { | ||||
this.projectList = response.rows; | this.projectList = response.rows; | ||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
this.$set(this.projectList[i],"text",response.rows[i].projectName) | |||||
this.$set(this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
this.$set(this.infoList[i],"text",response.rows[i].name) | |||||
this.$set(this.infoList[i],"value",response.rows[i].code) | |||||
} | } | ||||
}); | }); | ||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
@@ -341,6 +392,7 @@ | |||||
}); | }); | ||||
let params1={ | let params1={ | ||||
accountType: "102", | accountType: "102", | ||||
"params":{townAccountType:'0'}, | |||||
status: "N", | status: "N", | ||||
} | } | ||||
getAccount(params1).then((response) => { | getAccount(params1).then((response) => { | ||||
@@ -375,6 +427,14 @@ | |||||
this.projectForm = res.data | this.projectForm = res.data | ||||
console.log(res.data) | console.log(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{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -396,17 +456,13 @@ | |||||
}); | }); | ||||
}, | }, | ||||
getChange(){ | getChange(){ | ||||
console.log(this.buttonType) | |||||
if(this.buttonType == 'update'){ | if(this.buttonType == 'update'){ | ||||
console.log('update') | |||||
this.goUpdate(); | this.goUpdate(); | ||||
}else if(this.buttonType == 'add'){ | }else if(this.buttonType == 'add'){ | ||||
console.log('add') | |||||
this.goAdd(); | this.goAdd(); | ||||
} | } | ||||
}, | }, | ||||
getError(e){ | getError(e){ | ||||
console.log(e) | |||||
this.$notify({ type: 'danger', message: e.errors[0].message }); | this.$notify({ type: 'danger', message: e.errors[0].message }); | ||||
}, | }, | ||||
addChargeItme(index){ | addChargeItme(index){ | ||||
@@ -447,8 +503,9 @@ | |||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
if(res.payeeType==1||res.payeeType==2){ | |||||
this.payeeList[index].text = res.payee; | this.payeeList[index].text = res.payee; | ||||
this.payeeList[index].value = res.id; | |||||
this.payeeList[index].value = res.id;} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -463,12 +520,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
console.log(data) | |||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -491,6 +555,17 @@ | |||||
}) | }) | ||||
this.showproject = false; | this.showproject = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
console.log(data) | console.log(data) | ||||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | for (var i = 0 ; i < this.chargeItme.length ; i++){ | ||||
@@ -522,27 +597,33 @@ | |||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.isPeers = this.form.isPeers | |||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
accountTypeChange1(e){ | accountTypeChange1(e){ | ||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.accountType = this.form.accountType | |||||
this.queryParams.isPeers = this.form.isPeers | this.queryParams.isPeers = this.form.isPeers | ||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -579,6 +660,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -591,6 +686,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then(response => { | updateTransfer(this.form).then(response => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -612,6 +708,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -630,6 +735,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -651,6 +765,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then(response => { | updateTransfer(this.form).then(response => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -672,6 +787,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -690,6 +814,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -723,15 +856,29 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then((response) => { | updateTransfer(this.form).then((response) => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
@@ -749,6 +896,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -763,6 +917,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -896,7 +1057,6 @@ | |||||
this.uploadFiles.push(file.file); | this.uploadFiles.push(file.file); | ||||
}, | }, | ||||
deleteFile(file){ | deleteFile(file){ | ||||
console.log(file) | |||||
this.uploadFiles.map((response,index) => { | this.uploadFiles.map((response,index) => { | ||||
if(file.file == response){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | this.uploadFiles.splice(index,1) | ||||
@@ -915,12 +1075,9 @@ | |||||
fileType: "0", | fileType: "0", | ||||
} | } | ||||
attachmentList(oData).then(res => { | attachmentList(oData).then(res => { | ||||
console.log(res) | |||||
console.log(location.protocol+"//"+location.host+request.defaults.baseURL) | |||||
res.rows.map(r => { | res.rows.map(r => { | ||||
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL | ||||
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id}) | ||||
console.log(r) | |||||
}) | }) | ||||
}) | }) | ||||
}, | }, | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -199,7 +224,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow, listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request'; | import request from '@/utils/request'; | ||||
import { | import { | ||||
addCash, | addCash, | ||||
@@ -212,6 +237,7 @@ | |||||
name: "approvalModify10", | name: "approvalModify10", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -237,6 +263,7 @@ | |||||
capitalExpenditureTypeOptions:[], | capitalExpenditureTypeOptions:[], | ||||
bankTypeDictionaries:[], | bankTypeDictionaries:[], | ||||
projectList:[], | projectList:[], | ||||
infoList:[], | |||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | projectListShow:[], | ||||
@@ -253,6 +280,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -263,22 +291,29 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'2' | ynType:'2' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | fileList:[], | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (let i = 0; i < response.data.length; i++) { | for (let i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -302,6 +337,31 @@ | |||||
this.getFileList(); | this.getFileList(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
getDictionaries(){ | getDictionaries(){ | ||||
getCash(this.$route.query.id).then((response) => { | getCash(this.$route.query.id).then((response) => { | ||||
this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
@@ -320,6 +380,16 @@ | |||||
this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType); | ||||
this.projectForm = res.data | this.projectForm = res.data | ||||
}) | }) | ||||
}else if(response.data.capitalExpenditureType==4){ | |||||
this.contractOpen = true | |||||
let param={ | |||||
'transferId' : response.data.id | |||||
} | |||||
console.log(param) | |||||
getInfoto(param).then(res => { | |||||
this.infoForm = res.data | |||||
}) | |||||
}else{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -391,12 +461,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
console.log(data) | |||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -408,6 +485,17 @@ | |||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmProject(data){ | onConfirmProject(data){ | ||||
this.projectList.map(res => { | this.projectList.map(res => { | ||||
if(res.projectName==data.text){ | if(res.projectName==data.text){ | ||||
@@ -491,6 +579,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
@@ -516,6 +618,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(this.form.id).then(res => { | cashSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -555,6 +667,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(this.form.id).then(res => { | cashSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -587,6 +709,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
updateCash(this.form).then((response) => { | updateCash(this.form).then((response) => { | ||||
@@ -602,6 +738,16 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -636,6 +782,16 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(response.data.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -201,7 +226,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , cashSubmit ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { | import { | ||||
addCash, addCashdetail, | addCash, addCashdetail, | ||||
attachmentList, | attachmentList, | ||||
@@ -214,6 +239,7 @@ | |||||
name: "approvalModify11", | name: "approvalModify11", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -241,7 +267,7 @@ | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
infoList:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -250,11 +276,12 @@ | |||||
payeeList:[], | payeeList:[], | ||||
// 查询参数 | // 查询参数 | ||||
queryParams: { | queryParams: { | ||||
transferType:11, | |||||
cashType:11, | |||||
orderByColumn: "id", | orderByColumn: "id", | ||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -265,22 +292,29 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | fileList:[], | ||||
uploadFiles:[], | uploadFiles:[], | ||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -288,22 +322,49 @@ | |||||
this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
}); | }); | ||||
let params1={ | let params1={ | ||||
accountType: "102", | |||||
accountType: "101", | |||||
status: "N", | status: "N", | ||||
} | } | ||||
getAccount(params1).then((response) => { | getAccount(params1).then((response) => { | ||||
this.payerOptions = response.rows; | |||||
response.rows.map((res,index) => { | |||||
res['payerFrom'] = '1' | |||||
console.log(res) | |||||
this.payerOptions[index].text = res.accountName; | |||||
this.payerOptions[index].value = res.id; | |||||
response.rows.map(res => { | |||||
res['accountName'] = this.$store.state.user.bookName | |||||
res['id'] = this.$store.state.user.loginBookId | |||||
res['text'] = this.$store.state.user.bookName | |||||
res['value'] = this.$store.state.user.loginBookId | |||||
res['bankAccountNumber'] = res.id | |||||
res['payerFrom'] = '6' | |||||
this.payerOptions.push(res) | |||||
}) | }) | ||||
}); | }); | ||||
this.getDictionaries(); | this.getDictionaries(); | ||||
this.getFileList(); | this.getFileList(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
getDictionaries(){ | getDictionaries(){ | ||||
getCash(this.$route.query.id).then((response) => { | getCash(this.$route.query.id).then((response) => { | ||||
this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
@@ -324,6 +385,16 @@ | |||||
this.projectForm = res.data | this.projectForm = res.data | ||||
console.log(res.data) | console.log(res.data) | ||||
}) | }) | ||||
}else if(response.data.capitalExpenditureType==4){ | |||||
this.contractOpen = true | |||||
let param={ | |||||
'transferId' : response.data.id | |||||
} | |||||
console.log(param) | |||||
getInfoto(param).then(res => { | |||||
this.infoForm = res.data | |||||
}) | |||||
}else{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -403,12 +474,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
console.log(data) | |||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -440,6 +518,17 @@ | |||||
this.chargeItme[index].payeeId = data.value; | this.chargeItme[index].payeeId = data.value; | ||||
this.payeeSelectChange(data.value , index) | this.payeeSelectChange(data.value , index) | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmBankType(data,index){ | onConfirmBankType(data,index){ | ||||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | for (var i = 0 ; i < this.chargeItme.length ; i++){ | ||||
this.chargeItme[i].showbankType = false; | this.chargeItme[i].showbankType = false; | ||||
@@ -530,6 +619,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -551,6 +654,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(this.form.id).then(res => { | cashSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -591,6 +704,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(this.form.id).then(res => { | cashSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -623,6 +746,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
updateCash(this.form).then((response) => { | updateCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
@@ -637,6 +774,16 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -671,6 +818,16 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -732,9 +889,8 @@ | |||||
//model就是上面的数据源 | //model就是上面的数据源 | ||||
return account.id === select; //筛选出匹配数据 | return account.id === select; //筛选出匹配数据 | ||||
}); | }); | ||||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
obj.accountPassword != null && obj.accountPassword != ""){ | |||||
if(obj.accountPassword != null && obj.accountPassword != "" && | |||||
obj.bankType != null && obj.bankType != ""){ | |||||
this.$set(this.form, "bookId", obj.bookId); | this.$set(this.form, "bookId", obj.bookId); | ||||
this.$set(this.form, "deptId", obj.deptId); | this.$set(this.form, "deptId", obj.deptId); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
@@ -742,7 +898,22 @@ | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | this.$set(this.form, "payerAccount", obj.bankAccountNumber); | ||||
this.$set(this.form, "operatorCode", obj.operatorCode); | this.$set(this.form, "operatorCode", obj.operatorCode); | ||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | ||||
this.$set(this.form, "bankType", obj.bankType); | |||||
this.$set(this.form, "bankAccountType", obj.bankAccountType); | |||||
this.$set(this.form, "villageAccountType", obj.villageAccountType); | |||||
this.$set(this.form, "taccountId", obj.taccountId); | |||||
this.$set(this.form, "accountNo", obj.accountNo); | |||||
this.$set(this.form, "cifNo", obj.cifNo); | |||||
this.$set(this.form, "payerFrom", '1'); | this.$set(this.form, "payerFrom", '1'); | ||||
if(obj.bankType==1){ | |||||
this.form.accountType = "1" | |||||
this.form.isPeers = null | |||||
this.accountTypeChange(); | |||||
}else if(obj.bankType==2||obj.bankType==4){ | |||||
this.form.accountType = null | |||||
this.form.isPeers = "Y" | |||||
this.accountTypeChange1(); | |||||
} | |||||
}else{ | }else{ | ||||
if(obj.payerFrom==1){ | if(obj.payerFrom==1){ | ||||
this.diglogStatus = false; | this.diglogStatus = false; | ||||
@@ -770,6 +941,7 @@ | |||||
this.$set(this.form, "deptId", ''); | this.$set(this.form, "deptId", ''); | ||||
this.$set(this.form, "cashierId", obj.id); | this.$set(this.form, "cashierId", obj.id); | ||||
this.$set(this.form, "payer", obj.accountName); | this.$set(this.form, "payer", obj.accountName); | ||||
this.$set(this.form, "bankType", obj.bankType); | |||||
if(obj.payerFrom==6){ | if(obj.payerFrom==6){ | ||||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | getQmyeFlow(obj.bankAccountNumber).then((response) => { | ||||
this.$set(this.form, "payerAccount", response.data); | this.$set(this.form, "payerAccount", response.data); | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">出票方信息</p> | <p class="main_title">出票方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -251,7 +276,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import request from '@/utils/request'; | import request from '@/utils/request'; | ||||
import { | import { | ||||
addCash, addCashdetail, | addCash, addCashdetail, | ||||
@@ -264,6 +289,7 @@ | |||||
name: "approvalModify12", | name: "approvalModify12", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -291,7 +317,7 @@ | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
infoList:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -305,6 +331,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -315,6 +342,22 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | fileList:[], | ||||
uploadFiles:[], | uploadFiles:[], | ||||
@@ -323,16 +366,7 @@ | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
this.projectList = response.rows; | |||||
for (var i = 0; i < response.rows.length; i++) { | |||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
} | |||||
}); | |||||
this.initProjectInfo(); | |||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
for (var i = 0; i < response.data.length; i++) { | for (var i = 0; i < response.data.length; i++) { | ||||
this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue}); | ||||
@@ -360,6 +394,31 @@ | |||||
this.getFileList(); | this.getFileList(); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
initProjectInfo(){ | |||||
let _this = this | |||||
let queryParams={ | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
} | |||||
listProject(queryParams).then(response => { | |||||
_this.projectList = response.rows; | |||||
console.log(response) | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.projectList[i].set({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
_this.$set(_this.projectList[i],"text",response.rows[i].projectName) | |||||
_this.$set(_this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
console.log(response) | |||||
_this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
//_this.infoList[i].push({text: response.rows[i].name, value: response.rows[i].code}); | |||||
_this.$set(_this.infoList[i],"text",response.rows[i].name) | |||||
_this.$set(_this.infoList[i],"value",response.rows[i].code) | |||||
} | |||||
}); | |||||
}, | |||||
getDictionaries(){ | getDictionaries(){ | ||||
getCash(this.$route.query.id).then((response) => { | getCash(this.$route.query.id).then((response) => { | ||||
this.getDicts("capital_expenditure_type").then((res) => { | this.getDicts("capital_expenditure_type").then((res) => { | ||||
@@ -380,6 +439,16 @@ | |||||
this.projectForm = res.data | this.projectForm = res.data | ||||
console.log(res.data) | console.log(res.data) | ||||
}) | }) | ||||
}else if(response.data.capitalExpenditureType==4){ | |||||
this.contractOpen = true | |||||
let param={ | |||||
'transferId' : response.data.id | |||||
} | |||||
console.log(param) | |||||
getInfoto(param).then(res => { | |||||
this.infoForm = res.data | |||||
}) | |||||
}else{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -450,12 +519,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
console.log(data) | |||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -467,6 +543,17 @@ | |||||
this.projectFundType = data.text; | this.projectFundType = data.text; | ||||
this.showFundType = false; | this.showFundType = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmProject(data){ | onConfirmProject(data){ | ||||
this.projectList.map(res => { | this.projectList.map(res => { | ||||
if(res.projectName==data.text){ | if(res.projectName==data.text){ | ||||
@@ -550,6 +637,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -571,6 +672,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(this.form.id).then(res => { | cashSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -611,6 +722,16 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
cashSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
cashSubmit(this.form.id).then(res => { | cashSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -642,7 +763,21 @@ | |||||
this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | this.$notify({ type: 'danger', message: '请输入工程发票号!' }); | ||||
return; | return; | ||||
} | } | ||||
}if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | } | ||||
if(this.uploadFiles==null||this.uploadFiles.length==0){ | if(this.uploadFiles==null||this.uploadFiles.length==0){ | ||||
updateCash(this.form).then((response) => { | updateCash(this.form).then((response) => { | ||||
this.chargeItme.map(res => { | this.chargeItme.map(res => { | ||||
@@ -657,6 +792,14 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -691,6 +834,14 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
this.infoForm.transferId = this.form.id | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -248,10 +273,10 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow , listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
commonAttach, | |||||
commonAttach,listVaccount, listVaccount1, | |||||
systemAttachment | systemAttachment | ||||
} from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; | ||||
import request from '@/utils/request'; | import request from '@/utils/request'; | ||||
@@ -260,6 +285,7 @@ | |||||
name: "approvalModify2", | name: "approvalModify2", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -284,10 +310,10 @@ | |||||
sysDictionaries:[], | sysDictionaries:[], | ||||
capitalExpenditureTypeOptions:[], | capitalExpenditureTypeOptions:[], | ||||
bankTypeDictionaries:[], | bankTypeDictionaries:[], | ||||
infoList:[], | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -301,6 +327,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -311,6 +338,22 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | fileList:[], | ||||
uploadFiles:[], | uploadFiles:[], | ||||
@@ -324,7 +367,15 @@ | |||||
listProject(queryParams).then(response => { | listProject(queryParams).then(response => { | ||||
this.projectList = response.rows; | this.projectList = response.rows; | ||||
for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
this.$set(this.projectList[i],"text",response.rows[i].projectName) | |||||
this.$set(this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
this.$set(this.infoList[i],"text",response.rows[i].name) | |||||
this.$set(this.infoList[i],"value",response.rows[i].code) | |||||
} | } | ||||
}); | }); | ||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
@@ -334,15 +385,14 @@ | |||||
this.projectFundTypeDictionaries = response.data; | this.projectFundTypeDictionaries = response.data; | ||||
}); | }); | ||||
let params1={ | let params1={ | ||||
accountType: "102", | |||||
status: "N", | |||||
villageAccountType:'1', | |||||
"params":{townAccountType:'1'} | |||||
} | } | ||||
getAccount(params1).then((response) => { | |||||
listVaccount1(params1).then((response) => { | |||||
this.payerOptions = response.rows; | this.payerOptions = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
res['payerFrom'] = '1' | res['payerFrom'] = '1' | ||||
console.log(res) | |||||
this.payerOptions[index].text = res.accountName; | |||||
this.payerOptions[index].text = res.payee; | |||||
this.payerOptions[index].value = res.id; | this.payerOptions[index].value = res.id; | ||||
}) | }) | ||||
}); | }); | ||||
@@ -370,6 +420,16 @@ | |||||
this.projectForm = res.data | this.projectForm = res.data | ||||
console.log(res.data) | console.log(res.data) | ||||
}) | }) | ||||
}else if(response.data.capitalExpenditureType==4){ | |||||
this.contractOpen = true | |||||
let param={ | |||||
'transferId' : response.data.id | |||||
} | |||||
console.log(param) | |||||
getInfoto(param).then(res => { | |||||
this.infoForm = res.data | |||||
}) | |||||
}else{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -442,8 +502,9 @@ | |||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id;} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -458,12 +519,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
console.log(data) | |||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -486,6 +554,17 @@ | |||||
}) | }) | ||||
this.showproject = false; | this.showproject = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
console.log(data) | console.log(data) | ||||
for (var i = 0 ; i < this.chargeItme.length ; i++){ | for (var i = 0 ; i < this.chargeItme.length ; i++){ | ||||
@@ -517,12 +596,15 @@ | |||||
this.payeeList = []; | this.payeeList = []; | ||||
this.chargeItme = []; | this.chargeItme = []; | ||||
this.queryParams.accountType = this.form.accountType | this.queryParams.accountType = this.form.accountType | ||||
this.queryParams.bankType = this.form.bankType | |||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -559,6 +641,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -571,6 +667,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then(response => { | updateTransfer(this.form).then(response => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -592,6 +689,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -610,6 +716,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -631,6 +746,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then(response => { | updateTransfer(this.form).then(response => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -652,6 +768,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -670,6 +795,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -703,12 +837,27 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then((response) => { | updateTransfer(this.form).then((response) => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
console.log(this.uploadFiles) | console.log(this.uploadFiles) | ||||
@@ -729,6 +878,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -743,6 +899,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -803,59 +966,29 @@ | |||||
//model就是上面的数据源 | //model就是上面的数据源 | ||||
return account.id === select; //筛选出匹配数据 | return account.id === select; //筛选出匹配数据 | ||||
}); | }); | ||||
if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" && | |||||
obj.enterpriseCode != null && obj.enterpriseCode != "" && | |||||
obj.accountPassword != null && obj.accountPassword != ""){ | |||||
this.$set(this.form, "bookId", obj.bookId); | |||||
this.$set(this.form, "deptId", obj.deptId); | |||||
this.$set(this.form, "cashierId", obj.id); | |||||
this.$set(this.form, "payer", obj.accountName); | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
this.$set(this.form, "payerFrom", '1'); | |||||
}else{ | |||||
if(obj.payerFrom==1){ | |||||
this.diglogStatus = false; | |||||
this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" }); | |||||
this.$set(this.form,"payer","") | |||||
this.$set(this.form,"payerAccount","") | |||||
}else{ | |||||
this.$set(this.form, "payerFrom", obj.parerFrom); | |||||
if(obj.operatorCode!=null&&obj.operatorCode!=''){ | |||||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
}else{ | |||||
this.$set(this.form, "operatorCode", ''); | |||||
} | |||||
if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){ | |||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
}else{ | |||||
this.$set(this.form, "enterpriseCode", ''); | |||||
} | |||||
if(obj.accountPassword!=null&&obj.accountPassword!=''){ | |||||
this.$set(this.form, "accountPassword", obj.accountPassword); | |||||
}else{ | |||||
this.$set(this.form, "accountPassword", ''); | |||||
} | |||||
this.$set(this.form, "bookId",''); | |||||
this.$set(this.form, "deptId", ''); | |||||
this.$set(this.form, "cashierId", obj.id); | |||||
this.$set(this.form, "payer", obj.accountName); | |||||
if(obj.payerFrom==6){ | |||||
getQmyeFlow(obj.bankAccountNumber).then((response) => { | |||||
this.$set(this.form, "payerAccount", response.data); | |||||
}); | |||||
}else { | |||||
this.$set(this.form, "payerAccount", obj.bankAccountNumber); | |||||
} | |||||
} | |||||
this.$set(this.form, "bookId", obj.bookId); | |||||
this.$set(this.form, "deptId", obj.deptId); | |||||
this.$set(this.form, "cashierId", obj.id); | |||||
this.$set(this.form, "payer", obj.payee); | |||||
this.$set(this.form, "payerAccount", obj.payeeAccount); | |||||
this.$set(this.form, "operatorCode", obj.operatorCode); | |||||
this.$set(this.form, "enterpriseCode", obj.enterpriseCode); | |||||
this.$set(this.form, "bankType", obj.bankType); | |||||
this.$set(this.form, "payerFrom", '1'); | |||||
if(obj.bankType==1){ | |||||
this.form.accountType = "1" | |||||
this.form.isPeers = null | |||||
this.accountTypeChange(); | |||||
}else if(obj.bankType==2||obj.bankType==4){ | |||||
this.form.accountType = null | |||||
this.form.isPeers = "Y" | |||||
this.accountTypeChange1(); | |||||
} | } | ||||
}, | }, | ||||
beforeRead(file) { | beforeRead(file) { | ||||
this.uploadFiles.push(file.file); | this.uploadFiles.push(file.file); | ||||
}, | }, | ||||
deleteFile(file){ | deleteFile(file){ | ||||
console.log(file) | |||||
this.uploadFiles.map((response,index) => { | this.uploadFiles.map((response,index) => { | ||||
if(file.file == response){ | if(file.file == response){ | ||||
this.uploadFiles.splice(index,1) | this.uploadFiles.splice(index,1) | ||||
@@ -69,7 +69,7 @@ | |||||
<van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" required | ||||
:rules="[{ required: true , message:'请选择审批模式' }]"> | :rules="[{ required: true , message:'请选择审批模式' }]"> | ||||
<template #input> | <template #input> | ||||
<van-radio-group v-model="form.paymentState" direction="horizontal"> | |||||
<van-radio-group v-model="form.approvalMode" direction="horizontal"> | |||||
<van-radio name="1">线上支付</van-radio> | <van-radio name="1">线上支付</van-radio> | ||||
<van-radio name="2">线下支付</van-radio> | <van-radio name="2">线下支付</van-radio> | ||||
</van-radio-group> | </van-radio-group> | ||||
@@ -112,7 +112,7 @@ | |||||
<van-popup v-model="showproject" position="bottom"> | <van-popup v-model="showproject" position="bottom"> | ||||
<van-picker | <van-picker | ||||
show-toolbar | show-toolbar | ||||
:columns="projectListShow" | |||||
:columns="projectList" | |||||
@confirm="onConfirmProject" | @confirm="onConfirmProject" | ||||
@cancel="showproject = false" | @cancel="showproject = false" | ||||
/> | /> | ||||
@@ -141,6 +141,31 @@ | |||||
</van-popup> | </van-popup> | ||||
<van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" 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> | </div> | ||||
<p class="main_title" v-if="contractOpen">关联合同</p> | |||||
<div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;"> | |||||
<van-field | |||||
readonly | |||||
clickable | |||||
label="合同" | |||||
placeholder="请选择" | |||||
v-model="infoForm.name" | |||||
@click="showcontract = true" | |||||
input-align="right" | |||||
right-icon="arrow-down" | |||||
required | |||||
:rules="[{ required: true , message:'请选择项目名称' }]" | |||||
/> | |||||
<van-popup v-model="showcontract" position="bottom"> | |||||
<van-picker | |||||
show-toolbar | |||||
:columns="infoList" | |||||
@confirm="onConfirmContract" | |||||
@cancel="showcontract = false" | |||||
/> | |||||
</van-popup> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同编码' }]" v-model="infoForm.code" label="合同编码" placeholder="请输入合同编码" input-align="right" label-width="auto"/> | |||||
<van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="infoForm.totalAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/> | |||||
</div> | |||||
<p class="main_title">付款方信息</p> | <p class="main_title">付款方信息</p> | ||||
<div class="main_box"> | <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"/>--> | ||||
@@ -254,7 +279,7 @@ | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { getAccount , getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,getQmyeFlow,listInfo ,getInfoto ,addInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval"; | |||||
import { | import { | ||||
attachmentList, | attachmentList, | ||||
commonAttach, listVaccount, listVaccount1, | commonAttach, listVaccount, listVaccount1, | ||||
@@ -266,6 +291,7 @@ | |||||
name: "approvalModify4", | name: "approvalModify4", | ||||
data() { | data() { | ||||
return { | return { | ||||
showcontract:false, | |||||
showcapital:false, | showcapital:false, | ||||
showpayee:false, | showpayee:false, | ||||
showlasj:false, | showlasj:false, | ||||
@@ -290,10 +316,10 @@ | |||||
sysDictionaries:[], | sysDictionaries:[], | ||||
capitalExpenditureTypeOptions:[], | capitalExpenditureTypeOptions:[], | ||||
bankTypeDictionaries:[], | bankTypeDictionaries:[], | ||||
infoList:[], | |||||
projectList:[], | projectList:[], | ||||
projectFundTypeOptions:[], | projectFundTypeOptions:[], | ||||
projectFundTypeDictionaries:[], | projectFundTypeDictionaries:[], | ||||
projectListShow:[], | |||||
payerOptions:[], | payerOptions:[], | ||||
chargeItme:[], | chargeItme:[], | ||||
@@ -307,6 +333,7 @@ | |||||
isAsc: "desc", | isAsc: "desc", | ||||
}, | }, | ||||
capitalExpenditureOpen:false, | capitalExpenditureOpen:false, | ||||
contractOpen:false, | |||||
projectForm:{ | projectForm:{ | ||||
projectId:null, | projectId:null, | ||||
projectName:null, | projectName:null, | ||||
@@ -317,6 +344,22 @@ | |||||
outId:null, | outId:null, | ||||
ynType:'1' | ynType:'1' | ||||
}, | }, | ||||
infoForm:{ | |||||
infoId:null, | |||||
name:null, | |||||
code:null, | |||||
totalAmount:null, | |||||
contractionId:null, | |||||
transferId:null | |||||
}, | |||||
// 合同信息查询参数 | |||||
queryContractionParams: { | |||||
pageNum: 1, | |||||
pageSize: 100, | |||||
contractionStatus: '1', | |||||
orderByColumn: "endTime", | |||||
isAsc: "desc", | |||||
}, | |||||
projectFundType:'', | projectFundType:'', | ||||
fileList:[], | fileList:[], | ||||
uploadFiles:[], | uploadFiles:[], | ||||
@@ -330,7 +373,15 @@ | |||||
listProject(queryParams).then(response => { | listProject(queryParams).then(response => { | ||||
this.projectList = response.rows; | this.projectList = response.rows; | ||||
for (var i = 0; i < response.rows.length; i++) { | for (var i = 0; i < response.rows.length; i++) { | ||||
this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id}); | |||||
this.$set(this.projectList[i],"text",response.rows[i].projectName) | |||||
this.$set(this.projectList[i],"value",response.rows[i].id) | |||||
} | |||||
}); | |||||
listInfo(this.queryContractionParams).then(response => { | |||||
this.infoList = response.rows; | |||||
for (let i = 0; i < response.rows.length; i++) { | |||||
this.$set(this.infoList[i],"text",response.rows[i].name) | |||||
this.$set(this.infoList[i],"value",response.rows[i].code) | |||||
} | } | ||||
}); | }); | ||||
this.getDicts("project_fund_type").then((response) => { | this.getDicts("project_fund_type").then((response) => { | ||||
@@ -347,7 +398,6 @@ | |||||
this.payerOptions = response.rows; | this.payerOptions = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
res['payerFrom'] = '1' | res['payerFrom'] = '1' | ||||
console.log(res) | |||||
this.payerOptions[index].text = res.payee; | this.payerOptions[index].text = res.payee; | ||||
this.payerOptions[index].value = res.id; | this.payerOptions[index].value = res.id; | ||||
}) | }) | ||||
@@ -376,6 +426,16 @@ | |||||
this.projectForm = res.data | this.projectForm = res.data | ||||
console.log(res.data) | console.log(res.data) | ||||
}) | }) | ||||
}else if(response.data.capitalExpenditureType==4){ | |||||
this.contractOpen = true | |||||
let param={ | |||||
'transferId' : response.data.id | |||||
} | |||||
console.log(param) | |||||
getInfoto(param).then(res => { | |||||
this.infoForm = res.data | |||||
}) | |||||
}else{ | }else{ | ||||
this.showproject = false | this.showproject = false | ||||
} | } | ||||
@@ -448,8 +508,9 @@ | |||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | this.payeeList = response.rows; | ||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id;} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -464,12 +525,19 @@ | |||||
return actions.join(''); | return actions.join(''); | ||||
}, | }, | ||||
onConfirmCapital(data){ | onConfirmCapital(data){ | ||||
console.log(data) | |||||
if (data.value != 2){ | |||||
if (data.value == 2){ | |||||
this.capitalExpenditureOpen = true; | |||||
this.contractOpen = false | |||||
this.infoForm = {}; | |||||
}else if(data.value == 4){ | |||||
this.capitalExpenditureOpen = false; | this.capitalExpenditureOpen = false; | ||||
this.projectForm = []; | |||||
this.contractOpen = true | |||||
this.projectForm = {}; | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = true; | |||||
this.capitalExpenditureOpen = false; | |||||
this.contractOpen = false | |||||
this.projectForm = {}; | |||||
this.infoForm = {}; | |||||
} | } | ||||
this.capitalExpenditureType = data.text; | this.capitalExpenditureType = data.text; | ||||
this.form.capitalExpenditureType = data.value; | this.form.capitalExpenditureType = data.value; | ||||
@@ -492,6 +560,17 @@ | |||||
}) | }) | ||||
this.showproject = false; | this.showproject = false; | ||||
}, | }, | ||||
onConfirmContract(data){ | |||||
this.infoList.map(res => { | |||||
if(res.name==data.text){ | |||||
this.infoForm.contractionId = res.id; | |||||
this.infoForm.name = res.name; | |||||
this.infoForm.code = res.code; | |||||
this.infoForm.totalAmount = res.totalAmount; | |||||
} | |||||
}) | |||||
this.showcontract = false; | |||||
}, | |||||
onConfirmPayee(data,index){ | onConfirmPayee(data,index){ | ||||
for (let i = 0 ; i < this.chargeItme.length ; i++){ | for (let i = 0 ; i < this.chargeItme.length ; i++){ | ||||
this.chargeItme[i].showPayee = false; | this.chargeItme[i].showPayee = false; | ||||
@@ -528,10 +607,12 @@ | |||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -542,10 +623,12 @@ | |||||
this.queryParams.bankType = this.form.bankType | this.queryParams.bankType = this.form.bankType | ||||
this.queryParams.status = "0" | this.queryParams.status = "0" | ||||
listPayee(this.queryParams).then((response) => { | listPayee(this.queryParams).then((response) => { | ||||
this.payeeList = response.rows; | |||||
response.rows.map((res,index) => { | response.rows.map((res,index) => { | ||||
this.payeeList[index].text = res.payee; | |||||
this.payeeList[index].value = res.id; | |||||
if(res.payeeType==1||res.payeeType==2){ | |||||
response.rows[index].text = res.payee; | |||||
response.rows[index].value = res.id; | |||||
this.payeeList.push(res) | |||||
} | |||||
}) | }) | ||||
}); | }); | ||||
}, | }, | ||||
@@ -582,6 +665,20 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){ | ||||
Dialog.confirm({ | Dialog.confirm({ | ||||
title: '提示', | title: '提示', | ||||
@@ -594,6 +691,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then(response => { | updateTransfer(this.form).then(response => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -615,6 +713,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -633,6 +740,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -654,6 +770,7 @@ | |||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then(response => { | updateTransfer(this.form).then(response => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
@@ -675,6 +792,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -693,6 +819,15 @@ | |||||
},2000) | },2000) | ||||
}) | }) | ||||
}) | }) | ||||
} else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
customSubmit(this.form.id).then(res => { | |||||
this.$toast.success('提交成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}) | |||||
}else{ | }else{ | ||||
customSubmit(this.form.id).then(res => { | customSubmit(this.form.id).then(res => { | ||||
this.$toast.success('提交成功'); | this.$toast.success('提交成功'); | ||||
@@ -726,15 +861,29 @@ | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
if(this.form.capitalExpenditureType==4){ | |||||
if(this.infoForm.name==""||this.infoForm.name==null){ | |||||
this.$notify({ type: 'danger', message: '请选择合同名称!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.code==""||this.infoForm.code==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同编码!' }); | |||||
return; | |||||
} | |||||
if(this.infoForm.totalAmount==""||this.infoForm.totalAmount==null){ | |||||
this.$notify({ type: 'danger', message: '请输入合同价款!' }); | |||||
return; | |||||
} | |||||
} | |||||
this.$set(this.form, "payeeList", this.chargeItme); | this.$set(this.form, "payeeList", this.chargeItme); | ||||
this.$set(this.form, "bankTypeList", this.chargeItme); | this.$set(this.form, "bankTypeList", this.chargeItme); | ||||
this.$set(this.form, "accountTypeList", this.chargeItme); | this.$set(this.form, "accountTypeList", this.chargeItme); | ||||
this.$set(this.form, "transferStatusList", this.chargeItme); | this.$set(this.form, "transferStatusList", this.chargeItme); | ||||
updateTransfer(this.form).then((response) => { | updateTransfer(this.form).then((response) => { | ||||
this.projectForm.outId = this.form.id | this.projectForm.outId = this.form.id | ||||
this.infoForm.transferId = this.form.id | |||||
this.$set(this.projectForm, "ynType", '1'); | this.$set(this.projectForm, "ynType", '1'); | ||||
if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | if(this.uploadFiles!=null&&this.uploadFiles.length>0){ | ||||
console.log(this.uploadFiles) | |||||
this.uploadFiles.map(rr => { | this.uploadFiles.map(rr => { | ||||
const params = new FormData(); | const params = new FormData(); | ||||
params.append("tableId", this.form.id); | params.append("tableId", this.form.id); | ||||
@@ -752,6 +901,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -766,6 +922,13 @@ | |||||
history.go(-1) | history.go(-1) | ||||
},2000) | },2000) | ||||
}) | }) | ||||
}else if(this.form.capitalExpenditureType==4){ | |||||
addInfoto(this.infoForm).then(res => { | |||||
this.$toast.success('保存成功'); | |||||
setTimeout(function(){ | |||||
history.go(-1) | |||||
},2000) | |||||
}) | |||||
}else{ | }else{ | ||||
this.$toast.success('保存成功'); | this.$toast.success('保存成功'); | ||||
setTimeout(function(){ | setTimeout(function(){ | ||||
@@ -168,7 +168,7 @@ export default { | |||||
this.projectForm = res.data | this.projectForm = res.data | ||||
this.projectForm.projectFundType+="" | this.projectForm.projectFundType+="" | ||||
listCashdetailByCashId(id).then((r) => { | listCashdetailByCashId(id).then((r) => { | ||||
this.chargeItme = r.rows; | |||||
this.chargeItme = r.data; | |||||
this.length = this.chargeItme.length; | this.length = this.chargeItme.length; | ||||
this.detailTotal = r.total; | this.detailTotal = r.total; | ||||
this.loading = false; | this.loading = false; | ||||
@@ -177,7 +177,7 @@ export default { | |||||
}else{ | }else{ | ||||
this.capitalExpenditureOpen = false | this.capitalExpenditureOpen = false | ||||
listCashdetailByCashId(id).then((r) => { | listCashdetailByCashId(id).then((r) => { | ||||
this.chargeItme = r.rows; | |||||
this.chargeItme = r.data; | |||||
this.length = this.chargeItme.length; | this.length = this.chargeItme.length; | ||||
this.detailTotal = r.total; | this.detailTotal = r.total; | ||||
this.loading = false; | this.loading = false; | ||||
@@ -79,6 +79,16 @@ | |||||
/> | /> | ||||
</template> | </template> | ||||
</van-cell> | </van-cell> | ||||
<van-cell title="退出登录" is-link @click="logout"> | |||||
<template #icon> | |||||
<van-image | |||||
fit="contain" | |||||
height="22" | |||||
style="margin-right: 15px" | |||||
src="../../../static/images/onlineHome/myIcon8.png" | |||||
/> | |||||
</template> | |||||
</van-cell> | |||||
</van-cell-group> | </van-cell-group> | ||||
<onlineHomeIndex></onlineHomeIndex> | <onlineHomeIndex></onlineHomeIndex> | ||||
</div> | </div> | ||||
@@ -86,7 +96,7 @@ | |||||
<script> | <script> | ||||
import onlineHomeIndex from "../onlineHomeIndex"; | import onlineHomeIndex from "../onlineHomeIndex"; | ||||
import {getInfo} from "../../api/login"; | |||||
import {getInfo, logout} from "../../api/login"; | |||||
import request from '@/utils/request' | import request from '@/utils/request' | ||||
export default { | export default { | ||||
components: { | components: { | ||||
@@ -113,7 +123,11 @@ | |||||
}); | }); | ||||
}, | }, | ||||
methods: { | methods: { | ||||
logout(){ | |||||
logout().then(res => { | |||||
this.$router.push({path:"../onlineHomeLogin"}) | |||||
}) | |||||
} | |||||
}, | }, | ||||
} | } | ||||
</script> | </script> | ||||
@@ -6,7 +6,7 @@ | |||||
@click-left="$router.back(-1)" | @click-left="$router.back(-1)" | ||||
/> | /> | ||||
<van-tabs v-model="activeName" title-active-color="#1D6FE9" color="#1D6FE9" line-width="20px" swipeable @click="getList" @change="getList"> | <van-tabs v-model="activeName" title-active-color="#1D6FE9" color="#1D6FE9" line-width="20px" swipeable @click="getList" @change="getList"> | ||||
<van-tab title="村务" name="1" > | |||||
<van-tab title="党务" name="1" > | |||||
<van-list | <van-list | ||||
> | > | ||||
<van-cell v-for="item in list1" :key="item.id" is-link :to="{path:'threeAffairsDetail',query:{id:item.id,type:'1'}}" style="margin:2%;width:96%;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | <van-cell v-for="item in list1" :key="item.id" is-link :to="{path:'threeAffairsDetail',query:{id:item.id,type:'1'}}" style="margin:2%;width:96%;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | ||||
@@ -22,7 +22,7 @@ | |||||
</van-cell> | </van-cell> | ||||
</van-list> | </van-list> | ||||
</van-tab> | </van-tab> | ||||
<van-tab title="党务" name="2"> | |||||
<van-tab title="政务" name="2"> | |||||
<van-list | <van-list | ||||
> | > | ||||
<van-cell v-for="item in list2" :key="item.id" is-link :to="{path:'threeAffairsDetail',query:{id:item.id,type:'2'}}" style="margin:2%;width:96%;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | <van-cell v-for="item in list2" :key="item.id" is-link :to="{path:'threeAffairsDetail',query:{id:item.id,type:'2'}}" style="margin:2%;width:96%;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | ||||
@@ -38,7 +38,7 @@ | |||||
</van-cell> | </van-cell> | ||||
</van-list> | </van-list> | ||||
</van-tab> | </van-tab> | ||||
<van-tab title="政务" name="3"> | |||||
<van-tab title="村务" name="3"> | |||||
<van-list | <van-list | ||||
> | > | ||||
<van-cell v-for="item in list3" :key="item.id" is-link :to="{path:'threeAffairsDetail',query:{id:item.id,type:'3'}}" style="margin:2%;width:96%;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | <van-cell v-for="item in list3" :key="item.id" is-link :to="{path:'threeAffairsDetail',query:{id:item.id,type:'3'}}" style="margin:2%;width:96%;border-radius: 6px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);"> | ||||
@@ -20,7 +20,18 @@ | |||||
</van-popup> | </van-popup> | ||||
</template> | </template> | ||||
<template #right> | <template #right> | ||||
<van-icon name="wap-nav" color="#000" size="18"/> | |||||
<!-- <van-icon name="wap-nav" color="#000" size="18"/>--> | |||||
<p style="color: #878787;margin-left: 5px" @click="bookVisbile = true">{{bookName}}</p> | |||||
<van-popup v-model="bookVisbile" round position="bottom"> | |||||
<van-picker | |||||
title="请选择账套" | |||||
show-toolbar | |||||
:columns="bookList" | |||||
@confirm="onConfirmBook" | |||||
@cancel="onCancelBook" | |||||
value-key="bookName" | |||||
/> | |||||
</van-popup> | |||||
</template> | </template> | ||||
</van-nav-bar> | </van-nav-bar> | ||||
</van-sticky> | </van-sticky> | ||||
@@ -360,7 +371,7 @@ | |||||
<div class="icon" slot="default" style="background:#3ac2db;" > | <div class="icon" slot="default" style="background:#3ac2db;" > | ||||
<img src="../../../static/images/onlineHome/icon_Y2.png" alt /> | <img src="../../../static/images/onlineHome/icon_Y2.png" alt /> | ||||
</div> | </div> | ||||
<p style="margin-top: 5px;color: #666666;">信用卡转账</p> | |||||
<p style="margin-top: 5px;color: #666666;">公务卡转账</p> | |||||
</van-grid-item> | </van-grid-item> | ||||
<!-- | <!-- | ||||
<van-grid-item text="虚拟挂账" :to="{name:'approvalList3'}" > | <van-grid-item text="虚拟挂账" :to="{name:'approvalList3'}" > | ||||
@@ -522,8 +533,8 @@ | |||||
<script> | <script> | ||||
import onlineHomeIndex from "../onlineHomeIndex"; | import onlineHomeIndex from "../onlineHomeIndex"; | ||||
import {getInfo} from "../../api/login"; | import {getInfo} from "../../api/login"; | ||||
import {changeDept, ListTodo} from "../../api/onlineHome/done"; | |||||
import {treeselectByUser} from "../../api/homestead"; | |||||
import {changeDept, ListTodo,changeBook} from "../../api/onlineHome/done"; | |||||
import {treeselectByUser,bookListByDeptId} from "../../api/homestead"; | |||||
export default { | export default { | ||||
components: { | components: { | ||||
onlineHomeIndex | onlineHomeIndex | ||||
@@ -533,7 +544,7 @@ | |||||
return { | return { | ||||
list1: [], | list1: [], | ||||
images:['../../../static/images/onlineHome/tab.jpg'], | images:['../../../static/images/onlineHome/tab.jpg'], | ||||
deptName:this.$store.state.user.deptName, | |||||
deptName:"", | |||||
queryParams: { | queryParams: { | ||||
pageNum: 1, | pageNum: 1, | ||||
pageSize: 100, | pageSize: 100, | ||||
@@ -545,29 +556,65 @@ | |||||
villageVisbile: false, | villageVisbile: false, | ||||
//选中的值 | //选中的值 | ||||
villageValue: "", | villageValue: "", | ||||
//选中村相关信息 | |||||
villageDataObj: { | |||||
deptName: " ", //村名 | |||||
}, | |||||
hcAreaInfoFieldName: { | hcAreaInfoFieldName: { | ||||
text: "label", | text: "label", | ||||
value: "value", | value: "value", | ||||
children: "children", | children: "children", | ||||
}, | }, | ||||
//账套列表 | |||||
bookVisbile:false, | |||||
bookList:[], | |||||
bookName:"", | |||||
bookId:"", | |||||
book:"", | |||||
}; | }; | ||||
}, | }, | ||||
created() { | created() { | ||||
getInfo().then(response => { | |||||
console.log(response.user); | |||||
this.bookName = response.user.bookName | |||||
this.deptName = response.user.deptName | |||||
this.getBookList(response.user.loginDeptId); | |||||
}); | |||||
treeselectByUser().then((res) => { | treeselectByUser().then((res) => { | ||||
if (res.code == 200) { | if (res.code == 200) { | ||||
let content = res.data; | |||||
this.hcAreaInfoOption = content; | |||||
this.hcAreaInfoOption = res.data; | |||||
} | } | ||||
}), | }), | ||||
this.$set(this.queryParams, "systemType", '4'); | |||||
ListTodo(this.queryParams).then((response) => { | ListTodo(this.queryParams).then((response) => { | ||||
this.taskList = response.rows | this.taskList = response.rows | ||||
}) | }) | ||||
}, | }, | ||||
methods:{ | methods:{ | ||||
onConfirmBook(e){ | |||||
this.bookVisbile = false | |||||
this.bookName = e.bookName | |||||
let param={"loginBookId":e.id} | |||||
changeBook(param).then((response) => { | |||||
if (response.code === 200) { | |||||
this.$store.dispatch("GetInfo").then(() => { | |||||
// this.$router.go(0); | |||||
window.location.href = "/onlineHome/workbench"; | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
onCancelBook(e){ | |||||
this.bookVisbile = false | |||||
}, | |||||
getBookList(e){ | |||||
let params = { | |||||
loginDeptID:e | |||||
} | |||||
bookListByDeptId(params).then((response) => { | |||||
if (response.code == 200) { | |||||
this.bookList = response.rows; | |||||
} | |||||
}) | |||||
}, | |||||
selectDept(){ | selectDept(){ | ||||
this.villageVisbile = true; | this.villageVisbile = true; | ||||
}, | }, | ||||
@@ -579,7 +626,6 @@ | |||||
// 切换部门 | // 切换部门 | ||||
let Depquery={"loginDeptID":value} | let Depquery={"loginDeptID":value} | ||||
changeDept(Depquery).then((response) => { | changeDept(Depquery).then((response) => { | ||||
console.log(response) | |||||
if (response.code === 200) { | if (response.code === 200) { | ||||
this.$store.dispatch("GetInfo").then(() => { | this.$store.dispatch("GetInfo").then(() => { | ||||
// this.$router.go(0); | // this.$router.go(0); | ||||