Compare commits
57 Commits
76c2f50bf3
...
projects/m
| Author | SHA1 | Date | |
|---|---|---|---|
| e28cd67e20 | |||
| eb063779b4 | |||
|
|
a2672c1742 | ||
| 4e97989ede | |||
|
|
67200710c9 | ||
| 7e2b75aaa5 | |||
| 8ad9b9d717 | |||
| 3bf2757e42 | |||
|
|
2267444b4a | ||
|
|
fa5a303c08 | ||
|
|
37586a31c5 | ||
|
|
40b023cd8d | ||
| 5dce57e4bb | |||
| 50a75dcb74 | |||
| 9ed4c944c5 | |||
| 6702521f31 | |||
| f37bba6747 | |||
| 365aafc21a | |||
| de65afef11 | |||
| a135877df1 | |||
|
|
8d26a9e487 | ||
|
|
76771489da | ||
|
|
27faa04c7a | ||
| c0daa74a84 | |||
| 6e7339bca3 | |||
|
|
904350a4d8 | ||
|
|
4873f750d8 | ||
| 13b522475e | |||
| 1a7e8cfc19 | |||
| a0790a6e19 | |||
| b76b8f4fe9 | |||
| 978291e68a | |||
| a5c17d2276 | |||
| a7b4e72bc2 | |||
| 99f771a445 | |||
| 7201c26792 | |||
| ad56aaf359 | |||
|
|
5033bbb206 | ||
|
|
6fc4794300 | ||
|
|
79c9f1ca66 | ||
| c74269b282 | |||
| 57deff3875 | |||
| 68d3b46bab | |||
| 4323982b89 | |||
|
|
c76078214e | ||
|
|
b527589e0f | ||
| 375273419d | |||
| a18929a261 | |||
| 6d465c17c2 | |||
| 669345c983 | |||
| b86094c630 | |||
| 2fdee9cafd | |||
| 4348d66e53 | |||
| 888b5aa91f | |||
|
|
a7f1087775 | ||
|
|
b0efd66a75 | ||
| 51f72ea5d2 |
5
.env.dev
5
.env.dev
@@ -16,7 +16,7 @@ VUE_APP_TITLE = MES系统
|
|||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.173:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
# VUE_APP_BASE_API = 'http://192.168.2.173:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.49:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
|
# VUE_APP_BASE_API = 'http://192.168.1.56:48082'
|
||||||
@@ -31,9 +31,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
|||||||
# 多租户的开关
|
# 多租户的开关
|
||||||
VUE_APP_TENANT_ENABLE = true
|
VUE_APP_TENANT_ENABLE = true
|
||||||
|
|
||||||
# 验证码的开关
|
|
||||||
VUE_APP_CAPTCHA_ENABLE = true
|
|
||||||
|
|
||||||
# 文档的开关
|
# 文档的开关
|
||||||
VUE_APP_DOC_ENABLE = true
|
VUE_APP_DOC_ENABLE = true
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
|||||||
# 多租户的开关
|
# 多租户的开关
|
||||||
VUE_APP_TENANT_ENABLE = true
|
VUE_APP_TENANT_ENABLE = true
|
||||||
|
|
||||||
# 验证码的开关
|
|
||||||
VUE_APP_CAPTCHA_ENABLE = true
|
|
||||||
|
|
||||||
# 文档的开关
|
# 文档的开关
|
||||||
VUE_APP_DOC_ENABLE = true
|
VUE_APP_DOC_ENABLE = true
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ VUE_APP_APP_NAME ='yudao-admin'
|
|||||||
# 多租户的开关
|
# 多租户的开关
|
||||||
VUE_APP_TENANT_ENABLE = true
|
VUE_APP_TENANT_ENABLE = true
|
||||||
|
|
||||||
# 验证码的开关
|
|
||||||
VUE_APP_CAPTCHA_ENABLE = true
|
|
||||||
|
|
||||||
# 文档的开关
|
# 文档的开关
|
||||||
VUE_APP_DOC_ENABLE = false
|
VUE_APP_DOC_ENABLE = false
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
|
|||||||
# 多租户的开关
|
# 多租户的开关
|
||||||
VUE_APP_TENANT_ENABLE = true
|
VUE_APP_TENANT_ENABLE = true
|
||||||
|
|
||||||
# 验证码的开关
|
|
||||||
VUE_APP_CAPTCHA_ENABLE = true
|
|
||||||
|
|
||||||
# 文档的开关
|
# 文档的开关
|
||||||
VUE_APP_DOC_ENABLE = false
|
VUE_APP_DOC_ENABLE = false
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,6 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/'
|
|||||||
# 多租户的开关
|
# 多租户的开关
|
||||||
VUE_APP_TENANT_ENABLE = true
|
VUE_APP_TENANT_ENABLE = true
|
||||||
|
|
||||||
# 验证码的开关
|
|
||||||
VUE_APP_CAPTCHA_ENABLE = true
|
|
||||||
|
|
||||||
# 文档的开关
|
# 文档的开关
|
||||||
VUE_APP_DOC_ENABLE = true
|
VUE_APP_DOC_ENABLE = true
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,15 @@ export function deliveryProgressPage(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取订单列表
|
||||||
|
export function listOrderList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/extend/delivery-log/listOrderList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获取发货进度分页
|
// 获取发货进度分页
|
||||||
export function deliveryLogDetPage(data) {
|
export function deliveryLogDetPage(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-10-21 11:50:46
|
* @Date: 2023-10-21 11:50:46
|
||||||
* @LastEditTime: 2023-10-26 20:06:29
|
* @LastEditTime: 2023-11-27 17:54:28
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@@ -110,3 +110,11 @@ export function deleteMaterialPBDet(id) {
|
|||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得产品Bom详细
|
||||||
|
export function getMaterialPBDet(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/material-product-bom-det/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-08 15:56:52
|
* @Date: 2023-11-08 15:56:52
|
||||||
* @LastEditTime: 2023-11-20 16:38:18
|
* @LastEditTime: 2023-11-25 16:22:49
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@@ -73,4 +73,30 @@ export function deleteCheck(id) {
|
|||||||
url: '/base/equipment-check/delete?id=' + id,
|
url: '/base/equipment-check/delete?id=' + id,
|
||||||
method: 'delete'
|
method: 'delete'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获得设备巡检设置code
|
||||||
|
export function getCode() {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-check-config/getCode',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建巡检配置
|
||||||
|
export function createCheckConfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-check-config/create',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新巡检配置
|
||||||
|
export function updateCheckConfig(data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/equipment-check-config/update',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-10-31 15:05:06
|
* @Date: 2023-10-31 15:05:06
|
||||||
* @LastEditTime: 2023-11-03 09:05:50
|
* @LastEditTime: 2023-11-28 09:28:05
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@@ -24,6 +24,14 @@ export function getWorkOrderList(query) {
|
|||||||
params: query,
|
params: query,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getCoreProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-product/get?id=' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 导出物料信息
|
// 导出物料信息
|
||||||
// export function exportEnergyPlcExcel(query) {
|
// export function exportEnergyPlcExcel(query) {
|
||||||
// return request({
|
// return request({
|
||||||
|
|||||||
14
src/assets/icons/svg/table_edit.svg
Normal file
14
src/assets/icons/svg/table_edit.svg
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<g id="1_基础资料" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="1-1工厂信息" transform="translate(-1834.000000, -253.000000)">
|
||||||
|
<g id="icon/界面内/编辑" transform="translate(1834.000000, 253.000000)">
|
||||||
|
<rect id="矩形" x="0" y="0" width="16" height="16"></rect>
|
||||||
|
<g id="常用购票人/编辑32" fill-rule="nonzero">
|
||||||
|
<rect id="矩形" fill="#000000" opacity="0" x="0" y="0" width="16" height="16"></rect>
|
||||||
|
<path d="M13.5,7.8285 C13.5,7.55235763 13.7238576,7.3285 14,7.3285 C14.2761424,7.3285 14.5,7.55235763 14.5,7.8285 L14.5,12 C14.5,13.3807119 13.3807119,14.5 12,14.5 L4,14.5 C2.61928813,14.5 1.5,13.3807119 1.5,12 L1.5,4 C1.5,2.61928813 2.61928813,1.5 4,1.5 L8.759,1.5 C8.9376328,1.5 9.10269631,1.59529946 9.19201271,1.75 C9.28132911,1.90470054 9.28132911,2.09529946 9.19201271,2.25 C9.10269631,2.40470054 8.9376328,2.5 8.759,2.5 L4,2.5 C3.17157288,2.5 2.5,3.17157288 2.5,4 L2.5,12 C2.5,12.8284271 3.17157288,13.5 4,13.5 L12,13.5 C12.8284271,13.5 13.5,12.8284271 13.5,12 L13.5,7.8285 Z M13.284,2.312 C13.4738226,2.11757837 13.784168,2.11034095 13.9828473,2.2957025 C14.1815266,2.48106405 14.1958051,2.79116533 14.015,2.994 L8.56,8.845 C8.43817243,8.97566989 8.25588756,9.03141962 8.08181033,8.9912488 C7.90773311,8.95107798 7.76830999,8.82108951 7.71606033,8.65024879 C7.66381067,8.47940808 7.70667243,8.29366989 7.8285,8.163 L13.284,2.312 Z" id="形状" stroke="#0B58FF" stroke-width="0.1" fill="#0B58FF"></path>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -142,6 +142,9 @@ function findMaxLabelWidth(rows) {
|
|||||||
if (!opt.label) return 0;
|
if (!opt.label) return 0;
|
||||||
if (opt.label.length > max) {
|
if (opt.label.length > max) {
|
||||||
max = opt.label.length;
|
max = opt.label.length;
|
||||||
|
if (opt.label.includes('(')) {
|
||||||
|
max = max - 3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -239,7 +242,7 @@ export default {
|
|||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export default {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
placeholder: '请输入内容',
|
placeholder: '请输入内容',
|
||||||
readOnly: true,
|
// readOnly: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -123,11 +123,13 @@ export default {
|
|||||||
const editor = this.$refs.editor;
|
const editor = this.$refs.editor;
|
||||||
this.Quill = new Quill(editor, this.options);
|
this.Quill = new Quill(editor, this.options);
|
||||||
// 取消自动聚焦 start
|
// 取消自动聚焦 start
|
||||||
|
this.Quill?.enable(false);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.Quill.blur();
|
this.Quill?.enable(true);
|
||||||
if (!this.readOnly) {
|
this.Quill?.blur();
|
||||||
this.Quill.enable();
|
// if (!this.readOnly) {
|
||||||
}
|
// this.Quill?.enable();
|
||||||
|
// }
|
||||||
});
|
});
|
||||||
// 如果设置了上传地址则自定义图片上传事件
|
// 如果设置了上传地址则自定义图片上传事件
|
||||||
if (this.type === 'url') {
|
if (this.type === 'url') {
|
||||||
@@ -196,7 +198,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
.editor-wrapper {
|
.editor-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||||
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
||||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
<span class="el-icon-document"> {{ fileName }} </span>
|
||||||
</el-link>
|
</el-link>
|
||||||
<div class="ele-upload-list__item-content-action">
|
<div class="ele-upload-list__item-content-action">
|
||||||
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
<el-link :underline="false" @click="handleDelete(index)" :disabled="disabled" type="danger">删除</el-link>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
@@ -71,6 +71,11 @@ export default {
|
|||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
//文件名称
|
||||||
|
fName: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -81,6 +86,7 @@ export default {
|
|||||||
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
|
uploadFileUrl: process.env.VUE_APP_BASE_API + "/admin-api/infra/file/upload", // 请求地址
|
||||||
headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头部
|
headers: { Authorization: "Bearer " + getAccessToken() }, // 设置上传的请求头部
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
fileName: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -105,6 +111,14 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
|
},
|
||||||
|
fName: {
|
||||||
|
handler(val) {
|
||||||
|
if (val) {
|
||||||
|
console.log('11', val)
|
||||||
|
this.fileName = val
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -117,6 +131,7 @@ export default {
|
|||||||
// 上传前校检格式和大小
|
// 上传前校检格式和大小
|
||||||
handleBeforeUpload(file) {
|
handleBeforeUpload(file) {
|
||||||
// 校检文件类型
|
// 校检文件类型
|
||||||
|
this.fileName = file.name
|
||||||
if (this.fileType) {
|
if (this.fileType) {
|
||||||
let fileExtension = "";
|
let fileExtension = "";
|
||||||
if (file.name.lastIndexOf(".") > -1) {
|
if (file.name.lastIndexOf(".") > -1) {
|
||||||
@@ -150,7 +165,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 上传失败
|
// 上传失败
|
||||||
handleUploadError(err) {
|
handleUploadError(err) {
|
||||||
this.$modal.msgError("上传图片失败,请重试");
|
this.$modal.msgError("上传文件失败,请重试");
|
||||||
this.$modal.closeLoading()
|
this.$modal.closeLoading()
|
||||||
},
|
},
|
||||||
// 上传成功回调
|
// 上传成功回调
|
||||||
@@ -180,8 +195,12 @@ export default {
|
|||||||
this.number = 0;
|
this.number = 0;
|
||||||
this.$emit("input", this.listToString(this.fileList));
|
this.$emit("input", this.listToString(this.fileList));
|
||||||
this.$modal.closeLoading();
|
this.$modal.closeLoading();
|
||||||
|
this.returnFileName()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
returnFileName() {
|
||||||
|
this.$emit('name', this.fileName)
|
||||||
|
},
|
||||||
// 获取文件名称
|
// 获取文件名称
|
||||||
getFileName(name) {
|
getFileName(name) {
|
||||||
console.log('你好', name)
|
console.log('你好', name)
|
||||||
|
|||||||
@@ -196,4 +196,8 @@ input, textarea{
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
// 抽屉head区域---end
|
// 抽屉head区域---end
|
||||||
|
// 弹出框,上下分布,去掉label的padding-bottom
|
||||||
|
.el-form--label-top .el-form-item__label {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
@@ -187,19 +187,6 @@ export function getTenantEnable() {
|
|||||||
return process.env.VUE_APP_TENANT_ENABLE || true;
|
return process.env.VUE_APP_TENANT_ENABLE || true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获得验证码功能是否开启
|
|
||||||
*/
|
|
||||||
export function getCaptchaEnable() {
|
|
||||||
if (process.env.VUE_APP_CAPTCHA_ENABLE === "true") {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (process.env.VUE_APP_CAPTCHA_ENABLE === "false") {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return process.env.VUE_APP_CAPTCHA_ENABLE || true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得文档是否开启
|
* 获得文档是否开启
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,43 +2,45 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-22 10:32:10
|
* @LastEditTime: 2023-11-25 18:09:05
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-form
|
<div class="dialog">
|
||||||
:model="dataForm"
|
<el-form
|
||||||
:rules="dataRule"
|
:model="dataForm"
|
||||||
ref="dataForm"
|
:rules="dataRule"
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
ref="dataForm"
|
||||||
label-width="80px">
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
<el-row :gutter="20">
|
label-width="80px">
|
||||||
<el-col :span="12">
|
<el-row :gutter="20">
|
||||||
<el-form-item label="部门名称" prop="name">
|
<el-col :span="12">
|
||||||
<el-input v-model="dataForm.name" clearable placeholder="请输入部门名称" />
|
<el-form-item label="部门名称" prop="name">
|
||||||
</el-form-item>
|
<el-input v-model="dataForm.name" clearable placeholder="请输入部门名称" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="12">
|
</el-col>
|
||||||
<el-form-item label="部门编码" prop="code">
|
<el-col :span="12">
|
||||||
<el-input v-model="dataForm.code" clearable placeholder="请输入部门编码" />
|
<el-form-item label="部门编码" prop="code">
|
||||||
</el-form-item>
|
<el-input v-model="dataForm.code" clearable placeholder="请输入部门编码" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row :gutter="20">
|
</el-row>
|
||||||
<el-col :span="12">
|
<el-row :gutter="20">
|
||||||
<el-form-item label="上级部门" prop="parentId">
|
<el-col :span="12">
|
||||||
<treeselect v-model="dataForm.parentId" :options="menuOptions" :normalizer="normalizer" :show-count="true" placeholder="选择上级部门"/>
|
<el-form-item label="上级部门" prop="parentId">
|
||||||
</el-form-item>
|
<treeselect v-model="dataForm.parentId" :options="menuOptions" :normalizer="normalizer" :show-count="true" placeholder="选择上级部门" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="12">
|
</el-col>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-col :span="12">
|
||||||
<el-input
|
<el-form-item label="备注" prop="remark">
|
||||||
v-model="dataForm.remark"
|
<el-input
|
||||||
placeholder="请输入备注" />
|
v-model="dataForm.remark"
|
||||||
</el-form-item>
|
placeholder="请输入备注" />
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
</el-form>
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -68,6 +70,7 @@ export default {
|
|||||||
},
|
},
|
||||||
departmentlList: [],
|
departmentlList: [],
|
||||||
menuOptions: [],
|
menuOptions: [],
|
||||||
|
isChoosed: false,
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [{ required: true, message: "部门编码不能为空", trigger: "blur" }],
|
code: [{ required: true, message: "部门编码不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: "部门名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "部门名称不能为空", trigger: "blur" }],
|
||||||
@@ -104,3 +107,9 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dialog {
|
||||||
|
min-height: 180px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-15 16:23:49
|
* @LastEditTime: 2023-11-27 20:12:00
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
:rules="dataRule"
|
:rules="dataRule"
|
||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
label-width="100px">
|
label-width="90px">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="原料名称" prop="name">
|
<el-form-item label="原料名称" prop="name">
|
||||||
@@ -46,6 +46,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -70,7 +73,8 @@ export default {
|
|||||||
code: undefined,
|
code: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
unit: undefined,
|
unit: undefined,
|
||||||
dailyCost: undefined
|
dailyCost: undefined,
|
||||||
|
remark: undefined
|
||||||
},
|
},
|
||||||
departmentlList: [],
|
departmentlList: [],
|
||||||
menuOptions: [],
|
menuOptions: [],
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width="50%">
|
width="45%">
|
||||||
<add-or-update
|
<add-or-update
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-15 15:41:44
|
* @LastEditTime: 2023-11-27 20:07:09
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="isdetail"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
@@ -114,14 +114,6 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="drawer-body__footer">
|
|
||||||
<el-button v-if="!idAttrShow" @click="goback()">取消</el-button>
|
|
||||||
<el-button v-else :disabled="isdetail" @click="init(dataForm.id)">重置</el-button>
|
|
||||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="attr-list" v-if="idAttrShow">
|
<div class="attr-list" v-if="idAttrShow">
|
||||||
<small-title
|
<small-title
|
||||||
@@ -158,14 +150,16 @@
|
|||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page-sizes="[5, 10, 15]"
|
:page-sizes="[5, 10, 15]"
|
||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
|
||||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
|
<el-button @click="goback()">取消</el-button>
|
||||||
|
<el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<attr-add
|
<attr-add
|
||||||
v-if="addOrUpdateVisible"
|
v-if="addOrUpdateVisible"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@@ -253,8 +247,8 @@ export default {
|
|||||||
isdetail: false,
|
isdetail: false,
|
||||||
idAttrShow: false,
|
idAttrShow: false,
|
||||||
dataRule: {
|
dataRule: {
|
||||||
code: [{ required: true, message: "物料编码不能为空", trigger: "blur" }],
|
code: [{ required: true, message: "产品编码不能为空", trigger: "blur" }],
|
||||||
name: [{ required: true, message: "物料名称不能为空", trigger: "blur" }],
|
name: [{ required: true, message: "产品名称不能为空", trigger: "blur" }],
|
||||||
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
||||||
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
|
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
|
||||||
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
|
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
|
||||||
@@ -270,11 +264,7 @@ export default {
|
|||||||
handleClick(raw) {
|
handleClick(raw) {
|
||||||
if (raw.type === 'delete') {
|
if (raw.type === 'delete') {
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
`确定对${
|
`是否确认删除属性名为"${raw.data.name}"的数据项?`,
|
||||||
raw.data.attrName
|
|
||||||
? '[名称=' + raw.data.attrName + ']'
|
|
||||||
: '[序号=' + raw.data._pageIndex + ']'
|
|
||||||
}进行删除操作?`,
|
|
||||||
'提示',
|
'提示',
|
||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
@@ -84,18 +84,18 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi(`base:core-product:detail`)
|
||||||
|
? {
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '查看详情',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:core-product:update`)
|
this.$auth.hasPermi(`base:core-product:update`)
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:core-product:detail`)
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '查看详情',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:core-product:delete`)
|
this.$auth.hasPermi(`base:core-product:delete`)
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@@ -141,6 +141,27 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 删除
|
||||||
|
deleteHandle(id, name, index) {
|
||||||
|
this.$confirm(`是否确认删除产品名称为"${name}"的数据项`, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
// 查看详情
|
// 查看详情
|
||||||
otherMethods(val) {
|
otherMethods(val) {
|
||||||
if (val.type === 'detail') {
|
if (val.type === 'detail') {
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export default {
|
|||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '关键字',
|
label: '供应商',
|
||||||
placeholder: '供应商名称',
|
placeholder: '供应商名称',
|
||||||
param: 'name',
|
param: 'name',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,23 +2,23 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-24 18:20:26
|
* @LastEditTime: 2023-11-28 14:09:09
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="true"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="50%">
|
size="50%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ '预使用主原料信息' }}
|
{{ '工单名称:' + dataForm.name }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div style="height: 10vh">
|
<!-- <div style="height: 10vh">
|
||||||
<div style="font-size: 18px;">工单名:{{ dataForm.name }}</div>
|
<div style="font-size: 18px;">工单名:{{ dataForm.name }}</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="attr-list">
|
<div class="attr-list">
|
||||||
<small-title
|
<small-title
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<div class="action_btn">
|
<div class="action_btn">
|
||||||
<template>
|
<template>
|
||||||
<span style="display: inline-block;">
|
<span style="display: inline-block;">
|
||||||
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
<el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,9 +55,9 @@
|
|||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<!-- <div class="drawer-body__footer">
|
||||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<attr-add
|
<attr-add
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="dataForm" :rules="rules" label-width="130px" :model="dataForm">
|
<el-form ref="dataForm" :rules="rules" label-width="130px" :model="dataForm" label-position="top">
|
||||||
<el-row>
|
<el-row :gutter="20">
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="工单名称" prop="name">
|
<el-form-item label="工单名称" prop="name">
|
||||||
<el-input v-model="dataForm.name"></el-input>
|
<el-input v-model="dataForm.name" placeholder="请输入工单名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="工单编码" prop="code">
|
<el-form-item label="工单编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" disabled></el-input>
|
<el-input v-model="dataForm.code" disabled placeholder="请输入工单编码"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span='8'>
|
||||||
<el-row>
|
|
||||||
<el-col :span='12'>
|
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select v-model="dataForm.planProductId" placeholder="请选择" style="width: 100%;" @change="selectProduct">
|
<el-select v-model="dataForm.planProductId" placeholder="请选择产品" style="width: 100%;" filterable @change="selectProduct">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in productList"
|
v-for="item in productList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -25,52 +23,50 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span='8'>
|
||||||
<el-form-item label="产品规格" prop="specifications">
|
<el-form-item label="产品规格" prop="specifications">
|
||||||
<el-input v-model="dataForm.specifications" />
|
<el-input v-model="dataForm.specifications" placeholder="请输入产品规格" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span='8'>
|
||||||
<el-row>
|
|
||||||
<el-col :span='12'>
|
|
||||||
<el-form-item label="计划开始时间">
|
<el-form-item label="计划开始时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dataForm.planStartTime"
|
v-model="dataForm.planStartTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="timestamp"
|
value-format="timestamp"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
placeholder="选择日期">
|
placeholder="请选择计划开始时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="计划完成时间">
|
<el-form-item label="计划完成时间">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dataForm.planFinishTime"
|
v-model="dataForm.planFinishTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
value-format="timestamp"
|
value-format="timestamp"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
placeholder="选择日期">
|
placeholder="请选择计划完成时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row :gutter="20">
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
<el-form-item label="计划投入数量" prop="planAssignQuantity">
|
||||||
<el-input-number v-model="dataForm.planAssignQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="dataForm.planAssignQuantity" :min="0" :max="9999999999999" style="width: 100%;" placeholder="请输入计划投入数量"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="计划生产数量" prop="planQuantity">
|
<el-form-item label="计划生产数量" prop="planQuantity">
|
||||||
<el-input-number v-model="dataForm.planQuantity" :min="0" :max="9999999999999" style="width: 100%;"></el-input-number>
|
<el-input-number v-model="dataForm.planQuantity" :min="0" :max="9999999999999" style="width: 100%;" placeholder="请输入计划生产数量"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span='8'>
|
||||||
<el-row>
|
|
||||||
<el-col :span='12'>
|
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-select v-model="dataForm.processFlowId" placeholder="请选择工艺" clearable filterable style="width: 100%;" @change="processFlowIdChange">
|
<el-select v-model="dataForm.processFlowId" placeholder="请选择关联工艺" clearable filterable style="width: 100%;" @change="processFlowIdChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in processFlowList"
|
v-for="item in processFlowList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -80,19 +76,23 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span='8'>
|
||||||
<el-form-item label="物料计算方式" prop="materialMethod">
|
<el-form-item label="物料计算方式" prop="materialMethod">
|
||||||
<el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
|
<!-- <el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
|
||||||
<el-radio :label="1">产品基础BOM</el-radio>
|
<el-radio :label="1">产品基础BOM</el-radio>
|
||||||
<el-radio :label="2">工艺扩展BOM</el-radio>
|
<el-radio :label="2">工艺扩展BOM</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group> -->
|
||||||
|
<el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" @change="materialMethodChange">
|
||||||
|
<el-option key="1" label="产品基础BOM" :value="1" />
|
||||||
|
<el-option key="2" label="工艺扩展BOM" :value="2" />
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span='8'>
|
||||||
<el-row>
|
|
||||||
<el-col :span='12'>
|
|
||||||
<el-form-item label="优先级" prop="priority">
|
<el-form-item label="优先级" prop="priority">
|
||||||
<el-select v-model="dataForm.priority" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="dataForm.priority" placeholder="请选择优先级" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -102,9 +102,9 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="工单类型" prop="type">
|
<el-form-item label="工单类型" prop="type">
|
||||||
<el-select v-model="dataForm.type" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="dataForm.type" placeholder="请选择工单类型" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workOrderTypeList"
|
v-for="item in workOrderTypeList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -115,10 +115,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row :gutter="20">
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="关联产线" prop="productLineIds">
|
<el-form-item label="关联产线" prop="productLineIds">
|
||||||
<el-select v-model="dataForm.productLineIds" placeholder="请选择" multiple style="width: 100%;">
|
<el-select v-model="dataForm.productLineIds" placeholder="请选择关联产线" multiple style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in productLineList"
|
v-for="item in productLineList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -128,9 +128,9 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='8'>
|
||||||
<el-form-item label="负责人" prop="workers">
|
<el-form-item label="负责人" prop="workers">
|
||||||
<el-input v-model="dataForm.workers"></el-input>
|
<el-input v-model="dataForm.workers" placeholder="请输入负责人"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -175,6 +175,7 @@ export default {
|
|||||||
planQuantity: 0,
|
planQuantity: 0,
|
||||||
processFlowId: '',
|
processFlowId: '',
|
||||||
materialMethod: 1,
|
materialMethod: 1,
|
||||||
|
triggerOrigin: 1,
|
||||||
priority: '',
|
priority: '',
|
||||||
productLineIds: [],
|
productLineIds: [],
|
||||||
type: '',
|
type: '',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:width="'35%'"
|
:width="'50%'"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
class="dialog">
|
class="dialog">
|
||||||
@@ -17,73 +17,92 @@
|
|||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
:model="dataForm"
|
:model="dataForm"
|
||||||
:rules="dataRule"
|
:rules="dataRule"
|
||||||
label-width="100px"
|
label-width="80px"
|
||||||
@keyup.enter.native="dataFormSubmit()">
|
@keyup.enter.native="dataFormSubmit()">
|
||||||
<el-form-item label="原料" prop="material">
|
<el-row :gutter="20">
|
||||||
<el-select
|
<el-col :span="12">
|
||||||
v-model="dataForm.material"
|
<el-form-item label="原料" prop="material">
|
||||||
filterable
|
<el-select
|
||||||
style="width: 100%"
|
v-model="dataForm.material"
|
||||||
placeholder="请选择原料">
|
filterable
|
||||||
<el-option
|
style="width: 100%"
|
||||||
v-for="dict in getDictDatas('material')"
|
placeholder="请选择原料">
|
||||||
:key="dict.value"
|
<el-option
|
||||||
:label="dict.label"
|
v-for="dict in getDictDatas('material')"
|
||||||
:value="dict.value" />
|
:key="dict.value"
|
||||||
</el-select>
|
:label="dict.label"
|
||||||
</el-form-item>
|
:value="dict.value" />
|
||||||
<el-form-item label="来源" prop="origin">
|
</el-select>
|
||||||
<el-select
|
</el-form-item>
|
||||||
v-model="dataForm.origin"
|
</el-col>
|
||||||
filterable
|
<el-col :span="12">
|
||||||
style="width: 100%"
|
<el-form-item label="来源" prop="origin">
|
||||||
placeholder="请选择来源">
|
<el-select
|
||||||
<el-option
|
v-model="dataForm.origin"
|
||||||
v-for="dict in originList"
|
filterable
|
||||||
:key="dict.value"
|
style="width: 100%"
|
||||||
:label="dict.label"
|
placeholder="请选择来源">
|
||||||
:value="dict.value" />
|
<el-option
|
||||||
</el-select>
|
v-for="dict in originList"
|
||||||
</el-form-item>
|
:key="dict.value"
|
||||||
<el-form-item label="供应商" prop="supplierId">
|
:label="dict.label"
|
||||||
<el-select
|
:value="dict.value" />
|
||||||
v-model="dataForm.supplierId"
|
</el-select>
|
||||||
filterable
|
</el-form-item>
|
||||||
style="width: 100%"
|
</el-col>
|
||||||
placeholder="请选择供应商">
|
</el-row>
|
||||||
<el-option
|
<el-row :gutter="20">
|
||||||
v-for="dict in supplierList"
|
<el-col :span="12">
|
||||||
:key="dict.id"
|
<el-form-item label="供应商" prop="supplierId">
|
||||||
:label="dict.name"
|
<el-select
|
||||||
:value="dict.id" />
|
v-model="dataForm.supplierId"
|
||||||
</el-select>
|
filterable
|
||||||
</el-form-item>
|
style="width: 100%"
|
||||||
<el-form-item label="批次号" prop="batch">
|
placeholder="请选择供应商">
|
||||||
<el-input
|
<el-option
|
||||||
v-model="dataForm.batch"
|
v-for="dict in supplierList"
|
||||||
clearable
|
:key="dict.id"
|
||||||
placeholder="请输入批次号" />
|
:label="dict.name"
|
||||||
</el-form-item>
|
:value="dict.id" />
|
||||||
<el-form-item label="数量" prop="num">
|
</el-select>
|
||||||
<el-input-number
|
</el-form-item>
|
||||||
v-model="dataForm.num"
|
</el-col>
|
||||||
clearable
|
<el-col :span="12">
|
||||||
style="width: 100%"
|
<el-form-item label="批次号" prop="batch">
|
||||||
placeholder="请输入数量" />
|
<el-input
|
||||||
</el-form-item>
|
v-model="dataForm.batch"
|
||||||
<el-form-item label="单位" prop="unit">
|
clearable
|
||||||
<el-select
|
placeholder="请输入批次号" />
|
||||||
v-model="dataForm.unit"
|
</el-form-item>
|
||||||
filterable
|
</el-col>
|
||||||
style="width: 100%"
|
</el-row>
|
||||||
placeholder="请选择单位">
|
<el-row :gutter="20">
|
||||||
<el-option
|
<el-col :span="12">
|
||||||
v-for="dict in getDictDatas('unit_dict')"
|
<el-form-item label="数量" prop="num">
|
||||||
:key="dict.value"
|
<el-input-number
|
||||||
:label="dict.label"
|
v-model="dataForm.num"
|
||||||
:value="dict.value" />
|
clearable
|
||||||
</el-select>
|
controls-position="right"
|
||||||
</el-form-item>
|
style="width: 100%"
|
||||||
|
placeholder="请输入数量" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="单位" prop="unit">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.unit"
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择单位">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getDictDatas('unit_dict')"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row style="text-align: right">
|
<el-row style="text-align: right">
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="300"
|
:width="350"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" />
|
||||||
@@ -57,7 +57,8 @@ import {
|
|||||||
getCoreWOPage,
|
getCoreWOPage,
|
||||||
deleteCoreWO,
|
deleteCoreWO,
|
||||||
statusChange,
|
statusChange,
|
||||||
getConOrderList
|
getConOrderList,
|
||||||
|
getCoreWOList
|
||||||
} from '@/api/base/coreWorkOrder';
|
} from '@/api/base/coreWorkOrder';
|
||||||
|
|
||||||
|
|
||||||
@@ -65,19 +66,27 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
filter: parseTime
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '工单名称'
|
label: '工单名称',
|
||||||
|
minWidth: 120,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '工单编码'
|
label: '工单编码',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'workers',
|
prop: 'workers',
|
||||||
label: '负责人'
|
label: '负责人',
|
||||||
|
minWidth: 100,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'priority',
|
prop: 'priority',
|
||||||
@@ -87,7 +96,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'triggerOrigin',
|
prop: 'triggerOrigin',
|
||||||
label: '来源',
|
label: '来源',
|
||||||
filter: (val) => ['', 'MES', 'ERP'][val]
|
filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
@@ -97,15 +106,19 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'planFinishTime',
|
prop: 'planFinishTime',
|
||||||
label: '计划完成时间',
|
label: '计划完成时间',
|
||||||
filter: parseTime
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'planQuantity',
|
prop: 'planQuantity',
|
||||||
label: '计划生产数量'
|
label: '计划生产数量',
|
||||||
|
minWidth: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'actualQuantity',
|
prop: 'actualQuantity',
|
||||||
label: '实际生产数量'
|
label: '实际生产数量',
|
||||||
|
minWidth: 120,
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -127,48 +140,10 @@ export default {
|
|||||||
allocationVisible: false,
|
allocationVisible: false,
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`base:core-work-order:update`)
|
this.$auth.hasPermi(`base:core-work-order:material`)
|
||||||
? {
|
|
||||||
type: 'edit',
|
|
||||||
btnName: '编辑',
|
|
||||||
showParam: {
|
|
||||||
type: '&',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
name: 'status',
|
|
||||||
type: 'equal',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:core-work-order:material`)
|
|
||||||
? {
|
? {
|
||||||
type: 'material',
|
type: 'material',
|
||||||
btnName: '预使用原料信息',
|
btnName: '原料信息',
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:core-work-order:detail`)
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '查看详情',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:core-work-order:delete`)
|
|
||||||
? {
|
|
||||||
type: 'delete',
|
|
||||||
btnName: '删除',
|
|
||||||
showParam: {
|
|
||||||
type: '|',
|
|
||||||
data: [
|
|
||||||
{
|
|
||||||
name: 'status',
|
|
||||||
type: 'equal',
|
|
||||||
value: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
{
|
{
|
||||||
@@ -246,10 +221,58 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
this.$auth.hasPermi(`base:core-work-order:detail`)
|
||||||
|
? {
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '查看详情',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi(`base:core-work-order:update`)
|
||||||
|
? {
|
||||||
|
type: 'edit',
|
||||||
|
btnName: '编辑',
|
||||||
|
showParam: {
|
||||||
|
type: '&',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
name: 'status',
|
||||||
|
type: 'equal',
|
||||||
|
value: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi(`base:core-work-order:delete`)
|
||||||
|
? {
|
||||||
|
type: 'delete',
|
||||||
|
btnName: '删除',
|
||||||
|
showParam: {
|
||||||
|
type: '|',
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
name: 'status',
|
||||||
|
type: 'equal',
|
||||||
|
value: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
: undefined
|
||||||
].filter((v)=>v),
|
].filter((v)=>v),
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
|
// {
|
||||||
|
// type: 'select',
|
||||||
|
// label: '工单名称',
|
||||||
|
// placeholder: '工单名称',
|
||||||
|
// param: 'name',
|
||||||
|
// defaultSelect: '',
|
||||||
|
// selectOptions: [],
|
||||||
|
// allowCreate: true,
|
||||||
|
// filterable: true
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
type: 'input',
|
type: 'input',
|
||||||
label: '工单名称',
|
label: '工单名称',
|
||||||
@@ -307,9 +330,20 @@ export default {
|
|||||||
this.listQuery.name = this.$route.query.workOrderName;
|
this.listQuery.name = this.$route.query.workOrderName;
|
||||||
this.formConfig[0].defaultSelect = this.$route.query.workOrderName;
|
this.formConfig[0].defaultSelect = this.$route.query.workOrderName;
|
||||||
}
|
}
|
||||||
|
// this.getWorkOrder()
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getWorkOrder() {
|
||||||
|
getCoreWOList().then(res => {
|
||||||
|
this.formConfig[0].selectOptions = res.data.map(item => {
|
||||||
|
return {
|
||||||
|
name: item.name,
|
||||||
|
id: item.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
refreshWorkOrder(val) {
|
refreshWorkOrder(val) {
|
||||||
console.log(val)
|
console.log(val)
|
||||||
if (val) {
|
if (val) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-22 08:55:37
|
* @LastEditTime: 2023-11-27 09:21:48
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -43,7 +43,9 @@
|
|||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="dataForm.sort"
|
v-model="dataForm.sort"
|
||||||
placeholder="排序" />
|
controls-position="right"
|
||||||
|
placeholder="排序"
|
||||||
|
style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width="50%">
|
width="40%">
|
||||||
<add-or-update
|
<add-or-update
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-22 11:22:38
|
* @LastEditTime: 2023-11-27 15:26:12
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="isdetail"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="attr-list" v-if="idAttrShow">
|
<div class="attr-list" v-if="idAttrShow">
|
||||||
<small-title
|
<small-title
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
style="margin: 16px 0; padding-left: 8px"
|
||||||
@@ -156,13 +157,11 @@
|
|||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">{{ isdetail ? '关闭' : '取消' }}</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
编辑
|
|
||||||
</el-button> -->
|
|
||||||
<el-button v-if="!isdetail" type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<attr-add
|
<attr-add
|
||||||
@@ -293,11 +292,7 @@ export default {
|
|||||||
handleClick(raw) {
|
handleClick(raw) {
|
||||||
if (raw.type === 'delete') {
|
if (raw.type === 'delete') {
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
`确定对${
|
`是否确认删除属性名为"${raw.data.attrName}"的数据项?`,
|
||||||
raw.data.attrName
|
|
||||||
? '[名称=' + raw.data.attrName + ']'
|
|
||||||
: '[序号=' + raw.data._pageIndex + ']'
|
|
||||||
}进行删除操作?`,
|
|
||||||
'提示',
|
'提示',
|
||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -363,6 +358,29 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.visible = false
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.idAttrShow = true
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
goback() {
|
goback() {
|
||||||
this.$emit('refreshDataList');
|
this.$emit('refreshDataList');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
@@ -432,7 +450,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.action_btn {
|
.action_btn {
|
||||||
float: right;
|
float: right;
|
||||||
margin: -35px 15px;
|
margin: -40px 15px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
.add {
|
.add {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:width="'35%'"
|
:width="'30%'"
|
||||||
:append-to-body="true"
|
:append-to-body="true"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
class="dialog">
|
class="dialog">
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
:model="dataForm"
|
:model="dataForm"
|
||||||
:rules="dataRule"
|
:rules="dataRule"
|
||||||
label-width="100px"
|
label-width="70px"
|
||||||
@keyup.enter.native="dataFormSubmit()">
|
@keyup.enter.native="dataFormSubmit()">
|
||||||
<el-form-item label="属性名" prop="attrName">
|
<el-form-item label="属性名" prop="attrName">
|
||||||
<el-input
|
<el-input
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="220"
|
:width="120"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" />
|
||||||
@@ -85,25 +85,25 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
|
this.$auth.hasPermi(`base:material:queryAttr`)
|
||||||
|
? {
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '查看属性',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:material:update`)
|
this.$auth.hasPermi(`base:material:update`)
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:material:queryAttr`)
|
// this.$auth.hasPermi(`base:material:editAttr`)
|
||||||
? {
|
// ? {
|
||||||
type: 'search',
|
// type: 'editAttr',
|
||||||
btnName: '查看属性',
|
// btnName: '编辑属性',
|
||||||
}
|
// }
|
||||||
: undefined,
|
// : undefined,
|
||||||
this.$auth.hasPermi(`base:material:editAttr`)
|
this.$auth.hasPermi(`base:material:delete`)
|
||||||
? {
|
|
||||||
type: 'editAttr',
|
|
||||||
btnName: '编辑属性',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:material:delete`)
|
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
btnName: '删除',
|
btnName: '删除',
|
||||||
@@ -136,7 +136,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('base:material:create') ? 'button' : '',
|
type: this.$auth.hasPermi('base:material:create') ? 'button' : '',
|
||||||
btnName: '新增物料',
|
btnName: '新增',
|
||||||
name: 'add',
|
name: 'add',
|
||||||
color: 'success',
|
color: 'success',
|
||||||
plain: true
|
plain: true
|
||||||
@@ -166,7 +166,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
otherMethods(val) {
|
otherMethods(val) {
|
||||||
if (val.type === 'search') {
|
if (val.type === 'detail') {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrEditTitle = '详情';
|
this.addOrEditTitle = '详情';
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-06 19:55:59
|
* @LastEditTime: 2023-11-27 15:10:20
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -18,7 +18,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.materialId"
|
v-model="dataForm.materialId"
|
||||||
placeholder="请选择物料"
|
placeholder="请选择物料"
|
||||||
@change="setMaterialCode">
|
@change="setMaterialCode"
|
||||||
|
style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in materialList"
|
v-for="dict in materialList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width="50%">
|
width="40%">
|
||||||
<add-or-update
|
<add-or-update
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-23 15:00:00
|
* @LastEditTime: 2023-11-27 19:50:36
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="isdetail"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="70%">
|
size="70%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
label-width="100px"
|
label-width="100px"
|
||||||
label-position="top">
|
label-position="top">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="产品名称" prop="productId">
|
<el-form-item label="产品名称" prop="productId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.productId"
|
v-model="dataForm.productId"
|
||||||
@@ -42,15 +42,17 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="产品BOM编码" prop="code">
|
<el-form-item label="产品BOM编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" :disabled="isdetail" placeholder="请输入产品Bom编码" />
|
<el-input v-model="dataForm.code" :disabled="isdetail" placeholder="请输入产品Bom编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="attr-list" v-if="idAttrShow">
|
<div class="attr-list" v-if="idAttrShow">
|
||||||
@@ -60,90 +62,26 @@
|
|||||||
BOM明细
|
BOM明细
|
||||||
</small-title>
|
</small-title>
|
||||||
|
|
||||||
<!-- <base-table
|
<div v-if="!isdetail" class="action_btn">
|
||||||
|
<template>
|
||||||
|
<span style="display: inline-block;">
|
||||||
|
<el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<base-table
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
:page="listQuery.pageNo"
|
:page="listQuery.pageNo"
|
||||||
:limit="listQuery.pageSize"
|
:limit="listQuery.pageSize"
|
||||||
:add-button-show="isdetail ? null : '添加属性'"
|
:table-data="tableData">
|
||||||
@emitButtonClick="addNew()"
|
|
||||||
:table-data="materialAttrList">
|
|
||||||
<method-btn
|
<method-btn
|
||||||
v-if="!isdetail"
|
v-if="!isdetail"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="120"
|
:width="90"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" />
|
||||||
</base-table> -->
|
</base-table>
|
||||||
<el-button v-show="!isdetail" type="success" size="small" style="float: right" @click="addRow()">添加一行</el-button>
|
|
||||||
<el-table
|
|
||||||
:data="tableData"
|
|
||||||
style="width: 100%">
|
|
||||||
<el-table-column type="index" label="序号" />
|
|
||||||
<el-table-column prop="createTime" label="添加时间">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="materialId" label="物料名称">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.materialId"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
:disabled="!scope.row.isEdit"
|
|
||||||
placeholder="请选择物料"
|
|
||||||
@change="setCode(scope.row)">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in materialList"
|
|
||||||
:key="dict.id"
|
|
||||||
:label="dict.name"
|
|
||||||
:value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="materialCode" label="物料编码" />
|
|
||||||
<el-table-column prop="mUnit" label="单位" />
|
|
||||||
<el-table-column prop="num" label="数量">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.num" :disabled="!scope.row.isEdit"></el-input>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="remark" label="备注">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-model="scope.row.remark" :disabled="!scope.row.isEdit"></el-input>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="!isdetail" label="操作">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tooltip v-if="!scope.row.isEdit" placement="top" content="编辑">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
:style="{color:'#0B58FF'}"
|
|
||||||
size="mini"
|
|
||||||
@click="edit(scope.row)"
|
|
||||||
>
|
|
||||||
<!-- 此处的icon的名字命名为'table_'加上按钮的type -->
|
|
||||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="edit" />
|
|
||||||
<!-- <span>{{ item.btnName | i18nFilter }}</span> -->
|
|
||||||
</el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
<el-button v-else type="text" size="small" @click="saveData(scope.row)">保存</el-button>
|
|
||||||
<el-tooltip placement="top" content="删除">
|
|
||||||
<el-button
|
|
||||||
type="text"
|
|
||||||
:style="{color:'#FF5454'}"
|
|
||||||
size="mini"
|
|
||||||
@click="deleteDetail(scope.row)"
|
|
||||||
>
|
|
||||||
<!-- 此处的icon的名字命名为'table_'加上按钮的type -->
|
|
||||||
<svg-icon style="width: 18px; height: 18px" class="item-icon" icon-class="table_delete" />
|
|
||||||
<!-- <span>{{ item.btnName | i18nFilter }}</span> -->
|
|
||||||
</el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="listQuery.total > 0"
|
v-show="listQuery.total > 0"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@@ -153,20 +91,17 @@
|
|||||||
@pagination="getList" />
|
@pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">{{ isdetail ? '关闭' : '取消' }}</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
编辑
|
|
||||||
</el-button> -->
|
|
||||||
<el-button v-if="!isdetail" type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <attr-add
|
<attr-add
|
||||||
v-if="addOrUpdateVisible"
|
v-if="addOrUpdateVisible"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
:material-id="dataForm.id"
|
:bom-id="dataForm.id"
|
||||||
@refreshDataList="getList" /> -->
|
@refreshDataList="getList" />
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -177,7 +112,8 @@ import { getMaterialList } from "@/api/base/material";
|
|||||||
import { listData } from "@/api/system/dict/data";
|
import { listData } from "@/api/system/dict/data";
|
||||||
import SmallTitle from '../material/SmallTitle';
|
import SmallTitle from '../material/SmallTitle';
|
||||||
import { parseTime } from '../../core/mixins/code-filter';
|
import { parseTime } from '../../core/mixins/code-filter';
|
||||||
// import attrAdd from './attr-add';
|
import attrAdd from './attr-add';
|
||||||
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
|
||||||
const tableBtn = [
|
const tableBtn = [
|
||||||
{
|
{
|
||||||
@@ -196,18 +132,31 @@ const tableProps = [
|
|||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'attrName',
|
prop: 'materialName',
|
||||||
label: '属性名',
|
label: '物料名称',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'attrValue',
|
prop: 'materialCode',
|
||||||
label: '属性值',
|
label: '物料编码',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'unit',
|
||||||
|
label: '单位',
|
||||||
|
filter: publicFormatter('unit_dict'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'num',
|
||||||
|
label: '数量',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [basicAdd],
|
mixins: [basicAdd],
|
||||||
components: { SmallTitle },
|
components: { SmallTitle, attrAdd },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableBtn,
|
tableBtn,
|
||||||
@@ -233,7 +182,6 @@ export default {
|
|||||||
},
|
},
|
||||||
productList: [],
|
productList: [],
|
||||||
materialAttrList: [],
|
materialAttrList: [],
|
||||||
materialList: [],
|
|
||||||
tableData: [],
|
tableData: [],
|
||||||
unitList: [],
|
unitList: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -248,13 +196,42 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClick(raw) {
|
||||||
|
if (raw.type === 'delete') {
|
||||||
|
this.deleteDetail(raw.data);
|
||||||
|
} else {
|
||||||
|
this.addNew(raw.data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
this.urlOptions.updateURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
// this.visible = false;
|
||||||
|
this.idAttrShow = true;
|
||||||
|
this.dataForm.id = response.data
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产品列表
|
// 产品列表
|
||||||
const proRes = await getProList();
|
const proRes = await getProList();
|
||||||
this.productList = proRes.data;
|
this.productList = proRes.data;
|
||||||
// 物料列表
|
|
||||||
const res = await getMaterialList();
|
|
||||||
this.materialList = res.data;
|
|
||||||
// 物料单位列表
|
// 物料单位列表
|
||||||
const unitRes = await listData({
|
const unitRes = await listData({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
@@ -274,8 +251,7 @@ export default {
|
|||||||
},
|
},
|
||||||
deleteDetail(raw) {
|
deleteDetail(raw) {
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
`确定删除关于物料编码为${
|
`是否确认删除物料名称为"${raw.materialName}"的数据项?`,
|
||||||
raw.materialCode}的数据?`,
|
|
||||||
'提示',
|
'提示',
|
||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
@@ -297,70 +273,13 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
setCode(row) {
|
|
||||||
const tempM = this.materialList.filter(item => {
|
|
||||||
if (row.materialId === item.id) {
|
|
||||||
row.materialCode = item.code
|
|
||||||
}
|
|
||||||
return row.materialId === item.id
|
|
||||||
})
|
|
||||||
if (tempM[0].unit) {
|
|
||||||
this.unitList.filter(u => {
|
|
||||||
if (tempM[0].unit === u.value) {
|
|
||||||
row.unit = u.value
|
|
||||||
row.mUnit = u.label
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
row.unit = null
|
|
||||||
row.mUnit = ''
|
|
||||||
}
|
|
||||||
// row.materialCode = tempList[0].code
|
|
||||||
// row.unit = tempList[0].unit
|
|
||||||
},
|
|
||||||
edit(row) {
|
|
||||||
row.isEdit = true
|
|
||||||
},
|
|
||||||
saveData(row) {
|
|
||||||
// this.$refs['dataForm'].validate((valid) => {
|
|
||||||
// if (valid) {
|
|
||||||
// 修改的提交
|
|
||||||
if (row.id) {
|
|
||||||
updateMaterialPBDet({
|
|
||||||
...row
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('修改成功');
|
|
||||||
// this.visible = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// 添加的提交
|
|
||||||
createMaterialPBDet({
|
|
||||||
...row
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功');
|
|
||||||
// this.visible = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
getList() {
|
getList() {
|
||||||
// 获取产品Bom详细列表
|
// 获取产品Bom详细列表
|
||||||
getProBomList({
|
getProBomList({
|
||||||
...this.listQuery,
|
...this.listQuery,
|
||||||
bomId: this.dataForm.id
|
bomId: this.dataForm.id
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.tableData = response.data.records.map(item => {
|
this.tableData = response.data.records
|
||||||
this.unitList.filter(u => {
|
|
||||||
if (item.unit === u.value) {
|
|
||||||
item.mUnit = u.label
|
|
||||||
}
|
|
||||||
})
|
|
||||||
item.isEdit = false
|
|
||||||
return item
|
|
||||||
});
|
|
||||||
this.listQuery.total = response.data.total;
|
this.listQuery.total = response.data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -456,7 +375,7 @@ export default {
|
|||||||
|
|
||||||
.drawer >>> .visual-part {
|
.drawer >>> .visual-part {
|
||||||
flex: 1 auto;
|
flex: 1 auto;
|
||||||
max-height: 30vh;
|
max-height: 20vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
padding-right: 10px; /* 调整滚动条样式 */
|
padding-right: 10px; /* 调整滚动条样式 */
|
||||||
@@ -472,4 +391,12 @@ export default {
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
|
.action_btn {
|
||||||
|
float: right;
|
||||||
|
margin: -40px 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.add {
|
||||||
|
color: #0b58ff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
197
src/views/base/materialProductBom/attr-add.vue
Normal file
197
src/views/base/materialProductBom/attr-add.vue
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="visible"
|
||||||
|
:width="'40%'"
|
||||||
|
:append-to-body="true"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
class="dialog">
|
||||||
|
<template #title>
|
||||||
|
<slot name="title">
|
||||||
|
<div class="titleStyle">
|
||||||
|
{{ !dataForm.id ? '新增' : '编辑' }}
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-form
|
||||||
|
ref="dataForm"
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
label-width="80px"
|
||||||
|
@keyup.enter.native="dataFormSubmit()">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料名称" prop="materialId">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.materialId"
|
||||||
|
placeholder="请选择物料"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
@change="setCode"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in materialList"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.name"
|
||||||
|
:value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.materialCode"
|
||||||
|
clearable
|
||||||
|
disabled
|
||||||
|
placeholder="请输入物料编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="单位" prop="unit">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.unit"
|
||||||
|
style="width: 100%"
|
||||||
|
disabled
|
||||||
|
placeholder="请选择单位">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in getDictDatas(DICT_TYPE.UNIT_DICT)"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="数量" prop="num">
|
||||||
|
<el-input-number v-model="dataForm.num" controls-position="right" clearable placeholder="请输入数量" style="width: 100%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row style="text-align: right">
|
||||||
|
<el-button @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getMaterialList } from '@/api/base/material';
|
||||||
|
import { createMaterialPBDet, updateMaterialPBDet, getMaterialPBDet } from "@/api/base/materialProductBom";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
bomId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
materialId: '',
|
||||||
|
num: 0,
|
||||||
|
materialCode: undefined,
|
||||||
|
unit: undefined,
|
||||||
|
remark: '',
|
||||||
|
},
|
||||||
|
materialList: [],
|
||||||
|
dataRule: {
|
||||||
|
materialId: [{ required: true, message: '物料名称不能为空', trigger: 'change' }],
|
||||||
|
num: [{ required: true, message: '数量不能为空', trigger: 'blur' }]
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDict()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getDict() {
|
||||||
|
// 物料列表
|
||||||
|
const res = await getMaterialList();
|
||||||
|
this.materialList = res.data;
|
||||||
|
},
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || '';
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs['dataForm'].resetFields();
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
getMaterialPBDet(this.dataForm.id).then((res) => {
|
||||||
|
this.dataForm = res.data
|
||||||
|
this.setCode()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setCode() {
|
||||||
|
const tempMaterial = this.materialList.filter(item =>{
|
||||||
|
return item.id === this.dataForm.materialId
|
||||||
|
})
|
||||||
|
this.dataForm.materialCode = tempMaterial[0]?.code
|
||||||
|
this.dataForm.unit = tempMaterial[0].unit === undefined ? undefined : String(tempMaterial[0]?.unit)
|
||||||
|
},
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
updateMaterialPBDet({
|
||||||
|
...this.dataForm,
|
||||||
|
bomId: this.bomId,
|
||||||
|
}).then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
createMaterialPBDet({
|
||||||
|
...this.dataForm,
|
||||||
|
bomId: this.bomId,
|
||||||
|
}).then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('refreshDataList');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dialog >>> .el-dialog__body {
|
||||||
|
padding: 30px 24px;
|
||||||
|
}
|
||||||
|
.dialog >>> .el-dialog__header {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(0, 0, 0, 0.85);
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 13px 24px;
|
||||||
|
border-bottom: 1px solid #e9e9e9;
|
||||||
|
}
|
||||||
|
.dialog >>> .el-dialog__header .titleStyle::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 4px;
|
||||||
|
height: 16px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="220"
|
:width="120"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" />
|
||||||
@@ -68,24 +68,24 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi(`base:material-product-bom:update`)
|
this.$auth.hasPermi(`base:material-product-bom:queryMaterial`)
|
||||||
|
? {
|
||||||
|
type: 'detail',
|
||||||
|
btnName: '查看物料',
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
|
this.$auth.hasPermi(`base:material-product-bom:update`)
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'edit',
|
||||||
btnName: '编辑',
|
btnName: '编辑',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi(`base:material-product-bom:queryMaterial`)
|
// this.$auth.hasPermi(`base:material-product-bom:editMaterial`)
|
||||||
? {
|
// ? {
|
||||||
type: 'search',
|
// type: 'editMaterial',
|
||||||
btnName: '查看物料',
|
// btnName: '编辑物料',
|
||||||
}
|
// }
|
||||||
: undefined,
|
// : undefined,
|
||||||
this.$auth.hasPermi(`base:material-product-bom:editMaterial`)
|
|
||||||
? {
|
|
||||||
type: 'editMaterial',
|
|
||||||
btnName: '编辑物料',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi(`base:material-product-bom:delete`)
|
this.$auth.hasPermi(`base:material-product-bom:delete`)
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
otherMethods(val) {
|
otherMethods(val) {
|
||||||
if (val.type === 'search') {
|
if (val.type === 'detail') {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrEditTitle = '详情';
|
this.addOrEditTitle = '详情';
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-22 10:40:08
|
* @LastEditTime: 2023-11-27 19:57:23
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -11,9 +11,10 @@
|
|||||||
:rules="dataRule"
|
:rules="dataRule"
|
||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
label-width="80px">
|
label-width="80px"
|
||||||
|
label-position="top">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="物料名称" prop="materialId">
|
<el-form-item label="物料名称" prop="materialId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.materialId"
|
v-model="dataForm.materialId"
|
||||||
@@ -21,6 +22,7 @@
|
|||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
@change="setCode"
|
@change="setCode"
|
||||||
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in materialList"
|
v-for="dict in materialList"
|
||||||
@@ -30,7 +32,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="物料编码" prop="materialCode">
|
<el-form-item label="物料编码" prop="materialCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="dataForm.materialCode"
|
v-model="dataForm.materialCode"
|
||||||
@@ -39,15 +41,14 @@
|
|||||||
placeholder="请输入物料编码" />
|
placeholder="请输入物料编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="8">
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="批次号" prop="materialDateId">
|
<el-form-item label="批次号" prop="materialDateId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.materialDateId"
|
v-model="dataForm.materialDateId"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择物料批次"
|
placeholder="请选择物料批次"
|
||||||
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in materialDateList"
|
v-for="dict in materialDateList"
|
||||||
@@ -57,13 +58,16 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="8">
|
||||||
<el-form-item label="使用设备" prop="equipmentId">
|
<el-form-item label="使用设备" prop="equipmentId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.equipmentId"
|
v-model="dataForm.equipmentId"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择使用设备">
|
placeholder="请选择使用设备"
|
||||||
|
style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in eqList"
|
v-for="dict in eqList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
@@ -72,9 +76,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="8">
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="使用时间" prop="useTime">
|
<el-form-item label="使用时间" prop="useTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dataForm.useTime"
|
v-model="dataForm.useTime"
|
||||||
@@ -84,14 +86,15 @@
|
|||||||
placeholder="选择日期时间" />
|
placeholder="选择日期时间" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="操作员" prop="userNames">
|
<el-form-item label="操作员" prop="userNames">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.userNames"
|
v-model="dataForm.userNames"
|
||||||
clearable
|
clearable
|
||||||
filterable
|
filterable
|
||||||
multiple
|
multiple
|
||||||
placeholder="请选择操作员">
|
placeholder="请选择操作员"
|
||||||
|
style="width: 100%">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in workersList"
|
v-for="dict in workersList"
|
||||||
:key="dict.id"
|
:key="dict.id"
|
||||||
@@ -102,12 +105,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="使用数量" prop="num">
|
<el-form-item label="使用数量" prop="num">
|
||||||
<el-input-number v-model="dataForm.num" clearable placeholder="请输入使用数量" />
|
<el-input-number v-model="dataForm.num" clearable controls-position="right" placeholder="请输入使用数量" style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="数据来源" prop="source">
|
<el-form-item label="数据来源" prop="source">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.source"
|
v-model="dataForm.source"
|
||||||
@@ -121,10 +124,12 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -237,13 +242,8 @@ export default {
|
|||||||
this.dataForm.source = response.data.source
|
this.dataForm.source = response.data.source
|
||||||
this.dataForm.remark = response.data.remark
|
this.dataForm.remark = response.data.remark
|
||||||
this.dataForm.userNames = response.data.userName.split(',')
|
this.dataForm.userNames = response.data.userName.split(',')
|
||||||
console.log('打印', this.dataForm)
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {}
|
||||||
if (this.urlOptions.isGetCode) {
|
|
||||||
this.getCode()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setCode() {
|
setCode() {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
@confirm="handleConfirm"
|
@confirm="handleConfirm"
|
||||||
:before-close="handleCancel"
|
:before-close="handleCancel"
|
||||||
width="50%">
|
width="60%">
|
||||||
<add-or-update
|
<add-or-update
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="successSubmit"></add-or-update>
|
@refreshDataList="successSubmit"></add-or-update>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2022-08-24 11:19:43
|
* @Date: 2022-08-24 11:19:43
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-01 10:30:12
|
* @LastEditTime: 2023-11-24 09:29:36
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
@@ -85,6 +85,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//tableBtn点击
|
//tableBtn点击
|
||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
|
console.log(val.data.packagingCode);
|
||||||
if (val.type === "edit") {
|
if (val.type === "edit") {
|
||||||
this.addOrUpdateVisible = true;
|
this.addOrUpdateVisible = true;
|
||||||
this.addOrEditTitle = "编辑";
|
this.addOrEditTitle = "编辑";
|
||||||
@@ -92,7 +93,7 @@ export default {
|
|||||||
this.$refs.addOrUpdate.init(val.data.id);
|
this.$refs.addOrUpdate.init(val.data.id);
|
||||||
});
|
});
|
||||||
} else if (val.type === "delete") {
|
} else if (val.type === "delete") {
|
||||||
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex,val.data.packagingCode )
|
||||||
} else if (val.type === "change") {
|
} else if (val.type === "change") {
|
||||||
this.changeStatus(val.data.id)
|
this.changeStatus(val.data.id)
|
||||||
} else {
|
} else {
|
||||||
@@ -101,7 +102,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
deleteHandle(id, name, index) {
|
deleteHandle(id, name, index) {
|
||||||
this.$confirm(`是否确认删除${name ? '[' + name + ']' : '[' + index + ']'}数据项?`, "提示", {
|
this.$confirm(`是否确认删除${name ? ' 名称为'+ name : '[' + index + ']'}数据项?`, "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-22 14:40:59
|
* @LastEditTime: 2023-11-24 09:13:50
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -122,7 +122,8 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
param: 'workOrderId'
|
param: 'workOrderId',
|
||||||
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// parent: 'dateFilterType',
|
// parent: 'dateFilterType',
|
||||||
@@ -214,6 +215,26 @@ export default {
|
|||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
deleteHandle(id, name, index, packagingCode) {
|
||||||
|
this.$confirm(`是否确认删除${'[' + packagingCode + ']'}数据项?`, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
handlePrint(id) {
|
handlePrint(id) {
|
||||||
if (id) {
|
if (id) {
|
||||||
getPackingModel(id).then(res => {
|
getPackingModel(id).then(res => {
|
||||||
|
|||||||
228
src/views/core/analysis/balanceAnalysis/chart.vue
Normal file
228
src/views/core/analysis/balanceAnalysis/chart.vue
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
<!--
|
||||||
|
filename: chart.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-11-29 09:03:01
|
||||||
|
description:
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="analysis-chart">
|
||||||
|
<!-- tt ct 选择 -->
|
||||||
|
<el-button
|
||||||
|
v-for="(item, index) in ['设备CT', '设备TT', '产线CT', '产线TT']"
|
||||||
|
:key="index"
|
||||||
|
:class="[index == activeIndex ? 'activeButton' : '']"
|
||||||
|
@click="activeIndex = index">
|
||||||
|
{{ item }}
|
||||||
|
</el-button>
|
||||||
|
<!-- chart -->
|
||||||
|
<div id="chart" ref="chartDiv" class="chart" style="margin-top: 12px" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'AnalysisChart',
|
||||||
|
components: {},
|
||||||
|
props: ['daterange', 'tableData'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeIndex: 0,
|
||||||
|
chart: null,
|
||||||
|
templateOption: {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'axis',
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
icon: 'roundRect',
|
||||||
|
itemWidth: 12,
|
||||||
|
itemHeight: 12,
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '12%',
|
||||||
|
left: '6%',
|
||||||
|
right: '6%',
|
||||||
|
bottom: '12%',
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
name: '时间',
|
||||||
|
axisLabel: {
|
||||||
|
margin: 12,
|
||||||
|
rotate: -8,
|
||||||
|
},
|
||||||
|
axisTicks: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
data: this.daterange || [
|
||||||
|
'2020-01-02',
|
||||||
|
'2020-02-02',
|
||||||
|
'2020-03-02',
|
||||||
|
'2020-04-02',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
name: ['设备CT', '设备TT', '产线CT', '产线TT'][this.activeIndex],
|
||||||
|
nameLocation: 'end',
|
||||||
|
nameGap: 28,
|
||||||
|
nameTextStyle: {
|
||||||
|
fontSize: 14,
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: '#333',
|
||||||
|
opacity: 0.6,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'der Hund',
|
||||||
|
type: 'line',
|
||||||
|
data: [15, undefined, 36, 11],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'die Katze',
|
||||||
|
type: 'line',
|
||||||
|
data: [5, 2, 6, 3],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'die Maus',
|
||||||
|
type: 'line',
|
||||||
|
data: [11, 12, 13, 10],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.initChart();
|
||||||
|
},
|
||||||
|
deactivated() {},
|
||||||
|
watch: {
|
||||||
|
activeIndex(val) {
|
||||||
|
this.initChart(val);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {object} row 表格的每一列
|
||||||
|
* @param {string} key 表格列prop的后缀
|
||||||
|
*/
|
||||||
|
getListFromTableRow(row, key = '_eq_ct') {
|
||||||
|
const list = [];
|
||||||
|
for (const prop of Object.keys(row).sort()) {
|
||||||
|
if (prop.endsWith(key)) {
|
||||||
|
list.push(row[prop]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
},
|
||||||
|
/** 初始化/设置 图表 */
|
||||||
|
initChart(val) {
|
||||||
|
console.log('tableData', this.tableData);
|
||||||
|
if (!this.chart) this.chart = echarts.init(this.$refs.chartDiv);
|
||||||
|
switch (val) {
|
||||||
|
case 0:
|
||||||
|
const eqCt = this.tableData.map((row) => ({
|
||||||
|
name: row.equName,
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 8,
|
||||||
|
data: this.getListFromTableRow(row, '_eq_ct'),
|
||||||
|
}));
|
||||||
|
this.chart.setOption({
|
||||||
|
...this.templateOption,
|
||||||
|
yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
|
||||||
|
series: eqCt,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
const eqTt = this.tableData.map((row) => ({
|
||||||
|
name: row.equName,
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 8,
|
||||||
|
data: this.getListFromTableRow(row, '_eq_tt'),
|
||||||
|
}));
|
||||||
|
this.chart.setOption({
|
||||||
|
...this.templateOption,
|
||||||
|
yAxis: { ...this.templateOption.yAxis, name: '设备TT' },
|
||||||
|
series: eqTt,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
const plCt = this.tableData.map((row) => ({
|
||||||
|
name: row.equName,
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 8,
|
||||||
|
data: this.getListFromTableRow(row, '_pl_ct'),
|
||||||
|
}));
|
||||||
|
this.chart.setOption({
|
||||||
|
...this.templateOption,
|
||||||
|
yAxis: { ...this.templateOption.yAxis, name: '产线CT' },
|
||||||
|
series: plCt,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
const plTt = this.tableData.map((row) => ({
|
||||||
|
name: row.equName,
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 8,
|
||||||
|
data: this.getListFromTableRow(row, '_pl_tt'),
|
||||||
|
}));
|
||||||
|
this.chart.setOption({
|
||||||
|
...this.templateOption,
|
||||||
|
yAxis: { ...this.templateOption.yAxis, name: '产线TT' },
|
||||||
|
series: plTt,
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
const eqCt2 = this.tableData.map((row) => ({
|
||||||
|
name: row.equName,
|
||||||
|
type: 'line',
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 8,
|
||||||
|
data: this.getListFromTableRow(row, '_eq_ct'),
|
||||||
|
}));
|
||||||
|
this.chart.setOption({
|
||||||
|
...this.templateOption,
|
||||||
|
yAxis: { ...this.templateOption.yAxis, name: '设备CT' },
|
||||||
|
series: eqCt2,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.analysis-chart {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.analysis-chart >>> .el-button {
|
||||||
|
background: #f1f1f1;
|
||||||
|
color: #333;
|
||||||
|
transition: all 0.3s;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&.activeButton,
|
||||||
|
&:hover {
|
||||||
|
background: #0b58ff;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#chart {
|
||||||
|
height: 100%;
|
||||||
|
/* background: #ccc; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
270
src/views/core/analysis/balanceAnalysis/index copy.vue
Normal file
270
src/views/core/analysis/balanceAnalysis/index copy.vue
Normal file
@@ -0,0 +1,270 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<search-bar
|
||||||
|
:formConfigs="formConfig"
|
||||||
|
ref="searchBarForm"
|
||||||
|
@headBtnClick="buttonClick" />
|
||||||
|
|
||||||
|
<div v-if="tableData.length">
|
||||||
|
<el-tabs
|
||||||
|
v-model="activeName"
|
||||||
|
@tab-click="handleTabClick"
|
||||||
|
style="height: 100%">
|
||||||
|
<el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
|
||||||
|
<!-- @emitFun="handleEmitFun"> -->
|
||||||
|
<base-table
|
||||||
|
v-if="mode == 'table'"
|
||||||
|
:span-method="mergeColumnHandler"
|
||||||
|
:page="1"
|
||||||
|
:limit="999"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:table-data="tableData" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph">
|
||||||
|
<div class="graph" style="height: 100%">
|
||||||
|
<!-- graph -->
|
||||||
|
<!-- <Graph
|
||||||
|
v-if="list.length"
|
||||||
|
:equipment-list="list"
|
||||||
|
:render="renderKey" /> -->
|
||||||
|
<BalanceChart ref="lineChart" />
|
||||||
|
<div v-if="list.length == 0" class="no-data-bg"></div>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<!-- <SearchBar :formConfigs="[{ label: '产线平衡分析图', type: 'title' }]" /> -->
|
||||||
|
</div>
|
||||||
|
<div v-else class="no-data-bg"></div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getCT } from '@/api/core/analysis/index';
|
||||||
|
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
|
import BalanceChart from '../balanceChart';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
BalanceChart,
|
||||||
|
},
|
||||||
|
// mixins: [basicPage],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
getDataListURL: getCT,
|
||||||
|
},
|
||||||
|
activeName: 'table',
|
||||||
|
tableProps: [],
|
||||||
|
|
||||||
|
tableData: [],
|
||||||
|
listQuery: {
|
||||||
|
// time: ''
|
||||||
|
endTime: undefined,
|
||||||
|
lineId: undefined,
|
||||||
|
startTime: undefined,
|
||||||
|
},
|
||||||
|
timeList: [],
|
||||||
|
spanArr: [],
|
||||||
|
xData: [],
|
||||||
|
yData: [],
|
||||||
|
optionArrUrl: [getCorePLList],
|
||||||
|
formConfig: [
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
label: '产线',
|
||||||
|
selectOptions: [],
|
||||||
|
param: 'lineIds',
|
||||||
|
defaultSelect: '',
|
||||||
|
multiple: false,
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '时间',
|
||||||
|
dateType: 'datetimerange',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
width: 350,
|
||||||
|
param: 'time',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '查询',
|
||||||
|
name: 'search',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getArr();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleTabClick(tab, event) {
|
||||||
|
if (tab.name == 'graph') this.renderKey = Math.random();
|
||||||
|
},
|
||||||
|
|
||||||
|
getArr() {
|
||||||
|
const params = {
|
||||||
|
page: 1,
|
||||||
|
limit: 500,
|
||||||
|
};
|
||||||
|
this.optionArrUrl.forEach((item, index) => {
|
||||||
|
item(params).then((response) => {
|
||||||
|
this.formConfig[index].selectOptions = response.data;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
setRowSpan(arr) {
|
||||||
|
let count = 0;
|
||||||
|
arr.forEach((item, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
this.spanArr.push(1);
|
||||||
|
} else {
|
||||||
|
if (item === arr[index - 1]) {
|
||||||
|
this.spanArr[count] += 1;
|
||||||
|
this.spanArr.push(0);
|
||||||
|
} else {
|
||||||
|
count = index;
|
||||||
|
this.spanArr.push(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 合并table列的规则 */
|
||||||
|
mergeColumnHandler({ row, column, rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex == 0) {
|
||||||
|
if (this.spanArr[rowIndex]) {
|
||||||
|
return [
|
||||||
|
this.spanArr[rowIndex], // row span
|
||||||
|
1, // col span
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
return [0, 0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getData() {
|
||||||
|
// this.listQuery.lineId = '1672847052717821953'
|
||||||
|
// this.listQuery.startTime = '1693497600000';
|
||||||
|
// this.listQuery.endTime = '1693843200000';
|
||||||
|
this.urlOptions.getDataListURL(this.listQuery).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
let arr = [
|
||||||
|
{
|
||||||
|
prop: 'sectionName',
|
||||||
|
label: '工段',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'equName',
|
||||||
|
label: '设备',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
let sectionArr = [];
|
||||||
|
res.data.data.forEach((ele, index) => {
|
||||||
|
let tempData = [];
|
||||||
|
let eqData = [];
|
||||||
|
let plData = [];
|
||||||
|
ele.data.forEach((item, index) => {
|
||||||
|
item.children.forEach((params) => {
|
||||||
|
if (params.dynamicName === '设备CT') {
|
||||||
|
tempData[item.dynamicName + '_eq'] = params.dynamicValue;
|
||||||
|
eqData[index] = params.dynamicValue;
|
||||||
|
} else {
|
||||||
|
tempData[item.dynamicName + '_pl'] = params.dynamicValue;
|
||||||
|
plData[index] = params.dynamicValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const equipment = {
|
||||||
|
name: ele.equName,
|
||||||
|
eqData: eqData,
|
||||||
|
plData: plData,
|
||||||
|
};
|
||||||
|
tempData['equName'] = ele.equName;
|
||||||
|
tempData['sectionName'] = ele.sectionName;
|
||||||
|
this.tableData.push(tempData);
|
||||||
|
const { sectionName } = tempData;
|
||||||
|
sectionArr.push(sectionName);
|
||||||
|
this.yData.push(equipment);
|
||||||
|
console.log('看看equ', this.yData);
|
||||||
|
});
|
||||||
|
this.setRowSpan(sectionArr);
|
||||||
|
res.data.nameData.forEach((item) => {
|
||||||
|
this.timeList.push(item.name);
|
||||||
|
});
|
||||||
|
const timeArray = Array.from(new Set(this.timeList));
|
||||||
|
for (const times of timeArray) {
|
||||||
|
if (times !== '设备CT' && times !== '产线CT') {
|
||||||
|
const subprop = {
|
||||||
|
label: times,
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{ prop: times + '_eq', label: '设备CT', align: 'center' },
|
||||||
|
{ prop: times + '_pl', label: '产线CT', align: 'center' },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
arr.push(subprop);
|
||||||
|
this.xData.push(times);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tableProps = arr;
|
||||||
|
|
||||||
|
console.log('表格横坐标', this.xData, this.yData);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.lineChart.initChart(this.xData, this.yData);
|
||||||
|
});
|
||||||
|
// this.total = response.data.total;
|
||||||
|
// this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
buttonClick(val) {
|
||||||
|
// console.log(val)
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
// this.listQuery.pageNo = 1;
|
||||||
|
// this.listQuery.pageSize = 10;
|
||||||
|
this.listQuery.lineId = val.lineIds;
|
||||||
|
this.listQuery.startTime = val.time
|
||||||
|
? String(new Date(val.time[0]).getTime())
|
||||||
|
: undefined;
|
||||||
|
this.listQuery.endTime = val.time
|
||||||
|
? String(new Date(val.time[1]).getTime())
|
||||||
|
: undefined;
|
||||||
|
if (val.time && val.lineIds) {
|
||||||
|
this.tableData = [];
|
||||||
|
this.xData = [];
|
||||||
|
this.yData = [];
|
||||||
|
this.tableProps = [];
|
||||||
|
this.spanArr = [];
|
||||||
|
this.timeList = [];
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择产线和时间',
|
||||||
|
type: 'warning',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
};
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -1,262 +1,454 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container" style="flex: 1; height: 1px">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar
|
||||||
<div v-if="tableData.length">
|
:formConfigs="formConfig"
|
||||||
<base-table v-loading="dataListLoading" :span-method="mergeColumnHandler" :table-props="tableProps" :table-data="tableData" />
|
ref="searchBarForm"
|
||||||
<SearchBar :formConfigs="[{ label: '产线平衡分析图', type: 'title' }]" />
|
@headBtnClick="handleSearchBarBtnClick" />
|
||||||
<BalanceChart ref="lineChart" />
|
|
||||||
</div>
|
<!-- <div v-if="tableData.length"> -->
|
||||||
<div v-else class="no-data-bg"></div>
|
<div class="custom-tabs" style="">
|
||||||
<!-- <pagination
|
<el-tabs
|
||||||
:limit.sync="listQuery.pageSize"
|
v-model="activeName"
|
||||||
:page.sync="listQuery.pageNo"
|
@tab-click="handleTabClick"
|
||||||
:total="listQuery.total"
|
style="height: 100%">
|
||||||
@pagination="getDataList" /> -->
|
<el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
|
||||||
</div>
|
<base-table
|
||||||
|
v-if="activeName == 'table' && ready"
|
||||||
|
:span-method="mergeRow"
|
||||||
|
:page="1"
|
||||||
|
:limit="999"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:table-data="tableData" />
|
||||||
|
<div v-if="tableData.length == 0" class="no-data-bg"></div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane :label="'\u3000产线平衡分析图\u3000'" name="graph">
|
||||||
|
<div class="graph" style="height: 800px">
|
||||||
|
<!-- graph -->
|
||||||
|
<AnalysisChart
|
||||||
|
v-if="activeName == 'graph'"
|
||||||
|
:table-data="tableData"
|
||||||
|
:daterange="dateArr"></AnalysisChart>
|
||||||
|
<!-- <div v-else class="no-data-bg"></div> -->
|
||||||
|
<!-- <Graph
|
||||||
|
v-if="list.length"
|
||||||
|
:equipment-list="list"
|
||||||
|
:render="renderKey" /> -->
|
||||||
|
<!-- <BalanceChart ref="lineChart" /> -->
|
||||||
|
<!-- <div v-if="list.length == 0" class="no-data-bg"></div> -->
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import basicPage from '../../mixins/basic-page';
|
import BalanceChart from '../balanceChart';
|
||||||
import { parseTime } from '../../mixins/code-filter';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import { getCT } from '@/api/core/analysis/index';
|
import AnalysisChart from './chart.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
|
||||||
import BalanceChart from '../balanceChart'
|
|
||||||
import { time } from 'echarts';
|
|
||||||
// import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
|
||||||
|
|
||||||
// const tableProps = [
|
|
||||||
// // {
|
|
||||||
// // prop: 'lineName',
|
|
||||||
// // label: '产线',
|
|
||||||
// // align: 'center',
|
|
||||||
// // },
|
|
||||||
// // {
|
|
||||||
// // prop: 'sum',
|
|
||||||
// // label: '合计',
|
|
||||||
// // align: 'center',
|
|
||||||
// // },
|
|
||||||
// // {
|
|
||||||
// // prop: 'dynamicValue',
|
|
||||||
// // label: 'dynamicName',
|
|
||||||
// // align: 'center',
|
|
||||||
// // children:[
|
|
||||||
|
|
||||||
// // ]
|
|
||||||
// // }
|
|
||||||
// ];
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
BalanceChart
|
BalanceChart,
|
||||||
},
|
AnalysisChart,
|
||||||
// mixins: [basicPage],
|
},
|
||||||
data() {
|
mixins: [basicPageMixin],
|
||||||
return {
|
data() {
|
||||||
urlOptions: {
|
return {
|
||||||
getDataListURL: getCT,
|
activeName: 'table',
|
||||||
},
|
tableProps: [
|
||||||
tableProps: [],
|
{
|
||||||
dataListLoading: false,
|
prop: 'sectionName',
|
||||||
tableData: [],
|
label: '工段',
|
||||||
listQuery: {
|
align: 'center',
|
||||||
// time: ''
|
},
|
||||||
endTime: undefined,
|
{
|
||||||
lineId:undefined,
|
prop: 'equName',
|
||||||
startTime:undefined
|
label: '设备',
|
||||||
},
|
align: 'center',
|
||||||
timeList: [],
|
},
|
||||||
spanArr: [],
|
],
|
||||||
xData: [],
|
tableData: [],
|
||||||
yData: [],
|
formConfig: [
|
||||||
optionArrUrl: [getCorePLList],
|
{
|
||||||
formConfig: [
|
type: 'select',
|
||||||
{
|
label: '产线',
|
||||||
type: 'select',
|
selectOptions: [],
|
||||||
label: '产线',
|
param: 'lineIds',
|
||||||
selectOptions: [],
|
defaultSelect: '',
|
||||||
param: 'lineIds',
|
multiple: false,
|
||||||
defaultSelect: '',
|
filterable: true,
|
||||||
multiple: false,
|
},
|
||||||
filterable: true,
|
{
|
||||||
},
|
type: 'datePicker',
|
||||||
{
|
label: '时间',
|
||||||
type: 'datePicker',
|
dateType: 'monthrange',
|
||||||
label: '时间',
|
format: 'yyyy-MM',
|
||||||
dateType: 'datetimerange',
|
valueFormat: 'yyyy-MM-ddTHH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
rangeSeparator: '-',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
startPlaceholder: '开始时间',
|
||||||
rangeSeparator: '-',
|
endPlaceholder: '结束时间',
|
||||||
startPlaceholder: '开始时间',
|
width: 240,
|
||||||
endPlaceholder: '结束时间',
|
param: 'timeArr',
|
||||||
width: 350,
|
},
|
||||||
param: 'time',
|
{
|
||||||
},
|
type: 'button',
|
||||||
{
|
btnName: '查询',
|
||||||
type: 'button',
|
name: 'search',
|
||||||
btnName: '查询',
|
color: 'primary',
|
||||||
name: 'search',
|
},
|
||||||
color: 'primary',
|
],
|
||||||
}
|
queryParams: {
|
||||||
],
|
lineId: null,
|
||||||
};
|
startTime: null,
|
||||||
},
|
endTime: null,
|
||||||
created() {
|
},
|
||||||
this.getArr();
|
sectionMap: {},
|
||||||
},
|
lastSection: null,
|
||||||
methods: {
|
currRowIndex: 0,
|
||||||
getArr() {
|
spanArr: [],
|
||||||
const params = {
|
// 保存时间列表
|
||||||
page: 1,
|
dateArr: [],
|
||||||
limit: 500
|
ready: false,
|
||||||
}
|
};
|
||||||
this.optionArrUrl.forEach((item, index) => {
|
},
|
||||||
item(params).then((response) => {
|
|
||||||
this.formConfig[index].selectOptions = response.data
|
mounted() {
|
||||||
});
|
this.getLine();
|
||||||
});
|
},
|
||||||
},
|
|
||||||
setRowSpan(arr) {
|
methods: {
|
||||||
let count = 0
|
handleTabClick(tab, event) {
|
||||||
arr.forEach((item, index) => {
|
if (tab.name == 'graph') this.renderKey = Math.random();
|
||||||
if(index === 0) {
|
},
|
||||||
this.spanArr.push(1)
|
|
||||||
} else {
|
/** 初始化 tableProps */
|
||||||
if (item === arr[index - 1]) {
|
initTableProps() {
|
||||||
this.spanArr[count] += 1
|
this.tableProps = [
|
||||||
this.spanArr.push(0)
|
{
|
||||||
} else {
|
prop: 'sectionName',
|
||||||
count = index
|
label: '工段',
|
||||||
this.spanArr.push(1)
|
align: 'center',
|
||||||
}
|
},
|
||||||
}
|
{
|
||||||
})
|
prop: 'equName',
|
||||||
},
|
label: '设备',
|
||||||
/** 合并table列的规则 */
|
align: 'center',
|
||||||
mergeColumnHandler({ row, column, rowIndex, columnIndex }) {
|
},
|
||||||
if (columnIndex == 0) {
|
];
|
||||||
if (this.spanArr[rowIndex]) {
|
},
|
||||||
return [
|
|
||||||
this.spanArr[rowIndex], // row span
|
/** 获取产线 */
|
||||||
1, // col span
|
async getLine() {
|
||||||
];
|
this.formConfig[0].selectOptions = [];
|
||||||
} else {
|
const { code, data } = await this.http(
|
||||||
return [0, 0];
|
'/base/core-production-line/listAll',
|
||||||
}
|
'get'
|
||||||
|
);
|
||||||
|
if (code == 0) {
|
||||||
|
this.formConfig[0].selectOptions = data;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getData() {
|
|
||||||
// this.listQuery.lineId = '1672847052717821953'
|
|
||||||
// this.listQuery.startTime = '1693497600000';
|
|
||||||
// this.listQuery.endTime = '1693843200000';
|
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
|
||||||
console.log(res)
|
|
||||||
let arr = [
|
|
||||||
{
|
|
||||||
prop: 'sectionName',
|
|
||||||
label: '工段',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'equName',
|
|
||||||
label: '设备',
|
|
||||||
align: 'center',
|
|
||||||
}
|
|
||||||
]
|
|
||||||
let sectionArr= []
|
|
||||||
res.data.data.forEach((ele, index) => {
|
|
||||||
let tempData = []
|
|
||||||
let eqData = []
|
|
||||||
let plData = []
|
|
||||||
ele.data.forEach((item, index) => {
|
|
||||||
item.children.forEach(params => {
|
|
||||||
if (params.dynamicName === '设备CT') {
|
|
||||||
tempData[item.dynamicName + '_eq'] = params.dynamicValue
|
|
||||||
eqData[index] = params.dynamicValue
|
|
||||||
} else {
|
|
||||||
tempData[item.dynamicName + '_pl'] = params.dynamicValue
|
|
||||||
plData[index] = params.dynamicValue
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
const equipment = {
|
|
||||||
name: ele.equName,
|
|
||||||
eqData: eqData,
|
|
||||||
plData: plData
|
|
||||||
}
|
|
||||||
tempData['equName'] = ele.equName
|
|
||||||
tempData['sectionName'] = ele.sectionName
|
|
||||||
this.tableData.push(tempData)
|
|
||||||
const { sectionName } = tempData
|
|
||||||
sectionArr.push(sectionName)
|
|
||||||
this.yData.push(equipment)
|
|
||||||
console.log('看看equ', this.yData)
|
|
||||||
})
|
|
||||||
this.setRowSpan(sectionArr)
|
|
||||||
res.data.nameData.forEach(item => {
|
|
||||||
this.timeList.push(item.name)
|
|
||||||
})
|
|
||||||
const timeArray = Array.from(new Set(this.timeList))
|
|
||||||
for (const times of timeArray) {
|
|
||||||
if (times !== '设备CT' && times !== '产线CT') {
|
|
||||||
const subprop = {
|
|
||||||
label: times,
|
|
||||||
align: 'center',
|
|
||||||
children: [
|
|
||||||
{ prop: times + '_eq', label: '设备CT', align: 'center' },
|
|
||||||
{ prop: times + '_pl', label: '产线CT', align: 'center' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
arr.push(subprop)
|
|
||||||
this.xData.push(times)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.tableProps = arr
|
|
||||||
|
|
||||||
console.log('表格横坐标', this.xData, this.yData)
|
/** 获取产线平衡数据 */
|
||||||
this.$nextTick(() => {
|
async getCT() {
|
||||||
this.$refs.lineChart.initChart(this.xData, this.yData)
|
const { code, data } = await this.http(
|
||||||
})
|
'/analysis/equipment-analysis/getCT',
|
||||||
// this.total = response.data.total;
|
'post',
|
||||||
// this.dataListLoading = false;
|
this.queryParams
|
||||||
});
|
);
|
||||||
},
|
if (code == 0) {
|
||||||
buttonClick(val) {
|
return data;
|
||||||
// console.log(val)
|
}
|
||||||
switch (val.btnName) {
|
return { data: [], nameData: [] };
|
||||||
case 'search':
|
},
|
||||||
// this.listQuery.pageNo = 1;
|
|
||||||
// this.listQuery.pageSize = 10;
|
/** 解析数据 */
|
||||||
this.listQuery.lineId = val.lineIds
|
async getList() {
|
||||||
this.listQuery.startTime = val.time ? String(new Date(val.time[0]).getTime()) : undefined;
|
const { data, nameData } = await this.getCT();
|
||||||
this.listQuery.endTime = val.time ? String(new Date(val.time[1]).getTime()) : undefined;
|
await this.buildProps(nameData);
|
||||||
if (val.time && val.lineIds) {
|
await this.buildTableData(data);
|
||||||
this.tableData = []
|
this.tableData = this.tableData.sort((a, b) => {
|
||||||
this.xData = []
|
if (a.sectionName < b.sectionName) return -1;
|
||||||
this.yData = []
|
return 1;
|
||||||
this.tableProps = []
|
});
|
||||||
this.spanArr = []
|
// const p = this.tableProps
|
||||||
this.timeList = []
|
// const d = this.tableData
|
||||||
this.getData()
|
// debugger;
|
||||||
} else {
|
this.ready = true;
|
||||||
this.$message({
|
},
|
||||||
message: '请选择产线和时间',
|
|
||||||
type: 'warning'
|
buildProps(nameData) {
|
||||||
});
|
this.initTableProps();
|
||||||
}
|
this.dateArr = [];
|
||||||
break;
|
return new Promise((resolve, reject) => {
|
||||||
case 'reset':
|
try {
|
||||||
this.$refs.searchBarForm.resetForm();
|
const dateArr = Array.from(
|
||||||
this.listQuery = {
|
new Set(
|
||||||
pageSize: 10,
|
nameData
|
||||||
pageNo: 1,
|
.map((item) => (item.tree == 1 ? item.name : undefined))
|
||||||
total: 1,
|
.filter((v) => v)
|
||||||
};
|
)
|
||||||
this.getDataList();
|
);
|
||||||
break;
|
// 排个序
|
||||||
default:
|
dateArr.sort().forEach((date) => {
|
||||||
console.log(val);
|
this.tableProps.push({
|
||||||
}
|
label: date,
|
||||||
},
|
align: 'center',
|
||||||
},
|
children: [
|
||||||
|
{
|
||||||
|
prop: date + '_eq_ct',
|
||||||
|
label: '设备CT',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: date + '_eq_tt',
|
||||||
|
label: '设备TT',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: date + '_pl_ct',
|
||||||
|
label: '产线CT',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: date + '_pl_tt',
|
||||||
|
label: '产线TT',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.dateArr = dateArr;
|
||||||
|
resolve();
|
||||||
|
} catch (err) {
|
||||||
|
reject(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
async buildTableData(data) {
|
||||||
|
this.tableData = [];
|
||||||
|
const sectionArr = Array.from(
|
||||||
|
new Set(data.map((item) => item.sectionName))
|
||||||
|
).sort();
|
||||||
|
|
||||||
|
const sectionMap = sectionArr.reduce(
|
||||||
|
(sum, curr) => ({ ...sum, [curr]: 0 }),
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log('sectionArr', sectionArr);
|
||||||
|
console.log('sectionMap', sectionMap);
|
||||||
|
let spanArr = Array.from(sectionArr, () => 0);
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
/** 处理 工段 分组 */
|
||||||
|
data.map((item) => {
|
||||||
|
sectionMap[item.sectionName]++;
|
||||||
|
/** 处理 设备 */
|
||||||
|
const row = {
|
||||||
|
equName: item.equName,
|
||||||
|
sectionName: item.sectionName,
|
||||||
|
};
|
||||||
|
item.data.forEach((eq) => {
|
||||||
|
const date = eq.dynamicName;
|
||||||
|
eq.children.forEach((sub) => {
|
||||||
|
if (sub.dynamicName == '设备CT')
|
||||||
|
row[date + '_eq_ct'] = sub.dynamicValue;
|
||||||
|
if (sub.dynamicName == '设备TT')
|
||||||
|
row[date + '_eq_tt'] = sub.dynamicValue;
|
||||||
|
if (sub.dynamicName == '产线CT')
|
||||||
|
row[date + '_pl_ct'] = sub.dynamicValue;
|
||||||
|
if (sub.dynamicName == '产线TT')
|
||||||
|
row[date + '_pl_tt'] = sub.dynamicValue;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.tableData.push(row);
|
||||||
|
});
|
||||||
|
|
||||||
|
/** 生成span数组 */
|
||||||
|
const tmp = [...spanArr];
|
||||||
|
for (const [index, key] of sectionArr.entries()) {
|
||||||
|
tmp[index + 1] = tmp[index] + sectionMap[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('tep', tmp);
|
||||||
|
spanArr = tmp;
|
||||||
|
|
||||||
|
this.sectionMap = sectionMap;
|
||||||
|
this.spanArr = spanArr;
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
mergeRow({ row, column, rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex == 1) {
|
||||||
|
const span = this.sectionMap[row.sectionName];
|
||||||
|
if (this.spanArr.includes(rowIndex)) {
|
||||||
|
console.log('span...');
|
||||||
|
return [span, 1];
|
||||||
|
}
|
||||||
|
return [0, 0];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getData() {
|
||||||
|
// this.listQuery.lineId = '1672847052717821953'
|
||||||
|
// this.listQuery.startTime = '1693497600000';
|
||||||
|
// this.listQuery.endTime = '1693843200000';
|
||||||
|
this.urlOptions.getDataListURL(this.listQuery).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
let arr = [
|
||||||
|
{
|
||||||
|
prop: 'sectionName',
|
||||||
|
label: '工段',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'equName',
|
||||||
|
label: '设备',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
let sectionArr = [];
|
||||||
|
res.data.data.forEach((ele, index) => {
|
||||||
|
let tempData = [];
|
||||||
|
let eqData = [];
|
||||||
|
let plData = [];
|
||||||
|
ele.data.forEach((item, index) => {
|
||||||
|
item.children.forEach((params) => {
|
||||||
|
if (params.dynamicName === '设备CT') {
|
||||||
|
tempData[item.dynamicName + '_eq'] = params.dynamicValue;
|
||||||
|
eqData[index] = params.dynamicValue;
|
||||||
|
} else {
|
||||||
|
tempData[item.dynamicName + '_pl'] = params.dynamicValue;
|
||||||
|
plData[index] = params.dynamicValue;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const equipment = {
|
||||||
|
name: ele.equName,
|
||||||
|
eqData: eqData,
|
||||||
|
plData: plData,
|
||||||
|
};
|
||||||
|
tempData['equName'] = ele.equName;
|
||||||
|
tempData['sectionName'] = ele.sectionName;
|
||||||
|
this.tableData.push(tempData);
|
||||||
|
const { sectionName } = tempData;
|
||||||
|
sectionArr.push(sectionName);
|
||||||
|
this.yData.push(equipment);
|
||||||
|
console.log('看看equ', this.yData);
|
||||||
|
});
|
||||||
|
this.setRowSpan(sectionArr);
|
||||||
|
res.data.nameData.forEach((item) => {
|
||||||
|
this.timeList.push(item.name);
|
||||||
|
});
|
||||||
|
const timeArray = Array.from(new Set(this.timeList));
|
||||||
|
for (const times of timeArray) {
|
||||||
|
if (times !== '设备CT' && times !== '产线CT') {
|
||||||
|
const subprop = {
|
||||||
|
label: times,
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{ prop: times + '_eq', label: '设备CT', align: 'center' },
|
||||||
|
{ prop: times + '_pl', label: '产线CT', align: 'center' },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
arr.push(subprop);
|
||||||
|
this.xData.push(times);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tableProps = arr;
|
||||||
|
|
||||||
|
console.log('表格横坐标', this.xData, this.yData);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.lineChart.initChart(this.xData, this.yData);
|
||||||
|
});
|
||||||
|
// this.total = response.data.total;
|
||||||
|
// this.dataListLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSearchBarBtnClick(btn) {
|
||||||
|
switch (btn.btnName) {
|
||||||
|
case 'search':
|
||||||
|
this.queryParams.lineId = btn.lineIds || null;
|
||||||
|
this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
|
||||||
|
this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
|
||||||
|
|
||||||
|
if (!btn.lineIds || !btn.timeArr.length) {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择产线和时间',
|
||||||
|
type: 'warning',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.getList();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
buttonClick(val) {
|
||||||
|
// console.log(val)
|
||||||
|
switch (val.btnName) {
|
||||||
|
case 'search':
|
||||||
|
// this.listQuery.pageNo = 1;
|
||||||
|
// this.listQuery.pageSize = 10;
|
||||||
|
this.listQuery.lineId = val.lineIds;
|
||||||
|
this.listQuery.startTime = val.time
|
||||||
|
? String(new Date(val.time[0]).getTime())
|
||||||
|
: undefined;
|
||||||
|
this.listQuery.endTime = val.time
|
||||||
|
? String(new Date(val.time[1]).getTime())
|
||||||
|
: undefined;
|
||||||
|
if (val.time && val.lineIds) {
|
||||||
|
this.tableData = [];
|
||||||
|
this.xData = [];
|
||||||
|
this.yData = [];
|
||||||
|
this.tableProps = [];
|
||||||
|
this.spanArr = [];
|
||||||
|
this.timeList = [];
|
||||||
|
this.getData();
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择产线和时间',
|
||||||
|
type: 'warning',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'reset':
|
||||||
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
this.listQuery = {
|
||||||
|
pageSize: 10,
|
||||||
|
pageNo: 1,
|
||||||
|
total: 1,
|
||||||
|
};
|
||||||
|
this.getDataList();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(val);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.custom-tabs >>> .el-tabs__header {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
display: inline-block;
|
||||||
|
transform: translateY(-12px);
|
||||||
|
}
|
||||||
|
.custom-tabs >>> .el-tabs__item {
|
||||||
|
padding-left: 0px !important;
|
||||||
|
padding-right: 0px !important;
|
||||||
|
line-height: 36px !important;
|
||||||
|
height: 36px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-tabs >>> .el-tabs__content {
|
||||||
|
height: calc(100% - 42px);
|
||||||
|
}
|
||||||
|
.custom-tabs >>> .el-tab-pane {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
btnName: '搜索',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
@@ -149,6 +149,27 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {},
|
created() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 删除
|
||||||
|
deleteHandle(id, name, index) {
|
||||||
|
this.$confirm(`确定确认删除工厂名称为"${name}"的数据项?`, "提示", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.urlOptions.deleteURL(id).then(({ data }) => {
|
||||||
|
this.$message({
|
||||||
|
message: "操作成功",
|
||||||
|
type: "success",
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="订单名" prop="orderId">
|
<el-form-item label="订单名" prop="orderId">
|
||||||
<el-select v-model="form.orderId" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.orderId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in orderList"
|
v-for="item in orderList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="发货负责人" prop="deliveryPersonId">
|
<el-form-item label="发货负责人" prop="deliveryPersonId">
|
||||||
<el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.deliveryPersonId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in personList"
|
v-for="item in personList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -75,9 +75,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { orderList } from '@/api/base/orderManage'
|
|
||||||
import { getWorkerList } from '@/api/base/worker'
|
import { getWorkerList } from '@/api/base/worker'
|
||||||
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog } from '@/api/base/delivery'
|
import { deliveryLogCreate, deliveryLogUpdate, getDeliveryLog, listOrderList } from '@/api/base/delivery'
|
||||||
export default {
|
export default {
|
||||||
name: 'AddOrUpdate',
|
name: 'AddOrUpdate',
|
||||||
data() {
|
data() {
|
||||||
@@ -116,7 +115,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSelectList() {
|
getSelectList() {
|
||||||
orderList().then(res => {
|
listOrderList().then(res => {
|
||||||
this.orderList = res.data || []
|
this.orderList = res.data || []
|
||||||
})
|
})
|
||||||
getWorkerList().then(res => {
|
getWorkerList().then(res => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
<el-form ref="form" :rules="rules" label-width="100px" :model="form">
|
||||||
<el-form-item label="关联表名" prop="plcId">
|
<el-form-item label="关联表名" prop="plcId">
|
||||||
<el-select v-model="form.plcId" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.plcId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in plcList"
|
v-for="item in plcList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="能源类型" prop="typeId">
|
<el-form-item label="能源类型" prop="typeId">
|
||||||
<el-select v-model="form.typeId" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.typeId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in energyListType"
|
v-for="item in energyListType"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const tableProps = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: "EnergyPlc",
|
name: "EnergyQuantityRealtime",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formConfig: [
|
formConfig: [
|
||||||
@@ -125,10 +125,34 @@ export default {
|
|||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(260)
|
this.tableH = this.tableHeight(260)
|
||||||
})
|
})
|
||||||
|
if (location.href.indexOf('?') > 0) {
|
||||||
|
let arr = location.href.split('?')[1].split('&')
|
||||||
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
|
} else {
|
||||||
|
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
||||||
|
}
|
||||||
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTypeList()
|
this.getTypeList()
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
$route: 'initData'
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initData(to) {
|
||||||
|
if (to.name === 'EnergyQuantityRealtime') {
|
||||||
|
if (location.href.indexOf('?') > 0) {
|
||||||
|
let arr = location.href.split('?')[1].split('&')
|
||||||
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
|
} else {
|
||||||
|
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
||||||
|
}
|
||||||
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
this.queryParams.pageNo = 1;
|
this.queryParams.pageNo = 1;
|
||||||
this.queryParams.energyTypeId = val.energyTypeId
|
this.queryParams.energyTypeId = val.energyTypeId
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="能源类型" prop="energyTypeId">
|
<el-form-item label="能源类型" prop="energyTypeId">
|
||||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" @change="toggleType">
|
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable @change="toggleType">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in this.energyTypeList"
|
v-for="item in this.energyTypeList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ export default {
|
|||||||
param: 'timeVal',
|
param: 'timeVal',
|
||||||
defaultSelect: [],
|
defaultSelect: [],
|
||||||
width: 350,
|
width: 350,
|
||||||
clearable: false,
|
clearable: false
|
||||||
required:true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@@ -122,35 +121,11 @@ export default {
|
|||||||
this.tableH = this.tableHeight(260)
|
this.tableH = this.tableHeight(260)
|
||||||
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
|
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
|
||||||
})
|
})
|
||||||
if (location.href.indexOf('?') > 0) {
|
|
||||||
let arr = location.href.split('?')[1].split('&')
|
|
||||||
this.formConfig[2].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
|
||||||
} else {
|
|
||||||
this.formConfig[2].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
|
||||||
}
|
|
||||||
this.queryParams.startTime = this.formConfig[2].defaultSelect[0]
|
|
||||||
this.queryParams.endTime = this.formConfig[2].defaultSelect[1]
|
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getTypeList()
|
this.getTypeList()
|
||||||
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
|
this.isFold = this.searchBarWidth('energyReportSearchBox', 1180)
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
$route: 'initData'
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
initData(to) {
|
|
||||||
if (to.name === 'EnergyReportSearch') {
|
|
||||||
if (location.href.indexOf('?') > 0) {
|
|
||||||
let arr = location.href.split('?')[1].split('&')
|
|
||||||
this.formConfig[2].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
|
||||||
} else {
|
|
||||||
this.formConfig[2].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
|
||||||
}
|
|
||||||
this.queryParams.startTime = this.formConfig[2].defaultSelect[0]
|
|
||||||
this.queryParams.endTime = this.formConfig[2].defaultSelect[1]
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
getEnergyTypeListAll().then((res) => {
|
getEnergyTypeListAll().then((res) => {
|
||||||
this.formConfig[1].selectOptions = res.data || []
|
this.formConfig[1].selectOptions = res.data || []
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="能源类型" prop="energyTypeId">
|
<el-form-item label="能源类型" prop="energyTypeId">
|
||||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in energyListType"
|
v-for="item in energyListType"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -8,11 +8,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container allow-overflow">
|
<div class="app-container allow-overflow">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<small-title
|
<!-- <small-title
|
||||||
style="margin: 16px 0; padding-left: 8px"
|
style="margin: 16px 0; padding-left: 8px"
|
||||||
:no-padding="true">
|
:no-padding="true">
|
||||||
设备运行状态
|
设备运行状态
|
||||||
</small-title>
|
</small-title> -->
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="graph"
|
class="graph"
|
||||||
@@ -22,7 +22,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
">
|
">
|
||||||
<div class="blue-title">各设备加工数量</div>
|
<!-- <div class="blue-title">各设备加工数量</div> -->
|
||||||
|
<div class="blue-title">设备运行状态</div>
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<div class="legend-item">
|
<div class="legend-item">
|
||||||
<span class="icon blue"></span>
|
<span class="icon blue"></span>
|
||||||
@@ -41,22 +42,17 @@
|
|||||||
<span class="text">速度开动率</span>
|
<span class="text">速度开动率</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="graph-grid">
|
<div v-if="list.length" class="graph-grid">
|
||||||
<div class="bg-grid grid-line">
|
<div class="bg-grid grid-line">
|
||||||
<div
|
<div class="grid-item" v-for="item in list.length" :key="item"></div>
|
||||||
class="grid-item"
|
|
||||||
v-for="item in list.length"
|
|
||||||
:key="item"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bg-grid grid-charts">
|
<div class="bg-grid grid-charts">
|
||||||
<pie-chart
|
<pie-chart v-for="item in list" :key="item.id" :value="item" />
|
||||||
v-for="item in list"
|
|
||||||
:key="item.id"
|
|
||||||
:value="item" />
|
|
||||||
<!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> -->
|
<!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="no-data-bg" v-else></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -202,7 +202,9 @@ export default {
|
|||||||
];
|
];
|
||||||
this.config.series[1].data = [
|
this.config.series[1].data = [
|
||||||
{ name: '速度开动率', value: peEfficiency },
|
{ name: '速度开动率', value: peEfficiency },
|
||||||
{ name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
{ name: '', value: 100 },
|
||||||
|
// { name: '速度开动率', value: peEfficiency },
|
||||||
|
// { name: '', value: Math.ceil(peEfficiency) - peEfficiency },
|
||||||
];
|
];
|
||||||
//
|
//
|
||||||
this.textData = {
|
this.textData = {
|
||||||
|
|||||||
@@ -7,27 +7,30 @@
|
|||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="alarm-handle">
|
<div class="alarm-handle">
|
||||||
<DialogForm
|
<el-skeleton v-if="loading" />
|
||||||
ref="orderForm"
|
<div v-else>
|
||||||
key="orderForm"
|
<DialogForm
|
||||||
v-model="orderForm"
|
ref="orderForm"
|
||||||
:disabled="readOnly"
|
key="orderForm"
|
||||||
:has-files="false"
|
v-model="orderForm"
|
||||||
label-position="top"
|
:disabled="readOnly"
|
||||||
:rows="orderFormRows" />
|
:has-files="false"
|
||||||
|
label-position="top"
|
||||||
|
:rows="orderFormRows" />
|
||||||
|
|
||||||
<small-title style="margin: 16px 0" :no-padding="true" size="sm">
|
<small-title style="margin: 16px 0" :no-padding="true" size="sm">
|
||||||
处理方式
|
处理方式
|
||||||
</small-title>
|
</small-title>
|
||||||
|
|
||||||
<DialogForm
|
<DialogForm
|
||||||
key="handleMethodForm"
|
key="handleMethodForm"
|
||||||
ref="handleMethodForm"
|
ref="handleMethodForm"
|
||||||
v-model="handleMethodForm"
|
v-model="handleMethodForm"
|
||||||
:disabled="readOnly"
|
:disabled="readOnly"
|
||||||
:has-files="true"
|
:has-files="true"
|
||||||
label-position="top"
|
label-position="top"
|
||||||
:rows="handleMethodFormRows" />
|
:rows="handleMethodFormRows" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -43,6 +46,7 @@ export default {
|
|||||||
components: { SmallTitle, DialogForm, Editor },
|
components: { SmallTitle, DialogForm, Editor },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading: false,
|
||||||
orderForm: {
|
orderForm: {
|
||||||
id: null,
|
id: null,
|
||||||
equipment: null,
|
equipment: null,
|
||||||
@@ -50,13 +54,15 @@ export default {
|
|||||||
alarmContent: null,
|
alarmContent: null,
|
||||||
alarmValue: null,
|
alarmValue: null,
|
||||||
// 缺少报警编号字段, 用 alarmValue 代替
|
// 缺少报警编号字段, 用 alarmValue 代替
|
||||||
|
alarmCode: null,
|
||||||
|
equipmentCode: null
|
||||||
},
|
},
|
||||||
orderFormRows: [
|
orderFormRows: [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
label: '设备编码',
|
label: '设备编码',
|
||||||
prop: 'equipment',
|
prop: 'equipmentCode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
datetime: true,
|
datetime: true,
|
||||||
@@ -66,7 +72,7 @@ export default {
|
|||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
label: '报警编号',
|
label: '报警编号',
|
||||||
prop: 'alarmValue',
|
prop: 'alarmCode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: true,
|
input: true,
|
||||||
@@ -82,6 +88,9 @@ export default {
|
|||||||
label: '处理人',
|
label: '处理人',
|
||||||
prop: 'hander',
|
prop: 'hander',
|
||||||
url: '/base/core-worker/listAll',
|
url: '/base/core-worker/listAll',
|
||||||
|
bind: {
|
||||||
|
multiple: true,
|
||||||
|
},
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '类型名称不能为空', trigger: 'blur' },
|
{ required: true, message: '类型名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
@@ -122,9 +131,14 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict().then(() => {
|
this.loading = true;
|
||||||
this.init();
|
this.getDict()
|
||||||
});
|
.then(() => {
|
||||||
|
this.init();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
@@ -139,8 +153,9 @@ export default {
|
|||||||
* 初始化
|
* 初始化
|
||||||
*/
|
*/
|
||||||
async init() {
|
async init() {
|
||||||
this.initTop();
|
await this.initTop();
|
||||||
this.initDown();
|
await this.initDown();
|
||||||
|
this.loading = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -172,16 +187,19 @@ export default {
|
|||||||
this.$msgError('缺少报警日志id');
|
this.$msgError('缺少报警日志id');
|
||||||
this.$emit('close');
|
this.$emit('close');
|
||||||
}
|
}
|
||||||
const url = '/base/equipment-alarm-hand/get';
|
const url = '/base/equipment-alarm-hand/page'; // 经沟通,此处采用page接口的第一个返回值
|
||||||
const { data, code } = await this.$axios({
|
const { data, code } = await this.$axios({
|
||||||
url: url,
|
url: url,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
id: this.logId,
|
logId: this.logId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.handleMethodForm = data;
|
this.handleMethodForm = {
|
||||||
|
...data.list[0],
|
||||||
|
hander: data.list[0]?.hander?.split(',') || '',
|
||||||
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -213,7 +231,11 @@ export default {
|
|||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: url + (this.handleMethodForm.id ? '/update' : '/create'),
|
url: url + (this.handleMethodForm.id ? '/update' : '/create'),
|
||||||
method: this.handleMethodForm.id ? 'put' : 'post',
|
method: this.handleMethodForm.id ? 'put' : 'post',
|
||||||
data: { ...this.handleMethodForm, logId: this.logId },
|
data: {
|
||||||
|
...this.handleMethodForm,
|
||||||
|
hander: this.handleMethodForm.hander?.join(',') || '',
|
||||||
|
logId: this.logId,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default {
|
|||||||
startPlaceholder: '开始日期',
|
startPlaceholder: '开始日期',
|
||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
defaultTime: ['00:00:00', '23:59:59'],
|
defaultTime: ['00:00:00', '23:59:59'],
|
||||||
param: 'recordTime',
|
param: 'createTime',
|
||||||
// defaultSelect: [
|
// defaultSelect: [
|
||||||
// new Date(y, m, d)
|
// new Date(y, m, d)
|
||||||
// .toLocaleString()
|
// .toLocaleString()
|
||||||
@@ -206,7 +206,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
lineId: null,
|
lineId: null,
|
||||||
equipmentId: null,
|
equipmentId: null,
|
||||||
recordTime: []
|
recordTime: [],
|
||||||
},
|
},
|
||||||
basePath: '/base/equipment-alarm-log',
|
basePath: '/base/equipment-alarm-log',
|
||||||
list: [],
|
list: [],
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||||
|
:before-close="handleCancel"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@@ -129,13 +130,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">返回</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="!mode.includes('detail')"
|
|
||||||
@click="handleSave">
|
@click="handleSave">
|
||||||
保存
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||||
|
:before-close="handleCancel"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@@ -128,11 +129,10 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="!mode.includes('detail')"
|
|
||||||
@click="handleCancel">
|
@click="handleCancel">
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="title"
|
:dialogTitle="title"
|
||||||
:dialogVisible="open"
|
:dialogVisible="open"
|
||||||
width="700px"
|
width="30%"
|
||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ export default {
|
|||||||
filter: publicFormatter('unit_dict'),
|
filter: publicFormatter('unit_dict'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'equipment_param_type',
|
prop: 'equipmentParamType',
|
||||||
label: '设备参数类型',
|
label: '设备参数类型',
|
||||||
filter: (val) =>
|
filter: (val) =>
|
||||||
val != null
|
val != null
|
||||||
@@ -312,7 +312,7 @@ export default {
|
|||||||
: '-',
|
: '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'production_param_type',
|
prop: 'productionParamType',
|
||||||
label: '生产参数类型',
|
label: '生产参数类型',
|
||||||
filter: (val) =>
|
filter: (val) =>
|
||||||
val != null
|
val != null
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
label="操作"
|
label="操作"
|
||||||
|
:width="90"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
<base-dialog
|
<base-dialog
|
||||||
:dialogTitle="title"
|
:dialogTitle="title"
|
||||||
:dialogVisible="open"
|
:dialogVisible="open"
|
||||||
width="700px"
|
width="45%"
|
||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
@@ -127,7 +128,7 @@ export default {
|
|||||||
// width: 180,
|
// width: 180,
|
||||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||||
// },
|
// },
|
||||||
{ prop: 'code', label: '编码' },
|
{ prop: 'code', label: '编码', showOverflowtooltip: true },
|
||||||
{ prop: 'plcTableName', label: '关联表名' },
|
{ prop: 'plcTableName', label: '关联表名' },
|
||||||
{ prop: 'name', label: '标识名称' },
|
{ prop: 'name', label: '标识名称' },
|
||||||
{ prop: 'enName', label: '英文名称' },
|
{ prop: 'enName', label: '英文名称' },
|
||||||
@@ -136,7 +137,7 @@ export default {
|
|||||||
label: '是否采集',
|
label: '是否采集',
|
||||||
subcomponent: switchBtn,
|
subcomponent: switchBtn,
|
||||||
},
|
},
|
||||||
{ prop: 'description', label: '描述' },
|
{ prop: 'description', label: '描述', showOverflowtooltip: true },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@@ -213,16 +214,28 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
// {
|
||||||
|
// switch: true,
|
||||||
|
// label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
||||||
|
// prop: 'collection',
|
||||||
|
// bind: {
|
||||||
|
// 'active-value': 1,
|
||||||
|
// 'inactive-value': 0,
|
||||||
|
// value: 1,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
switch: true,
|
select: true,
|
||||||
label: '是否采集', // 是否采集 0 代表不采集, 1 代表采集
|
options: [
|
||||||
|
{ label: '否', value: 0 },
|
||||||
|
{ label: '是', value: 1 }
|
||||||
|
],
|
||||||
|
label: '是否采集',
|
||||||
prop: 'collection',
|
prop: 'collection',
|
||||||
bind: {
|
bind: {
|
||||||
'active-value': 1,
|
clearable: true, filterable: true
|
||||||
'inactive-value': 0,
|
}
|
||||||
value: 1,
|
}
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="mode.includes('detail') ? true : false"
|
||||||
|
:before-close="handleCancel"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
custom-class="mes-drawer"
|
custom-class="mes-drawer"
|
||||||
:size="size || '50%'"
|
:size="size || '50%'"
|
||||||
@@ -61,7 +62,7 @@
|
|||||||
关联表名
|
关联表名
|
||||||
</div>
|
</div>
|
||||||
<div class="value" style="font-size: 14px">
|
<div class="value" style="font-size: 14px">
|
||||||
{{ form.plcTableName }}
|
{{ form.plcName }}
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -73,9 +74,17 @@
|
|||||||
class="title"
|
class="title"
|
||||||
label="设备名"
|
label="设备名"
|
||||||
style="font-size: 16px; margin: 8px 0">
|
style="font-size: 16px; margin: 8px 0">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="form.equipmentName"
|
v-model="form.equipmentId"
|
||||||
placeholder="请输入设备名"></el-input>
|
filterable
|
||||||
|
clearable
|
||||||
|
placeholder="请选择设备">
|
||||||
|
<el-option
|
||||||
|
v-for="eq in eqList"
|
||||||
|
:key="eq.id"
|
||||||
|
:label="eq.name"
|
||||||
|
:value="eq.id"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -83,9 +92,17 @@
|
|||||||
class="title"
|
class="title"
|
||||||
label="设备关联表名"
|
label="设备关联表名"
|
||||||
style="font-size: 16px; margin: 8px 0">
|
style="font-size: 16px; margin: 8px 0">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="form.plcTableName"
|
v-model="form.plcId"
|
||||||
placeholder="请输入关联表名"></el-input>
|
filterable
|
||||||
|
clearable
|
||||||
|
placeholder="请选择关联表">
|
||||||
|
<el-option
|
||||||
|
v-for="plc in plcList"
|
||||||
|
:key="plc.id"
|
||||||
|
:label="plc.name"
|
||||||
|
:value="plc.id"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -131,13 +148,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!mode.includes('detail')" class="drawer-body__footer">
|
||||||
<el-button style="" @click="handleCancel">取消</el-button>
|
<el-button style="" @click="handleCancel">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-if="!mode.includes('detail')"
|
|
||||||
@click="handleSave">
|
@click="handleSave">
|
||||||
保存
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -202,6 +218,8 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
form: {},
|
form: {},
|
||||||
list: [],
|
list: [],
|
||||||
|
eqList: [],
|
||||||
|
plcList: [],
|
||||||
attrTitle: '',
|
attrTitle: '',
|
||||||
attrForm: {
|
attrForm: {
|
||||||
id: null,
|
id: null,
|
||||||
@@ -257,7 +275,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '设备参数类型',
|
label: '设备参数类型',
|
||||||
prop: 'equipment_param_type',
|
prop: 'equipmentParamType',
|
||||||
options: [
|
options: [
|
||||||
{ label: '一般参数', value: 1 },
|
{ label: '一般参数', value: 1 },
|
||||||
{ label: '工艺参数', value: 2 },
|
{ label: '工艺参数', value: 2 },
|
||||||
@@ -274,7 +292,7 @@ export default {
|
|||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '生产参数类型',
|
label: '生产参数类型',
|
||||||
prop: 'production_param_type',
|
prop: 'productionParamType',
|
||||||
options: [
|
options: [
|
||||||
// { label: '进片数量', value: 1 },
|
// { label: '进片数量', value: 1 },
|
||||||
// { label: '出片数量', value: 2 },
|
// { label: '出片数量', value: 2 },
|
||||||
@@ -380,6 +398,17 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.shouldRefreshPageView = false;
|
this.shouldRefreshPageView = false;
|
||||||
this.mode = this.defaultMode || 'detail';
|
this.mode = this.defaultMode || 'detail';
|
||||||
|
|
||||||
|
if (this.mode != 'detail') {
|
||||||
|
this.$axios('/base/core-equipment/listAll').then(({ code, data }) => {
|
||||||
|
this.eqList = data;
|
||||||
|
});
|
||||||
|
this.$axios({
|
||||||
|
url: '/base/equipment-plc/page',
|
||||||
|
}).then(({ code, data }) => {
|
||||||
|
this.plcList = data.list;
|
||||||
|
});
|
||||||
|
}
|
||||||
for (const section of this.sections) {
|
for (const section of this.sections) {
|
||||||
// 请求具体信息
|
// 请求具体信息
|
||||||
if ('url' in section) {
|
if ('url' in section) {
|
||||||
@@ -479,6 +508,8 @@ export default {
|
|||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
description: '',
|
description: '',
|
||||||
remark: '',
|
remark: '',
|
||||||
|
equipmentParamType: '',
|
||||||
|
productionParamType: '',
|
||||||
alarmContent: '',
|
alarmContent: '',
|
||||||
};
|
};
|
||||||
this.attrTitle = '添加参数绑定信息';
|
this.attrTitle = '添加参数绑定信息';
|
||||||
|
|||||||
@@ -7,13 +7,15 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
|
ref="drawer"
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="isdetail"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%"
|
||||||
|
@closed="$emit('destroy')">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ isdetail ? '查看详情' : '新增' }}
|
{{ isdetail ? '查看详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<el-form
|
<el-form
|
||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
@@ -84,6 +86,19 @@
|
|||||||
placeholder="选择巡检时间" />
|
placeholder="选择巡检时间" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="数据来源" prop="origin">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.origin"
|
||||||
|
filterable
|
||||||
|
:disabled="isdetail"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择数据来源">
|
||||||
|
<el-option key="1" label="手动" :value="1" />
|
||||||
|
<el-option key="2" label="自动" :value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="巡检内容">
|
<el-form-item label="巡检内容">
|
||||||
<base-table
|
<base-table
|
||||||
@@ -93,20 +108,17 @@
|
|||||||
:table-data="list" />
|
:table-data="list" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="巡检详情" prop="description">
|
<el-form-item label="巡检详情" prop="description">
|
||||||
<editor v-model="dataForm.description" :read-only="isdetail" :min-height="380"/>
|
<editor v-model="dataForm.description" :read-only="isdetail" :min-height="150"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<FileUpload v-model="file" :disabled="isdetail" />
|
<FileUpload v-model="file" :limit="1" :f-name="fileName" :disabled="isdetail" @name="setFileName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button type="primary" @click="goback()">取消</el-button>
|
<el-button type="primary" @click="goback()">取消</el-button>
|
||||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
编辑
|
|
||||||
</el-button>
|
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -173,6 +185,7 @@ export default {
|
|||||||
actualTime: undefined,
|
actualTime: undefined,
|
||||||
responsible: undefined,
|
responsible: undefined,
|
||||||
description: undefined,
|
description: undefined,
|
||||||
|
origin: undefined,
|
||||||
files: []
|
files: []
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
@@ -184,6 +197,7 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
file: '',
|
file: '',
|
||||||
|
fileName: '',
|
||||||
dataRule: {
|
dataRule: {
|
||||||
responsible: [{ required: true, message: "巡检人不能为空", trigger: "blur" }],
|
responsible: [{ required: true, message: "巡检人不能为空", trigger: "blur" }],
|
||||||
actualTime: [{ required: true, message: "巡检时间不能为空", trigger: "blur" }]
|
actualTime: [{ required: true, message: "巡检时间不能为空", trigger: "blur" }]
|
||||||
@@ -194,6 +208,9 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setFileName(val) {
|
||||||
|
this.fileName = val
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
const res = await getEquipmentAll()
|
const res = await getEquipmentAll()
|
||||||
this.eqList = res.data
|
this.eqList = res.data
|
||||||
@@ -222,16 +239,9 @@ export default {
|
|||||||
return this.$refs.dataForm.resetFields(args);
|
return this.$refs.dataForm.resetFields(args);
|
||||||
},
|
},
|
||||||
initData() {
|
initData() {
|
||||||
this.dataForm = {
|
|
||||||
id: undefined,
|
|
||||||
configId: undefined,
|
|
||||||
equipmentId: undefined,
|
|
||||||
actualTime: undefined,
|
|
||||||
responsible: undefined,
|
|
||||||
description: undefined,
|
|
||||||
files: []
|
|
||||||
}
|
|
||||||
this.list = []
|
this.list = []
|
||||||
|
this.file = ''
|
||||||
|
this.fileName = ''
|
||||||
},
|
},
|
||||||
init(id, isdetail) {
|
init(id, isdetail) {
|
||||||
this.initData();
|
this.initData();
|
||||||
@@ -239,6 +249,10 @@ export default {
|
|||||||
this.dataForm.id = id || undefined;
|
this.dataForm.id = id || undefined;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
|
||||||
|
// const scrollContainer = this.$refs.dataForm;
|
||||||
|
// const scrollPosition = scrollContainer.scrollTop;
|
||||||
|
// console.log('12', scrollPosition);
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['dataForm'].resetFields();
|
this.$refs['dataForm'].resetFields();
|
||||||
|
|
||||||
@@ -247,6 +261,12 @@ export default {
|
|||||||
getEqCheckLog(this.dataForm.id).then(response => {
|
getEqCheckLog(this.dataForm.id).then(response => {
|
||||||
this.formLoading = false
|
this.formLoading = false
|
||||||
this.dataForm = response.data;
|
this.dataForm = response.data;
|
||||||
|
if (this.dataForm.files.length > 0) {
|
||||||
|
this.file = this.dataForm.files[0].fileUrl
|
||||||
|
this.fileName = this.dataForm.files[0].fileName
|
||||||
|
}
|
||||||
|
this.setConfig()
|
||||||
|
this.setInspectionContet()
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// if (this.urlOptions.isGetCode) {
|
// if (this.urlOptions.isGetCode) {
|
||||||
@@ -283,8 +303,9 @@ export default {
|
|||||||
if (this.file) {
|
if (this.file) {
|
||||||
const temp = this.file.split(',') // 获取文件个数
|
const temp = this.file.split(',') // 获取文件个数
|
||||||
let arry = []
|
let arry = []
|
||||||
temp.forEach(item => {
|
temp.forEach((item, index) => {
|
||||||
arry.push({
|
arry.push({
|
||||||
|
fileName: this.fileName,
|
||||||
fileType: 2,
|
fileType: 2,
|
||||||
fileUrl: item
|
fileUrl: item
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,148 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog
|
|
||||||
:visible.sync="visible"
|
|
||||||
:width="'35%'"
|
|
||||||
:append-to-body="true"
|
|
||||||
:close-on-click-modal="false"
|
|
||||||
class="dialog">
|
|
||||||
<template #title>
|
|
||||||
<slot name="title">
|
|
||||||
<div class="titleStyle">
|
|
||||||
{{ !dataForm.id ? '新增' : '编辑' }}
|
|
||||||
</div>
|
|
||||||
</slot>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<el-form
|
|
||||||
ref="dataForm"
|
|
||||||
:model="dataForm"
|
|
||||||
:rules="dataRule"
|
|
||||||
label-width="100px"
|
|
||||||
@keyup.enter.native="dataFormSubmit()">
|
|
||||||
<el-form-item label="备品备件" prop="sparePartId">
|
|
||||||
<el-select
|
|
||||||
v-model="dataForm.sparePartId"
|
|
||||||
filterable
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="请选择备品备件">
|
|
||||||
<el-option
|
|
||||||
v-for="dict in partList"
|
|
||||||
:key="dict.id"
|
|
||||||
:label="dict.name"
|
|
||||||
:value="dict.id" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row style="text-align: right">
|
|
||||||
<el-button @click="visible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
||||||
</el-row>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
createConfigDet,
|
|
||||||
getSparePartList
|
|
||||||
} from '@/api/equipment/base/spare-parts/config';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
configId: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
visible: false,
|
|
||||||
dataForm: {
|
|
||||||
id: undefined,
|
|
||||||
sparePartId: ''
|
|
||||||
},
|
|
||||||
partList: [],
|
|
||||||
dataRule: {
|
|
||||||
sparePartId: [{ required: true, message: '备品备件不能为空', trigger: 'change' }]
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.getDict()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async getDict() {
|
|
||||||
const res = await getSparePartList()
|
|
||||||
this.partList = res.data
|
|
||||||
},
|
|
||||||
init(id) {
|
|
||||||
this.dataForm.id = id || '';
|
|
||||||
this.visible = true;
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.$refs['dataForm'].resetFields();
|
|
||||||
// if (this.dataForm.id) {
|
|
||||||
// getCoreProductAttr({
|
|
||||||
// id: this.dataForm.id
|
|
||||||
// }).then((res) => {
|
|
||||||
// const { name, value } = res.data;
|
|
||||||
// this.dataForm.name = name;
|
|
||||||
// this.dataForm.value = value;
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
// 表单提交
|
|
||||||
dataFormSubmit() {
|
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
// 修改的提交
|
|
||||||
// if (this.dataForm.id) {
|
|
||||||
// updateCoreProductAttr({
|
|
||||||
// ...this.dataForm,
|
|
||||||
// productId: this.productId,
|
|
||||||
// }).then((response) => {
|
|
||||||
// this.$modal.msgSuccess('修改成功');
|
|
||||||
// this.visible = false;
|
|
||||||
// this.$emit('refreshDataList');
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// 添加的提交
|
|
||||||
createConfigDet({
|
|
||||||
...this.dataForm,
|
|
||||||
configId: this.configId,
|
|
||||||
}).then((response) => {
|
|
||||||
this.$modal.msgSuccess('新增成功');
|
|
||||||
this.visible = false;
|
|
||||||
this.$emit('refreshDataList');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.dialog >>> .el-dialog__body {
|
|
||||||
padding: 30px 24px;
|
|
||||||
}
|
|
||||||
.dialog >>> .el-dialog__header {
|
|
||||||
font-size: 16px;
|
|
||||||
color: rgba(0, 0, 0, 0.85);
|
|
||||||
font-weight: 500;
|
|
||||||
padding: 13px 24px;
|
|
||||||
border-bottom: 1px solid #e9e9e9;
|
|
||||||
}
|
|
||||||
.dialog >>> .el-dialog__header .titleStyle::before {
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 4px;
|
|
||||||
height: 16px;
|
|
||||||
background-color: #0b58ff;
|
|
||||||
border-radius: 1px;
|
|
||||||
margin-right: 8px;
|
|
||||||
position: relative;
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -49,7 +49,8 @@
|
|||||||
<addRecord
|
<addRecord
|
||||||
v-if="addOrUpdateVisible"
|
v-if="addOrUpdateVisible"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="getList" />
|
@refreshDataList="getList"
|
||||||
|
@destroy="addOrUpdateVisible = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -93,7 +94,7 @@ export default {
|
|||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'configName', label: '配置名称' },
|
{ prop: 'configName', label: '配置名称' },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称' },
|
||||||
// { prop: 'lineName', label: '数据来源' },
|
{ prop: 'origin', label: '数据来源', filter: (val) => ['', '手动', '自动'][val] },
|
||||||
// { prop: 'sectionName', label: '计划巡检时间' },
|
// { prop: 'sectionName', label: '计划巡检时间' },
|
||||||
{ prop: 'actualTime', label: '实际巡检时间', filter: parseTime },
|
{ prop: 'actualTime', label: '实际巡检时间', filter: parseTime },
|
||||||
// { prop: 'maintenanceDetail', label: '完成状态' },
|
// { prop: 'maintenanceDetail', label: '完成状态' },
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-11-24 18:38:22
|
* @LastEditTime: 2023-11-27 10:48:55
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -176,11 +176,7 @@ export default {
|
|||||||
handleClick(raw) {
|
handleClick(raw) {
|
||||||
if (raw.type === 'delete') {
|
if (raw.type === 'delete') {
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
`确定对${
|
`是否确认删除巡检项目名称为"${raw.data.program}"的数据项?`,
|
||||||
raw.data.attrName
|
|
||||||
? '[名称=' + raw.data.attrName + ']'
|
|
||||||
: '[序号=' + raw.data._pageIndex + ']'
|
|
||||||
}进行删除操作?`,
|
|
||||||
'提示',
|
'提示',
|
||||||
{
|
{
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
105
src/views/equipment/base/inspection/Settings/add.vue
Normal file
105
src/views/equipment/base/inspection/Settings/add.vue
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zwq
|
||||||
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @LastEditTime: 2023-11-25 16:23:13
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="dataForm"
|
||||||
|
:rules="dataRule"
|
||||||
|
ref="dataForm"
|
||||||
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
|
label-width="80px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="配置名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.name"
|
||||||
|
placeholder="请输入配置名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="配置编码" prop="code">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.code"
|
||||||
|
placeholder="请输入配置编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备名称" prop="equipmentId">
|
||||||
|
<el-select
|
||||||
|
v-model="dataForm.equipmentId"
|
||||||
|
filterable
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择设备名称"
|
||||||
|
@change="setCode">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in eqList"
|
||||||
|
:key="dict.id"
|
||||||
|
:label="dict.name"
|
||||||
|
:value="dict.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="设备编码" prop="equipmentCode">
|
||||||
|
<el-input v-model="dataForm.equipmentCode" disabled placeholder="请输入设备编码" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import basicAdd from '../../../../core/mixins/basic-add';
|
||||||
|
import { getEqCheck, getCode, createCheckConfig, updateCheckConfig } from "@/api/equipment/base/inspection/settings";
|
||||||
|
import { getEquipmentAll } from '@/api/base/equipment'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mixins: [basicAdd],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
urlOptions: {
|
||||||
|
isGetCode: true,
|
||||||
|
codeURL: getCode,
|
||||||
|
createURL: createCheckConfig,
|
||||||
|
updateURL: updateCheckConfig,
|
||||||
|
infoURL: getEqCheck,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
id: undefined,
|
||||||
|
code: undefined,
|
||||||
|
name: undefined,
|
||||||
|
equipmentId: undefined,
|
||||||
|
equipmentCode: undefined
|
||||||
|
},
|
||||||
|
eqList: [],
|
||||||
|
dataRule: {
|
||||||
|
equipmentId: [{ required: true, message: "设备不能为空", trigger: "blur" }],
|
||||||
|
code: [{ required: true, message: "配置编码不能为空", trigger: "blur" }],
|
||||||
|
name: [{ required: true, message: "配置名称不能为空", trigger: "blur" }],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDict()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async getDict() {
|
||||||
|
// 设备列表
|
||||||
|
const res = await getEquipmentAll()
|
||||||
|
this.eqList = res.data
|
||||||
|
},
|
||||||
|
setCode() {
|
||||||
|
const chooseM = this.eqList.filter(item => {
|
||||||
|
return item.id === this.dataForm.equipmentId
|
||||||
|
})
|
||||||
|
this.dataForm.equipmentCode = chooseM[0].code
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -36,14 +36,10 @@
|
|||||||
:dialogVisible="open"
|
:dialogVisible="open"
|
||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="handleConfirm">
|
||||||
<DialogForm
|
<add
|
||||||
v-if="open"
|
ref="add"
|
||||||
ref="form"
|
@refreshDataList="successSubmit" />
|
||||||
v-model="form"
|
|
||||||
:disabled="mode == 'detail'"
|
|
||||||
:has-files="false"
|
|
||||||
:rows="rows" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
<!-- 添加巡检,查看详情 -->
|
<!-- 添加巡检,查看详情 -->
|
||||||
<addOrUpdata
|
<addOrUpdata
|
||||||
@@ -56,12 +52,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import addOrUpdata from './add-or-updata.vue';
|
import addOrUpdata from './add-or-updata.vue';
|
||||||
|
import add from './add.vue'
|
||||||
// import { publicFormatter } from '@/utils/dict';
|
// import { publicFormatter } from '@/utils/dict';
|
||||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EquipmentCheckSetting',
|
name: 'EquipmentCheckSetting',
|
||||||
components: { addOrUpdata },
|
components: { addOrUpdata, add },
|
||||||
mixins: [basicPageMixin],
|
mixins: [basicPageMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -206,6 +203,13 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleConfirm() {
|
||||||
|
this.$refs.add.dataFormSubmit()
|
||||||
|
},
|
||||||
|
successSubmit() {
|
||||||
|
this.cancel()
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||||
this.$set(
|
this.$set(
|
||||||
@@ -230,9 +234,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
cancel() {
|
cancel() {
|
||||||
|
this.$refs.add.formClear()
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.mode = null;
|
this.title = ''
|
||||||
this.reset();
|
// this.reset();
|
||||||
},
|
},
|
||||||
/** 表单重置 */
|
/** 表单重置 */
|
||||||
reset() {
|
reset() {
|
||||||
@@ -257,18 +262,26 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
// this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '添加巡检设置';
|
this.title = '添加巡检设置';
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.add.init();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
// this.reset();
|
||||||
const id = row.id;
|
// const id = row.id;
|
||||||
this.info({ id }).then((response) => {
|
// this.info({ id }).then((response) => {
|
||||||
this.form = response.data;
|
// this.form = response.data;
|
||||||
this.open = true;
|
// this.open = true;
|
||||||
this.title = '修改巡检设置';
|
// this.title = '修改巡检设置';
|
||||||
|
// });
|
||||||
|
this.open = true;
|
||||||
|
this.title = '修改巡检设置';
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.add.init(row.id);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
@@ -298,7 +311,7 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const id = row.id;
|
const id = row.id;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除该巡检记录?')
|
.confirm('是否确认删除配置名为"' + row.name + '"的数据项?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return this.del({ id });
|
return this.del({ id });
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { publicFormatter } from '@/utils/dict';
|
import { publicFormatter } from '@/utils/dict';
|
||||||
import moment from 'moment';
|
// import moment from 'moment';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
|
import { exportMaintainMonitorExcel } from '@/api/equipment/base/maintain/record'
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
@@ -67,7 +67,7 @@ const remainBox = {
|
|||||||
color() {
|
color() {
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
const v = +this.value;
|
const v = +this.value;
|
||||||
return v < 0 ? 'red' : v >= 0 && v < 2 ? 'yellow' : 'green';
|
return v < 0 ? '#FF5454' : v >= 0 && v < 2 ? '#FFD767' : '#37D97F';
|
||||||
}
|
}
|
||||||
return 'unset';
|
return 'unset';
|
||||||
},
|
},
|
||||||
@@ -78,9 +78,10 @@ const remainBox = {
|
|||||||
style={`background: ${
|
style={`background: ${
|
||||||
this.color
|
this.color
|
||||||
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
}; position:absolute; inset: 0; padding: 0 10px; display: flex; align-items: center; color: ${
|
||||||
this.color == 'red' ? '#fff' : 'unset'
|
// this.color == 'red' ? '#fff' : 'unset'
|
||||||
|
'#fff'
|
||||||
}`}>
|
}`}>
|
||||||
{this.injectData[this.injectData.prop] || ''}
|
{ this.injectData[this.injectData.prop]?.toFixed(0) || '' }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -121,30 +122,35 @@ export default {
|
|||||||
// width: 180,
|
// width: 180,
|
||||||
// filter: parseTime(createTime),
|
// filter: parseTime(createTime),
|
||||||
// },
|
// },
|
||||||
{ prop: 'name', label: '保养计划' },
|
{ prop: 'name', label: '保养计划', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'lineName', label: '产线名' },
|
{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'sectionName', label: '工段名' },
|
{ prop: 'sectionName', label: '工段名', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentCode', label: '设备编码' },
|
{ prop: 'equipmentCode', label: '设备编码', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintenancePeriod', label: '保养频率' },
|
{ prop: 'maintenancePeriod', label: '保养频率' },
|
||||||
{
|
{
|
||||||
prop: 'maintainType',
|
prop: 'maintainType',
|
||||||
label: '保养类型',
|
label: '保养类型',
|
||||||
|
showOverflowtooltip: true,
|
||||||
filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'lastMaintainTime',
|
prop: 'lastMaintainTime',
|
||||||
label: '上次保养时间',
|
label: '上次保养时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime },
|
{ prop: 'nextMaintainTime', label: '计划下次保养时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'remainDays',
|
prop: 'remainDays',
|
||||||
label: '距离保养时间(天)',
|
label: '距离保养时间(天)',
|
||||||
subcomponent: remainBox,
|
subcomponent: remainBox,
|
||||||
|
minWidth: 150,
|
||||||
|
// showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn },
|
{ prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn, width: 100 },
|
||||||
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn },
|
{ prop: 'opt2', label: '保养记录', name: '查看详情', subcomponent: btn, width: 100 },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@@ -176,6 +182,7 @@ export default {
|
|||||||
: '',
|
: '',
|
||||||
btnName: '导出',
|
btnName: '导出',
|
||||||
name: 'export',
|
name: 'export',
|
||||||
|
plain: true,
|
||||||
color: 'warning',
|
color: 'warning',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -99,23 +99,24 @@ export default {
|
|||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '添加时间',
|
label: '添加时间',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
width: 180,
|
width: 150,
|
||||||
filter: timeFilter,
|
filter: timeFilter,
|
||||||
},
|
},
|
||||||
{ prop: 'maintainOrderNumber', label: '设备保养单号' },
|
{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 110, showOverflowtooltip: true },
|
||||||
{ prop: 'startTime', label: '开始时间', filter: timeFilter },
|
{ prop: 'startTime', label: '开始时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'endTime', label: '结束时间', filter: timeFilter },
|
{ prop: 'endTime', label: '结束时间', filter: timeFilter, minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintainWorker', label: '保养人员' },
|
{ prop: 'maintainWorker', label: '保养人员', minWidth: 100, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'relatePlan',
|
prop: 'relatePlan',
|
||||||
label: '是否计划保养',
|
label: '是否计划保养',
|
||||||
|
width: 120,
|
||||||
filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
|
filter: (v) => (v != null ? ['', '是', '否'][v] : ''),
|
||||||
},
|
},
|
||||||
{ prop: 'planName', label: '保养计划名称' },
|
{ prop: 'planName', label: '保养计划名称', minWidth: 120, showOverflowtooltip: true },
|
||||||
{ prop: 'maintainDuration', label: '计划保养用时(h)' },
|
{ prop: 'maintainDuration', label: '计划保养用时(h)', minWidth: 130, showOverflowtooltip: true },
|
||||||
{ prop: 'timeUsed', label: '实际保养用时(h)' },
|
{ prop: 'timeUsed', label: '实际保养用时(h)', minWidth: 130 },
|
||||||
{ prop: 'remark', label: '备注' },
|
{ prop: 'remark', label: '备注', minWidth: 100, showOverflowtooltip: true },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@@ -162,6 +163,15 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'separate',
|
type: 'separate',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
||||||
|
? 'button'
|
||||||
|
: '',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
plain: true,
|
||||||
|
color: 'warning',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: this.$auth.hasPermi('equipment:maintain-record:create')
|
type: this.$auth.hasPermi('equipment:maintain-record:create')
|
||||||
? 'button'
|
? 'button'
|
||||||
@@ -171,14 +181,6 @@ export default {
|
|||||||
plain: true,
|
plain: true,
|
||||||
color: 'success',
|
color: 'success',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: this.$auth.hasPermi('equipment:maintain-record:export')
|
|
||||||
? 'button'
|
|
||||||
: '',
|
|
||||||
btnName: '导出',
|
|
||||||
name: 'export',
|
|
||||||
color: 'warning',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
@@ -213,17 +215,29 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
// {
|
||||||
|
// switch: true,
|
||||||
|
// label: '是否计划保养',
|
||||||
|
// prop: 'relatePlan',
|
||||||
|
// bind: {
|
||||||
|
// 'active-value': 1,
|
||||||
|
// 'inactive-value': 2,
|
||||||
|
// },
|
||||||
|
// rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
switch: true,
|
select: true,
|
||||||
|
options: [
|
||||||
|
{ label: '是', value: 1 },
|
||||||
|
{ label: '否', value: 2 }
|
||||||
|
],
|
||||||
label: '是否计划保养',
|
label: '是否计划保养',
|
||||||
prop: 'relatePlan',
|
prop: 'relatePlan',
|
||||||
bind: {
|
bind: {
|
||||||
'active-value': 1,
|
clearable: true, filterable: true
|
||||||
'inactive-value': 2,
|
|
||||||
},
|
},
|
||||||
rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '是否计划保养不能为空', trigger: 'blur' }],
|
||||||
},
|
},
|
||||||
{},
|
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '所属计划',
|
label: '所属计划',
|
||||||
@@ -234,6 +248,11 @@ export default {
|
|||||||
clearable: true,
|
clearable: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: '保养用时',
|
||||||
|
prop: 'timeUsed',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@@ -260,11 +279,7 @@ export default {
|
|||||||
clearable: true,
|
clearable: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{}
|
||||||
input: true,
|
|
||||||
label: '保养用时',
|
|
||||||
prop: 'timeUsed',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -9,166 +9,168 @@
|
|||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="false"
|
:wrapper-closable="disabled"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
custom-class="mes-drawer"
|
||||||
|
size="65%"
|
||||||
|
@closed="$emit('destroy')">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }}
|
{{ disabled ? '查看详情' : !dataForm.maintenanceStatus ? '修改' : '完成' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<el-form
|
<div class="drawer-body flex">
|
||||||
ref="form"
|
<div class="drawer-body__content">
|
||||||
:model="dataForm"
|
<el-form
|
||||||
label-width="100px"
|
ref="form"
|
||||||
label-position="top"
|
:model="dataForm"
|
||||||
v-loading="formLoading">
|
label-width="100px"
|
||||||
<el-row :gutter="20">
|
label-position="top"
|
||||||
<el-col :span="8">
|
v-loading="formLoading">
|
||||||
<el-form-item label="维修单号" prop="repairOrderNumber">
|
<el-row :gutter="20">
|
||||||
<span>{{ dataForm.repairOrderNumber }}</span>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="维修单号" prop="repairOrderNumber">
|
||||||
</el-col>
|
<span>{{ dataForm.repairOrderNumber }}</span>
|
||||||
<el-col :span="8">
|
</el-form-item>
|
||||||
<el-form-item label="设备名称" prop="equipmentName">
|
</el-col>
|
||||||
<span>{{ dataForm.equipmentName }}</span>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="设备名称" prop="equipmentName">
|
||||||
</el-col>
|
<span>{{ dataForm.equipmentName }}</span>
|
||||||
<el-col :span="8">
|
</el-form-item>
|
||||||
<el-form-item label="维修工" prop="repairman">
|
</el-col>
|
||||||
<span>{{ dataForm.repairman }}</span>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="维修工" prop="repairman">
|
||||||
</el-col>
|
<span>{{ dataForm.repairman }}</span>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
<el-row :gutter="20">
|
</el-col>
|
||||||
<el-col :span="8">
|
</el-row>
|
||||||
<el-form-item label="故障发生时间" prop="faultTime">
|
<el-row :gutter="20">
|
||||||
<span>{{ parseTime(dataForm.faultTime) }}</span>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="故障发生时间" prop="faultTime">
|
||||||
</el-col>
|
<span>{{ parseTime(dataForm.faultTime) }}</span>
|
||||||
<el-col :span="8">
|
</el-form-item>
|
||||||
<el-form-item label="故障级别" prop="faultLevel">
|
</el-col>
|
||||||
<span>{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}</span>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="故障级别" prop="faultLevel">
|
||||||
</el-col>
|
<span>{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}</span>
|
||||||
<el-col :span="8">
|
</el-form-item>
|
||||||
<el-form-item label="联系方式" prop="repairmanPhone">
|
</el-col>
|
||||||
<span>{{ dataForm.repairmanPhone }}</span>
|
<el-col :span="8">
|
||||||
</el-form-item>
|
<el-form-item label="联系方式" prop="repairmanPhone">
|
||||||
</el-col>
|
<span>{{ dataForm.repairmanPhone }}</span>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
</el-col>
|
||||||
{{ '可编辑信息' }}
|
</el-row>
|
||||||
</small-title>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item
|
|
||||||
label="维修开始时间"
|
|
||||||
prop="maintenanceStartTime"
|
|
||||||
:rules="[{ required: true, message: '维修开始时间不能为空', trigger: 'blur' }]">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="dataForm.maintenanceStartTime"
|
|
||||||
type="datetime"
|
|
||||||
:disabled="disabled"
|
|
||||||
placeholder="请选择维修开始时间"
|
|
||||||
value-format="timestamp" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-divider style="margin-top: -10px" />
|
||||||
<el-form-item
|
|
||||||
label="维修结束时间"
|
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||||
prop="maintenanceFinishTime"
|
{{ '设备维修信息' }}
|
||||||
:rules="[{ required: true, message: '维修结束时间不能为空', trigger: 'blur' }]">
|
</small-title>
|
||||||
<el-date-picker
|
<el-row :gutter="20">
|
||||||
v-model="dataForm.maintenanceFinishTime"
|
<el-col :span="6">
|
||||||
type="datetime"
|
<el-form-item
|
||||||
:disabled="disabled"
|
label="维修开始时间"
|
||||||
placeholder="请选择维修开始时间"
|
prop="maintenanceStartTime"
|
||||||
value-format="timestamp" />
|
:rules="[{ required: true, message: '维修开始时间不能为空', trigger: 'blur' }]">
|
||||||
</el-form-item>
|
<el-date-picker
|
||||||
</el-col>
|
v-model="dataForm.maintenanceStartTime"
|
||||||
|
type="datetime"
|
||||||
|
:disabled="disabled"
|
||||||
|
placeholder="请选择维修开始时间"
|
||||||
|
value-format="timestamp" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item
|
||||||
|
label="维修结束时间"
|
||||||
|
prop="maintenanceFinishTime"
|
||||||
|
:rules="[{ required: true, message: '维修结束时间不能为空', trigger: 'blur' }]">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.maintenanceFinishTime"
|
||||||
|
type="datetime"
|
||||||
|
:disabled="disabled"
|
||||||
|
placeholder="请选择维修开始时间"
|
||||||
|
value-format="timestamp" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item
|
||||||
|
label="维修方式"
|
||||||
|
prop="repairMode"
|
||||||
|
:rules="[{ required: true, message: '维修方式不能为空', trigger: 'blur' }]">
|
||||||
|
<el-select
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="dataForm.repairMode"
|
||||||
|
placeholder="请选择维修方式">
|
||||||
|
<el-option
|
||||||
|
v-for="opt in getDictDatas('repair-mode')"
|
||||||
|
:key="opt.value"
|
||||||
|
:label="opt.label"
|
||||||
|
:value="opt.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="故障类型" prop="faultType">
|
||||||
|
<el-select
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="dataForm.faultType"
|
||||||
|
placeholder="请选择故障类型">
|
||||||
|
<el-option
|
||||||
|
v-for="opt in getDictDatas('fault-type')"
|
||||||
|
:key="opt.value"
|
||||||
|
:label="opt.label"
|
||||||
|
:value="opt.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-row :gutter="20">
|
||||||
<el-form-item
|
<el-col>
|
||||||
label="维修方式"
|
<el-form-item
|
||||||
prop="repairMode"
|
label="故障明细"
|
||||||
:rules="[{ required: true, message: '维修方式不能为空', trigger: 'blur' }]">
|
prop="faultDetail"
|
||||||
<el-select
|
:rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
|
||||||
:disabled="disabled"
|
<!-- // 富文本 -->
|
||||||
v-model="dataForm.repairMode"
|
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="150"/>
|
||||||
placeholder="请选择维修方式">
|
</el-form-item>
|
||||||
<el-option
|
</el-col>
|
||||||
v-for="opt in getDictDatas('repair-mode')"
|
</el-row>
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="故障类型" prop="faultType">
|
|
||||||
<el-select
|
|
||||||
:disabled="disabled"
|
|
||||||
v-model="dataForm.faultType"
|
|
||||||
placeholder="请选择故障类型">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in getDictDatas('fault-type')"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.value" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item
|
<el-form-item label="维修记录" prop="maintenanceDetail">
|
||||||
label="故障明细"
|
<!-- // 富文本 -->
|
||||||
prop="faultDetail"
|
<editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="150"/>
|
||||||
:rules="[{ required: true, message: '故障明细不能为空', trigger: 'blur' }]">
|
</el-form-item>
|
||||||
<!-- // 富文本 -->
|
</el-col>
|
||||||
<editor v-model="dataForm.faultDetail" :read-only="disabled" :min-height="380"/>
|
</el-row>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="维修记录" prop="maintenanceDetail">
|
<el-form-item label="维修附件" prop="file">
|
||||||
<!-- // 富文本 -->
|
<FileUpload v-model="file" :limit="1" :f-name="fileName" :disabled="disabled" @name="setFileName" />
|
||||||
<editor v-model="dataForm.maintenanceDetail" :read-only="disabled" :min-height="380"/>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form-item label="维修附件" prop="file">
|
<el-form-item label="备注" prop="remark">
|
||||||
<FileUpload v-model="file" :disabled="disabled" />
|
<el-input
|
||||||
</el-form-item>
|
v-model="dataForm.remark"
|
||||||
</el-col>
|
:placeholder="`请输入备注`"
|
||||||
</el-row>
|
:disabled="disabled" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<div v-if="!disabled" class="drawer-body__footer">
|
||||||
<el-col>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
<el-input
|
</div>
|
||||||
v-model="dataForm.remark"
|
</div>
|
||||||
:placeholder="`请输入备注`"
|
|
||||||
:disabled="disabled" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
|
||||||
<el-button style="" @click="goback()">{{ disabled ? '返回' : '取消' }}</el-button>
|
|
||||||
<!-- <el-button v-if="disabled" type="primary" @click="goEdit()">
|
|
||||||
编辑
|
|
||||||
</el-button> -->
|
|
||||||
<el-button v-if="!disabled" type="primary" @click="dataFormSubmit()">确定</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -206,11 +208,15 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
dataForm: {},
|
dataForm: {},
|
||||||
file: ''
|
file: '',
|
||||||
|
fileName: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
setFileName(val) {
|
||||||
|
this.fileName = val
|
||||||
|
},
|
||||||
goback() {
|
goback() {
|
||||||
this.$emit('refreshDataList');
|
this.$emit('refreshDataList');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
@@ -225,12 +231,15 @@ export default {
|
|||||||
resetFields(args) {
|
resetFields(args) {
|
||||||
return this.$refs.form.resetFields(args);
|
return this.$refs.form.resetFields(args);
|
||||||
},
|
},
|
||||||
|
initData() {
|
||||||
|
this.file = ''
|
||||||
|
this.fileName = ''
|
||||||
|
},
|
||||||
init(row, isdetail) {
|
init(row, isdetail) {
|
||||||
// this.initData();
|
this.initData();
|
||||||
this.disabled = isdetail || false;
|
this.disabled = isdetail || false;
|
||||||
this.dataForm.id = row.id || undefined;
|
this.dataForm.id = row.id || undefined;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
console.log('111', this.dataForm, row)
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs['form'].resetFields();
|
this.$refs['form'].resetFields();
|
||||||
@@ -241,6 +250,10 @@ export default {
|
|||||||
this.formLoading = false
|
this.formLoading = false
|
||||||
this.dataForm = response.data;
|
this.dataForm = response.data;
|
||||||
this.dataForm.maintenanceStatus = row.maintenanceStatus || 0
|
this.dataForm.maintenanceStatus = row.maintenanceStatus || 0
|
||||||
|
if (this.dataForm.files.length > 0) {
|
||||||
|
this.file = this.dataForm.files[0].fileUrl
|
||||||
|
this.fileName = this.dataForm.files[0].fileName
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// if (this.urlOptions.isGetCode) {
|
// if (this.urlOptions.isGetCode) {
|
||||||
@@ -261,6 +274,7 @@ export default {
|
|||||||
let arry = []
|
let arry = []
|
||||||
temp.forEach(item => {
|
temp.forEach(item => {
|
||||||
arry.push({
|
arry.push({
|
||||||
|
fileName: this.fileName,
|
||||||
fileType: 2,
|
fileType: 2,
|
||||||
fileUrl: item
|
fileUrl: item
|
||||||
})
|
})
|
||||||
@@ -288,56 +302,39 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.el-date-editor,
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.drawer-body__footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
padding: 18px;
|
|
||||||
}
|
|
||||||
.drawer >>> .el-drawer {
|
.drawer >>> .el-drawer {
|
||||||
border-radius: 8px 0 0 8px;
|
border-radius: 8px 0 0 8px;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-form-item__label {
|
|
||||||
padding: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
.drawer >>> .el-drawer__header {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 32px 32px 24px;
|
padding: 32px 32px 24px;
|
||||||
border-bottom: 1px solid #dcdfe6;
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
.drawer >>> .el-drawer__body {
|
|
||||||
flex: 1;
|
.small-title::before {
|
||||||
height: 1px;
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 4px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 1px;
|
||||||
|
margin-right: 8px;
|
||||||
|
background-color: #0b58ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.drawer-body {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .content {
|
.drawer-body__content {
|
||||||
padding: 30px 24px;
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
/* background: #eee; */
|
||||||
flex-direction: column;
|
padding: 20px 30px;
|
||||||
/* height: 100%; */
|
overflow-y: auto;
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .visual-part {
|
|
||||||
flex: 1 auto;
|
|
||||||
max-height: 76vh;
|
|
||||||
overflow: hidden;
|
|
||||||
overflow-y: scroll;
|
|
||||||
padding-right: 10px; /* 调整滚动条样式 */
|
|
||||||
}
|
|
||||||
|
|
||||||
.drawer >>> .el-form,
|
|
||||||
.drawer >>> .attr-list {
|
|
||||||
padding: 0 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer-body__footer {
|
.drawer-body__footer {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
label="操作"
|
label="操作"
|
||||||
:width="180"
|
:width="120"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
@@ -48,7 +48,8 @@
|
|||||||
<CustomDialogForm
|
<CustomDialogForm
|
||||||
v-if="addOrUpdateVisible"
|
v-if="addOrUpdateVisible"
|
||||||
ref="addOrUpdate"
|
ref="addOrUpdate"
|
||||||
@refreshDataList="getList" />
|
@refreshDataList="getList"
|
||||||
|
@destroy="addOrUpdateVisible = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -69,12 +70,6 @@ export default {
|
|||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
searchBarKeys: ['maintenanceStatus', 'createTime', 'equipmentId'],
|
searchBarKeys: ['maintenanceStatus', 'createTime', 'equipmentId'],
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('equipment:repair:update')
|
|
||||||
? {
|
|
||||||
type: 'detail',
|
|
||||||
btnName: '详情',
|
|
||||||
}
|
|
||||||
: undefined,
|
|
||||||
this.$auth.hasPermi('equipment:repair:finish')
|
this.$auth.hasPermi('equipment:repair:finish')
|
||||||
? {
|
? {
|
||||||
type: 'finish',
|
type: 'finish',
|
||||||
@@ -83,10 +78,16 @@ export default {
|
|||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('equipment:repair:update')
|
this.$auth.hasPermi('equipment:repair:update')
|
||||||
? {
|
? {
|
||||||
type: 'edit',
|
type: 'detail',
|
||||||
btnName: '修改',
|
btnName: '详情',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
|
// this.$auth.hasPermi('equipment:repair:update')
|
||||||
|
// ? {
|
||||||
|
// type: 'edit',
|
||||||
|
// btnName: '修改',
|
||||||
|
// }
|
||||||
|
// : undefined,
|
||||||
this.$auth.hasPermi('equipment:repair:delete')
|
this.$auth.hasPermi('equipment:repair:delete')
|
||||||
? {
|
? {
|
||||||
type: 'delete',
|
type: 'delete',
|
||||||
@@ -99,29 +100,31 @@ export default {
|
|||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '添加时间',
|
label: '添加时间',
|
||||||
fixed: true,
|
fixed: true,
|
||||||
width: 180,
|
width: 150,
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
{ prop: 'repairOrderNumber', label: '设备维修单号' },
|
{ prop: 'repairOrderNumber', label: '设备维修单号', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime },
|
{ prop: 'maintenanceStartTime', label: '开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'maintenanceFinishTime',
|
prop: 'maintenanceFinishTime',
|
||||||
label: '结束时间',
|
label: '结束时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'maintenanceStatus',
|
prop: 'maintenanceStatus',
|
||||||
label: '维修状态',
|
label: '维修状态',
|
||||||
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
|
filter: (v) => (v != null ? ['未完成', '完成', '进行中'][v] : ''),
|
||||||
},
|
},
|
||||||
{ prop: 'maintenanceDuration', label: '维修时长(h)' },
|
{ prop: 'maintenanceDuration', label: '维修时长(h)', width: 110 },
|
||||||
{ prop: 'lineName', label: '产线' },
|
{ prop: 'lineName', label: '产线' },
|
||||||
{ prop: 'sectionName', label: '工段' },
|
{ prop: 'sectionName', label: '工段' },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'maintenanceDetail', label: '维修明细' },
|
{ prop: 'maintenanceDetail', label: '维修明细' },
|
||||||
{ prop: 'repairman', label: '维修工' },
|
{ prop: 'repairman', label: '维修工', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'repairmanPhone', label: '联系方式' },
|
{ prop: 'repairmanPhone', label: '联系方式', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'remark', label: '备注' },
|
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@@ -176,6 +179,7 @@ export default {
|
|||||||
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
|
type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '',
|
||||||
btnName: '导出',
|
btnName: '导出',
|
||||||
name: 'export',
|
name: 'export',
|
||||||
|
plain: true,
|
||||||
color: 'warning',
|
color: 'warning',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请选择产线"
|
placeholder="请选择产线"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
@change="getEquipmentByLineId"
|
@change="getEquipmentByLineId"
|
||||||
v-model="form.productionLineId">
|
v-model="form.productionLineId">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -30,6 +32,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请选择设备"
|
placeholder="请选择设备"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
v-model="form.equipmentId">
|
v-model="form.equipmentId">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in listEq"
|
v-for="item in listEq"
|
||||||
|
|||||||
@@ -80,6 +80,8 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-if="open"
|
v-if="open"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
v-model="queryParams.equipmentId"
|
v-model="queryParams.equipmentId"
|
||||||
placeholder="请选择一个设备">
|
placeholder="请选择一个设备">
|
||||||
<el-option
|
<el-option
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-22 16:50:55
|
* @LastEditTime: 2023-11-28 10:03:20
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">取消</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||||
编辑
|
编辑
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
|
<<<<<<< HEAD
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-23 09:20:12
|
* @LastEditTime: 2023-11-28 10:09:20
|
||||||
|
=======
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @LastEditTime: 2023-11-27 16:37:17
|
||||||
|
>>>>>>> projects/mes-test
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -53,7 +58,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isdetail" class="drawer-body__footer">
|
<div v-if="!isdetail" class="drawer-body__footer">
|
||||||
<el-button style="" @click="goback()">取消</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||||
编辑
|
编辑
|
||||||
@@ -140,7 +145,7 @@ const tableProps = [
|
|||||||
label: '最小值(工艺)',
|
label: '最小值(工艺)',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'manValue',
|
prop: 'maxValue',
|
||||||
label: '最大值(工艺)',
|
label: '最大值(工艺)',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-08 15:30:27
|
* @Date: 2023-11-08 15:30:27
|
||||||
* @LastEditTime: 2023-11-23 14:26:54
|
* @LastEditTime: 2023-11-28 10:11:40
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -84,7 +84,7 @@ export default {
|
|||||||
},
|
},
|
||||||
equipmentId:null,
|
equipmentId:null,
|
||||||
dataRule: {
|
dataRule: {
|
||||||
attrName: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
paramId: [{ required: true, message: '参数名称不能为空', trigger: 'change' }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ export default {
|
|||||||
.then(async () => {
|
.then(async () => {
|
||||||
const { code } = await this.http(
|
const { code } = await this.http(
|
||||||
'/extend/process-flow/copy',
|
'/extend/process-flow/copy',
|
||||||
'post',
|
'get',
|
||||||
{
|
{
|
||||||
id,
|
id,
|
||||||
}
|
}
|
||||||
@@ -333,10 +333,11 @@ export default {
|
|||||||
|
|
||||||
async getList() {
|
async getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
const { code, data } = await this.recv(this.queryParams);
|
// const { code, data } = await this.recv(this.queryParams);
|
||||||
|
const { code, data } = await this.http('/extend/process-flow/listAll', 'get');
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.list = data.list;
|
this.list = data;
|
||||||
this.total = data.total;
|
// this.total = data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default {
|
|||||||
// },
|
// },
|
||||||
props: {
|
props: {
|
||||||
currentSelect: {
|
currentSelect: {
|
||||||
type: String,
|
type: String | Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
list: {
|
list: {
|
||||||
@@ -59,8 +59,16 @@ export default {
|
|||||||
},
|
},
|
||||||
currentSelect: {
|
currentSelect: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
// val: string
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
this.randomKey = Math.random();
|
this.randomKey = Math.random();
|
||||||
|
// 更新选中状态
|
||||||
|
if (val) {
|
||||||
|
this.list__inner.forEach((item) => {
|
||||||
|
if (item.id == val) item.disabled = false;
|
||||||
|
else item.disabled = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row style="border: 1px solid #ccc; display: flex">
|
<el-row v-if="filteredBomList.length" style="border: 1px solid #ccc; display: flex">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
<div class="sl__header" style="background: #f3f4fb; padding: 12px">
|
||||||
@@ -78,6 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<div class="no-data-bg" v-else></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -77,6 +77,17 @@
|
|||||||
:bom-list="bomList"
|
:bom-list="bomList"
|
||||||
:value="selectedBoms"
|
:value="selectedBoms"
|
||||||
@update="selectedBoms = $event" />
|
@update="selectedBoms = $event" />
|
||||||
|
|
||||||
|
<el-row slot="footer">
|
||||||
|
<el-button size="small" @click="cancel">取消</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="submitForm"
|
||||||
|
:loading="btnLoading">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</el-row>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -95,6 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
btnLoading: false,
|
||||||
open: false,
|
open: false,
|
||||||
eqList: [],
|
eqList: [],
|
||||||
bomList: [],
|
bomList: [],
|
||||||
@@ -170,6 +182,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
this.btnLoading = true;
|
||||||
// 现将子组件的修改提交更新至本组件
|
// 现将子组件的修改提交更新至本组件
|
||||||
this.$refs.bomSelector.commit();
|
this.$refs.bomSelector.commit();
|
||||||
// 再提交至后端
|
// 再提交至后端
|
||||||
@@ -187,11 +200,14 @@ export default {
|
|||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.$message.success('操作成功');
|
this.$message.success('操作成功');
|
||||||
this.getList(this.currentDet);
|
this.getList(this.currentDet);
|
||||||
|
this.btnLoading = false;
|
||||||
this.cancel();
|
this.cancel();
|
||||||
} else {
|
} else {
|
||||||
|
this.btnLoading = false;
|
||||||
this.$message.error('操作失败');
|
this.$message.error('操作失败');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
this.btnLoading = false;
|
||||||
this.$message.info('请选择设备');
|
this.$message.info('请选择设备');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -218,34 +234,45 @@ export default {
|
|||||||
this.total = 0;
|
this.total = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.selectedBoms = [];
|
||||||
// 获取设备及bom列表
|
// 获取设备及bom列表
|
||||||
this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
|
this.http('/extend/process-flow-det/getEquipmentDetBySectionId', 'post', {
|
||||||
sectionId,
|
sectionId,
|
||||||
flowDetId: detId,
|
flowDetId: detId,
|
||||||
}).then(({ code, data }) => {
|
})
|
||||||
if (code == 0) {
|
.then(({ code, data }) => {
|
||||||
this.bomList = data.map((eq) => {
|
if (code == 0) {
|
||||||
eq.materialsBom = eq.materialsBom || [];
|
this.bomList = data.map((eq) => {
|
||||||
eq.valuesBom = eq.valuesBom || [];
|
eq.materialsBom = eq.materialsBom || [];
|
||||||
// 设置选中状态
|
eq.valuesBom = eq.valuesBom || [];
|
||||||
eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
|
// 设置选中状态
|
||||||
eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
|
eq.materialsBom.chosen = eq.materialsBomChoseId ?? null;
|
||||||
if (eq.equChose || eq.materialsBom.chosen || eq.valuesBom.chosen) {
|
eq.valuesBom.chosen = eq.valuesBomChoseId ?? null;
|
||||||
this.selectedBoms.push({
|
if (
|
||||||
equipmentId: eq.id,
|
eq.equChose ||
|
||||||
equMaterialBomId: eq.materialsBom.chosen,
|
eq.materialsBom.chosen ||
|
||||||
equValueBomId: eq.valuesBom.chosen,
|
eq.valuesBom.chosen
|
||||||
});
|
) {
|
||||||
}
|
this.selectedBoms.push({
|
||||||
// 设置设备id
|
equipmentId: eq.id,
|
||||||
eq.materialsBom.equipmentId = eq.id;
|
equMaterialBomId: eq.materialsBom.chosen,
|
||||||
eq.valuesBom.equipmentId = eq.id;
|
equValueBomId: eq.valuesBom.chosen,
|
||||||
return eq;
|
});
|
||||||
});
|
}
|
||||||
} else {
|
// 设置设备id
|
||||||
|
eq.materialsBom.equipmentId = eq.id;
|
||||||
|
eq.valuesBom.equipmentId = eq.id;
|
||||||
|
return eq;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.bomList.splice(0);
|
||||||
|
this.selectedBoms = [];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
this.bomList.splice(0);
|
this.bomList.splice(0);
|
||||||
}
|
this.selectedBoms = [];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleAddEquipment() {
|
async handleAddEquipment() {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
class="btn-refresh"
|
class="btn-refresh"
|
||||||
@click="handleUpdateLayout"
|
@click="handleUpdateLayout"
|
||||||
icon="el-icon-refresh">
|
icon="el-icon-refresh">
|
||||||
刷新布局
|
保存布局
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -62,6 +62,16 @@
|
|||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="submitForm">
|
@confirm="submitForm">
|
||||||
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="rows" />
|
||||||
|
<el-row slot="footer">
|
||||||
|
<el-button size="small" @click="cancel">取消</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="submitForm"
|
||||||
|
:loading="btnLoading">
|
||||||
|
确定
|
||||||
|
</el-button>
|
||||||
|
</el-row>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -102,7 +112,9 @@ export default {
|
|||||||
input: true,
|
input: true,
|
||||||
label: '工序名称',
|
label: '工序名称',
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
rules: [{ required: true, message: '工序名称不能为空', trigger: 'blur' }],
|
rules: [
|
||||||
|
{ required: true, message: '工序名称不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -111,7 +123,9 @@ export default {
|
|||||||
label: '工段',
|
label: '工段',
|
||||||
prop: 'sectionId',
|
prop: 'sectionId',
|
||||||
url: '/base/core-workshop-section/listAll',
|
url: '/base/core-workshop-section/listAll',
|
||||||
rules: [{ required: true, message: '工段不能为空', trigger: 'blur' }],
|
rules: [
|
||||||
|
{ required: true, message: '工段不能为空', trigger: 'blur' },
|
||||||
|
],
|
||||||
bind: {
|
bind: {
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
@@ -139,6 +153,7 @@ export default {
|
|||||||
},
|
},
|
||||||
currentDet: null,
|
currentDet: null,
|
||||||
currentNode: null,
|
currentNode: null,
|
||||||
|
btnLoading: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -221,7 +236,7 @@ export default {
|
|||||||
node.attr('container/stroke', '#0b58ff');
|
node.attr('container/stroke', '#0b58ff');
|
||||||
const { detId, detName, detDesc, processId, sectionId, sectionName } =
|
const { detId, detName, detDesc, processId, sectionId, sectionName } =
|
||||||
node.attrs;
|
node.attrs;
|
||||||
console.log('node clicked!', node)
|
console.log('node clicked!', node);
|
||||||
this.currentDet = {};
|
this.currentDet = {};
|
||||||
this.$set(this.currentDet, 'detId', detId?.text);
|
this.$set(this.currentDet, 'detId', detId?.text);
|
||||||
this.$set(this.currentDet, 'sectionId', sectionId?.text);
|
this.$set(this.currentDet, 'sectionId', sectionId?.text);
|
||||||
@@ -354,6 +369,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleEdit() {
|
handleEdit() {
|
||||||
|
console.log('edit: ', this.currentDet);
|
||||||
this.form.name = this.currentDet.detName;
|
this.form.name = this.currentDet.detName;
|
||||||
this.form.sectionId = this.currentDet.sectionId;
|
this.form.sectionId = this.currentDet.sectionId;
|
||||||
this.form.remark = this.currentDet.detDesc;
|
this.form.remark = this.currentDet.detDesc;
|
||||||
@@ -379,6 +395,7 @@ export default {
|
|||||||
if (!valid) {
|
if (!valid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.btnLoading = true;
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
this.updateProcess()
|
this.updateProcess()
|
||||||
@@ -392,9 +409,20 @@ export default {
|
|||||||
sectionName: { text: sectionName },
|
sectionName: { text: sectionName },
|
||||||
detDesc: { text: remark },
|
detDesc: { text: remark },
|
||||||
});
|
});
|
||||||
|
// 修改currentDet
|
||||||
|
this.currentDet = {
|
||||||
|
...this.currentDet,
|
||||||
|
detName: name,
|
||||||
|
sectionId: sectionId,
|
||||||
|
sectionName: sectionName,
|
||||||
|
detDesc: remark,
|
||||||
|
};
|
||||||
|
this.btnLoading = false;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {});
|
.catch((err) => {
|
||||||
|
this.btnLoading = false;
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,11 +440,14 @@ export default {
|
|||||||
.then((node) => {
|
.then((node) => {
|
||||||
if (!node) {
|
if (!node) {
|
||||||
this.$modal.msgError('创建节点失败');
|
this.$modal.msgError('创建节点失败');
|
||||||
|
this.btnLoading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.btnLoading = false;
|
||||||
this.graph.addNode(node);
|
this.graph.addNode(node);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
this.btnLoading = false;
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,12 +21,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20" style="margin-top: 12px;">
|
<el-row :gutter="20" style="margin-top: 12px">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<!-- <InfoItem label="创建人" value="xxse" /> -->
|
<!-- <InfoItem label="创建人" value="xxse" /> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<InfoItem label="创建时间" :value="form.createTime" />
|
<InfoItem label="创建时间" :value="form.createTime" :time-format="true" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<!-- <InfoItem label="更新人" value="xxse" /> -->
|
<!-- <InfoItem label="更新人" value="xxse" /> -->
|
||||||
@@ -39,11 +39,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
const InfoItem = {
|
const InfoItem = {
|
||||||
name: 'InfoItem',
|
name: 'InfoItem',
|
||||||
components: {},
|
components: {},
|
||||||
props: ['label', 'value'],
|
props: ['label', 'value', 'timeFormat'],
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
@@ -52,9 +53,13 @@ const InfoItem = {
|
|||||||
render: function (h) {
|
render: function (h) {
|
||||||
return (
|
return (
|
||||||
<div style="display: flex; align-items: center; font-size: 14px; line-height: 1.5">
|
<div style="display: flex; align-items: center; font-size: 14px; line-height: 1.5">
|
||||||
<span style="width: 100px; text-align: left; font-weight: 700">{this.label}:</span>
|
<span style="width: 100px; text-align: left; font-weight: 700">
|
||||||
|
{this.label}:
|
||||||
|
</span>
|
||||||
<span style="width: 200px; text-align: left; text-overflow: ellipse; white-space: nowrap">
|
<span style="width: 200px; text-align: left; text-overflow: ellipse; white-space: nowrap">
|
||||||
{this.value}
|
{this.timeFormat
|
||||||
|
? moment(this.value).format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
: this.value}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -77,12 +82,12 @@ export default {
|
|||||||
createTime: null,
|
createTime: null,
|
||||||
remark: null,
|
remark: null,
|
||||||
enable: null,
|
enable: null,
|
||||||
code: null
|
code: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
this.getInfo()
|
this.getInfo();
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -93,7 +98,7 @@ export default {
|
|||||||
method,
|
method,
|
||||||
params: method === 'get' ? payload : null,
|
params: method === 'get' ? payload : null,
|
||||||
data: method !== 'get' ? payload : null,
|
data: method !== 'get' ? payload : null,
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
put(payload) {
|
put(payload) {
|
||||||
return this.http(this.updateUrl, 'put', payload);
|
return this.http(this.updateUrl, 'put', payload);
|
||||||
@@ -114,12 +119,12 @@ export default {
|
|||||||
// debugger;
|
// debugger;
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
this.form = {
|
this.form = {
|
||||||
...data
|
...data,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError('工艺信息获取失败')
|
this.$modal.msgError('工艺信息获取失败');
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-22 14:23:40
|
* @LastEditTime: 2023-11-28 10:34:24
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -26,9 +26,10 @@ import { parseTime } from '../../core/mixins/code-filter';
|
|||||||
import {
|
import {
|
||||||
getProcessTraceabilityPage,
|
getProcessTraceabilityPage,
|
||||||
getWorkOrderList,
|
getWorkOrderList,
|
||||||
|
getCoreProduct
|
||||||
// exportEnergyPlcExcel
|
// exportEnergyPlcExcel
|
||||||
} from '@/api/quality/processTraceability';
|
} from '@/api/quality/processTraceability';
|
||||||
|
import { publicFormatter } from '@/utils/dict';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@@ -44,7 +45,8 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '状态'
|
label: '状态',
|
||||||
|
filter: (val) => val == 1 ? '等待' : val == 2 ? '激活' : val == 3 ? '暂停' : val == 4 ? '完成' : '作废',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'startProduceTime',
|
prop: 'startProduceTime',
|
||||||
@@ -61,8 +63,9 @@ const tableProps = [
|
|||||||
label: '生产数量'
|
label: '生产数量'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'planProductUnit',
|
||||||
label: '单位'
|
label: '单位',
|
||||||
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'processFlowName',
|
prop: 'processFlowName',
|
||||||
@@ -113,7 +116,8 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
param: 'orderName'
|
param: 'orderName',
|
||||||
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
@@ -182,17 +186,25 @@ export default {
|
|||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
if (val.type === "processDetail") {
|
if (val.type === "processDetail") {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
this.$router.push({
|
let specificationsData =''
|
||||||
name: 'process-traceability-detail',
|
getCoreProduct(val.data.planProductId).then((res) => {
|
||||||
params: {
|
console.log(res)
|
||||||
id: '1715180991838887938',
|
|
||||||
orderId: val.data.id,
|
this.$router.push({
|
||||||
name: val.data.name,
|
path: 'process-traceability-detail',
|
||||||
productName: val.data.planProductName,
|
query: {
|
||||||
processFlowName: val.data.processFlowName
|
id: val.data.processFlowId,
|
||||||
// equipmentName,
|
orderId: val.data.id,
|
||||||
},
|
name: val.data.name,
|
||||||
});
|
specifications: res.data.specifications,
|
||||||
|
productName: val.data.planProductName,
|
||||||
|
processFlowName: val.data.processFlowName,
|
||||||
|
// planProductId: val.data.planProductId
|
||||||
|
// equipmentName,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
// this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
// this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -117,11 +117,11 @@ export default {
|
|||||||
// },
|
// },
|
||||||
{ prop: 'name', label: '参数名' },
|
{ prop: 'name', label: '参数名' },
|
||||||
{
|
{
|
||||||
prop: 'name', label: '设定范围最小- 最大 / 标准',
|
prop: 'status', label: '设定范围最小- 最大 / 标准',
|
||||||
subcomponent: StatusBtn
|
subcomponent: StatusBtn
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code', label: '最小值',
|
prop: '', label: '最小值',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'minValueSet',
|
prop: 'minValueSet',
|
||||||
@@ -134,7 +134,7 @@ export default {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code', label: '最大值',
|
prop: '', label: '最大值',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
prop: 'maxValueSet',
|
prop: 'maxValueSet',
|
||||||
@@ -184,9 +184,9 @@ export default {
|
|||||||
getDetMaterial({
|
getDetMaterial({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderId: this.$route.params.orderId,
|
orderId: this.$route.query.orderId,
|
||||||
flowDetId: [this.detId],
|
flowDetId: [this.detId],
|
||||||
// orderId: this.$route.params.orderId,
|
// orderId: this.$route.query.orderId,
|
||||||
|
|
||||||
},).then((res) => {
|
},).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@@ -231,25 +231,29 @@ export default {
|
|||||||
getDetMaterial({
|
getDetMaterial({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderId: this.$route.params.orderId,
|
orderId: this.$route.query.orderId,
|
||||||
flowDetId: [this.detId],
|
flowDetId: [this.detId],
|
||||||
// orderId: this.$route.params.orderId,
|
// orderId: this.$route.query.orderId,
|
||||||
|
|
||||||
},).then((res) => {
|
},).then((res) => {
|
||||||
this.materialList = res.data[0].data
|
if (res.data.length != []) {
|
||||||
this.name = res.data[0].name
|
this.materialList = res.data[0].data
|
||||||
|
this.name = res.data[0].name
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getDetValue({
|
getDetValue({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderId: this.$route.params.orderId,
|
orderId: this.$route.query.orderId,
|
||||||
flowDetId: [this.detId],
|
flowDetId: [this.detId],
|
||||||
// orderId: this.$route.params.orderId,
|
// orderId: this.$route.query.orderId,
|
||||||
|
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.valueList = res.data[0].data
|
if (res.data.length != []) {
|
||||||
this.name = res.data[0].name
|
this.valueList = res.data[0].data
|
||||||
|
this.name = res.data[0].name
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -258,12 +262,14 @@ export default {
|
|||||||
getDetMaterial({
|
getDetMaterial({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
orderId: this.$route.params.orderId,
|
orderId: this.$route.query.orderId,
|
||||||
flowDetId: [this.detId],
|
flowDetId: [this.detId],
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.materialList = res.data[0].data
|
if (res.data.length != []) {
|
||||||
this.name = res.data[0].name
|
this.materialList = res.data[0].data
|
||||||
|
this.name = res.data[0].name
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
clearList() {
|
clearList() {
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.$route.params.id)
|
console.log(this.$route.query.id)
|
||||||
this.loadLayout().then(json => {
|
this.loadLayout().then(json => {
|
||||||
this.initGraph(json)
|
this.initGraph(json)
|
||||||
})
|
})
|
||||||
@@ -260,7 +260,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
async loadLayout() {
|
async loadLayout() {
|
||||||
const flowId = this.$route.params.id;
|
const flowId = this.$route.query.id;
|
||||||
console.log(flowId)
|
console.log(flowId)
|
||||||
if (!flowId) return { cells: [] }
|
if (!flowId) return { cells: [] }
|
||||||
const { code, data } = await this.info({ id: flowId });
|
const { code, data } = await this.info({ id: flowId });
|
||||||
@@ -288,12 +288,12 @@ export default {
|
|||||||
async handleUpdateLayout() {
|
async handleUpdateLayout() {
|
||||||
this.layout.content = JSON.stringify(this.graph.toJSON());
|
this.layout.content = JSON.stringify(this.graph.toJSON());
|
||||||
let code, data;
|
let code, data;
|
||||||
console.table([this.layout, this.$route.params.id])
|
console.table([this.layout, this.$route.query.id])
|
||||||
// 手动刷新布局
|
// 手动刷新布局
|
||||||
if (this.layout.id) {
|
if (this.layout.id) {
|
||||||
({ code, data } = await this.http('/extend/process-flow-view/update', 'put', this.layout));
|
({ code, data } = await this.http('/extend/process-flow-view/update', 'put', this.layout));
|
||||||
} else {
|
} else {
|
||||||
this.layout.flowId = this.$route.params.id;
|
this.layout.flowId = this.$route.query.id;
|
||||||
({ code, data } = await this.http('/extend/process-flow-view/create', 'post', this.layout));
|
({ code, data } = await this.http('/extend/process-flow-view/create', 'post', this.layout));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
createProcess() {
|
createProcess() {
|
||||||
// const flowId = this.$route.params.id;
|
// const flowId = this.$route.query.id;
|
||||||
const flowId = this.getFlowId(); // it also works
|
const flowId = this.getFlowId(); // it also works
|
||||||
if (!flowId) {
|
if (!flowId) {
|
||||||
this.$modal.msgError('工艺ID不能为空');
|
this.$modal.msgError('工艺ID不能为空');
|
||||||
|
|||||||
@@ -20,14 +20,13 @@
|
|||||||
<InfoItem label="产品名称" :value="form.productName" />
|
<InfoItem label="产品名称" :value="form.productName" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<InfoItem label="产品规格" />
|
<InfoItem label="产品规格" :value="form.specifications" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const InfoItem = {
|
const InfoItem = {
|
||||||
name: 'InfoItem',
|
name: 'InfoItem',
|
||||||
components: {},
|
components: {},
|
||||||
@@ -62,6 +61,7 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
name: null,
|
name: null,
|
||||||
productName: null,
|
productName: null,
|
||||||
|
specifications:null,
|
||||||
processFlowName: null,
|
processFlowName: null,
|
||||||
// remark: null,
|
// remark: null,
|
||||||
// enable: null,
|
// enable: null,
|
||||||
@@ -70,7 +70,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
|
console.log(this.$route.query)
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -95,12 +96,14 @@ export default {
|
|||||||
// info(payload) {
|
// info(payload) {
|
||||||
// return this.http(this.infoUrl, 'get', payload);
|
// return this.http(this.infoUrl, 'get', payload);
|
||||||
// },
|
// },
|
||||||
async getInfo() {
|
getInfo() {
|
||||||
this.form.name = this.$route.params.name
|
// console.log(this.$route.query.planProductId);
|
||||||
this.form.productName = this.$route.params.productName
|
this.form.name = this.$route.query.name
|
||||||
this.form.processFlowName = this.$route.params.processFlowName
|
this.form.specifications = this.$route.query.specifications
|
||||||
// this.form.name = this.$route.params.name
|
this.form.productName = this.$route.query.productName
|
||||||
// const flowId = this.$route.params.id;
|
this.form.processFlowName = this.$route.query.processFlowName
|
||||||
|
// this.form.name = this.$route.query.name
|
||||||
|
// const flowId = this.$route.query.id;
|
||||||
// console.log(flowId);
|
// console.log(flowId);
|
||||||
// if (!flowId) this.$router.go(-1);
|
// if (!flowId) this.$router.go(-1);
|
||||||
// const { code, data } = await this.info({ id: flowId });
|
// const { code, data } = await this.info({ id: flowId });
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="班组组长" prop="leaderId">
|
<el-form-item label="班组组长" prop="leaderId">
|
||||||
<el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" @change="selectLeader">
|
<el-select v-model="form.leaderId" placeholder="请选择" style="width: 100%;" filterable @change="selectLeader">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workerList"
|
v-for="item in workerList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -290,7 +290,8 @@ export default {
|
|||||||
break;
|
break;
|
||||||
case '2': // 能源
|
case '2': // 能源
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/energy/monitoring/energy-report-search?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
|
// path: '/energy/monitoring/energy-report-search?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
|
||||||
|
path: '/energy/base/energy-quantity-realtime?startTime='+this.chooseObj.startTime+'&endTime='+this.chooseObj.endTime
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -80,13 +80,6 @@
|
|||||||
|
|
||||||
<!-- 表单 -->
|
<!-- 表单 -->
|
||||||
<div class="form-cont">
|
<div class="form-cont">
|
||||||
<el-tabs
|
|
||||||
class="form"
|
|
||||||
v-model="loginForm.loginType"
|
|
||||||
style="float: none">
|
|
||||||
<el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
|
|
||||||
<el-tab-pane label="短信验证码登录" name="sms"></el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
<div style="">
|
<div style="">
|
||||||
<el-form
|
<el-form
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
@@ -106,7 +99,7 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 账号密码登录 -->
|
<!-- 账号密码登录 -->
|
||||||
<div v-if="loginForm.loginType === 'uname'">
|
<div>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="loginForm.username"
|
v-model="loginForm.username"
|
||||||
@@ -139,56 +132,6 @@
|
|||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 短信验证码登录 -->
|
|
||||||
<div v-if="loginForm.loginType === 'sms'">
|
|
||||||
<el-form-item prop="mobile">
|
|
||||||
<el-input
|
|
||||||
v-model="loginForm.mobile"
|
|
||||||
type="text"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="请输入手机号">
|
|
||||||
<!-- <svg-icon
|
|
||||||
slot="prefix"
|
|
||||||
icon-class="phone"
|
|
||||||
class="el-input__icon input-icon" /> -->
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item prop="mobileCode">
|
|
||||||
<el-input
|
|
||||||
v-model="loginForm.mobileCode"
|
|
||||||
type="text"
|
|
||||||
auto-complete="off"
|
|
||||||
placeholder="短信验证码"
|
|
||||||
class="sms-login-mobile-code-prefix"
|
|
||||||
@keyup.enter.native="handleLogin">
|
|
||||||
<!-- <template>
|
|
||||||
<svg-icon
|
|
||||||
slot="prefix"
|
|
||||||
icon-class="password"
|
|
||||||
class="el-input__icon input-icon" />
|
|
||||||
</template> -->
|
|
||||||
<template slot="suffix">
|
|
||||||
<span
|
|
||||||
v-if="mobileCodeTimer <= 0"
|
|
||||||
class="getMobileCode"
|
|
||||||
@click="getSmsCode"
|
|
||||||
style="
|
|
||||||
cursor: pointer;
|
|
||||||
color: #0b58ff;
|
|
||||||
font-size: calc(12 * 0.12vh);
|
|
||||||
line-height: calc(54 * 0.12vh);
|
|
||||||
padding-right: calc(10 * 0.12vh);
|
|
||||||
">
|
|
||||||
获取验证码
|
|
||||||
</span>
|
|
||||||
<span v-if="mobileCodeTimer > 0" class="getMobileCode">
|
|
||||||
{{ mobileCodeTimer }}秒后可重新获取
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 下方的登录按钮 -->
|
<!-- 下方的登录按钮 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
id="button-form-item"
|
id="button-form-item"
|
||||||
@@ -227,13 +170,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 图形验证码 -->
|
|
||||||
<Verify
|
|
||||||
ref="verify"
|
|
||||||
:captcha-type="'blockPuzzle'"
|
|
||||||
:img-size="{ width: '400px', height: '200px' }"
|
|
||||||
@success="handleLogin" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -241,7 +177,7 @@
|
|||||||
import { sendSmsCode, socialAuthRedirect } from '@/api/login';
|
import { sendSmsCode, socialAuthRedirect } from '@/api/login';
|
||||||
import { getTenantIdByName } from '@/api/system/tenant';
|
import { getTenantIdByName } from '@/api/system/tenant';
|
||||||
import { SystemUserSocialTypeEnum } from '@/utils/constants';
|
import { SystemUserSocialTypeEnum } from '@/utils/constants';
|
||||||
import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi';
|
import { getTenantEnable } from '@/utils/ruoyi';
|
||||||
import {
|
import {
|
||||||
getPassword,
|
getPassword,
|
||||||
getRememberMe,
|
getRememberMe,
|
||||||
@@ -269,7 +205,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
codeUrl: '',
|
codeUrl: '',
|
||||||
captchaEnable: true,
|
captchaEnable: false,
|
||||||
tenantEnable: true,
|
tenantEnable: true,
|
||||||
mobileCodeTimer: 0,
|
mobileCodeTimer: 0,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
@@ -347,8 +283,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 验证码开关
|
|
||||||
this.captchaEnable = getCaptchaEnable();
|
|
||||||
// 重定向地址
|
// 重定向地址
|
||||||
this.redirect = this.$route.query.redirect
|
this.redirect = this.$route.query.redirect
|
||||||
? decodeURIComponent(this.$route.query.redirect)
|
? decodeURIComponent(this.$route.query.redirect)
|
||||||
@@ -360,15 +294,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCode() {
|
getCode() {
|
||||||
// 情况一,未开启:则直接登录
|
this.handleLogin({});
|
||||||
if (!this.captchaEnable) {
|
|
||||||
this.handleLogin({});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
|
|
||||||
// 弹出验证码
|
|
||||||
this.$refs.verify.show();
|
|
||||||
},
|
},
|
||||||
getCookie() {
|
getCookie() {
|
||||||
const username = getUsername();
|
const username = getUsername();
|
||||||
@@ -522,4 +448,7 @@ export default {
|
|||||||
top: 22%;
|
top: 22%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.form-cont {
|
||||||
|
padding-top: 40px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -115,12 +115,12 @@ export default {
|
|||||||
vm.$set(
|
vm.$set(
|
||||||
vm.searchBarFormConfig[0],
|
vm.searchBarFormConfig[0],
|
||||||
'defaultSelect',
|
'defaultSelect',
|
||||||
to.params.equipmentCode
|
to.params.equipmentName
|
||||||
);
|
);
|
||||||
vm.$set(
|
vm.$set(
|
||||||
vm.searchBarFormConfig[1],
|
vm.searchBarFormConfig[1],
|
||||||
'defaultSelect',
|
'defaultSelect',
|
||||||
to.params.equipmentName
|
to.params.equipmentCode
|
||||||
);
|
);
|
||||||
vm.handleQuery();
|
vm.handleQuery();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
:data-value="fc.id"
|
:data-value="fc.id"
|
||||||
class="factory-list__item"
|
class="factory-list__item"
|
||||||
:class="{ 'is-current': fc.id == currentFactory?.id }">
|
:class="{ 'is-current': fc.id == currentFactory?.id }">
|
||||||
<span>
|
<span :data-value="fc.id">
|
||||||
{{ fc.label }}
|
{{ fc.label }}
|
||||||
</span>
|
</span>
|
||||||
<svg-icon
|
<svg-icon
|
||||||
@@ -98,9 +98,7 @@
|
|||||||
</base-table>
|
</base-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
|
<el-tab-pane :label="'\u3000柱状图\u3000'" name="graph">
|
||||||
<div
|
<div class="graph" style="height: 100%">
|
||||||
class="graph"
|
|
||||||
style="height: 100%;">
|
|
||||||
<!-- graph -->
|
<!-- graph -->
|
||||||
<Graph
|
<Graph
|
||||||
v-if="list.length"
|
v-if="list.length"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
<el-form-item label="工单名称" prop="workOrderId" v-if='isBind'>
|
||||||
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" @change="getWorkOrderMsg">
|
<el-select v-model="form.workOrderId" placeholder="请选择" style="width: 100%;" filterable @change="getWorkOrderMsg">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in workOrderList"
|
v-for="item in workOrderList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="产品名称" prop="planProductId">
|
<el-form-item label="产品名称" prop="planProductId">
|
||||||
<el-select v-model="form.planProductId" placeholder="请选择" style="width: 100%;">
|
<el-select v-model="form.planProductId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in productList"
|
v-for="item in productList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="客户" prop="customerId">
|
<el-form-item label="客户" prop="customerId">
|
||||||
<el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;" clearable>
|
<el-select v-model="form.customerId" placeholder="请选择" style="width: 100%;" clearable filterable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in customerList"
|
v-for="item in customerList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="关联工艺" prop="processFlowId">
|
<el-form-item label="关联工艺" prop="processFlowId">
|
||||||
<el-select v-model="form.processFlowId" placeholder="请选择" style="width: 100%;" clearable @change="processFlowIdChange">
|
<el-select v-model="form.processFlowId" placeholder="请选择" style="width: 100%;" clearable filterable @change="processFlowIdChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in processFlowList"
|
v-for="item in processFlowList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<method-btn
|
<method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
:width="320"
|
:width="240"
|
||||||
label="操作"
|
label="操作"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleClick"
|
@clickBtn="handleClick"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '订单状态',
|
label: '订单状态',
|
||||||
filter: publicFormatter('order_priority')
|
filter: publicFormatter('order_status')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'startProduceTime',
|
prop: 'startProduceTime',
|
||||||
@@ -88,7 +88,7 @@ const tableProps = [
|
|||||||
minWidth: 160
|
minWidth: 160
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'productLines',
|
prop: 'lineNames',
|
||||||
label: '加工线',
|
label: '加工线',
|
||||||
filter: (val) => val ? val.join(',') : '',
|
filter: (val) => val ? val.join(',') : '',
|
||||||
minWidth: 180
|
minWidth: 180
|
||||||
@@ -154,7 +154,7 @@ export default {
|
|||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
list: [],
|
list: [],
|
||||||
tableH: this.tableHeight(315),
|
tableH: this.tableHeight(305),
|
||||||
total: 0,
|
total: 0,
|
||||||
tableBtn: [
|
tableBtn: [
|
||||||
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
|
this.$auth.hasPermi('base:order-completion-monitoring:orderDet')
|
||||||
@@ -215,7 +215,7 @@ export default {
|
|||||||
components: { MonitoringRingCharts },
|
components: { MonitoringRingCharts },
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.tableH = this.tableHeight(315)
|
this.tableH = this.tableHeight(305)
|
||||||
})
|
})
|
||||||
let start = moment().subtract(30, 'days').format('yyyy-MM-DD')
|
let start = moment().subtract(30, 'days').format('yyyy-MM-DD')
|
||||||
let end = moment().format('yyyy-MM-DD')
|
let end = moment().format('yyyy-MM-DD')
|
||||||
@@ -347,6 +347,9 @@ export default {
|
|||||||
.el-tabs__item {
|
.el-tabs__item {
|
||||||
color: rgba(0, 0, 0, 0.45);
|
color: rgba(0, 0, 0, 0.45);
|
||||||
}
|
}
|
||||||
|
.searchBarBox {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
.boxTitle {
|
.boxTitle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -1,81 +1,53 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<SearchBar
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
:formConfigs="searchBarFormConfig"
|
|
||||||
ref="search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
|
||||||
:table-props="tableProps"
|
@emitFun="handleEmitFun">
|
||||||
:page="queryParams.pageNo"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right" :method-list="tableBtn"
|
||||||
:limit="queryParams.pageSize"
|
@clickBtn="handleTableBtnClick" />
|
||||||
:table-data="list"
|
</base-table>
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:width="120"
|
|
||||||
fixed="right"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||||
v-show="total > 0"
|
@pagination="getList" />
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
<!-- 对话框(添加 / 修改) -->
|
||||||
<base-dialog
|
<base-dialog :dialogTitle="title" :dialogVisible="open" width="40%" @close="cancel" @cancel="cancel"
|
||||||
:dialogTitle="title"
|
@confirm="submitForm">
|
||||||
:dialogVisible="open"
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="[
|
||||||
width="40%"
|
[
|
||||||
@close="cancel"
|
{
|
||||||
@cancel="cancel"
|
select: true,
|
||||||
@confirm="submitForm">
|
label: '检测类型',
|
||||||
<DialogForm
|
prop: 'typeId',
|
||||||
v-if="open"
|
url: '/base/quality-inspection-type/listAll',
|
||||||
ref="form"
|
rules: [{ required: true, message: '检测类型不能为空', trigger: 'blur' }],
|
||||||
v-model="form"
|
bind: {
|
||||||
:rows="[
|
filterable: true,
|
||||||
[
|
},
|
||||||
{
|
},
|
||||||
select: true,
|
{
|
||||||
label: '检测类型',
|
input: true,
|
||||||
prop: 'typeId',
|
label: '检测内容',
|
||||||
url: '/base/quality-inspection-type/listAll',
|
prop: 'content',
|
||||||
rules: [{ required: true, message: '检测类型不能为空', trigger: 'blur' }],
|
rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
|
||||||
bind: {
|
},
|
||||||
filterable: true,
|
],
|
||||||
},
|
|
||||||
},
|
[
|
||||||
],
|
{
|
||||||
[
|
input: true,
|
||||||
{
|
label: '内容编码',
|
||||||
input: true,
|
prop: 'code',
|
||||||
label: '检测内容',
|
url: '/base/quality-inspection-det/getCode',
|
||||||
prop: 'content',
|
},
|
||||||
rules: [{ required: true, message: '检测内容不能为空', trigger: 'blur' }],
|
{ input: true, label: '备注', prop: 'remark' }],
|
||||||
},
|
]" />
|
||||||
],
|
</base-dialog>
|
||||||
[
|
</div>
|
||||||
{
|
|
||||||
input: true,
|
|
||||||
label: '内容编码',
|
|
||||||
prop: 'code',
|
|
||||||
url: '/base/quality-inspection-det/getCode',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
|
||||||
]" />
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,76 +1,52 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<SearchBar
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
:formConfigs="searchBarFormConfig"
|
|
||||||
ref="search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
|
||||||
:table-props="tableProps"
|
@emitFun="handleEmitFun">
|
||||||
:page="queryParams.pageNo"
|
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" :method-list="tableBtn"
|
||||||
:limit="queryParams.pageSize"
|
@clickBtn="handleTableBtnClick" />
|
||||||
:table-data="list"
|
</base-table>
|
||||||
@emitFun="handleEmitFun">
|
|
||||||
<method-btn
|
|
||||||
v-if="tableBtn.length"
|
|
||||||
slot="handleBtn"
|
|
||||||
label="操作"
|
|
||||||
:width="120"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleTableBtnClick" />
|
|
||||||
</base-table>
|
|
||||||
|
|
||||||
<!-- 分页组件 -->
|
<!-- 分页组件 -->
|
||||||
<pagination
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||||
v-show="total > 0"
|
@pagination="getList" />
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 对话框(添加 / 修改) -->
|
<!-- 对话框(添加 / 修改) -->
|
||||||
<base-dialog
|
<base-dialog :dialogTitle="title" :dialogVisible="open" @close="cancel" width="30%" @cancel="cancel"
|
||||||
:dialogTitle="title"
|
@confirm="submitForm">
|
||||||
:dialogVisible="open"
|
<DialogForm v-if="open" ref="form" v-model="form" :rows="[
|
||||||
@close="cancel"
|
[
|
||||||
@cancel="cancel"
|
{
|
||||||
@confirm="submitForm">
|
input: true,
|
||||||
<DialogForm
|
label: '检测类型名称',
|
||||||
v-if="open"
|
prop: 'name',
|
||||||
ref="form"
|
rules: [
|
||||||
v-model="form"
|
{
|
||||||
:rows="[
|
required: true,
|
||||||
[
|
message: '检测类型名称不能为空',
|
||||||
{
|
trigger: 'blur',
|
||||||
input: true,
|
},
|
||||||
label: '检测类型名称',
|
],
|
||||||
prop: 'name',
|
// bind: {
|
||||||
rules: [
|
// disabled: true, // some condition, like detail mode...
|
||||||
{
|
// }
|
||||||
required: true,
|
},
|
||||||
message: '检测类型名称不能为空',
|
],
|
||||||
trigger: 'blur',
|
[
|
||||||
},
|
{
|
||||||
],
|
input: true,
|
||||||
// bind: {
|
label: '检测类型编码',
|
||||||
// disabled: true, // some condition, like detail mode...
|
prop: 'code',
|
||||||
// }
|
url: '/base/quality-inspection-type/getCode',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[{ input: true, label: '备注', prop: 'remark' }],
|
||||||
{
|
]" />
|
||||||
input: true,
|
</base-dialog>
|
||||||
label: '检测类型编码',
|
</div>
|
||||||
prop: 'code',
|
|
||||||
url: '/base/quality-inspection-type/getCode',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[{ input: true, label: '备注', prop: 'remark' }],
|
|
||||||
]" />
|
|
||||||
</base-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-11-06 15:15:30
|
* @Date: 2023-11-06 15:15:30
|
||||||
* @LastEditTime: 2023-11-06 15:36:31
|
* @LastEditTime: 2023-11-24 08:42:18
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="报废类型编码" prop="code">
|
<el-form-item label="报废类型编码" prop="code">
|
||||||
<el-input v-model="dataForm.code" placeholder="请输入报废类型编码" />
|
<el-input v-model="dataForm.code" placeholder="请输入报废类型编码" />
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="描述类型" prop="description">
|
<el-form-item label="描述类型" prop="description">
|
||||||
<el-input v-model="dataForm.description" clearable placeholder="描述类型" />
|
<el-input v-model="dataForm.description" clearable placeholder="描述类型" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<base-table class="base-table__margin" :table-props="productProps" :page="1" :limit="10" :table-data="list">
|
<base-table class="base-table__margin" :table-props="productProps" :page="1" :limit="10" :table-data="list">
|
||||||
</base-table>
|
</base-table>
|
||||||
<div v-for="(item,index) in downProps" :key="index">
|
<div v-for="(item,index) in downProps" :key="index">
|
||||||
<div class="blue-title">工单:{{ list[index].workOrderName }}</div>
|
<div class="blue-title">工单名称:{{ list[index].workOrderName }}</div>
|
||||||
<base-table class="base-table__margin" :table-props="item" :page="1" :limit="10"
|
<base-table class="base-table__margin" :table-props="item" :page="1" :limit="10"
|
||||||
:table-data="downList[index]">
|
:table-data="downList[index]">
|
||||||
</base-table>
|
</base-table>
|
||||||
@@ -214,7 +214,7 @@ export default {
|
|||||||
{
|
{
|
||||||
// width: 160,
|
// width: 160,
|
||||||
prop: 'workOrderName',
|
prop: 'workOrderName',
|
||||||
label: '工单名',
|
label: '工单名称',
|
||||||
},
|
},
|
||||||
...this.dynamicProps,
|
...this.dynamicProps,
|
||||||
{
|
{
|
||||||
@@ -315,7 +315,11 @@ export default {
|
|||||||
data: arrYAxis,
|
data: arrYAxis,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
showBackground: true,
|
showBackground: true,
|
||||||
barWidth:'20',
|
barWidth: '20',
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'top'
|
||||||
|
},
|
||||||
backgroundStyle: {
|
backgroundStyle: {
|
||||||
color: 'rgba(180, 180, 180, 0.2)'
|
color: 'rgba(180, 180, 180, 0.2)'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-10 16:25:02
|
* @LastEditTime: 2023-11-24 10:55:54
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -132,6 +132,9 @@ export default {
|
|||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'separate',
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// type: 'separate',
|
// type: 'separate',
|
||||||
// },
|
// },
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-01 14:55:51
|
* @Date: 2023-08-01 14:55:51
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2023-11-10 16:32:28
|
* @LastEditTime: 2023-11-28 10:51:44
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@@ -26,10 +26,10 @@ import { parseTime } from '../mixins/code-filter';
|
|||||||
import {
|
import {
|
||||||
getProcessTraceabilityPage,
|
getProcessTraceabilityPage,
|
||||||
getWorkOrderList,
|
getWorkOrderList,
|
||||||
|
getCoreProduct
|
||||||
// exportEnergyPlcExcel
|
// exportEnergyPlcExcel
|
||||||
} from '@/api/quality/processTraceability';
|
} from '@/api/quality/processTraceability';
|
||||||
import { publicFormatter } from '@/utils/dict';
|
import { publicFormatter } from '@/utils/dict';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
@@ -46,7 +46,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
filter:publicFormatter('work_order_status')
|
filter: (val) => val == 1 ? '等待' : val == 2 ? '激活' : val == 3 ? '暂停' : val == 4 ? '完成' : '作废',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'startProduceTime',
|
prop: 'startProduceTime',
|
||||||
@@ -63,7 +63,7 @@ const tableProps = [
|
|||||||
label: '生产数量'
|
label: '生产数量'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'unit',
|
prop: 'planProductUnit',
|
||||||
label: '单位',
|
label: '单位',
|
||||||
filter: publicFormatter('unit_dict')
|
filter: publicFormatter('unit_dict')
|
||||||
},
|
},
|
||||||
@@ -73,7 +73,7 @@ const tableProps = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'yield',
|
prop: 'yield',
|
||||||
label: '成品率'
|
label: '合格率'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -116,21 +116,22 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
param: 'orderName'
|
param: 'orderName',
|
||||||
|
filterable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'datePicker',
|
||||||
|
label: '工单开始时间',
|
||||||
|
dateType: 'daterange',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
valueFormat: "yyyy-MM-dd",
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
param: 'timeVal',
|
||||||
|
defaultSelect: [],
|
||||||
|
width: 250
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// type: 'datePicker',
|
|
||||||
// label: '时间段',
|
|
||||||
// dateType: 'daterange',
|
|
||||||
// format: 'yyyy-MM-dd',
|
|
||||||
// valueFormat: "yyyy-MM-dd",
|
|
||||||
// rangeSeparator: '-',
|
|
||||||
// startPlaceholder: '开始时间',
|
|
||||||
// endPlaceholder: '结束时间',
|
|
||||||
// param: 'timeVal',
|
|
||||||
// defaultSelect: [],
|
|
||||||
// width: 250
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
btnName: '搜索',
|
btnName: '搜索',
|
||||||
@@ -185,17 +186,25 @@ export default {
|
|||||||
handleClick(val) {
|
handleClick(val) {
|
||||||
if (val.type === "processDetail") {
|
if (val.type === "processDetail") {
|
||||||
console.log(val);
|
console.log(val);
|
||||||
this.$router.push({
|
let specificationsData =''
|
||||||
name: 'process-traceability-detail',
|
getCoreProduct(val.data.planProductId).then((res) => {
|
||||||
params: {
|
console.log(res)
|
||||||
id: '1715180991838887938',
|
|
||||||
orderId: val.data.id,
|
this.$router.push({
|
||||||
name: val.data.name,
|
path: 'process-traceability-detail',
|
||||||
productName: val.data.planProductName,
|
query: {
|
||||||
processFlowName: val.data.processFlowName
|
id: val.data.processFlowId,
|
||||||
// equipmentName,
|
orderId: val.data.id,
|
||||||
},
|
name: val.data.name,
|
||||||
});
|
specifications: res.data.specifications,
|
||||||
|
productName: val.data.planProductName,
|
||||||
|
processFlowName: val.data.processFlowName,
|
||||||
|
// planProductId: val.data.planProductId
|
||||||
|
// equipmentName,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
// this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
// this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -241,13 +250,13 @@ export default {
|
|||||||
if (val.btnName === 'search') {
|
if (val.btnName === 'search') {
|
||||||
this.listQuery.orderName = val.orderName ? val.orderName :undefined
|
this.listQuery.orderName = val.orderName ? val.orderName :undefined
|
||||||
// this.queryParams.status = val.status
|
// this.queryParams.status = val.status
|
||||||
// if (val.timeVal && val.timeVal.length != 0 ) {
|
if (val.timeVal && val.timeVal.length != 0 ) {
|
||||||
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
|
this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
|
||||||
// this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
|
this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
|
||||||
// } else {
|
} else {
|
||||||
// this.listQuery.startTime = undefined
|
this.listQuery.startTime = undefined
|
||||||
// this.listQuery.endTime = undefined
|
this.listQuery.endTime = undefined
|
||||||
// }
|
}
|
||||||
this.getList()
|
this.getList()
|
||||||
} else {
|
} else {
|
||||||
// this.handleExport()
|
// this.handleExport()
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user