yujk 3 лет назад
Родитель
Сommit
f8806dad2e
22 измененных файлов: 1939 добавлений и 1085 удалений
  1. +2
    -1
      src/views/homesteadSurvey/index.vue
  2. +1
    -1
      src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountAdd.vue
  3. +1
    -1
      src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountDetail.vue
  4. +1
    -1
      src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountModify.vue
  5. +152
    -111
      src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd.vue
  6. +122
    -18
      src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue
  7. +122
    -18
      src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue
  8. +122
    -19
      src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd12.vue
  9. +168
    -149
      src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd2.vue
  10. +147
    -126
      src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd4.vue
  11. +44
    -8
      src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail.vue
  12. +44
    -10
      src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail10.vue
  13. +44
    -10
      src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail11.vue
  14. +44
    -10
      src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail12.vue
  15. +44
    -10
      src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail2.vue
  16. +44
    -10
      src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail4.vue
  17. +152
    -134
      src/views/yinnong/bankAgriculture/paymentApproval/approvalModify.vue
  18. +144
    -74
      src/views/yinnong/bankAgriculture/paymentApproval/approvalModify10.vue
  19. +166
    -91
      src/views/yinnong/bankAgriculture/paymentApproval/approvalModify11.vue
  20. +77
    -13
      src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue
  21. +137
    -125
      src/views/yinnong/bankAgriculture/paymentApproval/approvalModify2.vue
  22. +161
    -145
      src/views/yinnong/bankAgriculture/paymentApproval/approvalModify4.vue

+ 2
- 1
src/views/homesteadSurvey/index.vue Просмотреть файл

@@ -368,8 +368,9 @@
this.$router.push({name:'homesteadList'})
this.$cookies.set("item",JSON.stringify(item));
}*/
this.$router.push({name:'homesteadList'})
this.$cookies.set("item","");
this.$cookies.set("item",JSON.stringify(item));
this.$router.push({name:'homesteadList'})
},
getList() {
this.totalList = []


+ 1
- 1
src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountAdd.vue Просмотреть файл

@@ -88,7 +88,7 @@
label-width="auto"
required
:rules="[{ required: true , message:'请选择所属镇账户' }]"
v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=1"
v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=2"
/>
<van-popup v-model="showTaccountId" position="bottom">
<van-picker


+ 1
- 1
src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountDetail.vue Просмотреть файл

@@ -15,7 +15,7 @@
<van-field readonly label="账户类型" v-model="accountType" input-align="right" label-width="auto" />
<van-field readonly label="所属银行" v-model="bankType" input-align="right" label-width="auto" />
<van-field readonly label="账户分类" v-if="accountType=='银行存款'&&(bankType=='中国银行'||bankType=='山东省农村信用社(农商行)')" v-model="villageAccountType" input-align="right" label-width="auto" />
<van-field readonly label="所属镇账户" v-if="accountType=='银行存款'&&villageAccountType!='村虚拟账户'" v-model="taccountId" input-align="right" label-width="auto" />
<van-field readonly label="所属镇账户" v-if="accountType=='银行存款'&&villageAccountType!='村实体账户'" v-model="taccountId" input-align="right" label-width="auto" />
<van-field readonly label="账簿号" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'" v-model="accountNo" input-align="right" label-width="auto" />
<van-cell title="管控类型" v-if="accountType=='银行存款'&&villageAccountType=='多级账簿'&&bankType=='山东省农村信用社(农商行)'" >
<template #right-icon>


+ 1
- 1
src/views/yinnong/bankAgriculture/paymentAccount/paymentAccountModify.vue Просмотреть файл

@@ -88,7 +88,7 @@
label-width="auto"
required
:rules="[{ required: true , message:'请选择所属镇账户' }]"
v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=1"
v-if="accountType=='银行存款'&&(form.bankType=='1'||form.bankType=='2')&&form.villageAccountType!=2"
/>
<van-popup v-model="showTaccountId" position="bottom">
<van-picker


+ 152
- 111
src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd.vue Просмотреть файл

@@ -259,9 +259,17 @@
</van-popup>-->
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -304,8 +312,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
fileList:[],

fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -360,10 +369,14 @@
isAsc: "desc",
},
projectFundType:'',
uploadFiles:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
nowDate:""
};
},
created() {
this.getNowDate();
this.reset();
this.initProjectInfo();
this.capitalExpenditureOpen = false
@@ -389,6 +402,13 @@
this.getDictionaries();
},
methods: {
getNowDate(){
var _this = this;
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
_this.nowDate = yy+'-'+mm+'-'+dd
},
initProjectInfo(){
let _this = this
let queryParams={
@@ -419,6 +439,8 @@
this.form = {
id: null,
upId: null,
applyDate:this.nowDate,
approvalMode:'1',
downId: null,
orderId: null,
cashierId: null,
@@ -688,7 +710,7 @@
return;
}
}
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -702,70 +724,31 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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{
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{
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 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 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{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
})
@@ -781,70 +764,64 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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)
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
} 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)
})
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
})}
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{
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 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 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{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
}
@@ -893,7 +870,7 @@
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_transfer");
@@ -903,6 +880,26 @@
commonAttach(params).then((r) => {
})
})
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
@@ -1077,27 +1074,71 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles2.splice(index,1)
}
})
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles3.splice(index,1)
}
})
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},


