|
@@ -0,0 +1,185 @@
|
|
|
+<template >
|
|
|
+ <div id="">
|
|
|
+ <!-- 还款 -->
|
|
|
+ <div v-if="workType == '06'">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-form-item label="上传附件">
|
|
|
+ <el-upload
|
|
|
+ ref="upload"
|
|
|
+ class="upload-demo"
|
|
|
+ action=""
|
|
|
+ :class="{showUoload:showBtnImg,uoloadSty:noneBtnImg}"
|
|
|
+ :on-change="dealImgChange"
|
|
|
+ accept=".jpg, .jpeg, .png, .JPG, .JPEG, .PNG"
|
|
|
+ :http-request="httpRequest"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ multiple
|
|
|
+ :limit="1"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ list-type="picture-card"
|
|
|
+ :file-list="fileList"
|
|
|
+ :auto-upload="true">
|
|
|
+ <el-button slot="trigger" size="small" type="primary">点击选择</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="融资id" prop="zfrId" label-width="90px" v-if="false">
|
|
|
+ <el-input v-model="form.zfrId" style="width:284px"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 内部审批 -->
|
|
|
+ <div v-if="workType == '07'">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-form-item label="备注">
|
|
|
+ <el-input type="textarea" placeholder="请输入内容" v-model="form.remark":row="3"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submit">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { RepaymentRegistration } from "@/api/service/repayment/repayment";
|
|
|
+import { uploadFileNew } from "@/api/common/file";
|
|
|
+import { dealWork } from '@/api/system/notice'
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ // 正常的业务数据,对应echarts饼图配置中series[0].data
|
|
|
+ tableId: {
|
|
|
+ type: String,
|
|
|
+ required: true,
|
|
|
+ default: () => "",
|
|
|
+ },
|
|
|
+ workType: {
|
|
|
+ type: String,
|
|
|
+ required: true,
|
|
|
+ default: () => "",
|
|
|
+ },
|
|
|
+ noticeId: {
|
|
|
+ type: String,
|
|
|
+ required: true,
|
|
|
+ default: () => "",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 表单参数
|
|
|
+ form: {
|
|
|
+
|
|
|
+ },
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ // pptName:[
|
|
|
+ // { required: true, message: "项目类型不能为空", trigger: "blur" },
|
|
|
+ // ]
|
|
|
+ },
|
|
|
+ //附件地址
|
|
|
+ fileList:[],
|
|
|
+ //附件按钮
|
|
|
+ showBtnImg:true,
|
|
|
+ noneBtnImg:false,
|
|
|
+ limitCountImg:1,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created: function () {
|
|
|
+ this.form.zfrId = this.tableId
|
|
|
+ },
|
|
|
+ activated () {
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleExceed(files, fileList) {
|
|
|
+ this.$message.warning(`当前限制选择 1 个文件`);
|
|
|
+ },
|
|
|
+ //文件移除提示
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ console.log(file)
|
|
|
+ for(let i = 0;i< this.fileList.length;i++){
|
|
|
+ if(file.uid == this.fileList[i].uid){
|
|
|
+ this.fileList.splice(i, 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.noneBtnImg = fileList.length >= this.limitCountImg;
|
|
|
+ //return this.$confirm(`确定移除 ${ file.name }?`);
|
|
|
+ },
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
+ this.dialogImageUrl = file.url;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ },
|
|
|
+ //手动上传文件触发
|
|
|
+ httpRequest(param) {
|
|
|
+ let fileObj = param.file // 相当于input里取得的files
|
|
|
+ let fd = new FormData()// FormData 对象
|
|
|
+ fd.append('file', fileObj)// 文件对象
|
|
|
+ fd.append('fileType','00')//文件类型
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: 'Loading',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ });
|
|
|
+ uploadFileNew(fd).then(response => {
|
|
|
+ if(response){
|
|
|
+ // this.form.eeiImgUrl = response.url
|
|
|
+ this.fileList.push({uid : response.fileId,url:response.url+'/'+getToken()})
|
|
|
+ console.log(response.url)
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.close();
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
+ }).catch(response => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ dealImgChange(file, fileList){
|
|
|
+ this.noneBtnImg = fileList.length >= this.limitCountImg;
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.zfrId != null) {
|
|
|
+ this.form.zfrApplyFile = this.fileList;
|
|
|
+ RepaymentRegistration(this.form).then(response => {
|
|
|
+ this.msgSuccess("登记成功");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submit() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.noticeId != null) {
|
|
|
+ dealWork(this.form).then(response => {
|
|
|
+ this.msgSuccess("处理成功");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ cancel(){
|
|
|
+ this.$emit("cancelOpen");
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.labelData .el-collapse-item__header{
|
|
|
+ height: 200px;
|
|
|
+}
|
|
|
+</style>
|