|
|
|
|
@ -67,7 +67,8 @@ |
|
|
|
|
size="mini" |
|
|
|
|
@click="handleAdd" |
|
|
|
|
v-hasPermi="['wcs:location:add']" |
|
|
|
|
>新增</el-button> |
|
|
|
|
>新增 |
|
|
|
|
</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button |
|
|
|
|
@ -78,7 +79,8 @@ |
|
|
|
|
:disabled="single" |
|
|
|
|
@click="handleUpdate" |
|
|
|
|
v-hasPermi="['wcs:location:edit']" |
|
|
|
|
>修改</el-button> |
|
|
|
|
>修改 |
|
|
|
|
</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
<el-button |
|
|
|
|
@ -89,7 +91,8 @@ |
|
|
|
|
:disabled="multiple" |
|
|
|
|
@click="handleDelete" |
|
|
|
|
v-hasPermi="['wcs:location:remove']" |
|
|
|
|
>删除</el-button> |
|
|
|
|
>删除 |
|
|
|
|
</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
@ -101,7 +104,8 @@ |
|
|
|
|
:disabled="multiple" |
|
|
|
|
@click="handleLock" |
|
|
|
|
v-hasPermi="['wcs:location:lock']" |
|
|
|
|
>锁定</el-button> |
|
|
|
|
>锁定 |
|
|
|
|
</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<el-col :span="1.5"> |
|
|
|
|
@ -113,7 +117,8 @@ |
|
|
|
|
:disabled="multiple" |
|
|
|
|
@click="handleUnLock" |
|
|
|
|
v-hasPermi="['wcs:location:lock']" |
|
|
|
|
>解锁</el-button> |
|
|
|
|
>解锁 |
|
|
|
|
</el-button> |
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
|
|
@ -159,28 +164,32 @@ |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
|
v-hasPermi="['wcs:location:edit']" |
|
|
|
|
>修改</el-button> |
|
|
|
|
>修改 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
@click="handleDelete(scope.row)" |
|
|
|
|
v-hasPermi="['wcs:location:remove']" |
|
|
|
|
>删除</el-button> |
|
|
|
|
>删除 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-circle-check" |
|
|
|
|
@click="handleVerify(scope.row)" |
|
|
|
|
v-hasPermi="['wcs:location:verify']" |
|
|
|
|
>验证</el-button> |
|
|
|
|
>验证 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
size="mini" |
|
|
|
|
type="text" |
|
|
|
|
icon="el-icon-refresh" |
|
|
|
|
@click="handleRescan(scope.row)" |
|
|
|
|
v-hasPermi="['wcs:location:rescan']" |
|
|
|
|
>重扫</el-button> |
|
|
|
|
>重扫 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
@ -287,10 +296,18 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { listLocation, getLocation, delLocation, addLocation, updateLocation,lockLocation,unlockLocation } from "@/api/wcs/location"; |
|
|
|
|
import { |
|
|
|
|
listLocation, |
|
|
|
|
getLocation, |
|
|
|
|
delLocation, |
|
|
|
|
addLocation, |
|
|
|
|
updateLocation, |
|
|
|
|
lockLocation, |
|
|
|
|
unlockLocation |
|
|
|
|
} from '@/api/wcs/location' |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: "Location", |
|
|
|
|
name: 'Location', |
|
|
|
|
dicts: ['number_yes_no', 'location_group_dict', 'lock_flag_dict', 'location_type', 'location_status'], |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
@ -309,7 +326,7 @@ export default { |
|
|
|
|
// 货位信息表格数据 |
|
|
|
|
locationList: [], |
|
|
|
|
// 弹出层标题 |
|
|
|
|
title: "", |
|
|
|
|
title: '', |
|
|
|
|
// 是否显示弹出层 |
|
|
|
|
open: false, |
|
|
|
|
// 查询参数 |
|
|
|
|
@ -320,47 +337,47 @@ export default { |
|
|
|
|
boxId: null, |
|
|
|
|
locationAreaNo: null, |
|
|
|
|
locationType: null, |
|
|
|
|
locationStatus:null, |
|
|
|
|
locationStatus: null |
|
|
|
|
}, |
|
|
|
|
// 表单参数 |
|
|
|
|
form: {}, |
|
|
|
|
// 表单校验 |
|
|
|
|
rules: { |
|
|
|
|
locationCode: [ |
|
|
|
|
{ required: true, message: "货位编码不能为空", trigger: "blur" } |
|
|
|
|
{ required: true, message: '货位编码不能为空', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
locationName: [ |
|
|
|
|
{ required: true, message: "货位名称不能为空", trigger: "blur" } |
|
|
|
|
{ required: true, message: '货位名称不能为空', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
boxId: [ |
|
|
|
|
{ required: true, message: "boxId不能为空", trigger: "blur" } |
|
|
|
|
{ required: true, message: 'boxId不能为空', trigger: 'blur' } |
|
|
|
|
], |
|
|
|
|
locationAreaNo: [ |
|
|
|
|
{ required: true, message: "货位分组不能为空", trigger: "blur" } |
|
|
|
|
], |
|
|
|
|
{ required: true, message: '货位分组不能为空', trigger: 'blur' } |
|
|
|
|
] |
|
|
|
|
// tunnel: [ |
|
|
|
|
// { required: true, message: "巷道不能为空", trigger: "blur" } |
|
|
|
|
// ], |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.getList(); |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
/** 查询货位信息列表 */ |
|
|
|
|
getList() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.loading = true |
|
|
|
|
listLocation(this.queryParams).then(response => { |
|
|
|
|
this.locationList = response.rows; |
|
|
|
|
this.total = response.total; |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
this.locationList = response.rows |
|
|
|
|
this.total = response.total |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 取消按钮 |
|
|
|
|
cancel() { |
|
|
|
|
this.open = false; |
|
|
|
|
this.reset(); |
|
|
|
|
this.open = false |
|
|
|
|
this.reset() |
|
|
|
|
}, |
|
|
|
|
// 表单重置 |
|
|
|
|
reset() { |
|
|
|
|
@ -378,18 +395,18 @@ export default { |
|
|
|
|
createTime: null, |
|
|
|
|
updateTime: null, |
|
|
|
|
lockFlag: null |
|
|
|
|
}; |
|
|
|
|
this.resetForm("form"); |
|
|
|
|
} |
|
|
|
|
this.resetForm('form') |
|
|
|
|
}, |
|
|
|
|
/** 搜索按钮操作 */ |
|
|
|
|
handleQuery() { |
|
|
|
|
this.queryParams.pageNum = 1; |
|
|
|
|
this.getList(); |
|
|
|
|
this.queryParams.pageNum = 1 |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
/** 重置按钮操作 */ |
|
|
|
|
resetQuery() { |
|
|
|
|
this.resetForm("queryForm"); |
|
|
|
|
this.handleQuery(); |
|
|
|
|
this.resetForm('queryForm') |
|
|
|
|
this.handleQuery() |
|
|
|
|
}, |
|
|
|
|
// 多选框选中数据 |
|
|
|
|
handleSelectionChange(selection) { |
|
|
|
|
@ -399,72 +416,74 @@ export default { |
|
|
|
|
}, |
|
|
|
|
/** 新增按钮操作 */ |
|
|
|
|
handleAdd() { |
|
|
|
|
this.reset(); |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "添加货位信息"; |
|
|
|
|
this.reset() |
|
|
|
|
this.open = true |
|
|
|
|
this.title = '添加货位信息' |
|
|
|
|
}, |
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
|
handleUpdate(row) { |
|
|
|
|
this.reset(); |
|
|
|
|
this.reset() |
|
|
|
|
const id = row.id || this.ids |
|
|
|
|
getLocation(id).then(response => { |
|
|
|
|
this.form = response.data; |
|
|
|
|
this.open = true; |
|
|
|
|
this.title = "修改货位信息"; |
|
|
|
|
}); |
|
|
|
|
this.form = response.data |
|
|
|
|
this.open = true |
|
|
|
|
this.title = '修改货位信息' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
/** 提交按钮 */ |
|
|
|
|
submitForm() { |
|
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
|
this.$refs['form'].validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
if (this.form.id != null) { |
|
|
|
|
updateLocation(this.form).then(response => { |
|
|
|
|
this.$modal.msgSuccess("修改成功"); |
|
|
|
|
this.open = false; |
|
|
|
|
this.getList(); |
|
|
|
|
}); |
|
|
|
|
this.$modal.msgSuccess('修改成功') |
|
|
|
|
this.open = false |
|
|
|
|
this.getList() |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
addLocation(this.form).then(response => { |
|
|
|
|
this.$modal.msgSuccess("新增成功"); |
|
|
|
|
this.open = false; |
|
|
|
|
this.getList(); |
|
|
|
|
}); |
|
|
|
|
this.$modal.msgSuccess('新增成功') |
|
|
|
|
this.open = false |
|
|
|
|
this.getList() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
|
handleDelete(row) { |
|
|
|
|
const ids = row.id || this.ids; |
|
|
|
|
const ids = row.id || this.ids |
|
|
|
|
this.$modal.confirm('是否确认删除货位信息编号为"' + ids + '"的数据项?').then(function() { |
|
|
|
|
return delLocation(ids); |
|
|
|
|
return delLocation(ids) |
|
|
|
|
}).then(() => { |
|
|
|
|
this.getList(); |
|
|
|
|
this.$modal.msgSuccess("删除成功"); |
|
|
|
|
}).catch(() => {}); |
|
|
|
|
this.getList() |
|
|
|
|
this.$modal.msgSuccess('删除成功') |
|
|
|
|
}).catch(() => { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
handleLock(row) { |
|
|
|
|
const ids = row.id || this.ids; |
|
|
|
|
const ids = row.id || this.ids |
|
|
|
|
this.$modal.confirm('是否确认锁定货位信息编号为"' + ids + '"的数据项?').then(function() { |
|
|
|
|
return lockLocation(ids); |
|
|
|
|
return lockLocation(ids) |
|
|
|
|
}).then(() => { |
|
|
|
|
this.getList(); |
|
|
|
|
this.$modal.msgSuccess("锁定成功"); |
|
|
|
|
}).catch(() => {}); |
|
|
|
|
this.getList() |
|
|
|
|
this.$modal.msgSuccess('锁定成功') |
|
|
|
|
}).catch(() => { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
handleUnLock(row) { |
|
|
|
|
const ids = row.id || this.ids; |
|
|
|
|
const ids = row.id || this.ids |
|
|
|
|
this.$modal.confirm('是否确认解锁货位信息编号为"' + ids + '"的数据项?').then(function() { |
|
|
|
|
return unlockLocation(ids); |
|
|
|
|
return unlockLocation(ids) |
|
|
|
|
}).then(() => { |
|
|
|
|
this.getList(); |
|
|
|
|
this.$modal.msgSuccess("解锁成功"); |
|
|
|
|
}).catch(() => {}); |
|
|
|
|
this.getList() |
|
|
|
|
this.$modal.msgSuccess('解锁成功') |
|
|
|
|
}).catch(() => { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
|
handleExport() { |
|
|
|
|
this.download('wcs/location/export', { |
|
|
|
|
@ -472,5 +491,5 @@ export default { |
|
|
|
|
}, `location_${new Date().getTime()}.xlsx`) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|