+ 122
- 18
src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd10.vue Просмотреть файл

@@ -203,9 +203,17 @@
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -253,7 +261,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -308,10 +318,14 @@
isAsc: "desc",
},
projectFundType:'',
uploadFiles:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
nowDate:""
};
},
created() {
this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -337,6 +351,13 @@
this.addChargeItme();
},
methods: {
getNowDate(){
var _this = this;
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
_this.nowDate = yy+'-'+mm+'-'+dd
},
initProjectInfo(){
let _this = this
let queryParams={
@@ -366,6 +387,8 @@
reset() {
this.form = {
id: null,
applyDate:this.nowDate,
approvalMode:'1',
upId: null,
downId: null,
orderId: null,
@@ -645,7 +668,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -655,6 +678,26 @@
commonAttach(params).then((r) => {
})
})
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {})
@@ -757,7 +800,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -767,6 +810,26 @@
commonAttach(params).then((r) => {
})
})
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {})
@@ -910,30 +973,71 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles3.splice(index,1)
}
})
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "1",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "3",
}
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},


+ 122
- 18
src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd11.vue Просмотреть файл

@@ -204,9 +204,17 @@
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -254,7 +262,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -309,10 +319,14 @@
isAsc: "desc",
},
projectFundType:'',
uploadFiles:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
nowDate:""
};
},
created() {
this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -340,6 +354,13 @@
this.addChargeItme();
},
methods: {
getNowDate(){
var _this = this;
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
_this.nowDate = yy+'-'+mm+'-'+dd
},
initProjectInfo(){
let _this = this
let queryParams={
@@ -370,6 +391,8 @@
this.form = {
id: null,
upId: null,
applyDate:this.nowDate,
approvalMode:'1',
downId: null,
orderId: null,
cashierId: null,
@@ -647,7 +670,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -657,6 +680,26 @@
commonAttach(params).then((r) => {
})
})
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {})
@@ -775,7 +818,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -785,6 +828,26 @@
commonAttach(params).then((r) => {
})
})
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {})
@@ -930,30 +993,71 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles3.splice(index,1)
}
})
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},


+ 122
- 19
src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd12.vue Просмотреть файл

@@ -248,9 +248,17 @@
<van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -299,7 +307,9 @@
maxDate: new Date(2050, 10, 1),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -357,10 +367,14 @@
projectFundType:'',
orderTypeName:'',
orderTypeOptions:[],
uploadFiles:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
nowDate:""
};
},
created() {
this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -389,6 +403,13 @@
this.getDictionaries();
},
methods: {
getNowDate(){
var _this = this;
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
_this.nowDate = yy+'-'+mm+'-'+dd
},
initProjectInfo(){
let _this = this
let queryParams={
@@ -418,6 +439,8 @@
reset() {
this.form = {
id: null,
applyDate:this.nowDate,
approvalMode:'1',
upId: null,
downId: null,
orderId: null,
@@ -730,8 +753,7 @@
})
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -741,6 +763,26 @@
commonAttach(params).then((r) => {
})
})
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {})
@@ -843,7 +885,7 @@
}else{
addCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
@@ -853,6 +895,26 @@
commonAttach(params).then((r) => {
})
})
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme.map(res => {
res.cashId = response.data.id
addCashdetail(res).then(r => {})
@@ -981,30 +1043,71 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles3.splice(index,1)
}
})
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "1",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "3",
}
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},


