会员项目字段修改 jupload修改

This commit is contained in:
fengachen
2021-08-27 11:53:30 +08:00
parent 40383e6a5e
commit 17d02b2c34
5 changed files with 65 additions and 39 deletions
+56 -29
View File
@@ -52,36 +52,36 @@
uploadGoOn:true, uploadGoOn:true,
} }
}, },
props:{ props: {
text:{ text: {
type:String, type: String,
required:false, required: false,
default:"点击上传" default: "点击上传"
}, },
fileType:{ fileType: {
type:String, type: String,
required:false, required: false,
default:FILE_TYPE_ALL default: FILE_TYPE_ALL
}, },
/*这个属性用于控制文件上传的业务路径*/ /*这个属性用于控制文件上传的业务路径*/
bizPath:{ bizPath: {
type:String, type: String,
required:false, required: false,
default:"temp" default: "temp"
}, },
value:{ value: {
type:[String,Array], type: [String, Array],
required:false required: false
}, },
// update-begin- --- author:wangshuai ------ date:20190929 ---- for:Jupload组件增加是否能够点击 // update-begin- --- author:wangshuai ------ date:20190929 ---- for:Jupload组件增加是否能够点击
disabled:{ disabled: {
type:Boolean, type: Boolean,
required:false, required: false,
default: false default: false
}, },
// update-end- --- author:wangshuai ------ date:20190929 ---- for:Jupload组件增加是否能够点击 // update-end- --- author:wangshuai ------ date:20190929 ---- for:Jupload组件增加是否能够点击
//此属性被废弃了 //此属性被废弃了
triggerChange:{ triggerChange: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
@@ -91,19 +91,29 @@
* true:仅返回url * true:仅返回url
* false:返回fileName filePath fileSize * false:返回fileName filePath fileSize
*/ */
returnUrl:{ returnUrl: {
type:Boolean, type: Boolean,
required:false, required: false,
default: true default: true
}, },
number:{ /**
type:Number, * 仅返回文件id
required:false, * true 仅返回文件id
default: 0 * false 返回reurl
}, * */
buttonVisible:{ returnId:{
type:Boolean, type:Boolean,
required:false, required:false,
default: false
},
number: {
type: Number,
required: false,
default: 0
},
buttonVisible: {
type: Boolean,
required: false,
default: true default: true
}, },
}, },
@@ -181,10 +191,27 @@
handlePathChange(){ handlePathChange(){
let uploadFiles = this.fileList let uploadFiles = this.fileList
let path = '' let path = ''
// 文件id
let fileIds = ''
if(!uploadFiles || uploadFiles.length==0){ if(!uploadFiles || uploadFiles.length==0){
path = '' path = ''
} }
let arr = []; let arr = [];
// 如果returnid为true 只返回id
if(this.returnId){
for(var a=0;a<uploadFiles.length;a++){
if(uploadFiles[a].status === 'done' ) {
arr.push(uploadFiles[a].response.result.id)
}else{
return;
}
}
if(arr.length>0){
fileIds = arr.join(",")
}
this.$emit('change', fileIds);
return
}
for(var a=0;a<uploadFiles.length;a++){ for(var a=0;a<uploadFiles.length;a++){
if(uploadFiles[a].status === 'done' ) { if(uploadFiles[a].status === 'done' ) {
@@ -28,7 +28,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">添加</a-button> <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('混淆表')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('会员项目')">导出</a-button>
<a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button> <a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"--> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">--> <!-- @change="handleImportExcel">-->
@@ -107,7 +107,7 @@ export default {
{ {
title: '收费标准', title: '收费标准',
align: "center", align: "center",
dataIndex: 'chargStandard', dataIndex: 'chargeStandard',
}, },
{ {
@@ -155,7 +155,7 @@ export default {
<style scoped lang="less"> <style scoped lang="less">
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
.color_blue { .color_blue {
color: dodgerblue; color: #069f99;
cursor: pointer; cursor: pointer;
} }
</style> </style>
@@ -14,7 +14,7 @@
<label>负责人:</label><span>{{currentInfo.directorName}}</span> <label>负责人:</label><span>{{currentInfo.directorName}}</span>
</a-col> </a-col>
<a-col :xl="5" :lg="4" :md="4" :sm="8"> <a-col :xl="5" :lg="4" :md="4" :sm="8">
<label>收费标准:</label><span>{{currentInfo.chargStandard}}</span> <label>收费标准:</label><span>{{currentInfo.chargeStandard}}</span>
</a-col> </a-col>
<a-col :xl="4" :lg="4" :md="4" :sm="8"> <a-col :xl="4" :lg="4" :md="4" :sm="8">
<label>收费通知号:</label><span>{{currentInfo.chargeNoticeNo}}</span> <label>收费通知号:</label><span>{{currentInfo.chargeNoticeNo}}</span>
@@ -234,7 +234,7 @@ export default {
} }
.color_blue { .color_blue {
color: dodgerblue; color: #069f99;
cursor: pointer; cursor: pointer;
} }
.btn-arrow-left { .btn-arrow-left {
@@ -38,7 +38,7 @@
<a-form-item label="收费标准" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="收费标准" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入收费标准" <a-input placeholder="请输入收费标准"
:maxLength='50' :maxLength='50'
v-decorator="[ 'chargStandard']" v-decorator="[ 'chargeStandard']"
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"></a-input> @change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"></a-input>
<span class="yuan">元</span> <span class="yuan">元</span>
</a-form-item> </a-form-item>
@@ -55,7 +55,7 @@
<a-row> <a-row>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="收费通知" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="收费通知" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-upload file-type="pdf" file-type-error-message="请上传收费通知" :multiple="false" :number="1" <j-upload file-type="pdf" file-type-error-message="请上传收费通知" :multiple="false" :number="1" :return-id="true"
bizPath="payment" v-decorator="['chargeNoticeFileId']" bizPath="payment" v-decorator="['chargeNoticeFileId']"
:trigger-change="true"></j-upload> :trigger-change="true"></j-upload>
</a-form-item> </a-form-item>
@@ -147,7 +147,7 @@ export default {
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
this.visible = true this.visible = true
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'projectName', 'particularYear', 'chargeNoticeNo', 'chargeNoticeFileId','chargStandard','remark')) this.form.setFieldsValue(pick(this.model, 'projectName', 'particularYear', 'chargeNoticeNo','directorId', 'chargeNoticeFileId','chargeStandard','remark'))
}) })
}, },
close() { close() {
@@ -166,7 +166,7 @@ export default {
method = 'post' method = 'post'
} else { } else {
httpurl += this.url.edit httpurl += this.url.edit
method = 'put' method = 'post'
} }
const formData = Object.assign(this.model, values) const formData = Object.assign(this.model, values)
console.log('表单提交数据', formData) console.log('表单提交数据', formData)
@@ -307,7 +307,6 @@ export default {
* */ * */
addContacts() { addContacts() {
if (this.selectedCompany.id) { if (this.selectedCompany.id) {
debugger
this.$refs.contactForm.add() this.$refs.contactForm.add()
this.$refs.contactForm.title = "新增"; this.$refs.contactForm.title = "新增";
this.$refs.contactForm.disableSubmit = false; this.$refs.contactForm.disableSubmit = false;