opt:修改国际化,add:增加大屏看板
This commit is contained in:
@@ -5,6 +5,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.base.TableDataInfo;
|
import org.nl.common.base.TableDataInfo;
|
||||||
import org.nl.common.logging.annotation.Log;
|
import org.nl.common.logging.annotation.Log;
|
||||||
import org.nl.wms.bigscreen_manage.service.BigScreenService;
|
import org.nl.wms.bigscreen_manage.service.BigScreenService;
|
||||||
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,10 +43,12 @@ public class BigScreenController {
|
|||||||
@Log("大屏数据")
|
@Log("大屏数据")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> getData(@RequestBody JSONObject stors) {
|
public ResponseEntity<Object> getData(@RequestBody JSONObject stors) {
|
||||||
List<String> list = new ArrayList<>();
|
String storStr = stors.getString("stors");
|
||||||
list.add("FJ");
|
List<JSONObject> data = new ArrayList<>();
|
||||||
List<JSONObject> data = bigScreenService.getData(list);
|
if (!StringUtils.isEmpty(storStr)){
|
||||||
return new ResponseEntity<>(PdaResponse.requestParamOk(data.get(0)), HttpStatus.OK);
|
data = bigScreenService.getData(Arrays.asList(storStr.split(",")));
|
||||||
|
}
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(data), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public class BigScreenServiceImpl implements BigScreenService {
|
|||||||
// 空余货位
|
// 空余货位
|
||||||
result.put("emp_qty", emp_qty);
|
result.put("emp_qty", emp_qty);
|
||||||
// 使用货位百分比
|
// 使用货位百分比
|
||||||
double use_percentage = NumberUtil.mul(NumberUtil.div(use_qty, total_qty), 100);
|
double use_percentage = NumberUtil.mul(NumberUtil.div(use_qty, total_qty==0?1:total_qty), 100);
|
||||||
result.put("use_percentage", NumberUtil.round(use_percentage, 2));
|
result.put("use_percentage", NumberUtil.round(use_percentage, 2));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ var config = {
|
|||||||
'Tip19': 'Are you sure to delete the selected data?',
|
'Tip19': 'Are you sure to delete the selected data?',
|
||||||
'Tip20': 'The login has expired,please log in again!',
|
'Tip20': 'The login has expired,please log in again!',
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
|
"import": "import",
|
||||||
|
"export": "export",
|
||||||
"create_name": "Created By",
|
"create_name": "Created By",
|
||||||
"create_time": "Creation Time",
|
"create_time": "Creation Time",
|
||||||
"update_name": "Modified By",
|
"update_name": "Modified By",
|
||||||
@@ -171,7 +173,15 @@ var config = {
|
|||||||
"yes": "Yes",
|
"yes": "Yes",
|
||||||
"no": "No",
|
"no": "No",
|
||||||
"user_info_get_fail": "Failed to get user information",
|
"user_info_get_fail": "Failed to get user information",
|
||||||
"operation_success": "Operation successful"
|
"operation_success": "Operation successful",
|
||||||
|
"inputCodeOrName": "input code or name"
|
||||||
|
},
|
||||||
|
"upload": {
|
||||||
|
"load_text1": "Drag file here or",
|
||||||
|
"load_text2": "click to upload",
|
||||||
|
"load_text3": "Only Excel files can be uploaded, and no larger than 10MB",
|
||||||
|
"load_text4": "File is too large, please upload files smaller than 10MB~",
|
||||||
|
"load_text5": "Only one Excel file can be uploaded!"
|
||||||
},
|
},
|
||||||
"gateway": {
|
"gateway": {
|
||||||
"picking_point_not_exist": "The picking point you entered does not exist, please enter 1207 or 1210 picking point!",
|
"picking_point_not_exist": "The picking point you entered does not exist, please enter 1207 or 1210 picking point!",
|
||||||
@@ -179,6 +189,19 @@ var config = {
|
|||||||
"apply_task_fail": "Task application failed, application parameters are",
|
"apply_task_fail": "Task application failed, application parameters are",
|
||||||
"check_error_log": "Please check the error log"
|
"check_error_log": "Please check the error log"
|
||||||
},
|
},
|
||||||
|
"md_me_materialbase": {
|
||||||
|
"material_code": "Material Code",
|
||||||
|
"material_name": "Material Name",
|
||||||
|
"product_series_name": "Product Series",
|
||||||
|
"material_spec": "Material Specification",
|
||||||
|
"material_model": "Material Model"
|
||||||
|
},
|
||||||
|
"md_pb_classstandard": {
|
||||||
|
"class_code": "Class Code",
|
||||||
|
"class_name": "Class Name",
|
||||||
|
"class_desc": "Class Description",
|
||||||
|
"parent_class_id": "Parent Class ID"
|
||||||
|
},
|
||||||
"md_pb_measureunit": {
|
"md_pb_measureunit": {
|
||||||
"unit_code": "Code",
|
"unit_code": "Code",
|
||||||
"unit_name": "Name",
|
"unit_name": "Name",
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ var config = {
|
|||||||
'Tip19': 'Bạn có chắc chắn xóa dữ liệu đã chọn?',
|
'Tip19': 'Bạn có chắc chắn xóa dữ liệu đã chọn?',
|
||||||
'Tip20': 'Trạng thái đăng nhập hiện tại đã hết hạn, vui lòng đăng nhập lại!',
|
'Tip20': 'Trạng thái đăng nhập hiện tại đã hết hạn, vui lòng đăng nhập lại!',
|
||||||
"name": "Tên",
|
"name": "Tên",
|
||||||
|
"import": "Nhập",
|
||||||
|
"export": "Xuất",
|
||||||
"create_name": "Người tạo",
|
"create_name": "Người tạo",
|
||||||
"create_time": "Thời gian tạo",
|
"create_time": "Thời gian tạo",
|
||||||
"update_name": "Người sửa đổi",
|
"update_name": "Người sửa đổi",
|
||||||
@@ -171,7 +173,15 @@ var config = {
|
|||||||
"yes": "Có",
|
"yes": "Có",
|
||||||
"no": "Không",
|
"no": "Không",
|
||||||
"user_info_get_fail": "Lấy thông tin người dùng thất bại",
|
"user_info_get_fail": "Lấy thông tin người dùng thất bại",
|
||||||
"operation_success": "Thao tác thành công"
|
"operation_success": "Thao tác thành công",
|
||||||
|
"inputCodeOrName": "Nhập mã hoặc tên"
|
||||||
|
},
|
||||||
|
"upload": {
|
||||||
|
"load_text1": "Kéo file vào đây, hoặc",
|
||||||
|
"load_text2": "nhấp để tải lên",
|
||||||
|
"load_text3": "Chỉ có thể tải lên file Excel và không vượt quá 10MB",
|
||||||
|
"load_text4": "File quá lớn, vui lòng tải lên file nhỏ hơn 10MB~",
|
||||||
|
"load_text5": "Chỉ có thể tải lên một file excel!"
|
||||||
},
|
},
|
||||||
"gateway": {
|
"gateway": {
|
||||||
"picking_point_not_exist": "Vị trí chọn bạn nhập không tồn tại, vui lòng nhập vị trí chọn 1207 hoặc 1210!",
|
"picking_point_not_exist": "Vị trí chọn bạn nhập không tồn tại, vui lòng nhập vị trí chọn 1207 hoặc 1210!",
|
||||||
@@ -179,6 +189,19 @@ var config = {
|
|||||||
"apply_task_fail": "Ứng dụng tác vụ thất bại, tham số ứng dụng là",
|
"apply_task_fail": "Ứng dụng tác vụ thất bại, tham số ứng dụng là",
|
||||||
"check_error_log": "Vui lòng kiểm tra nhật ký lỗi"
|
"check_error_log": "Vui lòng kiểm tra nhật ký lỗi"
|
||||||
},
|
},
|
||||||
|
"md_me_materialbase": {
|
||||||
|
"material_code": "Mã vật liệu",
|
||||||
|
"material_name": "Tên vật liệu",
|
||||||
|
"product_series_name": "Dòng sản phẩm",
|
||||||
|
"material_spec": "Quy cách vật liệu",
|
||||||
|
"material_model": "Model vật liệu"
|
||||||
|
},
|
||||||
|
"md_pb_classstandard": {
|
||||||
|
"class_code": "Mã phân loại",
|
||||||
|
"class_name": "Tên phân loại",
|
||||||
|
"class_desc": "Mô tả phân loại",
|
||||||
|
"parent_class_id": "ID phân loại cấp trên"
|
||||||
|
},
|
||||||
"md_pb_measureunit": {
|
"md_pb_measureunit": {
|
||||||
"unit_code": "Mã",
|
"unit_code": "Mã",
|
||||||
"unit_name": "Tên",
|
"unit_name": "Tên",
|
||||||
|
|||||||
@@ -144,6 +144,8 @@ var config = {
|
|||||||
'Tip19': '你确定删除选中的数据吗?',
|
'Tip19': '你确定删除选中的数据吗?',
|
||||||
'Tip20': '当前登录状态已过期,请重新登录!',
|
'Tip20': '当前登录状态已过期,请重新登录!',
|
||||||
"name": "名称",
|
"name": "名称",
|
||||||
|
"import": "导入",
|
||||||
|
"export": "导出",
|
||||||
"create_name": "创建人",
|
"create_name": "创建人",
|
||||||
"create_time": "创建时间",
|
"create_time": "创建时间",
|
||||||
"update_name": "修改人",
|
"update_name": "修改人",
|
||||||
@@ -171,7 +173,15 @@ var config = {
|
|||||||
"yes": "是",
|
"yes": "是",
|
||||||
"no": "否",
|
"no": "否",
|
||||||
"user_info_get_fail": "用户信息获取失败",
|
"user_info_get_fail": "用户信息获取失败",
|
||||||
"operation_success": "操作成功"
|
"operation_success": "操作成功",
|
||||||
|
"inputCodeOrName": "输入编码或名称"
|
||||||
|
},
|
||||||
|
"upload":{
|
||||||
|
"load_text1":"将文件拖到此处,或",
|
||||||
|
"load_text2":"点击上传",
|
||||||
|
"load_text3":"只能上传Excel文件,且不超过10MB",
|
||||||
|
"load_text4":"文件过大,请上传小于10MB的文件〜",
|
||||||
|
"load_text5":"只能上传一个excel文件!",
|
||||||
},
|
},
|
||||||
"gateway": {
|
"gateway": {
|
||||||
"picking_point_not_exist": "您输入的拣选位不存在,请输入1207或1210拣选位!",
|
"picking_point_not_exist": "您输入的拣选位不存在,请输入1207或1210拣选位!",
|
||||||
@@ -179,6 +189,19 @@ var config = {
|
|||||||
"apply_task_fail": "任务申请失败,申请参数为",
|
"apply_task_fail": "任务申请失败,申请参数为",
|
||||||
"check_error_log": "请查看错误日志"
|
"check_error_log": "请查看错误日志"
|
||||||
},
|
},
|
||||||
|
"md_me_materialbase": {
|
||||||
|
"material_code": "物料编码",
|
||||||
|
"material_name": "物料名称",
|
||||||
|
"material_spec": "物料规格",
|
||||||
|
"material_model": "物料型号"
|
||||||
|
},
|
||||||
|
"md_pb_classstandard": {
|
||||||
|
"class_code": "分类编码",
|
||||||
|
"class_name": "分类名称",
|
||||||
|
"class_desc": "分类描述",
|
||||||
|
"product_series_name": "系列",
|
||||||
|
"parent_class_id": "上级分类标识"
|
||||||
|
},
|
||||||
"md_pb_measureunit": {
|
"md_pb_measureunit": {
|
||||||
"unit_code": "编码",
|
"unit_code": "编码",
|
||||||
"unit_name": "名称",
|
"unit_name": "名称",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
// 国际化开发:3。增加文件获取接口
|
||||||
export function fetchMessages(locale) {
|
export function fetchMessages(locale) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/language/js/' + locale,
|
url: '/api/language/js/' + locale,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import VueI18n from 'vue-i18n'
|
import VueI18n from 'vue-i18n'
|
||||||
|
// 国际化开发:5。i18n index文件修改
|
||||||
Vue.use(VueI18n)
|
Vue.use(VueI18n)
|
||||||
|
|
||||||
// 准备默认的语言环境消息(可以是空对象,也可以是一些基本消息)
|
// 准备默认的语言环境消息(可以是空对象,也可以是一些基本消息)
|
||||||
|
|||||||
@@ -50,10 +50,11 @@
|
|||||||
<span class="el-dropdown-link" style="font-size: 18px">
|
<span class="el-dropdown-link" style="font-size: 18px">
|
||||||
{{ language }} <i class="el-icon-caret-bottom" />
|
{{ language }} <i class="el-icon-caret-bottom" />
|
||||||
</span>
|
</span>
|
||||||
|
<!-- 国际化开发:1.修改语言列表-->
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
||||||
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
||||||
<el-dropdown-item divided command="in">Indonesian</el-dropdown-item>
|
<el-dropdown-item divided command="iv">Vietnamese</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</div>
|
</div>
|
||||||
@@ -137,13 +138,14 @@ export default {
|
|||||||
this.setLang(command)
|
this.setLang(command)
|
||||||
location.reload()
|
location.reload()
|
||||||
},
|
},
|
||||||
|
// 国际化开发:2.设置
|
||||||
setLang(command) {
|
setLang(command) {
|
||||||
if (command === 'en') {
|
if (command === 'en') {
|
||||||
this.language = 'English'
|
this.language = 'English'
|
||||||
} else if (command === 'zh') {
|
} else if (command === 'zh') {
|
||||||
this.language = '简体中文'
|
this.language = '简体中文'
|
||||||
} else if (command === 'in') {
|
} else if (command === 'iv') {
|
||||||
this.language = 'Indonesian'
|
this.language = 'Vietnamese'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleSideBar() {
|
toggleSideBar() {
|
||||||
|
|||||||
@@ -106,10 +106,10 @@ new Vue({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// add-xy start
|
// add-xy start
|
||||||
// 异步获取语言文件
|
// 国际化开发:3.调用接口异步获取语言文件,增加api文件
|
||||||
fetchMessages(currentLocale).then(messages => {
|
fetchMessages(currentLocale).then(messages => {
|
||||||
// 将获取到的消息设置到i18n实例
|
// 将获取到的消息设置到i18n实例
|
||||||
i18n.setLocaleMessage(currentLocale, messages)
|
i18n.setLocaleMessage(currentLocale, messages.content)
|
||||||
// 设置当前语言
|
// 设置当前语言
|
||||||
i18n.locale = currentLocale
|
i18n.locale = currentLocale
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -32,10 +32,11 @@
|
|||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
{{ language }}
|
{{ language }}
|
||||||
</span>
|
</span>
|
||||||
|
<!-- 国际化开发:1.修改语言列表-->
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
||||||
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
||||||
<el-dropdown-item divided command="in">Indonesian</el-dropdown-item>
|
<el-dropdown-item divided command="iv">Vietnamese</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -63,6 +64,7 @@ import { getCodeImg } from '@/api/login'
|
|||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
import Background from '@/assets/images/background.jpg'
|
import Background from '@/assets/images/background.jpg'
|
||||||
import i18n from '@/i18n'
|
import i18n from '@/i18n'
|
||||||
|
import { fetchMessages } from '@/api/i18n'
|
||||||
export default {
|
export default {
|
||||||
name: 'Login',
|
name: 'Login',
|
||||||
data() {
|
data() {
|
||||||
@@ -113,12 +115,13 @@ export default {
|
|||||||
// 如果已经加载过该语言,可以直接设置,避免重复请求
|
// 如果已经加载过该语言,可以直接设置,避免重复请求
|
||||||
if (!this.$i18n.getLocaleMessage(locale)) {
|
if (!this.$i18n.getLocaleMessage(locale)) {
|
||||||
const messages = await fetchMessages(locale)
|
const messages = await fetchMessages(locale)
|
||||||
this.$i18n.setLocaleMessage(locale, messages)
|
this.$i18n.setLocaleMessage(locale, messages.content)
|
||||||
}
|
}
|
||||||
this.$i18n.locale = locale
|
this.$i18n.locale = locale
|
||||||
// 可以将当前语言保存到本地存储,以便下次使用
|
// 可以将当前语言保存到本地存储,以便下次使用
|
||||||
localStorage.setItem('lang', locale)
|
localStorage.setItem('lang', locale)
|
||||||
this.setLang(locale)
|
this.setLang(locale)
|
||||||
|
location.reload()
|
||||||
},
|
},
|
||||||
langChange(command) {
|
langChange(command) {
|
||||||
this.$i18n.locale = command
|
this.$i18n.locale = command
|
||||||
@@ -126,13 +129,14 @@ export default {
|
|||||||
this.setLang(command)
|
this.setLang(command)
|
||||||
location.reload()
|
location.reload()
|
||||||
},
|
},
|
||||||
|
// 国际化开发:2.设置
|
||||||
setLang(command) {
|
setLang(command) {
|
||||||
if (command === 'en') {
|
if (command === 'en') {
|
||||||
this.language = 'English'
|
this.language = 'English'
|
||||||
} else if (command === 'zh') {
|
} else if (command === 'zh') {
|
||||||
this.language = '简体中文'
|
this.language = '简体中文'
|
||||||
} else if (command === 'in') {
|
} else if (command === 'iv') {
|
||||||
this.language = 'Indonesian'
|
this.language = 'Vietnamese'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getCode() {
|
getCode() {
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
src="/screen/index.html"
|
src="/screen/index.html"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="100%"
|
height="100%"
|
||||||
frameborder="0"
|
frameBorder="0"
|
||||||
allowfullscreen
|
allowFullScreen
|
||||||
></iframe>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
import ECharts from 'vue-echarts'
|
import ECharts from 'vue-echarts'
|
||||||
import 'echarts/lib/chart/line'
|
import 'echarts/lib/chart/line'
|
||||||
import 'echarts/lib/component/polar'
|
import 'echarts/lib/component/polar'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ServerMonitor',
|
name: 'ServerMonitor',
|
||||||
components: {
|
components: {
|
||||||
@@ -94,12 +95,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
/* this.init()
|
this.init()
|
||||||
this.monitor = window.setInterval(() => {
|
this.monitor = window.setInterval(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.init()
|
this.init()
|
||||||
}, 2)
|
}, 2)
|
||||||
}, 3500)*/
|
}, 3500)
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
clearInterval(this.monitor)
|
clearInterval(this.monitor)
|
||||||
@@ -126,41 +127,47 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
::v-deep .box-card {
|
::v-deep .box-card {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
span {
|
|
||||||
margin-right: 28px;
|
span {
|
||||||
}
|
margin-right: 28px;
|
||||||
.el-icon-refresh {
|
|
||||||
margin-right: 10px;
|
|
||||||
float: right;
|
|
||||||
cursor:pointer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.cpu, .memory, .swap, .disk {
|
|
||||||
width: 20%;
|
.el-icon-refresh {
|
||||||
float: left;
|
margin-right: 10px;
|
||||||
padding-bottom: 20px;
|
float: right;
|
||||||
margin-right: 5%;
|
cursor: pointer;
|
||||||
}
|
|
||||||
.title {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #999;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
.footer {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #999;
|
|
||||||
margin-top: -5px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cpu, .memory, .swap, .disk {
|
||||||
|
width: 20%;
|
||||||
|
float: left;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
margin-right: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #999;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #999;
|
||||||
|
margin-top: -5px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,267 +1,173 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div style="height:1000px">
|
||||||
<el-row>
|
<iframe
|
||||||
<el-col :span="24" class="card-box">
|
src="/screen/index.html"
|
||||||
<el-card>
|
width="100%"
|
||||||
<div slot="header">
|
height="100%"
|
||||||
<span>{{ $t('Redis.title1') }}</span>
|
frameBorder="0"
|
||||||
</div>
|
allowFullScreen
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
/>
|
||||||
<table cellspacing="0" style="width: 100%">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td><div class="cell">{{ $t('Redis.redis_version') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.redis_version }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.redis_mode') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.redis_mode == "standalone" ? $t('Redis.standalone') : $t('Redis.cluster') }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.tcp_port') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.tcp_port }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.connected_clients') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.connected_clients }}</div></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><div class="cell">{{ $t('Redis.running') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.uptime_in_days }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.memory_use') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.used_memory_human }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.cpu') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.memory') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.maxmemory_human }}</div></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><div class="cell">{{ $t('Redis.AOF') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.aof_enabled === "0" ? $t('common.No') : $t('common.Yes') }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.RDB') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.rdb_last_bgsave_status }}</div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.keys') }}:</div></td>
|
|
||||||
<td><div v-if="cache.dbSize" class="cell">{{ cache.dbSize }} </div></td>
|
|
||||||
<td><div class="cell">{{ $t('Redis.io') }}:</div></td>
|
|
||||||
<td><div v-if="cache.info" class="cell">{{ cache.info.instantaneous_input_kbps }}kps/{{ cache.info.instantaneous_output_kbps }}kps</div></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="card-box">
|
|
||||||
<el-card>
|
|
||||||
<div slot="header"><span>{{ $t('Redis.left_title') }}</span></div>
|
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
|
||||||
<div ref="commandstats" style="height: 420px" />
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12" class="card-box">
|
|
||||||
<el-card>
|
|
||||||
<div slot="header">
|
|
||||||
<span>{{ $t('Redis.right_title') }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="el-table el-table--enable-row-hover el-table--medium">
|
|
||||||
<div ref="usedmemory" style="height: 420px" />
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="24" class="card-box">
|
|
||||||
<el-card>
|
|
||||||
<el-button size="mini" :disabled="delBtlStatu" type="danger" style="margin-bottom: 10px" @click="batchDel">
|
|
||||||
{{ $t('Redis.batch_del') }}</el-button>
|
|
||||||
<el-table
|
|
||||||
:data="keyAndValues"
|
|
||||||
row-key="id"
|
|
||||||
:header-cell-style="{'text-align':'center'}"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column prop="key" label="Key" width="200" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column prop="dataType" :label="$t('Redis.key_type')" width="100" />
|
|
||||||
<el-table-column prop="value" :label="$t('Redis.value2')" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column prop="expire" :label="$t('Redis.expiration')" width="200">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag>
|
|
||||||
<span v-if="scope.row.expire === -1">
|
|
||||||
{{ $t('Redis.no_expired') }}
|
|
||||||
</span>
|
|
||||||
<span v-else-if="scope.row.expire === -2">
|
|
||||||
{{ $t('Redis.expired') }}
|
|
||||||
</span>
|
|
||||||
<span v-else>
|
|
||||||
{{ scope.row.expire }}{{ $t('Redis.unit') }}
|
|
||||||
</span>
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column :label="$t('common.Operate')" width="150px" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="danger" size="mini" @click="clearRedisData(scope.row)">{{ $t('Redis.clear') }}</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCache, getKeyDefineList, getKeyValueList, batch } from '@/views/system/redis/redis'
|
import ECharts from 'vue-echarts'
|
||||||
import echarts from 'echarts'
|
import 'echarts/lib/chart/line'
|
||||||
import i18n from '@/i18n'
|
import 'echarts/lib/component/polar'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Redis',
|
name: 'ServerMonitor',
|
||||||
|
components: {
|
||||||
|
'v-chart': ECharts
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 统计命令信息
|
show: false,
|
||||||
commandstats: null,
|
monitor: null,
|
||||||
// 使用内存
|
url: 'api/monitor',
|
||||||
usedmemory: null,
|
data: {},
|
||||||
// cache 信息
|
cpuInfo: {
|
||||||
cache: [],
|
tooltip: {
|
||||||
// key 列表
|
trigger: 'axis'
|
||||||
keyDefineListLoad: true,
|
},
|
||||||
keyDefineList: [],
|
xAxis: {
|
||||||
// 模块弹出框
|
type: 'category',
|
||||||
open: false,
|
boundaryGap: false,
|
||||||
keyTemplate: '',
|
data: []
|
||||||
cacheKeys: [],
|
},
|
||||||
cacheForm: {},
|
yAxis: {
|
||||||
keyAndValues: [],
|
type: 'value',
|
||||||
multipleSelection: [], // 多选数据
|
min: 0,
|
||||||
delBtlStatu: true
|
max: 100,
|
||||||
|
interval: 20
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [],
|
||||||
|
type: 'line',
|
||||||
|
areaStyle: {
|
||||||
|
normal: {
|
||||||
|
color: 'rgb(32, 160, 255)' // 改变区域颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: '#6fbae1',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#6fbae1' // 改变折线颜色
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
memoryInfo: {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: []
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
min: 0,
|
||||||
|
max: 100,
|
||||||
|
interval: 20
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
data: [],
|
||||||
|
type: 'line',
|
||||||
|
areaStyle: {
|
||||||
|
normal: {
|
||||||
|
color: 'rgb(32, 160, 255)' // 改变区域颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: '#6fbae1',
|
||||||
|
lineStyle: {
|
||||||
|
color: '#6fbae1' // 改变折线颜色
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.init()
|
||||||
|
this.monitor = window.setInterval(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.init()
|
||||||
|
}, 2)
|
||||||
|
}, 3500)
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
clearInterval(this.monitor)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取redis的信息
|
// init() {
|
||||||
getList() {
|
// initData(this.url, {}).then(data => {
|
||||||
getCache().then(res => {
|
// this.data = data
|
||||||
// console.log(res)
|
// this.show = true
|
||||||
this.cache = res.info
|
// if (this.cpuInfo.xAxis.data.length >= 8) {
|
||||||
// this.$model.closeLoading()
|
// this.cpuInfo.xAxis.data.shift()
|
||||||
this.commandstats = echarts.init(this.$refs.commandstats, 'macarons')
|
// this.memoryInfo.xAxis.data.shift()
|
||||||
const commandStats = [] // 指令状态数据
|
// this.cpuInfo.series[0].data.shift()
|
||||||
res.info.commandStats.forEach(row => {
|
// this.memoryInfo.series[0].data.shift()
|
||||||
commandStats.push({
|
// }
|
||||||
name: row.command,
|
// this.cpuInfo.xAxis.data.push(data.time)
|
||||||
value: row.calls
|
// this.memoryInfo.xAxis.data.push(data.time)
|
||||||
})
|
// this.cpuInfo.series[0].data.push(parseFloat(data.cpu.used))
|
||||||
})
|
// this.memoryInfo.series[0].data.push(parseFloat(data.memory.usageRate))
|
||||||
this.commandstats.setOption({
|
// })
|
||||||
tooltip: {
|
// }
|
||||||
trigger: 'item',
|
|
||||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: i18n.t('Redis.command'),
|
|
||||||
type: 'pie',
|
|
||||||
roseType: 'radius',
|
|
||||||
radius: [15, 95],
|
|
||||||
center: ['50%', '38%'],
|
|
||||||
data: commandStats,
|
|
||||||
animationEasing: 'cubicInOut',
|
|
||||||
animationDuration: 1000
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
// 使用内存信息
|
|
||||||
this.usedmemory = echarts.init(this.$refs.usedmemory, 'macarons')
|
|
||||||
this.usedmemory.setOption({
|
|
||||||
tooltip: {
|
|
||||||
formatter: '{b} <br/>{a} : ' + this.cache.info.used_memory_human
|
|
||||||
},
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: i18n.t('Redis.pake'),
|
|
||||||
type: 'gauge',
|
|
||||||
min: 0,
|
|
||||||
max: 1000,
|
|
||||||
detail: {
|
|
||||||
formatter: this.cache.info.used_memory_human
|
|
||||||
},
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
value: parseFloat(this.cache.info.used_memory_human),
|
|
||||||
name: i18n.t('Redis.memory_consumption')
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
})
|
|
||||||
// 查询 Redis Key 模板列表
|
|
||||||
getKeyDefineList().then(res => {
|
|
||||||
this.keyDefineList = res.info
|
|
||||||
this.keyDefineListLoad = false
|
|
||||||
})
|
|
||||||
getKeyValueList().then(res => {
|
|
||||||
console.log('keyAndValue', res)
|
|
||||||
this.keyAndValues = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
clearRedisData(row) {
|
|
||||||
this.$confirm(i18n.t('Redis.msg1'), i18n.t('common.Tips'), {
|
|
||||||
confirmButtonText: i18n.t('common.Confirm'),
|
|
||||||
cancelButtonText: i18n.t('common.Cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
const ids = []
|
|
||||||
ids.push(row.key)
|
|
||||||
batch(ids).then(res => {
|
|
||||||
this.$message({
|
|
||||||
type: 'success',
|
|
||||||
message: i18n.t('common.Operation_success')
|
|
||||||
})
|
|
||||||
location.reload()
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: i18n.t('Redis.msg2')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleSelectionChange(val) {
|
|
||||||
this.multipleSelection = val
|
|
||||||
this.delBtlStatu = val.length == 0
|
|
||||||
},
|
|
||||||
batchDel() {
|
|
||||||
this.$confirm(i18n.t('common.Tip1', { count: this.multipleSelection.length }), i18n.t('common.Tips'), {
|
|
||||||
confirmButtonText: i18n.t('common.Confirm'),
|
|
||||||
cancelButtonText: i18n.t('common.Cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
const ids = []
|
|
||||||
for (const i in this.multipleSelection) {
|
|
||||||
ids.push(this.multipleSelection[i].key)
|
|
||||||
}
|
|
||||||
batch(ids).then(res => {
|
|
||||||
this.$message({
|
|
||||||
type: 'success',
|
|
||||||
message: i18n.t('common.Operation_success')
|
|
||||||
})
|
|
||||||
location.reload()
|
|
||||||
})
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: i18n.t('Redis.msg2')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.card-box {
|
::v-deep .box-card {
|
||||||
padding-right: 15px;
|
margin-bottom: 5px;
|
||||||
padding-left: 15px;
|
|
||||||
|
span {
|
||||||
|
margin-right: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-icon-refresh {
|
||||||
|
margin-right: 10px;
|
||||||
|
float: right;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.cpu, .memory, .swap, .disk {
|
||||||
|
width: 20%;
|
||||||
|
float: left;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
margin-right: 5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #999;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #999;
|
||||||
|
margin-top: -5px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="物料选择"
|
:title="$t('common.Please_select')"
|
||||||
append-to-body
|
append-to-body
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
@@ -15,12 +15,12 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="物料名称">
|
<el-form-item :label="$t('md_me_materialbase.material_name')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="物料名称"
|
:placeholder="$t('md_me_materialbase.material_name')"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -42,25 +42,25 @@
|
|||||||
@current-change="clickChange"
|
@current-change="clickChange"
|
||||||
>
|
>
|
||||||
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
<el-table-column v-if="!isSingle" type="selection" width="55" />
|
||||||
<el-table-column v-if="isSingle" label="选择" width="55">
|
<el-table-column v-if="isSingle" :label="$t('common.Please_select')" width="55">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material_code" label="物料编码" width="140" />
|
<el-table-column prop="material_code" :label="$t('md_me_materialbase.material_code')" width="140" />
|
||||||
<el-table-column prop="material_name" label="物料名称" width="170" show-overflow-tooltip />
|
<el-table-column prop="material_name" :label="$t('md_me_materialbase.material_name')" width="170" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_spec" label="物料规格" width="170" show-overflow-tooltip/>
|
<el-table-column prop="material_spec" :label="$t('md_me_materialbase.material_spec')" width="170" show-overflow-tooltip />
|
||||||
<el-table-column prop="class_name" label="物料分类" width="140" />
|
<el-table-column prop="class_name" :label="$t('md_pb_classstandard.class_name')" width="140" />
|
||||||
<el-table-column prop="unit_name" label="计量单位" />
|
<el-table-column prop="unit_name" :label="$t('md_pb_measureunit.unit_name')" />
|
||||||
<el-table-column prop="product_series_name" label="系列" />
|
<el-table-column prop="product_series_name" :label="$t('md_me_materialbase.product_series_name')" />
|
||||||
<el-table-column prop="update_optname" label="修改人" />
|
<el-table-column prop="update_optname" :label="$t('common.update_optname')" />
|
||||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
<el-table-column prop="update_time" :label="$t('common.update_time')" width="135" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">{{ $t('common.Cancel') }}</el-button>
|
||||||
<el-button type="primary" @click="submit">确 定</el-button>
|
<el-button type="primary" @click="submit">{{ $t('common.Confirm') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -71,13 +71,14 @@ import CRUD, { header, presenter } from '@crud/crud'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
import i18n from '@/i18n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MaterialDialog',
|
name: 'MaterialDialog',
|
||||||
components: { rrOperation, pagination },
|
components: { rrOperation, pagination },
|
||||||
dicts: ['is_used'],
|
dicts: ['is_used'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '物料选择', url: 'api/Materia', optShow: {}})
|
return CRUD({ title: i18n.t('common.Please_select'), url: 'api/Materia', optShow: {}})
|
||||||
},
|
},
|
||||||
mixins: [presenter(), header()],
|
mixins: [presenter(), header()],
|
||||||
props: {
|
props: {
|
||||||
@@ -135,7 +136,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.rows = this.$refs.table.selection
|
this.rows = this.$refs.table.selection
|
||||||
if (this.rows.length <= 0) {
|
if (this.rows.length <= 0) {
|
||||||
this.$message('请先勾选物料')
|
this.$message(i18n.t('common.Please_select'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="导入Excel文件"
|
:title="$t('common.import')"
|
||||||
append-to-body
|
append-to-body
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
@@ -25,14 +25,14 @@
|
|||||||
>
|
>
|
||||||
<i class="el-icon-upload" />
|
<i class="el-icon-upload" />
|
||||||
<div class="el-upload__text">
|
<div class="el-upload__text">
|
||||||
将文件拖到此处,或
|
{{ $t('upload.load_text1') }}
|
||||||
<em>点击上传</em>
|
<em>{{ $t('upload.load_text2') }}</em>
|
||||||
</div>
|
</div>
|
||||||
<div slot="tip" class="el-upload__tip">只能上传Excel文件,且不超过10MB</div>
|
<div slot="tip" class="el-upload__tip">{{ $t('upload.load_text3') }}</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">{{ $t('common.Cancel') }}</el-button>
|
||||||
<el-button type="primary" @click="submit">确 定</el-button>
|
<el-button type="primary" @click="submit">{{ $t('common.Confirm') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -42,6 +42,7 @@ import crudMaterial from './material'
|
|||||||
import CRUD, { crud } from '@crud/crud'
|
import CRUD, { crud } from '@crud/crud'
|
||||||
import { download2 } from '@/api/data'
|
import { download2 } from '@/api/data'
|
||||||
import { downloadFile } from '@/utils'
|
import { downloadFile } from '@/utils'
|
||||||
|
import i18n from '@/i18n'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadDialog',
|
name: 'UploadDialog',
|
||||||
@@ -82,7 +83,7 @@ export default {
|
|||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
},
|
},
|
||||||
is_one() {
|
is_one() {
|
||||||
this.crud.notify('只能上传一个excel文件!', CRUD.NOTIFICATION_TYPE.WARNING)
|
this.crud.notify(i18n.t('upload.load_text5'), CRUD.NOTIFICATION_TYPE.WARNING)
|
||||||
},
|
},
|
||||||
// 文件校验方法
|
// 文件校验方法
|
||||||
beforeAvatarUpload(file) {
|
beforeAvatarUpload(file) {
|
||||||
@@ -104,19 +105,18 @@ export default {
|
|||||||
formdata.append('file', this.file1.raw)
|
formdata.append('file', this.file1.raw)
|
||||||
// excelImport:请求接口 formdata:传递参数
|
// excelImport:请求接口 formdata:传递参数
|
||||||
crudMaterial.excelImport(formdata).then((res) => {
|
crudMaterial.excelImport(formdata).then((res) => {
|
||||||
this.crud.notify('导入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify(i18n.t('common.Success'), CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.$emit('tableChanged3', '')
|
this.$emit('tableChanged3', '')
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|
||||||
const list = err.response.data.message
|
const list = err.response.data.message
|
||||||
download2('/api/produceWorkorder/download', list).then(result => {
|
download2('/api/produceWorkorder/download', list).then(result => {
|
||||||
downloadFile(result, '错误信息汇总', 'xlsx')
|
downloadFile(result, i18n.t('gateway.check_error_log'), 'xlsx')
|
||||||
crud.downloadLoading = false
|
crud.downloadLoading = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.crud.notify('文件过大,请上传小于10MB的文件〜', CRUD.NOTIFICATION_TYPE.WARNING)
|
this.crud.notify(i18n.t('upload.load_text4'), CRUD.NOTIFICATION_TYPE.WARNING)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
模糊查询:
|
{{ $t('common.Query') }}:
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
clearable
|
clearable
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="输入物料编码或名称"
|
:placeholder="$t('common.inputCodeOrName')"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
/>
|
/>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="uploadShow = true"
|
@click="uploadShow = true"
|
||||||
>
|
>
|
||||||
导入
|
{{ $t('common.import') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
@@ -43,65 +43,63 @@
|
|||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="物料编码" prop="material_code" >
|
<el-form-item :label="$t('md_me_materialbase.material_code')" prop="material_code">
|
||||||
<el-input v-model="form.material_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
<el-input v-model="form.material_code" style="width: 200px;" :disabled="crud.status.edit > 0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="物料名称" prop="material_name">
|
<el-form-item :label="$t('md_me_materialbase.material_name')" prop="material_name">
|
||||||
<el-input v-model="form.material_name" style="width: 200px;" />
|
<el-input v-model="form.material_name" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
||||||
<el-form-item label="物料规格" prop="material_spec">
|
<el-form-item :label="$t('md_me_materialbase.material_spec')" prop="material_spec">
|
||||||
<label slot="label">物料规格</label>
|
|
||||||
<el-input v-model="form.material_spec" style="width: 200px;" />
|
<el-input v-model="form.material_spec" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="物料型号" prop="material_model">
|
<el-form-item :label="$t('md_me_materialbase.material_model')" prop="material_model">
|
||||||
<label slot="label">物料型号</label>
|
|
||||||
<el-input v-model="form.material_model" style="width: 200px;" />
|
<el-input v-model="form.material_model" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
|
|
||||||
<el-form-item label="物料分类" prop="material_type_id">
|
<el-form-item :label="$t('md_me_materialbase.material_model')" prop="material_type_id">
|
||||||
<treeselect
|
<treeselect
|
||||||
v-model="form.material_type_id"
|
v-model="form.material_type_id"
|
||||||
:load-options="loadClass"
|
:load-options="loadClass"
|
||||||
:options="classes"
|
:options="classes"
|
||||||
style="width: 200px;"
|
style="width: 200px;"
|
||||||
placeholder="请选择"
|
:placeholder="$t('common.Please_select')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="外部标识" prop="ext_id">
|
<el-form-item :label="$t('common.ext_id')" prop="ext_id">
|
||||||
<el-input v-model="form.ext_id" style="width: 200px;" />
|
<el-input v-model="form.ext_id" style="width: 200px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="是否启用" prop="is_used">
|
<el-form-item :label="$t('common.is_used')" prop="is_used">
|
||||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
<el-radio v-model="form.is_used" label="0">{{ $t('common.No') }}</el-radio>
|
||||||
<el-radio v-model="form.is_used" label="1" >是</el-radio>
|
<el-radio v-model="form.is_used" label="1">{{ $t('common.Yes') }}</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item :label="$t('common.remark')" prop="remark">
|
||||||
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
<el-input v-model="form.remark" style="width: 380px;" rows="2" type="textarea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
|
||||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
@@ -113,12 +111,12 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
<el-table-column prop="material_code" :label="$t('md_me_materialbase.material_code')" width="160" />
|
||||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
<el-table-column prop="material_name" :label="$t('md_me_materialbase.material_name')" width="180" show-overflow-tooltip />
|
||||||
<el-table-column prop="material_spec" label="物料规格" width="140" />
|
<el-table-column prop="material_spec" :label="$t('md_me_materialbase.material_spec')" width="140" />
|
||||||
<el-table-column prop="material_model" label="物料型号" />
|
<el-table-column prop="material_model" :label="$t('md_me_materialbase.material_model')" />
|
||||||
<el-table-column prop="class_name" label="物料分类" width="140" :formatter="bill_typeFormat" />
|
<el-table-column prop="class_name" :label="$t('md_pb_classstandard.class_name')" width="140" :formatter="bill_typeFormat" />
|
||||||
<el-table-column label="启用" align="center" prop="is_used">
|
<el-table-column :label="$t('common.is_used')" align="center" prop="is_used">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.is_used"
|
v-model="scope.row.is_used"
|
||||||
@@ -130,9 +128,9 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" width="140" />
|
<el-table-column prop="remark" :label="$t('common.remark')" width="140" />
|
||||||
<el-table-column prop="update_optname" label="修改人" />
|
<el-table-column prop="update_optname" :label="$t('common.update_optname')" />
|
||||||
<el-table-column prop="update_time" label="修改时间" width="135" />
|
<el-table-column prop="update_time" :label="$t('common.update_time')" width="135" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','Materialbase:edit','Materialbase:del']"
|
v-permission="['admin','Materialbase:edit','Materialbase:del']"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
@@ -151,7 +149,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
<UploadDialog :dialog-show.sync="uploadShow"/>
|
<UploadDialog :dialog-show.sync="uploadShow" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -167,6 +165,7 @@ import crudClassstandard from '@/views/wms/basedata/class/classstandard'
|
|||||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import crudMaterialbase from '@/views/wms/basedata/material/material'
|
import crudMaterialbase from '@/views/wms/basedata/material/material'
|
||||||
|
import i18n from '@/i18n'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
material_id: null,
|
material_id: null,
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="载具类型">
|
<el-form-item :label="$t('md_pb_storagevehicleinfo.storagevehicle_type')">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.vehicle_type"
|
v-model="query.vehicle_type"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="请选择"
|
:placeholder="$t('common.Please_select')"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
style="width: 180px;"
|
style="width: 180px;"
|
||||||
@change="hand"
|
@change="hand"
|
||||||
@@ -29,18 +29,17 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="载具号">
|
<el-form-item :label="$t('md_pb_storagevehicleinfo.storagevehicle_code')">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.vehicle_code"
|
v-model="query.vehicle_code"
|
||||||
clearable
|
clearable
|
||||||
size="mini"
|
size="mini"
|
||||||
placeholder="载具号"
|
|
||||||
style="width: 110px;"
|
style="width: 110px;"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation/>
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -67,30 +66,34 @@
|
|||||||
>
|
>
|
||||||
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
<el-form ref="form" :model="materialForm" :rules="rules" size="mini" label-width="110px">
|
||||||
<el-form-item label="载具编码" prop="vehicle_code">
|
<el-form-item label="载具编码" prop="vehicle_code">
|
||||||
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;"/>
|
<el-input v-model="materialForm.vehicle_code" disabled style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料编码" prop="material_code">
|
<el-form-item label="物料编码" prop="material_code">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="materialForm.material_code" clearable style="width: 370px"
|
<el-input
|
||||||
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''">
|
v-model="materialForm.material_code"
|
||||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater"/>
|
clearable
|
||||||
|
style="width: 370px"
|
||||||
|
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''"
|
||||||
|
>
|
||||||
|
<el-button slot="append" icon="el-icon-plus" @click="queryMater" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料规格" prop="material_spec">
|
<el-form-item label="物料规格" prop="material_spec">
|
||||||
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;"/>
|
<el-input v-model="materialForm.material_spec" disabled style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="批 次" prop="pcsn">
|
<el-form-item label="批 次" prop="pcsn">
|
||||||
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;"/>
|
<el-input v-model="materialForm.pcsn" clearable style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料数量" prop="qty">
|
<el-form-item label="物料数量" prop="qty">
|
||||||
<el-input v-model="materialForm.qty" clearable style="width: 370px;"/>
|
<el-input v-model="materialForm.qty" clearable style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="冻结数量" prop="frozen_qty">
|
<el-form-item label="冻结数量" prop="frozen_qty">
|
||||||
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;"/>
|
<el-input v-model="materialForm.frozen_qty" clearable style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="流程实例" prop="proc_inst_id">
|
<el-form-item label="流程实例" prop="proc_inst_id">
|
||||||
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;"/>
|
<el-input v-model="materialForm.proc_inst_id" clearable style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -108,11 +111,11 @@
|
|||||||
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
|
<el-form ref="form" :model="updateForm" :rules="rules" size="mini" label-width="110px">
|
||||||
<el-form-item label="载具编号" prop="vehicle_code">
|
<el-form-item label="载具编号" prop="vehicle_code">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="updateForm.vehicle_code" clearable/>
|
<el-input v-model="updateForm.vehicle_code" clearable />
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载具重量(g)" prop="vehicle_weight">
|
<el-form-item label="载具重量(g)" prop="vehicle_weight">
|
||||||
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;"/>
|
<el-input-number v-model="updateForm.vehicle_weight" clearable style="width: 370px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -129,22 +132,22 @@
|
|||||||
>
|
>
|
||||||
<el-form ref="form" :model="printForm" size="mini" label-width="150px">
|
<el-form ref="form" :model="printForm" size="mini" label-width="150px">
|
||||||
<el-form-item label="纸张高度(mm)" prop="pageh">
|
<el-form-item label="纸张高度(mm)" prop="pageh">
|
||||||
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;"/>
|
<el-input v-model="printForm.pageh" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="纸张宽度(mm)" prop="pagew">
|
<el-form-item label="纸张宽度(mm)" prop="pagew">
|
||||||
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;"/>
|
<el-input v-model="printForm.pagew" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="页边距top(mm)" prop="pagetop">
|
<el-form-item label="页边距top(mm)" prop="pagetop">
|
||||||
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;"/>
|
<el-input v-model="printForm.pagetop" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="页边距right(mm)" prop="pageright">
|
<el-form-item label="页边距right(mm)" prop="pageright">
|
||||||
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;"/>
|
<el-input v-model="printForm.pageright" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="页边距down(mm)" prop="pagedown">
|
<el-form-item label="页边距down(mm)" prop="pagedown">
|
||||||
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;"/>
|
<el-input v-model="printForm.pagedown" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="页边距left(mm)" prop="pageleft">
|
<el-form-item label="页边距left(mm)" prop="pageleft">
|
||||||
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;"/>
|
<el-input v-model="printForm.pageleft" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br>
|
<br>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -180,22 +183,22 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<br>
|
<br>
|
||||||
<el-form-item label="起始载具号" prop="vehicle_code">
|
<el-form-item label="起始载具号" prop="vehicle_code">
|
||||||
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;"/>
|
<el-input v-model="form.vehicle_code" :disabled="true" style="width: 250px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="载具数量" prop="num">
|
<el-form-item label="载具数量" prop="num">
|
||||||
<el-input-number v-model="form.num" :precision="0" style="width: 150px;"/>
|
<el-input-number v-model="form.num" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="高度(mm)" prop="h">
|
<el-form-item label="高度(mm)" prop="h">
|
||||||
<el-input-number v-model="form.h" :precision="0" style="width: 150px;"/>
|
<el-input-number v-model="form.h" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="宽度(mm)" prop="w">
|
<el-form-item label="宽度(mm)" prop="w">
|
||||||
<el-input-number v-model="form.w" :precision="0" style="width: 150px;"/>
|
<el-input-number v-model="form.w" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="深度(mm)" prop="l">
|
<el-form-item label="深度(mm)" prop="l">
|
||||||
<el-input-number v-model="form.l" :precision="0" style="width: 150px;"/>
|
<el-input-number v-model="form.l" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="重量(g)" prop="weight">
|
<el-form-item label="重量(g)" prop="weight">
|
||||||
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;"/>
|
<el-input-number v-model="form.weight" :precision="0" style="width: 150px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用">
|
<el-form-item label="是否启用">
|
||||||
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
<el-radio v-model="form.is_used" label="0">否</el-radio>
|
||||||
@@ -236,8 +239,8 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="create_name" label="创建人"/>
|
<el-table-column prop="create_name" label="创建人" />
|
||||||
<el-table-column prop="create_time" label="创建时间" width="150px"/>
|
<el-table-column prop="create_time" label="创建时间" width="150px" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
v-permission="['admin','storagevehicleinfo:edit','storagevehicleinfo:del']"
|
||||||
label="操作"
|
label="操作"
|
||||||
@@ -254,7 +257,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 分页组件-->
|
<!-- 分页组件-->
|
||||||
<pagination/>
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
<MaterDtl
|
<MaterDtl
|
||||||
:dialog-show.sync="materialShow"
|
:dialog-show.sync="materialShow"
|
||||||
@@ -275,7 +278,6 @@ import pagination from '@crud/Pagination'
|
|||||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||||
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
|
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
|
||||||
|
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
vehicle_code: null,
|
vehicle_code: null,
|
||||||
vehicle_name: null,
|
vehicle_name: null,
|
||||||
@@ -298,7 +300,7 @@ const defaultForm = {
|
|||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Storagevehicleinfo',
|
name: 'Storagevehicleinfo',
|
||||||
dicts: ['storagevehicle_type', "VEHICLE_OVER_TYPE"],
|
dicts: ['storagevehicle_type', 'VEHICLE_OVER_TYPE'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
@@ -347,23 +349,23 @@ export default {
|
|||||||
permission: {},
|
permission: {},
|
||||||
rules: {
|
rules: {
|
||||||
vehicle_code: [
|
vehicle_code: [
|
||||||
{required: true, message: '不能为空', trigger: 'blur'}
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
is_delete: [
|
is_delete: [
|
||||||
{required: true, message: '不能为空', trigger: 'blur'}
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
is_used: [
|
is_used: [
|
||||||
{required: true, message: '不能为空', trigger: 'blur'}
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
vehicle_type: [
|
vehicle_type: [
|
||||||
{required: true, message: '不能为空', trigger: 'blur'}
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
overstruct_type: [
|
overstruct_type: [
|
||||||
{required: true, message: '不能为空', trigger: 'blur'}
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
num: [
|
num: [
|
||||||
{required: true, message: '不能为空', trigger: 'blur'},
|
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||||
{validator: numberOne}
|
{ validator: numberOne }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user