Commit c87bb289 authored by 张冬's avatar 张冬

更新

parent 4938c450
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<dataTable :table-data="fileList" :columns="columns" :is-pageobj="false"> <dataTable :table-data="fileList" :columns="columns" :is-pageobj="false">
<el-table-column slot="operate" label="文件大小" align="center" fixed="right" width="300"> <el-table-column slot="operate" label="文件大小" align="center" fixed="right" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{getMb(scope.row.size)}}M</div> <div>{{getMb(scope.row.size)}}KB</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column slot="operate" label="价格" align="center" fixed="right" width="300"> <el-table-column slot="operate" label="价格" align="center" fixed="right" width="300">
...@@ -108,12 +108,12 @@ export default { ...@@ -108,12 +108,12 @@ export default {
] ]
} }
}, },
computed:{
getMb(size){
return size / 1024 / 1024
}
},
methods: { methods: {
getMb(size){
let sieze1= size/1024
let integer= sieze1.toFixed(0)
return integer
},
emitInput(fileList) { emitInput(fileList) {
let value = [] let value = []
for (let i = 0; i < fileList.length; i++) { for (let i = 0; i < fileList.length; i++) {
......
This diff is collapsed.
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
}, },
data() { data() {
return { return {
activeIdx: 2, activeIdx: 3,
allForm: {} allForm: {}
} }
}, },
......
...@@ -104,6 +104,19 @@ ...@@ -104,6 +104,19 @@
Upload Upload
}, },
data() { data() {
let checkPhone = async (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'));
} else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
console.log(reg.test(value));
if (reg.test(value)) {
callback();
} else {
return callback(new Error('请输入正确的手机号'));
}
}
};
// 测试图片 // 测试图片
let checkimg = (rule, value, callback) => { let checkimg = (rule, value, callback) => {
if (this.ruleForm.voucherUrl.length === 0) { if (this.ruleForm.voucherUrl.length === 0) {
...@@ -137,7 +150,7 @@ ...@@ -137,7 +150,7 @@
}], }],
companyPhone: [{ companyPhone: [{
required: true, required: true,
message: '请输入', validator: checkPhone,
trigger: 'blur' trigger: 'blur'
}], }],
...@@ -163,8 +176,8 @@ ...@@ -163,8 +176,8 @@
const valid = await this.$refs['ruleForm'].validate() const valid = await this.$refs['ruleForm'].validate()
if (valid) { if (valid) {
let message = this.ruleForm let message = this.ruleForm
message.companyId = localStorage.getItem("companyId"), message.companyId =localStorage.getItem("companyId")
message.projectId = localstorage.getitem("projectId") message.projectId =localStorage.getItem("projectId")
const { const {
code, code,
msg msg
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="上传缴费凭证:" prop="voucherUrl"> <el-form-item label="上传缴费凭证:" prop="voucherUrl">
<Upload :limit="5" :max="5" tip="完成上传5份文件,每份不超过10M" @input="getfile"></Upload> <Upload :limit="5" :max="10" tip="完成上传5份文件,每份不超过10M" @input="getfile"></Upload>
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
...@@ -241,8 +241,8 @@ ...@@ -241,8 +241,8 @@
const valid = await this.$refs['ruleForm'].validate() const valid = await this.$refs['ruleForm'].validate()
if (valid) { if (valid) {
let message = this.ruleForm let message = this.ruleForm
message.companyId = localStorage.getItem("companyId"), message.companyId =localStorage.getItem("companyId")
message.projectId = localstorage.getitem("projectId") message.projectId =localStorage.getItem("projectId")
const { const {
code, code,
msg msg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment