|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div v-show="viewState == 1">
|
|
|
|
<button-bar ref="btnbar" view-title="项目监管报表" :btndisabled="btndisabled" @btnhandle="btnHandle" />
|
|
|
|
<div class="main-content">
|
|
|
|
<div class="searchcon">
|
|
|
|
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
|
|
|
|
<div v-show="isSearchShow" class="search">
|
|
|
|
<el-form :inline="true" :model="queryParams" class="tab-header">
|
|
|
|
<el-form-item label="数据日期">
|
|
|
|
<el-date-picker v-model="queryParams.params.dataDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据开始日期" style="width: 140px;" />
|
|
|
|
<span style="padding: 0 8px">至</span>
|
|
|
|
<el-date-picker v-model="queryParams.params.dataDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择数据结束日期" style="width: 140px;" />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="监管项目">
|
|
|
|
<el-select v-model="queryParams.params.projectSid" placeholder="请选择" clearable style="width: 300px;">
|
|
|
|
<el-option v-for="item in projectList" :key="item.sid" :label="item.entryName" :value="item.sid" />
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
<div class="btn" style="text-align: center;">
|
|
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button>
|
|
|
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Start 项目列表头部 -->
|
|
|
|
<div class="listtop">
|
|
|
|
<div class="tit" />
|
|
|
|
<pageye
|
|
|
|
v-show="dataList.length > 0"
|
|
|
|
:total="queryParams.total"
|
|
|
|
:page.sync="queryParams.current"
|
|
|
|
:limit.sync="queryParams.size"
|
|
|
|
class="pagination"
|
|
|
|
@pagination="loadList"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<!-- End 项目列表头部 -->
|
|
|
|
<!-- Start 项目列表 -->
|
|
|
|
<div class="">
|
|
|
|
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
|
|
|
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
|
|
|
<el-table-column prop="orderDate" label="数据日期" align="center" width="110" />
|
|
|
|
<el-table-column prop="createTime" label="录入时间" align="center" width="160" />
|
|
|
|
<el-table-column prop="projectName" label="项目名称" align="center" />
|
|
|
|
<el-table-column prop="accountsBalance" label="帐户余额(元)" align="center" width="140" />
|
|
|
|
<el-table-column prop="accountsReceivable" label="应收账款(元)" align="center" width="140" />
|
|
|
|
<el-table-column prop="stockAmount" label="库存货值(元)" align="center" width="140" />
|
|
|
|
<el-table-column prop="transitAmount" label="在途货值(元)" align="center" width="140" />
|
|
|
|
<el-table-column prop="advancePayment" label="预付款(元)" align="center" width="140" />
|
|
|
|
<el-table-column label="操作" align="center" width="130">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button type="primary" icon="el-icon-chat-dot-round" size="small" @click="sendMess(scope.row)">发送通知</el-button>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</div>
|
|
|
|
<!-- End 项目列表 -->
|
|
|
|
<div class="pages">
|
|
|
|
<div class="tit" />
|
|
|
|
<!-- 翻页 -->
|
|
|
|
<pagination
|
|
|
|
v-show="dataList.length > 0"
|
|
|
|
:total="queryParams.total"
|
|
|
|
:page.sync="queryParams.current"
|
|
|
|
:limit.sync="queryParams.size"
|
|
|
|
class="pagination"
|
|
|
|
@pagination="loadList"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<el-dialog title="编辑项目监管报表数据" :close-on-click-modal="false" :visible.sync="dialogVisible" width="60%" :before-close="projectDailyClose">
|
|
|
|
<el-form ref="form_daily" :model="projectDaily" :rules="rules" label-position="right" class="formadd">
|
|
|
|
<div class="title">
|
|
|
|
<div>项目监管数据</div>
|
|
|
|
</div>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>填报日期</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6" class="trightb">
|
|
|
|
<el-form-item prop="orderDate"> <el-date-picker v-model="projectDaily.orderDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" /></el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="4" class="tleftb">
|
|
|
|
<span>选择监管项目</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8" class="trightb">
|
|
|
|
<el-form-item>
|
|
|
|
<el-select v-model="projectDaily.projectSid" placeholder="请选择" @change="projectSelectChange()">
|
|
|
|
<el-option v-for="item in projectList" :key="item.sid" :label="item.entryName" :value="item.sid" />
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>贷款总额(元)</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="18" class="trightb">
|
|
|
|
<el-form-item prop="totalLoan">
|
|
|
|
<el-input v-model="projectDaily.totalLoan" oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="" class="addinputw" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>帐户余额(元)</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10" class="trightb">
|
|
|
|
<el-form-item prop="accountsBalance">
|
|
|
|
<el-input v-model="projectDaily.accountsBalance" oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="" class="addinputw" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8" class="trightb">
|
|
|
|
<el-form-item>
|
|
|
|
<el-upload class="upload-demo" :action="updateAction" :on-success="handleSuccess1" :show-file-list="false">
|
|
|
|
<el-button size="small" type="primary">上传账户余额报表</el-button>
|
|
|
|
</el-upload>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>应收账款(元)</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10" class="trightb">
|
|
|
|
<el-form-item prop="accountsReceivable">
|
|
|
|
<el-input v-model="projectDaily.accountsReceivable" oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="" class="addinputw" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8" class="trightb">
|
|
|
|
<el-form-item>
|
|
|
|
<el-upload class="upload-demo" :action="updateAction" :on-success="handleSuccess2" :show-file-list="false">
|
|
|
|
<el-button size="small" type="primary">上传应收账款报表</el-button>
|
|
|
|
</el-upload>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>库存货值(元)</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10" class="trightb">
|
|
|
|
<el-form-item prop="stockAmount">
|
|
|
|
<el-input v-model="projectDaily.stockAmount" oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="" class="addinputw" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8" class="trightb">
|
|
|
|
<el-form-item>
|
|
|
|
<el-upload class="upload-demo" :action="updateAction" :on-success="handleSuccess3" :show-file-list="false">
|
|
|
|
<el-button size="small" type="primary">上传库存货值报表</el-button>
|
|
|
|
</el-upload>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>在途货值(元)</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10" class="trightb">
|
|
|
|
<el-form-item prop="transitAmount">
|
|
|
|
<el-input v-model="projectDaily.transitAmount" oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="" class="addinputw" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8" class="trightb">
|
|
|
|
<el-form-item>
|
|
|
|
<el-upload class="upload-demo" :action="updateAction" :on-success="handleSuccess4" :show-file-list="false">
|
|
|
|
<el-button size="small" type="primary">上传在途货值报表</el-button>
|
|
|
|
</el-upload>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>预付款(元)</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="10" class="trightb">
|
|
|
|
<el-form-item prop="advancePayment">
|
|
|
|
<el-input v-model="projectDaily.advancePayment" oninput="value=value.replace(/[^0-9.]/g,'')" placeholder="" class="addinputw" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8" class="trightb">
|
|
|
|
<el-form-item>
|
|
|
|
<el-upload class="upload-demo" :action="updateAction" :on-success="handleSuccess5" :show-file-list="false">
|
|
|
|
<el-button size="small" type="primary">上传预付款报表</el-button>
|
|
|
|
</el-upload>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6" class="tleftb">
|
|
|
|
<span>备注</span>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="18" class="trightb">
|
|
|
|
<el-form-item><el-input v-model="projectDaily.remarks" type="textarea" :rows="2" placeholder="" class="addinputw" clearable /></el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-form>
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
<el-button @click="projectDailyClose">取 消</el-button>
|
|
|
|
<el-button type="primary" @click="projectDailySave()">保 存</el-button>
|
|
|
|
</span>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import ButtonBar from '@/components/ButtonBar'
|
|
|
|
import Pagination from '@/components/pagination'
|
|
|
|
import pageye from '@/components/pagination/pageye'
|
|
|
|
import req from '@/api/project/projectDaily'
|
|
|
|
import {
|
|
|
|
parseTime
|
|
|
|
} from '@/utils/index'
|
|
|
|
export default {
|
|
|
|
name: 'DaydatauploadCash',
|
|
|
|
components: {
|
|
|
|
ButtonBar,
|
|
|
|
Pagination,
|
|
|
|
pageye
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
var checkIsNumber = (rule, value, callback) => {
|
|
|
|
if (!value) { // 当使用时没有定义text则非空验证默认提示请输入
|
|
|
|
callback(new Error(rule.text ? rule.text : '请输入'))
|
|
|
|
} else {
|
|
|
|
// const reg = /^[0-9]*$/
|
|
|
|
const reg = /^[+-]?\d+(?:\.\d{1,4})?$/
|
|
|
|
if (reg.test(value) && value >= 0) {
|
|
|
|
callback()
|
|
|
|
} else {
|
|
|
|
if (!String(value).indexOf('.') + 1) {
|
|
|
|
callback(new Error('请输入数字!'))
|
|
|
|
} else {
|
|
|
|
callback(new Error('仅支持小数点后4位!'))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return {
|
|
|
|
btndisabled: false,
|
|
|
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看
|
|
|
|
isSearchShow: false,
|
|
|
|
searchxianshitit: '显示查询条件',
|
|
|
|
queryParams: {
|
|
|
|
current: 1,
|
|
|
|
size: 10,
|
|
|
|
total: 0,
|
|
|
|
params: {
|
|
|
|
dataDateStart: '',
|
|
|
|
dataDateEnd: '',
|
|
|
|
projectSid: ''
|
|
|
|
}
|
|
|
|
},
|
|
|
|
tableLoading: false,
|
|
|
|
dataList: [],
|
|
|
|
btnList: [{
|
|
|
|
type: 'primary',
|
|
|
|
size: 'small',
|
|
|
|
icon: 'upload',
|
|
|
|
btnKey: 'showUploadXlsx',
|
|
|
|
btnLabel: '填报当日数据'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: 'info',
|
|
|
|
size: 'small',
|
|
|
|
icon: 'cross',
|
|
|
|
btnKey: 'doClose',
|
|
|
|
btnLabel: '关闭'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
dialogVisible: false,
|
|
|
|
updateAction: '/api/report' + '/projectdaily/uploadfile',
|
|
|
|
showSelectButton: false,
|
|
|
|
currentLogSid: '',
|
|
|
|
ychzFilePath: '',
|
|
|
|
projectDaily: {
|
|
|
|
sid: '',
|
|
|
|
remarks: '', // 备注说明',
|
|
|
|
orderDate: parseTime(new Date(), '{y}-{m}-{d}'), // 单据日期',
|
|
|
|
projectSid: '', // 项目Sid',
|
|
|
|
projectName: '', // 项目名称',
|
|
|
|
totalLoan: 0, // 贷款总额',
|
|
|
|
accountsBalance: 0, // 帐户余额',
|
|
|
|
accountsReceivable: 0, // 应收账款',
|
|
|
|
stockAmount: 0, // 库存货值',
|
|
|
|
transitAmount: 0, // 在途货值',
|
|
|
|
advancePayment: 0, // 预付款',
|
|
|
|
fileList: []
|
|
|
|
// fileList:[{
|
|
|
|
|
|
|
|
// fileTypeId: '', // 文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
// fileTypeName` VARCHAR(100) DEFAULT NULL COMMENT '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
// fileSrcName` VARCHAR(100) DEFAULT NULL COMMENT '原文件名',
|
|
|
|
// filePath` VARCHAR(1024) DEFAULT NULL COMMENT '文件的相对路径',
|
|
|
|
// fullUrl` VARCHAR(2048) DEFAULT NULL COMMENT '文件完整的访问URL',
|
|
|
|
// }]
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
projectSid: [{
|
|
|
|
required: true,
|
|
|
|
message: '请选择回监管项目',
|
|
|
|
trigger: 'blur'
|
|
|
|
}],
|
|
|
|
orderDate: [{
|
|
|
|
required: true,
|
|
|
|
message: '请选择填报日期',
|
|
|
|
trigger: 'blur'
|
|
|
|
}],
|
|
|
|
totalLoan: [{
|
|
|
|
validator: checkIsNumber,
|
|
|
|
trigger: 'blur'
|
|
|
|
}],
|
|
|
|
accountsBalance: [{
|
|
|
|
validator: checkIsNumber,
|
|
|
|
trigger: 'blur'
|
|
|
|
}],
|
|
|
|
accountsReceivable: [{
|
|
|
|
validator: checkIsNumber,
|
|
|
|
trigger: 'blur'
|
|
|
|
}],
|
|
|
|
stockAmount: [{
|
|
|
|
validator: checkIsNumber,
|
|
|
|
trigger: 'blur'
|
|
|
|
}],
|
|
|
|
transitAmount: [{
|
|
|
|
validator: checkIsNumber,
|
|
|
|
trigger: 'blur'
|
|
|
|
}],
|
|
|
|
advancePayment: [{
|
|
|
|
validator: checkIsNumber,
|
|
|
|
trigger: 'blur'
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
projectList: [],
|
|
|
|
reportFileList: []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList)
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.initData()
|
|
|
|
this.loadList()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
initData() {
|
|
|
|
req.projectListAll().then(res => {
|
|
|
|
this.projectList = res.data
|
|
|
|
this.projectDaily.projectSid = this.projectList[0].sid
|
|
|
|
this.projectDaily.projectName = this.projectList[0].entryName
|
|
|
|
this.projectDaily.totalLoan = Number(this.projectList[0].creditLimit)
|
|
|
|
console.log('projectList:', res)
|
|
|
|
}).catch(e => {
|
|
|
|
console.log('projectListAll--ee:', e)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
// 搜索条件效果
|
|
|
|
clicksearchShow() {
|
|
|
|
this.isSearchShow = !this.isSearchShow
|
|
|
|
if (this.isSearchShow) {
|
|
|
|
this.searchxianshitit = '隐藏查询条件'
|
|
|
|
} else {
|
|
|
|
this.searchxianshitit = '显示查询条件'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
btnHandle(btnKey) {
|
|
|
|
switch (btnKey) {
|
|
|
|
case 'showUploadXlsx':
|
|
|
|
this.showUploadXlsx()
|
|
|
|
break
|
|
|
|
case 'doClose':
|
|
|
|
this.doClose()
|
|
|
|
break
|
|
|
|
default:
|
|
|
|
break
|
|
|
|
}
|
|
|
|
},
|
|
|
|
dosearch() {
|
|
|
|
this.queryParams.current = 1
|
|
|
|
this.loadList()
|
|
|
|
},
|
|
|
|
resetQuery() {
|
|
|
|
this.queryParams = {
|
|
|
|
current: 1,
|
|
|
|
size: 10,
|
|
|
|
total: 0,
|
|
|
|
params: {
|
|
|
|
dataDateStart: '',
|
|
|
|
dataDateEnd: '',
|
|
|
|
projectSid: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.loadList()
|
|
|
|
},
|
|
|
|
// 序号
|
|
|
|
indexMethod(index) {
|
|
|
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size
|
|
|
|
var pageindex = index + 1 + pagestart
|
|
|
|
return pageindex
|
|
|
|
},
|
|
|
|
loadList() {
|
|
|
|
req.listPage(this.queryParams).then(res => {
|
|
|
|
this.queryParams.total = res.data.total
|
|
|
|
this.dataList = res.data.records
|
|
|
|
}).catch(e => {
|
|
|
|
console.log('CsmCashLog-loadList-ee:', e)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
doClose() {
|
|
|
|
this.$store.dispatch('tagsView/delView', this.$route)
|
|
|
|
this.$router.go(-1)
|
|
|
|
},
|
|
|
|
showUploadXlsx() {
|
|
|
|
this.dialogVisible = true
|
|
|
|
},
|
|
|
|
projectSelectChange() {
|
|
|
|
for (const i in this.projectList) {
|
|
|
|
if (this.projectDaily.projectSid === this.projectList[i].sid) {
|
|
|
|
this.projectDaily.totalLoan = Number(this.projectList[i].creditLimit)
|
|
|
|
this.projectDaily.projectName = this.projectList[i].entryName
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
projectDailyClose() {
|
|
|
|
this.projectDaily.sid = ''
|
|
|
|
this.projectDaily.remarks = '' // 备注说明',
|
|
|
|
this.projectDaily.orderDate = parseTime(new Date(), '{y}-{m}-{d}') // 单据日期',
|
|
|
|
this.projectDaily.projectSid = this.projectList[0].sid // 项目Sid',
|
|
|
|
this.projectDaily.projectName = this.projectList[0].entryName // 项目名称',
|
|
|
|
this.projectDaily.totalLoan = Number(this.projectList[0].creditLimit) // 贷款总额',
|
|
|
|
this.projectDaily.accountsBalance = 0 // 帐户余额',
|
|
|
|
this.projectDaily.accountsReceivable = 0 // 应收账款',
|
|
|
|
this.projectDaily.stockAmount = 0 // 库存货值',
|
|
|
|
this.projectDaily.transitAmount = 0 // 在途货值',
|
|
|
|
this.projectDaily.advancePayment = 0 // 预付款',
|
|
|
|
this.projectDaily.fileList = []
|
|
|
|
|
|
|
|
this.reportFileList = []
|
|
|
|
this.$refs['form_daily'].resetFields()
|
|
|
|
this.dialogVisible = false
|
|
|
|
},
|
|
|
|
projectDailySave() {
|
|
|
|
this.$refs['form_daily'].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
this.projectDaily.fileList = this.reportFileList
|
|
|
|
req.saveDaily(this.projectDaily).then(resp => {
|
|
|
|
this.loadList()
|
|
|
|
this.projectDailyClose()
|
|
|
|
}).catch(e => {
|
|
|
|
console.log('projectDailySave--e:', e)
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
console.log('error submit!!')
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
sendMess(row) {
|
|
|
|
req.sendMess(row.projectSid, row.orderDate).then(res => {
|
|
|
|
this.$message({
|
|
|
|
showClose: true,
|
|
|
|
type: 'success',
|
|
|
|
message: '消息已经送出'
|
|
|
|
})
|
|
|
|
}).catch(e => {
|
|
|
|
console.log('sendMess--e: ', e)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handleSuccess1(resp, file, fileList) {
|
|
|
|
console.log('111', resp)
|
|
|
|
const _this = this
|
|
|
|
let noHasFile = true
|
|
|
|
for (const i in _this.reportFileList) {
|
|
|
|
if (_this.reportFileList[i].fileTypeId === 1) {
|
|
|
|
noHasFile = false
|
|
|
|
_this.reportFileList[i].fileTypeId = 1 // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
_this.reportFileList[i].fileTypeName = '帐户余额' // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
_this.reportFileList[i].fileSrcName = resp.data.sourceFileName // '原文件名',
|
|
|
|
_this.reportFileList[i].filePath = resp.data.filePath // '文件的相对路径',
|
|
|
|
_this.reportFileList[i].fullUrl = resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (noHasFile) {
|
|
|
|
const upfile = {
|
|
|
|
fileTypeId: 1, // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
fileTypeName: '帐户余额', // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
fileSrcName: resp.data.sourceFileName, // '原文件名',
|
|
|
|
filePath: resp.data.filePath, // '文件的相对路径',
|
|
|
|
fullUrl: resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
}
|
|
|
|
_this.reportFileList.push(upfile)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleSuccess2(resp, file, fileList) {
|
|
|
|
console.log('222', resp)
|
|
|
|
const _this = this
|
|
|
|
let noHasFile = true
|
|
|
|
for (const i in _this.reportFileList) {
|
|
|
|
if (_this.reportFileList[i].fileTypeId === 2) {
|
|
|
|
noHasFile = false
|
|
|
|
_this.reportFileList[i].fileTypeId = 2 // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
_this.reportFileList[i].fileTypeName = '应收账款' // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
_this.reportFileList[i].fileSrcName = resp.data.sourceFileName // '原文件名',
|
|
|
|
_this.reportFileList[i].filePath = resp.data.filePath // '文件的相对路径',
|
|
|
|
_this.reportFileList[i].fullUrl = resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (noHasFile) {
|
|
|
|
const upfile = {
|
|
|
|
fileTypeId: 2, // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
fileTypeName: '应收账款', // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
fileSrcName: resp.data.sourceFileName, // '原文件名',
|
|
|
|
filePath: resp.data.filePath, // '文件的相对路径',
|
|
|
|
fullUrl: resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
}
|
|
|
|
_this.reportFileList.push(upfile)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleSuccess3(resp, file, fileList) {
|
|
|
|
console.log('333', resp)
|
|
|
|
const _this = this
|
|
|
|
let noHasFile = true
|
|
|
|
for (const i in _this.reportFileList) {
|
|
|
|
if (_this.reportFileList[i].fileTypeId === 3) {
|
|
|
|
noHasFile = false
|
|
|
|
_this.reportFileList[i].fileTypeId = 3 // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
_this.reportFileList[i].fileTypeName = '库存货值' // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
_this.reportFileList[i].fileSrcName = resp.data.sourceFileName // '原文件名',
|
|
|
|
_this.reportFileList[i].filePath = resp.data.filePath // '文件的相对路径',
|
|
|
|
_this.reportFileList[i].fullUrl = resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (noHasFile) {
|
|
|
|
const upfile = {
|
|
|
|
fileTypeId: 3, // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
fileTypeName: '库存货值', // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
fileSrcName: resp.data.sourceFileName, // '原文件名',
|
|
|
|
filePath: resp.data.filePath, // '文件的相对路径',
|
|
|
|
fullUrl: resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
}
|
|
|
|
_this.reportFileList.push(upfile)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleSuccess4(resp, file, fileList) {
|
|
|
|
console.log('444', resp)
|
|
|
|
const _this = this
|
|
|
|
let noHasFile = true
|
|
|
|
for (const i in _this.reportFileList) {
|
|
|
|
if (_this.reportFileList[i].fileTypeId === 4) {
|
|
|
|
noHasFile = false
|
|
|
|
_this.reportFileList[i].fileTypeId = 4 // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
_this.reportFileList[i].fileTypeName = '在途货值' // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
_this.reportFileList[i].fileSrcName = resp.data.sourceFileName // '原文件名',
|
|
|
|
_this.reportFileList[i].filePath = resp.data.filePath // '文件的相对路径',
|
|
|
|
_this.reportFileList[i].fullUrl = resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (noHasFile) {
|
|
|
|
const upfile = {
|
|
|
|
fileTypeId: 4, // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
fileTypeName: '在途货值', // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
fileSrcName: resp.data.sourceFileName, // '原文件名',
|
|
|
|
filePath: resp.data.filePath, // '文件的相对路径',
|
|
|
|
fullUrl: resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
}
|
|
|
|
_this.reportFileList.push(upfile)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleSuccess5(resp, file, fileList) {
|
|
|
|
console.log('555', resp)
|
|
|
|
const _this = this
|
|
|
|
let noHasFile = true
|
|
|
|
for (const i in _this.reportFileList) {
|
|
|
|
if (_this.reportFileList[i].fileTypeId === 5) {
|
|
|
|
noHasFile = false
|
|
|
|
_this.reportFileList[i].fileTypeId = 5 // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
_this.reportFileList[i].fileTypeName = '预付款' // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
_this.reportFileList[i].fileSrcName = resp.data.sourceFileName // '原文件名',
|
|
|
|
_this.reportFileList[i].filePath = resp.data.filePath // '文件的相对路径',
|
|
|
|
_this.reportFileList[i].fullUrl = resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (noHasFile) {
|
|
|
|
const upfile = {
|
|
|
|
fileTypeId: 5, // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;',
|
|
|
|
fileTypeName: '预付款', // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款',
|
|
|
|
fileSrcName: resp.data.sourceFileName, // '原文件名',
|
|
|
|
filePath: resp.data.filePath, // '文件的相对路径',
|
|
|
|
fullUrl: resp.data.fullUrl // '文件完整的访问URL',
|
|
|
|
}
|
|
|
|
_this.reportFileList.push(upfile)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
.wenjiantit {
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: bold;
|
|
|
|
margin: 25px 0 10px 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.forminfo {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.listcon {
|
|
|
|
height: calc(100vh - 250px);
|
|
|
|
overflow-y: auto;
|
|
|
|
overflow-x: hidden;
|
|
|
|
}
|
|
|
|
</style>
|