+ 168
- 149
src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd2.vue Просмотреть файл

@@ -251,9 +251,17 @@
/>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -295,7 +303,9 @@
currentDate: new Date(),
form:{
},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -351,10 +361,14 @@
isAsc: "desc",
},
projectFundType:'',
uploadFiles:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
nowDate:""
};
},
created() {
this.getNowDate();
this.reset();
this.initProjectInfo();
this.getDicts("project_fund_type").then((response) => {
@@ -378,6 +392,13 @@
this.getDictionaries();
},
methods: {
getNowDate(){
var _this = this;
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
_this.nowDate = yy+'-'+mm+'-'+dd
},
initProjectInfo(){
let _this = this
let queryParams={
@@ -406,6 +427,8 @@
reset() {
this.form = {
id: null,
applyDate:this.nowDate,
approvalMode:'1',
upId: null,
downId: null,
orderId: null,
@@ -674,7 +697,7 @@
return;
}
}
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -688,70 +711,31 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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{
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{
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 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 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{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
})
@@ -767,75 +751,67 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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)
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
} 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)
})
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
})}
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{
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 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 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{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
}


},
goUpdate(){
if(this.chargeItme.length<1){
@@ -878,58 +854,58 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
})}
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
}else{
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}else{
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
})
}else{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}

});
@@ -1048,31 +1024,74 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles1.splice(index,1)
}
})
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles3.splice(index,1)
}
})
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",

}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",

}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",

}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},


+ 147
- 126
src/views/yinnong/bankAgriculture/paymentApproval/approvalAdd4.vue Просмотреть файл

@@ -251,9 +251,17 @@
/>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -301,7 +309,9 @@
maxDate: new Date(2050, 12, 31),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -356,10 +366,14 @@
isAsc: "desc",
},
projectFundType:'',
uploadFiles:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
nowDate:""
};
},
created() {
this.getNowDate();
this.reset();
this.initProjectInfo();
this.capitalExpenditureOpen = false
@@ -385,6 +399,13 @@
this.getDictionaries();
},
methods: {
getNowDate(){
var _this = this;
let yy = new Date().getFullYear();
let mm = new Date().getMonth()+1;
let dd = new Date().getDate();
_this.nowDate = yy+'-'+mm+'-'+dd
},
initProjectInfo(){
let _this = this
let queryParams={
@@ -413,6 +434,8 @@
this.form = {
id: null,
upId: null,
applyDate:this.nowDate,
approvalMode:'1',
downId: null,
orderId: null,
cashierId: null,
@@ -684,7 +707,7 @@
return;
}
}
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -698,70 +721,31 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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{
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{
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 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 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{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
})
@@ -777,44 +761,39 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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)
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}
}else{
})}
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
customSubmit(response.data.id).then(res => {
@@ -841,7 +820,7 @@
},2000)
})
}
}
});
}

@@ -888,38 +867,39 @@
this.projectForm.outId = response.data.id
this.infoForm.transferId = response.data.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", response.data.id);
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
}else{
})}
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
@@ -940,8 +920,6 @@
history.go(-1)
},2000)
}
}

});
},
payeeSelectChange(select, i) {
@@ -1034,31 +1012,74 @@
this.accountTypeChange1();
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles2.splice(index,1)
}
})
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles3.splice(index,1)
}
})
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",

}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",

}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",

}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
})
})
},


+ 44
- 8
src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail.vue Просмотреть файл

@@ -72,10 +72,20 @@
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
</div>
</div>
</template>
@@ -103,7 +113,9 @@
maxDate: new Date(2025, 10, 1),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -220,16 +232,40 @@
});
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
attachmentList(oData3).then(res => {
res.rows.map(r => {
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.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 44
- 10
src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail10.vue Просмотреть файл

@@ -63,9 +63,20 @@
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
</div>
</div>
</template>
@@ -94,7 +105,9 @@
maxDate: new Date(2050, 10, 1),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -204,19 +217,40 @@
});
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 44
- 10
src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail11.vue Просмотреть файл

@@ -64,9 +64,20 @@
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" label-width="auto"/>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
</div>
</div>
</template>
@@ -95,7 +106,9 @@
maxDate: new Date(2025, 10, 1),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -215,19 +228,40 @@
});
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 44
- 10
src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail12.vue Просмотреть файл

