|
@@ -63,7 +63,7 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-table v-loading="loading" :data="RANKList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table :data="RANKList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="保税区" align="center" prop="deptName">
|
|
|
<template slot-scope="scope">
|
|
@@ -130,8 +130,8 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="ranking" label-width="100px" label="出入口总值">
|
|
|
- <el-input v-model="form.ranking" placeholder="请输入出入口总值" ></el-input>
|
|
|
+ <el-form-item prop="ranking" label-width="100px" label="排名">
|
|
|
+ <el-input v-model="form.ranking" placeholder="请输入排名" ></el-input>
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-form>
|
|
@@ -194,11 +194,11 @@ export default {
|
|
|
{ required: true, message: "保税区ID不能为空", trigger: "blur" }
|
|
|
],
|
|
|
year: [
|
|
|
- { required: true, message: "年份不能为空", trigger: "blur" },
|
|
|
- { trigger: 'blur', validator: this.validatorFloatNum }
|
|
|
+ { required: true, message: "年份不能为空", trigger: "blur" }
|
|
|
],
|
|
|
ranking: [
|
|
|
- { required: true, message: "排名不能为空", trigger: "blur" }
|
|
|
+ { required: true, message: "排名不能为空", trigger: "blur" },
|
|
|
+ { trigger: 'blur', validator: this.validatorFloatNum }
|
|
|
],
|
|
|
}
|
|
|
};
|
|
@@ -234,6 +234,7 @@ export default {
|
|
|
|
|
|
// 获取近三年
|
|
|
let nearYearArr = [];
|
|
|
+ nearYearArr.push(curYear)
|
|
|
for (let i = 1; i <= 4; i++) {
|
|
|
nearYearArr.push(curYear - i + '');
|
|
|
}
|
|
@@ -284,6 +285,7 @@ export default {
|
|
|
const id = row.id || this.ids
|
|
|
getRANK(id).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ this.form.deptId = Number(this.form.deptId)
|
|
|
this.open = true;
|
|
|
this.title = "修改广西保税区排名";
|
|
|
});
|
|
@@ -291,6 +293,7 @@ export default {
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
+ debugger
|
|
|
if (valid) {
|
|
|
if (this.form.id != null) {
|
|
|
updateRANK(this.form).then(response => {
|
|
@@ -329,14 +332,14 @@ export default {
|
|
|
let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
|
|
|
if (!reg.test(value)) {
|
|
|
callback(new Error('请输入数字和正确格式的数字'));
|
|
|
- } else if (value.split('.').length > 2) {
|
|
|
+ } else if (value.split('.').length >= 1) {
|
|
|
callback(new Error('请输入正确格式的数字')); //防止输入多个小数点
|
|
|
- } else if (value.indexOf('.') != -1 && value.split('.')[1].length > 2) {
|
|
|
+ } else if (value.indexOf('.') != -1 && value.split('.')[1].length > 6) {
|
|
|
callback(new Error('最多只能输入两位小数')); //小数点后两位
|
|
|
} else {
|
|
|
callback();
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|