|
|
@ -40,15 +40,19 @@ |
|
|
|
<!-- 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="totalLoan" label="贷款总额(元)" align="center" width="140" /> |
|
|
|
<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 prop="advancePayment" label="质押率" align="center" width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.pledgeRatePercent }}%</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<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> |
|
|
@ -101,7 +105,7 @@ |
|
|
|
</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-input v-model="projectDaily.totalLoan" class="addinputw" clearable @blur="zyl" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -111,14 +115,14 @@ |
|
|
|
</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-input v-model="projectDaily.accountsBalance" class="addinputw" clearable @blur="zyl" /> |
|
|
|
</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-upload class="upload-demo" :action="updateAction" :on-success="handleSuccess1" :show-file-list="false"> |
|
|
|
<el-button size="small" type="primary">上传账户余额报表</el-button> |
|
|
|
</el-upload> |
|
|
|
</el-upload> --> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -128,15 +132,11 @@ |
|
|
|
</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-input v-model="projectDaily.accountsReceivable" class="addinputw" clearable @blur="zyl" /> |
|
|
|
</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-form-item /> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
@ -145,15 +145,11 @@ |
|
|
|
</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-input v-model="projectDaily.stockAmount" class="addinputw" clearable @blur="zyl" /> |
|
|
|
</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-form-item /> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
@ -162,15 +158,11 @@ |
|
|
|
</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-input v-model="projectDaily.transitAmount" class="addinputw" clearable @blur="zyl" /> |
|
|
|
</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-form-item /> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
@ -179,15 +171,11 @@ |
|
|
|
</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-input v-model="projectDaily.advancePayment" class="addinputw" clearable @blur="zyl" /> |
|
|
|
</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-form-item /> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
@ -199,6 +187,26 @@ |
|
|
|
<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-row> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span>质押率</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18" class="trightb"> |
|
|
|
<el-form-item>{{ zhiyalv }}</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 style="padding-bottom: 20px;"> |
|
|
|
<el-upload class="upload-demo" :action="updateAction" :on-success="handleSuccess" :on-remove="handleRemove" :file-list="uploadFileList"> |
|
|
|
<el-button size="small" type="primary">点击上传报表文件</el-button> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="projectDailyClose">取 消</el-button> |
|
|
@ -224,23 +232,6 @@ |
|
|
|
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、查看 |
|
|
@ -312,32 +303,45 @@ |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
totalLoan: [{ |
|
|
|
validator: checkIsNumber, |
|
|
|
trigger: 'blur' |
|
|
|
type: 'number', |
|
|
|
message: '请输入正确数据', |
|
|
|
trigger: 'blur', |
|
|
|
transform: (value) => Number(value) |
|
|
|
}], |
|
|
|
accountsBalance: [{ |
|
|
|
validator: checkIsNumber, |
|
|
|
trigger: 'blur' |
|
|
|
type: 'number', |
|
|
|
message: '请输入正确数据', |
|
|
|
trigger: 'blur', |
|
|
|
transform: (value) => Number(value) |
|
|
|
}], |
|
|
|
accountsReceivable: [{ |
|
|
|
validator: checkIsNumber, |
|
|
|
pattern: /^-?\d+\.?\d*$/, |
|
|
|
message: '请输入正确数据', |
|
|
|
trigger: 'blur' |
|
|
|
}], |
|
|
|
stockAmount: [{ |
|
|
|
validator: checkIsNumber, |
|
|
|
trigger: 'blur' |
|
|
|
type: 'number', |
|
|
|
message: '请输入正确数据', |
|
|
|
trigger: 'blur', |
|
|
|
transform: (value) => Number(value) |
|
|
|
}], |
|
|
|
transitAmount: [{ |
|
|
|
validator: checkIsNumber, |
|
|
|
trigger: 'blur' |
|
|
|
type: 'number', |
|
|
|
message: '请输入正确数据', |
|
|
|
trigger: 'blur', |
|
|
|
transform: (value) => Number(value) |
|
|
|
}], |
|
|
|
advancePayment: [{ |
|
|
|
validator: checkIsNumber, |
|
|
|
trigger: 'blur' |
|
|
|
type: 'number', |
|
|
|
message: '请输入正确数据', |
|
|
|
trigger: 'blur', |
|
|
|
transform: (value) => Number(value) |
|
|
|
}] |
|
|
|
}, |
|
|
|
projectList: [], |
|
|
|
reportFileList: [] |
|
|
|
reportFileList: [], |
|
|
|
zhiyalv: '0', |
|
|
|
uploadFileList: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -348,6 +352,16 @@ |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
zyl() { |
|
|
|
const a = Number(this.projectDaily.totalLoan) - Number(this.projectDaily.accountsBalance) |
|
|
|
const b = Number(this.projectDaily.accountsReceivable) + Number(this.projectDaily.stockAmount) + Number(this.projectDaily.transitAmount) + Number(this.projectDaily |
|
|
|
.advancePayment) |
|
|
|
if (b === 0) { |
|
|
|
this.zhiyalv = '0' |
|
|
|
} else { |
|
|
|
this.zhiyalv = Number(a / b * 100).toFixed(2) + '%' |
|
|
|
} |
|
|
|
}, |
|
|
|
initData() { |
|
|
|
req.projectListAll().then(res => { |
|
|
|
this.projectList = res.data |
|
|
@ -441,6 +455,9 @@ |
|
|
|
this.projectDaily.fileList = [] |
|
|
|
|
|
|
|
this.reportFileList = [] |
|
|
|
this.uploadFileList = [] |
|
|
|
this.zhiyalv = 0 |
|
|
|
|
|
|
|
this.$refs['form_daily'].resetFields() |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
@ -600,6 +617,30 @@ |
|
|
|
} |
|
|
|
_this.reportFileList.push(upfile) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSuccess(resp, file, fileList) { |
|
|
|
console.log('handleSuccess----', resp) |
|
|
|
const _this = this |
|
|
|
const upfile = { |
|
|
|
fileTypeId: 6, // '文件类型: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款;', |
|
|
|
fileTypeName: '报表文件', // '文件类型名: 1=帐户余额;2=应收账款;3=库存货值;4=在途货值;5=预付款', |
|
|
|
fileSrcName: resp.data.sourceFileName, // '原文件名', |
|
|
|
filePath: resp.data.filePath, // '文件的相对路径', |
|
|
|
fullUrl: resp.data.fullUrl, // '文件完整的访问URL', |
|
|
|
fileuid: file.uid // '文件完整的访问URL', |
|
|
|
} |
|
|
|
_this.reportFileList.push(upfile) |
|
|
|
}, |
|
|
|
handleRemove(file, fileList) { |
|
|
|
const _this = this |
|
|
|
let delete_index = 0 |
|
|
|
for (let i = 0, len = _this.reportFileList.length; i < len; i++) { |
|
|
|
if (file.uid === _this.reportFileList[i].fileuid) { |
|
|
|
delete_index = i |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
_this.reportFileList.splice(delete_index, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|