@@ -116,9 +116,20 @@
<van-field readonly label="资金用途" v-model="item.remark" input-align="right" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
</div>
</div>
</template>
@@ -147,7 +158,9 @@
maxDate: new Date(2025, 10, 1),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -279,19 +292,40 @@
});
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 44
- 10
src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail2.vue Просмотреть файл

@@ -69,9 +69,20 @@
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
</div>
</div>
</template>
@@ -99,7 +110,9 @@
maxDate: new Date(2025, 10, 1),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -216,19 +229,40 @@
});
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 44
- 10
src/views/yinnong/bankAgriculture/paymentApproval/approvalDetail4.vue Просмотреть файл

@@ -71,9 +71,20 @@
<van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
<van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
</div>
</div>
</template>
@@ -101,7 +112,9 @@
maxDate: new Date(2025, 10, 1),
currentDate: new Date(),
form:{},
fileList:[],
fileList1:[],
fileList2:[],
fileList3:[],
capitalExpenditureType:'',
payee:'',
bankType:'',
@@ -218,19 +231,40 @@
});
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 152
- 134
src/views/yinnong/bankAgriculture/paymentApproval/approvalModify.vue Просмотреть файл

@@ -259,9 +259,17 @@
</van-popup>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -361,8 +369,12 @@
isAsc: "desc",
},
projectFundType:'',
fileList:[],
uploadFiles:[],
fileList1:[],
fileList2:[],
fileList3:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
};
},
created() {
@@ -681,7 +693,7 @@
return;
}
}
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -695,70 +707,31 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "upload");
params.append("fileType", "0");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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{
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{
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 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 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{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
})
@@ -774,70 +747,64 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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)
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
} 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)
})
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
})}
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{
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 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 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{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
}
@@ -885,38 +852,39 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
}else{
})}
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
@@ -937,7 +905,6 @@
history.go(-1)
},2000)
}
}

});
},
@@ -1064,32 +1031,83 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles1.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles3.splice(index,1)
}
})
console.log(file)
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
attachmentList(oData3).then(res => {
res.rows.map(r => {
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.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 144
- 74
src/views/yinnong/bankAgriculture/paymentApproval/approvalModify10.vue Просмотреть файл

@@ -204,9 +204,17 @@
<van-field required :rules="[{ required: true , message:'请输入资金用途' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto" />
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -308,8 +316,12 @@
isAsc: "desc",
},
projectFundType:'',
fileList:[],
uploadFiles:[],
fileList1:[],
fileList2:[],
fileList3:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
};
},
created() {
@@ -597,7 +609,7 @@
this.$set(this.form, "bankTypeList", this.chargeItme);
this.$set(this.form, "accountTypeList", this.chargeItme);
this.$set(this.form, "transferStatusList", this.chargeItme);
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -642,17 +654,39 @@
})
}else {
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
@@ -724,52 +758,40 @@
}
}
this.projectForm.outId = this.form.id
if(this.uploadFiles==null||this.uploadFiles.length==0){
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
})
})
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},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)
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
}else{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
});
}else {
updateCash(this.form).then((response) => {
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
@@ -801,7 +823,7 @@
},2000)
}
});
}

},
payeeSelectChange(select, i) {
@@ -902,14 +924,41 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile(file){
console.log(file)
this.uploadFiles.map((response,index) => {
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles1.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles3.splice(index,1)
}
})
if(file.id){
@@ -918,19 +967,40 @@
}
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "1",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "3",
}
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 166
- 91
src/views/yinnong/bankAgriculture/paymentApproval/approvalModify11.vue Просмотреть файл

