Showing
8 changed files
with
62 additions
and
37 deletions
| ... | @@ -104,7 +104,7 @@ export default { | ... | @@ -104,7 +104,7 @@ export default { |
| 104 | default: "mini", | 104 | default: "mini", |
| 105 | }, | 105 | }, |
| 106 | height: { | 106 | height: { |
| 107 | - type: String, | 107 | + type: [String, Number], |
| 108 | default: "400", | 108 | default: "400", |
| 109 | }, | 109 | }, |
| 110 | fit: { | 110 | fit: { |
| ... | @@ -202,10 +202,18 @@ export default { | ... | @@ -202,10 +202,18 @@ export default { |
| 202 | created() { | 202 | created() { |
| 203 | this.newHeader = this.headerData; | 203 | this.newHeader = this.headerData; |
| 204 | }, | 204 | }, |
| 205 | - watch:{ | 205 | + watch: { |
| 206 | - page(){ | 206 | + page() { |
| 207 | this.pageNum = this.page; | 207 | this.pageNum = this.page; |
| 208 | - } | 208 | + }, |
| 209 | + data() { | ||
| 210 | + this.data.forEach((item, index) => { | ||
| 211 | + item.index = index; | ||
| 212 | + }); | ||
| 213 | + this.$nextTick(()=>{ | ||
| 214 | + this.$refs.tables.doLayout() | ||
| 215 | + }) | ||
| 216 | + }, | ||
| 209 | }, | 217 | }, |
| 210 | mounted() {}, | 218 | mounted() {}, |
| 211 | methods: { | 219 | methods: { |
| ... | @@ -226,7 +234,7 @@ export default { | ... | @@ -226,7 +234,7 @@ export default { |
| 226 | currentChange(val) { | 234 | currentChange(val) { |
| 227 | this.$emit("currentChange", { | 235 | this.$emit("currentChange", { |
| 228 | page: val, | 236 | page: val, |
| 229 | - start: val > 1 ? (val-1) * this.limitSize + 1 : val, | 237 | + start: val > 1 ? (val - 1) * this.limitSize + 1 : val, |
| 230 | }); | 238 | }); |
| 231 | scrollTo(0, 800); | 239 | scrollTo(0, 800); |
| 232 | }, | 240 | }, |
| ... | @@ -245,13 +253,13 @@ export default { | ... | @@ -245,13 +253,13 @@ export default { |
| 245 | } else if (selection.includes(this.data[row.index])) { | 253 | } else if (selection.includes(this.data[row.index])) { |
| 246 | if (!selection.includes(this.data[this.start])) { | 254 | if (!selection.includes(this.data[this.start])) { |
| 247 | this.$refs.tables.toggleRowSelection(this.data[this.start], true); | 255 | this.$refs.tables.toggleRowSelection(this.data[this.start], true); |
| 248 | - if(this.selectTable.includes(this.data[this.start])){ | 256 | + if (this.selectTable.includes(this.data[this.start])) { |
| 249 | this.selectTable.push(this.data[this.start]); | 257 | this.selectTable.push(this.data[this.start]); |
| 250 | } | 258 | } |
| 251 | } | 259 | } |
| 252 | for (i = min; i <= sum + min; i++) { | 260 | for (i = min; i <= sum + min; i++) { |
| 253 | this.$refs.tables.toggleRowSelection(this.data[i], true); | 261 | this.$refs.tables.toggleRowSelection(this.data[i], true); |
| 254 | - if(!this.selectTable.includes(this.data[i])){ | 262 | + if (!this.selectTable.includes(this.data[i])) { |
| 255 | this.selectTable.push(this.data[i]); | 263 | this.selectTable.push(this.data[i]); |
| 256 | } | 264 | } |
| 257 | } | 265 | } |
| ... | @@ -274,7 +282,7 @@ export default { | ... | @@ -274,7 +282,7 @@ export default { |
| 274 | } | 282 | } |
| 275 | } | 283 | } |
| 276 | } | 284 | } |
| 277 | - selection = this.selectTable.sort(this.compare('index','ascending')); | 285 | + selection = this.selectTable.sort(this.compare("index", "ascending")); |
| 278 | this.$emit("tableSelect", { selection, row }); | 286 | this.$emit("tableSelect", { selection, row }); |
| 279 | }, | 287 | }, |
| 280 | tableSelectAll(selection) { | 288 | tableSelectAll(selection) { |
| ... | @@ -313,6 +321,9 @@ export default { | ... | @@ -313,6 +321,9 @@ export default { |
| 313 | return dictLabels[column.property][cellValue]; | 321 | return dictLabels[column.property][cellValue]; |
| 314 | } | 322 | } |
| 315 | } | 323 | } |
| 324 | + if (column.property == "roleNames") { | ||
| 325 | + return cellValue.toString(); | ||
| 326 | + } | ||
| 316 | return cellValue; | 327 | return cellValue; |
| 317 | }, | 328 | }, |
| 318 | }, | 329 | }, | ... | ... |
| ... | @@ -72,7 +72,7 @@ | ... | @@ -72,7 +72,7 @@ |
| 72 | </el-select> | 72 | </el-select> |
| 73 | </el-form-item> | 73 | </el-form-item> |
| 74 | </el-col> | 74 | </el-col> |
| 75 | - <el-col :span="6"> | 75 | + <!-- <el-col :span="6"> |
| 76 | <el-form-item label="ACCSpool"> | 76 | <el-form-item label="ACCSpool"> |
| 77 | <el-select | 77 | <el-select |
| 78 | placeholder="不限" | 78 | placeholder="不限" |
| ... | @@ -97,7 +97,7 @@ | ... | @@ -97,7 +97,7 @@ |
| 97 | </el-option> | 97 | </el-option> |
| 98 | </el-select> | 98 | </el-select> |
| 99 | </el-form-item> | 99 | </el-form-item> |
| 100 | - </el-col> | 100 | + </el-col> --> |
| 101 | <el-col :span="6"> | 101 | <el-col :span="6"> |
| 102 | <el-form-item label="运单号"> | 102 | <el-form-item label="运单号"> |
| 103 | <el-input | 103 | <el-input |
| ... | @@ -376,7 +376,7 @@ export default { | ... | @@ -376,7 +376,7 @@ export default { |
| 376 | handingCodes: null, | 376 | handingCodes: null, |
| 377 | subCategorys: null, | 377 | subCategorys: null, |
| 378 | customsReceiptStatusId: null, | 378 | customsReceiptStatusId: null, |
| 379 | - accsPool:"OSPR" | 379 | + // accsPool:"OSPR" |
| 380 | }, //查询数据 | 380 | }, //查询数据 |
| 381 | tableHeader: [ | 381 | tableHeader: [ |
| 382 | { | 382 | { | ... | ... |
| ... | @@ -875,7 +875,7 @@ export default { | ... | @@ -875,7 +875,7 @@ export default { |
| 875 | } | 875 | } |
| 876 | }); | 876 | }); |
| 877 | this.tableHeight = | 877 | this.tableHeight = |
| 878 | - window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 120; | 878 | + window.innerHeight - this.$refs.queryForm.$el.offsetHeight - 150; |
| 879 | }, | 879 | }, |
| 880 | methods: { | 880 | methods: { |
| 881 | //输入航班号后 | 881 | //输入航班号后 | ... | ... |
| ... | @@ -792,7 +792,7 @@ export default { | ... | @@ -792,7 +792,7 @@ export default { |
| 792 | this.shiftKey = false; | 792 | this.shiftKey = false; |
| 793 | } | 793 | } |
| 794 | }); | 794 | }); |
| 795 | - this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight-50 | 795 | + this.tableHeight = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight-80 |
| 796 | }, | 796 | }, |
| 797 | 797 | ||
| 798 | methods: { | 798 | methods: { | ... | ... |
| ... | @@ -157,12 +157,15 @@ export default { | ... | @@ -157,12 +157,15 @@ export default { |
| 157 | drawer(val,oldVal){ | 157 | drawer(val,oldVal){ |
| 158 | if(val){ | 158 | if(val){ |
| 159 | this.roleForm = this.roleData; | 159 | this.roleForm = this.roleData; |
| 160 | + }else{ | ||
| 161 | + this.loading = false; | ||
| 160 | } | 162 | } |
| 161 | } | 163 | } |
| 162 | }, | 164 | }, |
| 163 | methods: { | 165 | methods: { |
| 164 | //关闭 | 166 | //关闭 |
| 165 | handleClose() { | 167 | handleClose() { |
| 168 | + this.$refs['roleForm'].clearValidate(); | ||
| 166 | this.$emit("handleClose", false); | 169 | this.$emit("handleClose", false); |
| 167 | }, | 170 | }, |
| 168 | 171 | ||
| ... | @@ -177,12 +180,12 @@ export default { | ... | @@ -177,12 +180,12 @@ export default { |
| 177 | formData.name = this.roleForm.name; | 180 | formData.name = this.roleForm.name; |
| 178 | addOrUpdateRole(formData) | 181 | addOrUpdateRole(formData) |
| 179 | .then((res) => { | 182 | .then((res) => { |
| 183 | + this.loading = false; | ||
| 180 | if (res.code === 200) { | 184 | if (res.code === 200) { |
| 181 | this.$message({ | 185 | this.$message({ |
| 182 | message: "操作成功", | 186 | message: "操作成功", |
| 183 | type: "success", | 187 | type: "success", |
| 184 | }); | 188 | }); |
| 185 | - this.loading = false; | ||
| 186 | this.$emit("handleClose", false); | 189 | this.$emit("handleClose", false); |
| 187 | } else { | 190 | } else { |
| 188 | this.$message({ | 191 | this.$message({ | ... | ... |
| ... | @@ -19,6 +19,7 @@ | ... | @@ -19,6 +19,7 @@ |
| 19 | range-separator="至" | 19 | range-separator="至" |
| 20 | start-placeholder="开始日期" | 20 | start-placeholder="开始日期" |
| 21 | end-placeholder="结束日期" | 21 | end-placeholder="结束日期" |
| 22 | + value-format="yyyy-MM-dd" | ||
| 22 | clearable | 23 | clearable |
| 23 | > | 24 | > |
| 24 | </el-date-picker> | 25 | </el-date-picker> |
| ... | @@ -28,7 +29,7 @@ | ... | @@ -28,7 +29,7 @@ |
| 28 | <el-form-item label="状态"> | 29 | <el-form-item label="状态"> |
| 29 | <el-select v-model="formData.valid" placeholder="角色状态" clearable> | 30 | <el-select v-model="formData.valid" placeholder="角色状态" clearable> |
| 30 | <el-option label="开启" value="1"> </el-option> | 31 | <el-option label="开启" value="1"> </el-option> |
| 31 | - <el-option label="关闭" value="1"> </el-option> | 32 | + <el-option label="关闭" value="2"> </el-option> |
| 32 | </el-select> | 33 | </el-select> |
| 33 | </el-form-item> | 34 | </el-form-item> |
| 34 | </el-col> | 35 | </el-col> |
| ... | @@ -148,7 +149,7 @@ export default { | ... | @@ -148,7 +149,7 @@ export default { |
| 148 | { | 149 | { |
| 149 | type: "", | 150 | type: "", |
| 150 | name: "创建人", | 151 | name: "创建人", |
| 151 | - value: "remark", | 152 | + value: "createUserName", |
| 152 | width: "150px", | 153 | width: "150px", |
| 153 | align: "center", | 154 | align: "center", |
| 154 | sorTable: false, | 155 | sorTable: false, |
| ... | @@ -210,7 +211,6 @@ export default { | ... | @@ -210,7 +211,6 @@ export default { |
| 210 | this.formData.createStart = this.createTime[0]; | 211 | this.formData.createStart = this.createTime[0]; |
| 211 | this.formData.createEnd = this.createTime[1]; | 212 | this.formData.createEnd = this.createTime[1]; |
| 212 | } | 213 | } |
| 213 | - | ||
| 214 | getRoleList(this.formData) | 214 | getRoleList(this.formData) |
| 215 | .then((res) => { | 215 | .then((res) => { |
| 216 | this.tableLoading = false; | 216 | this.tableLoading = false; |
| ... | @@ -261,7 +261,7 @@ export default { | ... | @@ -261,7 +261,7 @@ export default { |
| 261 | status == 0 | 261 | status == 0 |
| 262 | ? (this.roleFormDisabled = true) | 262 | ? (this.roleFormDisabled = true) |
| 263 | : (this.roleFormDisabled = false); | 263 | : (this.roleFormDisabled = false); |
| 264 | - this.drawerTitle = "查看/修改角色"; | 264 | + this.drawerTitle = "修改角色"; |
| 265 | }, | 265 | }, |
| 266 | //修改角色状态 | 266 | //修改角色状态 |
| 267 | roleStatus(row) { | 267 | roleStatus(row) { | ... | ... |
| ... | @@ -103,12 +103,9 @@ | ... | @@ -103,12 +103,9 @@ |
| 103 | </el-form-item> | 103 | </el-form-item> |
| 104 | </el-col> --> | 104 | </el-col> --> |
| 105 | <el-col :span="24"> | 105 | <el-col :span="24"> |
| 106 | - <el-form-item | 106 | + <el-form-item label="所属口岸:" prop="portName"> |
| 107 | - label="所属口岸:" | ||
| 108 | - prop="portName" | ||
| 109 | - > | ||
| 110 | <el-select | 107 | <el-select |
| 111 | - placeholder="不限" | 108 | + placeholder="请选择口岸" |
| 112 | v-model="port" | 109 | v-model="port" |
| 113 | :disabled="userFormDisabled" | 110 | :disabled="userFormDisabled" |
| 114 | size="small" | 111 | size="small" |
| ... | @@ -216,14 +213,14 @@ export default { | ... | @@ -216,14 +213,14 @@ export default { |
| 216 | loginName: [ | 213 | loginName: [ |
| 217 | { | 214 | { |
| 218 | required: true, | 215 | required: true, |
| 219 | - message: "角色名不能为空", | 216 | + message: "员工号不能为空", |
| 220 | trigger: "blur", | 217 | trigger: "blur", |
| 221 | }, | 218 | }, |
| 222 | ], | 219 | ], |
| 223 | username: [ | 220 | username: [ |
| 224 | { | 221 | { |
| 225 | required: true, | 222 | required: true, |
| 226 | - message: "角色名不能为空", | 223 | + message: "用户名不能为空", |
| 227 | trigger: "blur", | 224 | trigger: "blur", |
| 228 | }, | 225 | }, |
| 229 | ], | 226 | ], |
| ... | @@ -238,11 +235,12 @@ export default { | ... | @@ -238,11 +235,12 @@ export default { |
| 238 | }; | 235 | }; |
| 239 | }, | 236 | }, |
| 240 | created() { | 237 | created() { |
| 241 | - this.selectRoleList(); | ||
| 242 | }, | 238 | }, |
| 243 | - watch:{ | 239 | + watch: { |
| 244 | - drawer(val,oldVal){ | 240 | + drawer(val, oldVal) { |
| 245 | - if(val){ | 241 | + if (val) { |
| 242 | + this.roleList = [] | ||
| 243 | + this.selectRoleList(); | ||
| 246 | this.userForm = this.userData; | 244 | this.userForm = this.userData; |
| 247 | if (this.userForm.roleIds) { | 245 | if (this.userForm.roleIds) { |
| 248 | this.roleid = this.userForm.roleIds; | 246 | this.roleid = this.userForm.roleIds; |
| ... | @@ -250,11 +248,16 @@ export default { | ... | @@ -250,11 +248,16 @@ export default { |
| 250 | if (this.userForm.portName) { | 248 | if (this.userForm.portName) { |
| 251 | this.port = this.userForm.portName; | 249 | this.port = this.userForm.portName; |
| 252 | } | 250 | } |
| 251 | + }else{ | ||
| 252 | + this.loading = false; | ||
| 253 | } | 253 | } |
| 254 | - } | 254 | + }, |
| 255 | }, | 255 | }, |
| 256 | methods: { | 256 | methods: { |
| 257 | - change(val){ | 257 | + clearValidate(formName){ |
| 258 | + this.$refs[formName].clearValidate(); | ||
| 259 | + }, | ||
| 260 | + change(val) { | ||
| 258 | this.roleid = val; | 261 | this.roleid = val; |
| 259 | }, | 262 | }, |
| 260 | selectRoleList() { | 263 | selectRoleList() { |
| ... | @@ -262,11 +265,11 @@ export default { | ... | @@ -262,11 +265,11 @@ export default { |
| 262 | getRoleList({ size: null, page: null }) | 265 | getRoleList({ size: null, page: null }) |
| 263 | .then((res) => { | 266 | .then((res) => { |
| 264 | if (res.code === 200) { | 267 | if (res.code === 200) { |
| 265 | - res.data.list.map(item=>{ | 268 | + res.data.list.map((item) => { |
| 266 | - if(item.valid == 1){ | 269 | + if (item.valid == 1) { |
| 267 | - this.roleList.push(item) | 270 | + this.roleList.push(item); |
| 268 | } | 271 | } |
| 269 | - }) | 272 | + }); |
| 270 | } else { | 273 | } else { |
| 271 | this.$message({ | 274 | this.$message({ |
| 272 | message: res.msg, | 275 | message: res.msg, |
| ... | @@ -302,11 +305,13 @@ export default { | ... | @@ -302,11 +305,13 @@ export default { |
| 302 | this.userForm = { | 305 | this.userForm = { |
| 303 | roleIds: [], | 306 | roleIds: [], |
| 304 | }; | 307 | }; |
| 308 | + this.clearValidate('userForm') | ||
| 305 | this.$emit("handleClose", false); | 309 | this.$emit("handleClose", false); |
| 306 | }, | 310 | }, |
| 307 | 311 | ||
| 308 | //提交 | 312 | //提交 |
| 309 | submit() { | 313 | submit() { |
| 314 | + if (this.port.join(",").length > 0) { | ||
| 310 | this.loading = true; | 315 | this.loading = true; |
| 311 | this.userData.isValid ? "" : (this.userForm.isValid = 1); | 316 | this.userData.isValid ? "" : (this.userForm.isValid = 1); |
| 312 | this.userForm.roleIds = this.roleid; | 317 | this.userForm.roleIds = this.roleid; |
| ... | @@ -331,6 +336,12 @@ export default { | ... | @@ -331,6 +336,12 @@ export default { |
| 331 | this.loading = false; | 336 | this.loading = false; |
| 332 | console.log(err); | 337 | console.log(err); |
| 333 | }); | 338 | }); |
| 339 | + }else{ | ||
| 340 | + this.$message({ | ||
| 341 | + message: "口岸不能为空", | ||
| 342 | + type: "warning", | ||
| 343 | + }); | ||
| 344 | + } | ||
| 334 | }, | 345 | }, |
| 335 | }, | 346 | }, |
| 336 | }; | 347 | }; | ... | ... |
| ... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
| 14 | <el-col :span="6"> | 14 | <el-col :span="6"> |
| 15 | <el-form-item label="手机号码"> | 15 | <el-form-item label="手机号码"> |
| 16 | <el-input | 16 | <el-input |
| 17 | - placeholder="请输入用户名称" | 17 | + placeholder="请输入手机号码" |
| 18 | v-model="formData.phone" | 18 | v-model="formData.phone" |
| 19 | clearable | 19 | clearable |
| 20 | ></el-input> | 20 | ></el-input> |
| ... | @@ -278,7 +278,7 @@ export default { | ... | @@ -278,7 +278,7 @@ export default { |
| 278 | detailUser(id) | 278 | detailUser(id) |
| 279 | .then((res) => { | 279 | .then((res) => { |
| 280 | this.drawer = true; | 280 | this.drawer = true; |
| 281 | - this.drawerTitle = "查看/修改用户"; | 281 | + this.drawerTitle = "修改用户"; |
| 282 | if (res.code === 200) { | 282 | if (res.code === 200) { |
| 283 | this.userData = res.data; | 283 | this.userData = res.data; |
| 284 | this.userData.portName | 284 | this.userData.portName | ... | ... |
-
Please register or login to post a comment