@@ -206,9 +206,17 @@
</div>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -309,8 +317,12 @@
isAsc: "desc",
},
projectFundType:'',
fileList:[],
uploadFiles:[],
fileList1:[],
fileList2:[],
fileList3:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
};
},
created() {
@@ -609,7 +621,7 @@
this.$set(this.form, "bankTypeList", this.chargeItme);
this.$set(this.form, "accountTypeList", this.chargeItme);
this.$set(this.form, "transferStatusList", this.chargeItme);
if(this.uploadFiles==null||this.uploadFiles.length==0){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -635,7 +647,7 @@
}else if(this.form.capitalExpenditureType==4){
this.infoForm.transferId = this.form.id
addInfoto(this.infoForm).then(res => {
cashSubmit(response.data.id).then(res => {
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
@@ -654,17 +666,39 @@
})
}else {
updateCash(this.form).then((response) => {
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
this.chargeItme = this.chargeItme.reverse()
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})}
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
@@ -684,7 +718,7 @@
}else if(this.form.capitalExpenditureType==4){
this.infoForm.transferId = this.form.id
addInfoto(this.infoForm).then(res => {
cashSubmit(this.form.id).then(res => {
customSubmit(response.data.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
@@ -752,80 +786,71 @@
}
}
this.projectForm.outId = this.form.id
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
updateCash(this.form).then((response) => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}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)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_cash");
params.append("bizPath", "yinnong");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
})}
this.chargeItme.map(res => {
res.cashId = this.form.id
addCashdetail(res).then(r => {
})
})
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
});
}else {
updateCash(this.form).then((response) => {
this.chargeItme.map(res => {
console.log(res)
res.cashId = this.form.id
addCashdetail(res).then(r => {
})
})
if(this.form.capitalExpenditureType==2){
this.projectForm.outId = this.form.id
this.$set(this.projectForm, "ynType", '2');
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}else if(this.form.capitalExpenditureType==4){
this.infoForm.transferId = this.form.id
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
}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{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
});
}
})
}else{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
});
}
}

@@ -943,33 +968,83 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles1.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles3.splice(index,1)
}
})
console.log(file)
if(file.id){
console.log(file.id)
systemAttachment(file.id).then((res) => {
});
}
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
attachmentList(oData3).then(res => {
res.rows.map(r => {
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.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 77
- 13
src/views/yinnong/bankAgriculture/paymentApproval/approvalModify12.vue Просмотреть файл

@@ -256,9 +256,17 @@
<van-field required :rules="[{ required: true , message:'资金用途不能为空' }]" v-model="item.remark" label="资金用途" placeholder="请输入资金用途" input-align="right" label-width="auto"/>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -359,8 +367,12 @@
isAsc: "desc",
},
projectFundType:'',
fileList:[],
uploadFiles:[],
fileList1:[],
fileList2:[],
fileList3:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
orderTypeName:'',
orderTypeOptions:[]
};
@@ -960,13 +972,41 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles3.splice(index,1)
}
})
if(file.id){
@@ -975,16 +1015,40 @@
}
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_cash",
bizPath: "yinnong",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
attachmentList(oData3).then(res => {
res.rows.map(r => {
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.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 137
- 125
src/views/yinnong/bankAgriculture/paymentApproval/approvalModify2.vue Просмотреть файл

@@ -261,9 +261,17 @@
</van-popup>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" accept="image/*,file/*" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -363,8 +371,12 @@
isAsc: "desc",
},
projectFundType:'',
fileList:[],
uploadFiles:[],
fileList1:[],
fileList2:[],
fileList3:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
};
},
created() {
@@ -666,7 +678,7 @@
return;
}
}
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -680,70 +692,31 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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{
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{
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 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 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{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
})
@@ -759,8 +732,8 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
@@ -769,34 +742,29 @@
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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)
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}
}else{
})}
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
customSubmit(this.form.id).then(res => {
@@ -823,11 +791,8 @@
},2000)
})
}
}
});
}


},
goUpdate(){
if(this.chargeItme.length<1){
@@ -870,9 +835,8 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
console.log(this.uploadFiles)
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
@@ -881,28 +845,29 @@
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
}else{
})}
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
@@ -923,8 +888,6 @@
history.go(-1)
},2000)
}
}

});
},
accountTypeChange1(e){
@@ -1066,13 +1029,41 @@
}
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles3.splice(index,1)
}
})
if(file.id){
@@ -1081,19 +1072,40 @@
}
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


+ 161
- 145
src/views/yinnong/bankAgriculture/paymentApproval/approvalModify4.vue Просмотреть файл

@@ -259,9 +259,17 @@
</van-popup>
</div>
</div>
<p class="main_title">上传附件</p>
<p class="main_title">上传附件(收据)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
<van-uploader v-model="fileList1" :after-read="beforeRead1" @delete="deleteFile1"></van-uploader>
</div>
<p class="main_title">上传附件(发票)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList2" :after-read="beforeRead2" @delete="deleteFile2"></van-uploader>
</div>
<p class="main_title">上传附件(其他)</p>
<div class="main_box" style="padding: 5px 0 0 8px;">
<van-uploader v-model="fileList3" :after-read="beforeRead3" @delete="deleteFile3"></van-uploader>
</div>
<div style="padding: 16px 0;">
<van-row>
@@ -361,8 +369,12 @@
isAsc: "desc",
},
projectFundType:'',
fileList:[],
uploadFiles:[],
fileList1:[],
fileList2:[],
fileList3:[],
uploadFiles1:[],
uploadFiles2:[],
uploadFiles3:[],
};
},
created() {
@@ -682,7 +694,7 @@
return;
}
}
if((this.uploadFiles==null||this.uploadFiles.length==0)&&(this.fileList==null||this.fileList.length==0)){
if((this.uploadFiles1==null||this.uploadFiles1.length==0)&&(this.uploadFiles2==null||this.uploadFiles2.length==0)&&(this.uploadFiles3==null||this.uploadFiles3.length==0)){
Dialog.confirm({
title: '提示',
message: '此申请单中未上传任何附件,是否确认提交?',
@@ -696,70 +708,31 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "1");
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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 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{
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{
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 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 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{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
})
@@ -775,8 +748,8 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
@@ -785,60 +758,54 @@
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
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)
})
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
} 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)
})
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
})}
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{
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 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 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{
customSubmit(this.form.id).then(res => {
this.$toast.success('提交成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}
});
}
@@ -886,8 +853,8 @@
this.projectForm.outId = this.form.id
this.infoForm.transferId = this.form.id
this.$set(this.projectForm, "ynType", '1');
if(this.uploadFiles!=null&&this.uploadFiles.length>0){
this.uploadFiles.map(rr => {
if(this.uploadFiles1!=null&&this.uploadFiles1.length>0){
this.uploadFiles1.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
@@ -896,48 +863,48 @@
params.append("file", rr);
commonAttach(params).then((r) => {
})
})
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles2!=null&&this.uploadFiles2.length>0){
this.uploadFiles2.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "2");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})}
if(this.uploadFiles3!=null&&this.uploadFiles3.length>0){
this.uploadFiles3.map(rr => {
const params = new FormData();
params.append("tableId", this.form.id);
params.append("tableName", "t_yinnong_transfer");
params.append("bizPath", "transfer");
params.append("fileType", "3");
params.append("file", rr);
commonAttach(params).then((r) => {
})
}else{
})}
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
}else{
if(this.form.capitalExpenditureType==2){
addProjectto(this.projectForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
})
}else{
})
}else if(this.form.capitalExpenditureType==4){
addInfoto(this.infoForm).then(res => {
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}
})
}else{
this.$toast.success('保存成功');
setTimeout(function(){
history.go(-1)
},2000)
}

});
@@ -1026,13 +993,41 @@
this.accountTypeChange1();
}
},
beforeRead(file) {
this.uploadFiles.push(file.file);
beforeRead1(file) {
this.uploadFiles1.push(file.file);
},
deleteFile1(file){
this.uploadFiles1.map((response,index) => {
if(file.file == response){
this.uploadFiles1.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead2(file) {
this.uploadFiles2.push(file.file);
},
deleteFile2(file){
this.uploadFiles2.map((response,index) => {
if(file.file == response){
this.uploadFiles2.splice(index,1)
}
})
if(file.id){
systemAttachment(file.id).then((res) => {
});
}
},
beforeRead3(file) {
this.uploadFiles3.push(file.file);
},
deleteFile(file){
this.uploadFiles.map((response,index) => {
deleteFile3(file){
this.uploadFiles3.map((response,index) => {
if(file.file == response){
this.uploadFiles.splice(index,1)
this.uploadFiles3.splice(index,1)
}
})
if(file.id){
@@ -1041,19 +1036,40 @@
}
},
getFileList(){
let oData= {
let oData1= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "1",
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData2= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "2",
}
attachmentList(oData2).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
let oData3= {
tableId: this.$route.query.id,
tableName: "t_yinnong_transfer",
bizPath: "transfer",
fileType: "",
fileType: "3",
}
attachmentList(oData).then(res => {
console.log(res)
console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
attachmentList(oData3).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
console.log(r)
this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},


Загрузка…
Отмена
Сохранить