Compare commits

..

15 Commits

51 changed files with 1825 additions and 299 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2023-12-13 16:52:10 # @LastEditTime: 2023-12-15 16:28:20
# @LastEditors: zhp # @LastEditors: zhp
# @Description: # @Description:
### ###
@ -13,7 +13,7 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
# VUE_APP_BASE_API = 'http://100.64.0.26:48082' # VUE_APP_BASE_API = 'http://100.64.0.26:48082'
# 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:48082' # VUE_APP_BASE_API = 'http://192.168.1.49:48082'
@ -21,6 +21,7 @@ VUE_APP_TITLE = MES系统
# 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'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082' VUE_APP_JIMU_API = 'http://192.168.0.33:48082'

View File

@ -15,7 +15,7 @@ VUE_APP_TITLE = MES系统
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://10.70.2.2:8080' VUE_APP_JIMU_API = 'http://10.70.2.22:8080'
# 根据服务器或域名修改 # 根据服务器或域名修改

View File

@ -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-11-15 15:56:14 * @LastEditTime: 2023-12-14 10:57:24
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
*/ */
@ -65,4 +65,31 @@ export function getHotMaterialList(query) {
method: 'get', method: 'get',
params: query params: query
}) })
}
// 创建原料质量检测条目
export function createHotMaterialCheck(data) {
return request({
url: '/base/core-hot-material-check/create',
method: 'post',
data: data
})
}
// 更新原料质量检测条目
export function updateHotMaterialCheck(data) {
return request({
url: '/base/core-hot-material-check/update',
method: 'put',
data: data
})
}
// 获得质量检测条目列表
export function getHotCheckList(query) {
return request({
url: '/base/core-hot-material-check/listByMaterial',
method: 'get',
params: query
})
} }

View File

@ -2,7 +2,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:38:12 * @Date: 2023-11-06 15:38:12
* @LastEditTime: 2023-12-08 16:08:35 * @LastEditTime: 2023-12-15 15:29:16
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -99,3 +99,27 @@ export function getMaterialCheckList(query) {
params: query params: query
}) })
} }
export function createQualityHotMaterialDet(query){
return request({
url: '/base/quality-hot-material-det/create',
method: 'post',
data: query
})
}
export function updateQualityHotMaterialDet(query){
return request({
url: '/base/quality-hot-material-det/listbyfilter',
method: 'put',
data: query
})
}
export function getQualityHotMaterialDetList(query){
return request({
url: '/base/quality-hot-material-det/listbyfilter',
method: 'get',
params: query
})
}

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2023-12-04 14:10:37 * @Date: 2023-12-04 14:10:37
* @LastEditTime: 2023-12-13 16:03:46 * @LastEditTime: 2023-12-14 10:06:03
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -19,7 +19,7 @@ export function createQualityInspectionBoxBtn(data) {
// 更新安灯按钮16键对应 // 更新安灯按钮16键对应
export function updateQualityInspectionBoxBtn(data) { export function updateQualityInspectionBoxBtn(data) {
return request({ return request({
url: '/base/quality-inspection-box-btn/update', url: '/base/quality-inspection-box-btn/updateBatch',
method: 'put', method: 'put',
data: data data: data
}) })
@ -44,7 +44,7 @@ export function getQualityInspectionBoxBtn(id) {
// 获得安灯按钮16键对应分页 // 获得安灯按钮16键对应分页
export function getQualityInspectionBoxBtnPage(query) { export function getQualityInspectionBoxBtnPage(query) {
return request({ return request({
url: '/base/quality-inspection-box-btn/page', url: '/base/quality-inspection-box-btn/listGroupByLineSection',
method: 'get', method: 'get',
params: query params: query
}) })

61
src/api/report/glass.js Normal file
View File

@ -0,0 +1,61 @@
/*
* @Author: Do not edit
* @Date: 2023-12-08 10:26:48
* @LastEditTime: 2023-12-13 17:16:00
* @LastEditors: DY
* @Description:
*/
import request from '@/utils/request'
// 创建原片自动报
export function createGlass(data) {
return request({
url: '/base/report-auto-original-glass/create',
method: 'post',
data: data
})
}
// 批量更新原片自动报
export function updateGlass(data) {
return request({
url: '/base/report-auto-original-glass/updatePlus',
method: 'put',
data: data
})
}
// 更新原片自动报
export function updateGlassRemark(data) {
return request({
url: '/base/report-auto-original-glass/update',
method: 'put',
data: data
})
}
// 获得原片自动报
export function getGlass(id) {
return request({
url: '/base/report-auto-original-glass/get?id=' + id,
method: 'get'
})
}
// 获得原片分页
export function getGlassPage(query) {
return request({
url: '/base/report-auto-original-glass/listPlus',
method: 'get',
params: query
})
}
// 导出原片自动报 Excel
export function exportGlasscExcel(query) {
return request({
url: '/base/report-auto-original-glass/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}

View File

@ -1,7 +1,7 @@
/* /*
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:49:02 * @Date: 2023-12-12 13:49:02
* @LastEditTime: 2023-12-13 15:52:11 * @LastEditTime: 2023-12-14 14:21:43
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
*/ */
@ -39,3 +39,19 @@ export function getAutoDeliveDataList(query) {
data: query, data: query,
}) })
} }
export function updateAutoDeliveDataList(query) {
return request({
url: '/base/report-auto-delive/update',
method: 'put',
data: query,
})
}
export function updateSumAutoDeliveDataList(query) {
return request({
url: '/base/report-auto-delive/updatePlus',
method: 'put',
data: query,
})
}

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702606455297" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1590" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M614.4 59.136l238.592 137.728a204.8 204.8 0 0 1 102.4 177.3568v275.5584a204.8 204.8 0 0 1-102.4 177.3568L614.4 964.864a204.8 204.8 0 0 1-204.8 0l-238.592-137.728a204.8 204.8 0 0 1-102.4-177.3568V374.2208a204.8 204.8 0 0 1 102.4-177.3568L409.6 59.136a204.8 204.8 0 0 1 204.8 0z" fill="#EE1609" p-id="1591"></path><path d="M471.04 261.9904v315.392a40.96 40.96 0 1 0 81.92 0v-315.392a40.96 40.96 0 1 0-81.92 0z" fill="#FFFFFF" p-id="1592"></path><path d="M512 706.56m-51.2 0a51.2 51.2 0 1 0 102.4 0 51.2 51.2 0 1 0-102.4 0Z" fill="#FFFFFF" p-id="1593"></path></svg>

After

Width:  |  Height:  |  Size: 895 B

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1702606467176" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1824" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M622.812817 29.238717l258.222014 146.7694A217.658893 217.658893 0 0 1 991.847648 365.004111v293.666761c0 77.991238-42.226593 150.032365-110.812817 188.995994l-258.222014 146.7694a224.568699 224.568699 0 0 1-221.625634 0l-258.222014-146.7694A217.658893 217.658893 0 0 1 32.152352 658.670872v-293.666761c0-77.991238 42.226593-150.032365 110.812817-188.995994L401.187183 29.238717a224.568699 224.568699 0 0 1 221.625634 0z" fill="#4AA468" p-id="1825"></path><path d="M448.852049 592.899754l-124.120591-140.883269a37.108218 37.108218 0 0 0-56.877941 1.087654 51.631607 51.631607 0 0 0-0.447858 65.067342l151.567877 172.105356c15.355125 17.466454 39.987304 18.042272 55.982226 1.407553l279.39929-290.403797a50.863851 50.863851 0 0 0 12.667978-44.529861 44.84976 44.84976 0 0 0-27.511265-34.67699 36.980259 36.980259 0 0 0-39.859345 10.17277l-250.800371 260.653242z" fill="#FFFFFF" p-id="1826"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -15,6 +15,7 @@
:headers="headers" :headers="headers"
:file-list="fileList" :file-list="fileList"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
:disabled="disabled"
:class="{hide: this.fileList.length >= this.limit}" :class="{hide: this.fileList.length >= this.limit}"
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
@ -44,6 +45,7 @@
<script> <script>
import { getAccessToken } from "@/utils/auth"; import { getAccessToken } from "@/utils/auth";
import { flatten } from 'min-dash';
export default { export default {
props: { props: {
@ -67,6 +69,10 @@ export default {
isShowTip: { isShowTip: {
type: Boolean, type: Boolean,
default: true default: true
},
disabled: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -122,14 +128,16 @@ export default {
// //
handleUploadSuccess(res) { handleUploadSuccess(res) {
// edit by // edit by
this.uploadList.push({ name: res.data, url: res.data }); if (res.code !== 500) {
if (this.uploadList.length === this.number) { this.uploadList.push({ name: res.data, url: res.data });
this.fileList = this.fileList.concat(this.uploadList); if (this.uploadList.length === this.number) {
this.uploadList = []; this.fileList = this.fileList.concat(this.uploadList);
this.number = 0; this.uploadList = [];
this.$emit("input", this.listToString(this.fileList)); this.number = 0;
this.$modal.closeLoading(); this.$emit("input", this.listToString(this.fileList));
}
} }
this.$modal.closeLoading();
}, },
// loading // loading
handleBeforeUpload(file) { handleBeforeUpload(file) {

View File

@ -102,6 +102,7 @@ export const DICT_TYPE = {
ORDER_ORIGIN: 'order_Origin', ORDER_ORIGIN: 'order_Origin',
ORDER_PRIORITY: 'order_priority', ORDER_PRIORITY: 'order_priority',
PACK_SPEC: 'pack_spec', PACK_SPEC: 'pack_spec',
WORK_ORDER_STATUS: 'work_order_status',
// ============== EQUIPMENT - 设备模块 ============= // ============== EQUIPMENT - 设备模块 =============
MAINTAIN_TYPE: 'maintain_type', MAINTAIN_TYPE: 'maintain_type',

View File

@ -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:27:50 * @LastEditTime: 2023-12-12 16:04:44
* @Description: * @Description:
--> -->
<template> <template>
@ -15,25 +15,26 @@
<el-row :gutter="20"> <el-row :gutter="20">
<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" clearable placeholder="请输入客户编号" /> <el-input v-model="dataForm.code" :disabled="isdetail" clearable placeholder="请输入客户编号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="客户名称" prop="name"> <el-form-item label="客户名称" prop="name">
<el-input v-model="dataForm.name" clearable placeholder="请输入客户名称" /> <el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入客户名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系人" prop="contact"> <el-form-item label="联系人" prop="contact">
<el-input v-model="dataForm.contact" clearable placeholder="请输入联系人" /> <el-input v-model="dataForm.contact" :disabled="isdetail" clearable placeholder="请输入联系人" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="联系电话" prop="telephone"> <el-form-item label="联系电话" prop="telephone">
<el-input <el-input
v-model="dataForm.telephone" v-model="dataForm.telephone"
:disabled="isdetail"
maxlength="11" maxlength="11"
placeholder="请输入联系电话" /> placeholder="请输入联系电话" />
</el-form-item> </el-form-item>
@ -42,22 +43,34 @@
<el-form-item label="地址" prop="address"> <el-form-item label="地址" prop="address">
<el-input <el-input
v-model="dataForm.address" v-model="dataForm.address"
:disabled="isdetail"
placeholder="请输入地址" /> placeholder="请输入地址" />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
v-model="dataForm.remark" v-model="dataForm.remark"
:disabled="isdetail"
placeholder="请输入备注" /> placeholder="请输入备注" />
</el-form-item> </el-form-item>
<el-form-item label="特殊要求" prop="specialRequirements">
<el-input
type="textarea"
v-model="dataForm.specialRequirements"
:disabled="isdetail"
placeholder="请输入备注" />
<imageUpload v-model="files" :disabled="isdetail" :limit="5"/>
</el-form-item>
</el-form> </el-form>
</template> </template>
<script> <script>
import basicAdd from '../../core/mixins/basic-add'; import basicAdd from '../../core/mixins/basic-add';
import { createCustomer, updateCustomer, getCustomer, getCode } from "@/api/base/coreCustomer"; import { createCustomer, updateCustomer, getCustomer, getCode } from "@/api/base/coreCustomer";
import ImageUpload from '@/components/ImageUpload';
export default { export default {
mixins: [basicAdd], mixins: [basicAdd],
components: { ImageUpload },
data() { data() {
return { return {
urlOptions: { urlOptions: {
@ -67,6 +80,8 @@ export default {
updateURL: updateCustomer, updateURL: updateCustomer,
infoURL: getCustomer infoURL: getCustomer
}, },
files: [],
isdetail: false,
dataForm: { dataForm: {
id: undefined, id: undefined,
code: undefined, code: undefined,
@ -74,7 +89,9 @@ export default {
telephone: undefined, telephone: undefined,
contact: undefined, contact: undefined,
address: undefined, address: undefined,
remark: undefined remark: undefined,
specialRequirements: undefined,
files: []
}, },
dataRule: { dataRule: {
code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }], code: [{ required: true, message: "客户编号不能为空", trigger: "blur" }],
@ -100,6 +117,66 @@ export default {
}; };
}, },
mounted() {}, mounted() {},
methods: {} methods: {
init(id, isdetail) {
this.dataForm.id = id || "";
this.isdetail = isdetail || false;
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
if (this.setData) {
this.setDataForm()
}
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
//
dataFormSubmit() {
console.log('122', this.files)
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.dataForm.files = []
if (this.files.length > 0) {
this.files.forEach(item => {
const temp = {
fileType: 1,
fileUrl: item
}
this.dataForm.files.push(temp)
})
}
//
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.$emit("refreshDataList");
});
});
},
}
}; };
</script> </script>

View File

@ -88,13 +88,19 @@ export default {
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:core-customer:detail`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`base:core-customer:update`) this.$auth.hasPermi(`base:core-customer:update`)
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi(`base:core-customer:delete`) this.$auth.hasPermi(`base:core-customer:delete`)
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -171,6 +177,13 @@ export default {
console.log(val); console.log(val);
} }
}, },
otherMethods(val) {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "详情";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, true);
});
}
}, },
}; };
</script> </script>

View File

@ -0,0 +1,65 @@
<!--
* @Author: zwq
* @Date: 2023-08-01 15:27:31
* @LastEditors: zwq
* @LastEditTime: 2023-08-01 16:25:54
* @Description:
-->
<template>
<div :class="[className, { 'p-0': noPadding }]">
<slot />
</div>
</template>
<script>
export default {
props: {
size: {
// : xl lg md sm
type: String,
default: 'de',
validator: function (val) {
return ['xl', 'lg', 'de', 'md', 'sm'].indexOf(val) !== -1;
},
},
noPadding: {
type: Boolean,
default: false,
},
},
computed: {
className: function () {
return `${this.size}-title`;
},
},
};
</script>
<style lang="scss" scoped>
$pxls: (xl, 28px) (lg, 24px) (de, 20px) (md, 18px) (sm, 16px);
$mgr: 8px;
@each $size, $height in $pxls {
.#{$size}-title {
font-size: 18px;
line-height: $height;
color: #000;
font-weight: 500;
font-family: '微软雅黑', 'Microsoft YaHei', Arial, Helvetica, sans-serif;
&::before {
content: '';
display: inline-block;
vertical-align: top;
width: 4px;
height: $height + 2px;
border-radius: 1px;
margin-right: $mgr;
background-color: #0b58ff;
}
}
}
.p-0 {
padding: 0;
}
</style>

View File

@ -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-27 20:12:00 * @LastEditTime: 2023-12-14 13:52:42
* @Description: * @Description:
--> -->
<template> <template>
@ -15,19 +15,19 @@
<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">
<el-input v-model="dataForm.name" clearable placeholder="请输入原料名称" /> <el-input v-model="dataForm.name" :disabled="isdetail" clearable placeholder="请输入原料名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<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" clearable placeholder="请输入原料编号" /> <el-input v-model="dataForm.code" :disabled="isdetail" clearable placeholder="请输入原料编号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="每日消耗量" prop="dailyCost"> <el-form-item label="每日消耗量" prop="dailyCost">
<el-input-number v-model="dataForm.dailyCost" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" /> <el-input-number v-model="dataForm.dailyCost" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="请输入每日消耗量" style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -35,6 +35,7 @@
<el-select <el-select
v-model="dataForm.unit" v-model="dataForm.unit"
filterable filterable
:disabled="isdetail"
style="width: 100%" style="width: 100%"
placeholder="请选择单位"> placeholder="请选择单位">
<el-option <el-option
@ -47,17 +48,58 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" clearable placeholder="请输入备注" /> <el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" />
</el-form-item> </el-form-item>
<small-title
:size="'sm'"
style="margin: 16px 0; padding-left: 8px; font-size: 14px"
:no-padding="true">
质量信息
</small-title>
<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>
<el-row :gutter="20" v-for="(item, index) in test" :key="index">
<el-col :span="9">
<el-form-item label="成分" label-width="50px" prop="name1">
<el-input v-model="item.name" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="请输入成分" style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="15">
<el-form-item label="标准含量" prop="unit1">
<el-row :gutter="5">
<el-col :span="1">
<el-tooltip content="如果标准含量不是一个范围,而是一个值,在最大值、最小值中填入相同数字即可。" placement="top">
<span style="margin-left: -15px"><i class="el-icon-question"></i></span>
</el-tooltip>
</el-col>
<el-col :span="11">
<el-input-number v-model="item.minValue" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="最小值" style="width: 100%" />
</el-col>
<el-col :span="11">
<el-input-number v-model="item.maxValue" :disabled="isdetail" :min="0" controls-position="right" clearable placeholder="最大值" style="width: 100%" />
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
</template> </template>
<script> <script>
import basicAdd from '../../core/mixins/basic-add'; import basicAdd from '../../core/mixins/basic-add';
import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode } from "@/api/base/coreHotMaterial"; import { createHotMaterial, updateHotMaterial, getHotMaterial, getCode, createHotMaterialCheck, updateHotMaterialCheck, getHotCheckList } from "@/api/base/coreHotMaterial";
import { getDictDatas} from "@/utils/dict"; import { getDictDatas} from "@/utils/dict";
import SmallTitle from './SmallTitle';
export default { export default {
components: { SmallTitle },
mixins: [basicAdd], mixins: [basicAdd],
data() { data() {
return { return {
@ -76,8 +118,10 @@ export default {
dailyCost: undefined, dailyCost: undefined,
remark: undefined remark: undefined
}, },
test: [],
departmentlList: [], departmentlList: [],
menuOptions: [], menuOptions: [],
isdetail: 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" }]
@ -85,6 +129,100 @@ export default {
}; };
}, },
mounted() {}, mounted() {},
methods: {} methods: {
init(id, isdetail) {
this.test = []
this.dataForm.id = id || "";
this.isdetail = isdetail || false;
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data;
});
getHotCheckList({
materialId: this.dataForm.id
}).then(res => {
this.test = res.data
})
} else {
this.test = [
{
name: null,
minValue: undefined,
maxValue: undefined
}
]
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
//
if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => {
if (this.test.length > 1 || this.test[0].name) {
this.test.forEach(check => {
check.hotMaterialId = this.dataForm.id
if (check.id) {
updateHotMaterialCheck(check).then(res => {
console.log(res)
})
} else {
createHotMaterialCheck(check).then(res1 => {
console.log(res1)
})
}
})
}
this.$modal.msgSuccess("修改成功");
this.visible = false;
this.$emit("refreshDataList");
});
return;
}
//
this.urlOptions.createURL(this.dataForm).then(response => {
if (this.test.length > 1 || this.test[0].name) {
this.test.forEach(check => {
check.hotMaterialId = response.data
createHotMaterialCheck(check).then(res => {
console.log(res)
})
})
}
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
});
});
},
addNew() {
this.test.push({
name: null,
minValue: undefined,
maxValue: undefined
})
}
}
}; };
</script> </script>
<style scoped>
.action_btn {
float: right;
margin: -40px 15px;
font-size: 14px;
}
.add {
color: #0b58ff;
}
</style>

View File

@ -83,13 +83,19 @@ export default {
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:core-hot-material:update`) this.$auth.hasPermi(`base:core-hot-material-check:detail`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`base:core-hot-material-check:update`)
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi(`base:core-hot-material:delete`) this.$auth.hasPermi(`base:core-hot-material-check:delete`)
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -120,7 +126,7 @@ export default {
type: 'separate', type: 'separate',
}, },
{ {
type: this.$auth.hasPermi('base:core-hot-material:create') ? 'button' : '', type: this.$auth.hasPermi('base:core-hot-material-check:create') ? 'button' : '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
color: 'success', color: 'success',
@ -143,6 +149,14 @@ export default {
// this.dataListLoading = false; // this.dataListLoading = false;
// }); // });
// }, // },
otherMethods(val) {
//
this.addOrUpdateVisible = true;
this.addOrEditTitle = "详情";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, true);
});
},
buttonClick(val) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':

View File

@ -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-27 20:07:09 * @LastEditTime: 2023-12-06 10:36:56
* @Description: * @Description:
--> -->
<template> <template>
@ -91,27 +91,30 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位平方数" prop="area"> <el-form-item label="单位平方数" prop="area">
<el-input-number v-model="dataForm.area" :precision="2" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" /> <el-input-number v-model="dataForm.area" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="规格" prop="specifications"> <el-form-item label="规格" prop="specifications">
<el-input v-model="dataForm.specifications" :disabled="isdetail" clearable placeholder="请输入规格" /> <el-input v-model="dataForm.specifications" :disabled="isdetail" @blur="setArea" @clear="clearArea" clearable placeholder="请输入规格" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="产线生产单位用时(S)" prop="processTime"> <el-form-item label="产线生产单位用时(S)" prop="processTime">
<el-input v-model.number="dataForm.processTime" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" /> <el-input v-model.number="dataForm.processTime" :precision="4" :min="0" type="number" :disabled="isdetail" clearable placeholder="请输入产线生产单位用时" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="备注" prop="remark"> <el-form-item label="重量" prop="weight">
<el-input v-model="dataForm.remark" :disabled="isdetail" clearable placeholder="请输入备注" /> <el-input-number v-model="dataForm.weight" :precision="6" :min="0" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入重量" />
</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" :disabled="isdetail" clearable placeholder="请输入备注" />
</el-form-item>
</el-form> </el-form>
</div> </div>
@ -240,7 +243,8 @@ export default {
specifications: undefined, specifications: undefined,
processTime: 0, processTime: 0,
remark: undefined, remark: undefined,
unit: undefined unit: undefined,
weight: undefined
}, },
productAttrList: [], productAttrList: [],
visible: false, visible: false,
@ -257,6 +261,24 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
clearArea() {
this.$set(this.dataForm, 'area', 0)
this.$set(this.dataForm, 'weight', 0)
},
setArea() {
if (this.dataForm.specifications) {
const height = Number(this.dataForm.specifications.slice(2,4))
const length = Number(this.dataForm.specifications.slice(4,8))
const width = Number(this.dataForm.specifications.slice(8))
// this.dataForm.area = length * width
// this.dataForm.weight = 2.5 * height * length * width
this.$set(this.dataForm, 'area', length * width)
this.$set(this.dataForm, 'weight', 2.5 * height * length * width)
} else {
this.dataForm.area = 0
this.dataForm.weight = 0
}
},
initData() { initData() {
this.productAttrList.splice(0); this.productAttrList.splice(0);
this.listQuery.total = 0; this.listQuery.total = 0;
@ -317,6 +339,10 @@ export default {
// //
this.urlOptions.infoURL(id).then(response => { this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data this.dataForm = response.data
// this.dataForm.area = response.data.area || 0
// this.dataForm.weight = response.data.weight || 0
// this.dataForm.specifications = response.data.specifications || undefined
console.log('11res112', this.dataForm.specifications, this.dataForm.weight, this.dataForm.area)
if (this.dataForm.unit !== undefined) { if (this.dataForm.unit !== undefined) {
this.dataForm.unit = String(this.dataForm.unit) this.dataForm.unit = String(this.dataForm.unit)
} }
@ -339,7 +365,7 @@ export default {
goback() { goback() {
this.$emit('refreshDataList'); this.$emit('refreshDataList');
this.visible = false; this.visible = false;
// this.initData(); this.initData();
}, },
goEdit() { goEdit() {
this.isdetail = false; this.isdetail = false;
@ -370,6 +396,7 @@ export default {
this.urlOptions.createURL(this.dataForm).then(response => { this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.idAttrShow = true this.idAttrShow = true
this.dataForm.id = response.data
// this.visible = false; // this.visible = false;
this.$emit("refreshDataList"); this.$emit("refreshDataList");
}); });

View File

@ -140,12 +140,13 @@ export default {
allocationVisible: false, allocationVisible: false,
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:core-work-order:material`) // this.$auth.hasPermi(`base:core-work-order:material`)
? { // ? {
type: 'material', // type: 'material',
btnName: '原料信息', // btnName: '',
} // showTip: '使'
: undefined, // }
// : undefined,
{ {
type: 'active', type: 'active',
btnName: '激活', btnName: '激活',

View File

@ -268,7 +268,7 @@ export default {
// }) // })
// } else { // } else {
$('.hiprintEpContainer').empty() $('.hiprintEpContainer').empty()
console.log(this.modelData); console.log(this.modelData || {});
hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value) hiprint.PrintElementTypeManager.build('.hiprintEpContainer', provider.value)
$('.hiprint-printTemplate').empty() $('.hiprint-printTemplate').empty()
// const templates = this.$ls.get('KEY_TEMPLATES', {}) // const templates = this.$ls.get('KEY_TEMPLATES', {})

View File

@ -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-27 15:26:12 * @LastEditTime: 2023-12-04 15:10:11
* @Description: * @Description:
--> -->
<template> <template>
@ -377,6 +377,7 @@ export default {
this.urlOptions.createURL(this.dataForm).then(response => { this.urlOptions.createURL(this.dataForm).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.idAttrShow = true this.idAttrShow = true
this.dataForm.id = response.data
this.$emit("refreshDataList"); this.$emit("refreshDataList");
}); });
}); });

View File

@ -106,7 +106,7 @@ export default {
}, },
{ {
type: 'datePicker', type: 'datePicker',
label: '时间', label: '抄表日期',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd', format: 'yyyy-MM-dd',
valueFormat: "timestamp", valueFormat: "timestamp",

View File

@ -118,8 +118,8 @@ export default {
type: '', type: '',
plcParamId: '', plcParamId: '',
limitType: '', limitType: '',
minValue: null, minValue: 0,
maxValue: null maxValue: 0
}, },
objIds: [],// objIds: [],//
isEdit: false, // isEdit: false, //
@ -239,7 +239,8 @@ export default {
return false return false
} }
} }
// this.form.limitType = Number(this.form.limitType) this.form.minValue = this.form.minValue || 0
this.form.maxValue = this.form.maxValue || 0
if (this.isEdit) { if (this.isEdit) {
// //
updateEnergyLimit({...this.form}).then((res) => { updateEnergyLimit({...this.form}).then((res) => {

View File

@ -125,7 +125,7 @@
<script> <script>
import SmallTitle from '../../../base/alarm/Record/SmallTitle.vue'; import SmallTitle from '../../../base/alarm/Record/SmallTitle.vue';
import { createCheckLog, updateCheckLog, getcheckConfigByEqList, getEqCheckLog } from '@/api/equipment/base/inspection/record' import { createCheckLog, updateCheckLog, getcheckConfigByEqList, getEqCheckLog } from '@/api/equipment/base/inspection/record'
import { getEquipmentAll } from '@/api/base/equipment' import { getEquipmentPage } from '@/api/base/equipment'
import Editor from "@/components/Editor"; import Editor from "@/components/Editor";
import { getCheckDetPage } from "@/api/equipment/base/inspection/settings"; import { getCheckDetPage } from "@/api/equipment/base/inspection/settings";
// import FileUpload from "@/components/FileUpload"; // import FileUpload from "@/components/FileUpload";
@ -203,7 +203,7 @@ export default {
} }
}; };
}, },
mounted() { created() {
this.getDict() this.getDict()
}, },
methods: { methods: {
@ -211,8 +211,12 @@ export default {
this.fileName = val this.fileName = val
}, },
async getDict() { async getDict() {
const res = await getEquipmentAll() const res = await getEquipmentPage({
this.eqList = res.data pageNo: 1,
pageSize: 100,
special: false
})
this.eqList = res.data.list
const configres = await getcheckConfigByEqList() const configres = await getcheckConfigByEqList()
this.configList = configres.data this.configList = configres.data
}, },

View File

@ -215,6 +215,7 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
special: false,
maintenanceStatus: null, maintenanceStatus: null,
createTime: null, createTime: null,
equipmentId: null, equipmentId: null,
@ -231,11 +232,15 @@ export default {
}, },
methods: { methods: {
initSearchBar() { initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => { this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 99,
}).then(({ data }) => {
this.$set( this.$set(
this.searchBarFormConfig[0], this.searchBarFormConfig[0],
'selectOptions', 'selectOptions',
data.map((item) => ({ (data?.list || []).map((item) => ({
name: item.name, name: item.name,
id: item.id, id: item.id,
})) }))

View File

@ -186,6 +186,7 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
special: false,
equipmentName: null, equipmentName: null,
createTime: null, createTime: null,
}, },
@ -217,11 +218,15 @@ export default {
.catch(() => { }); .catch(() => { });
}, },
initSearchBar() { initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => { this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 99
}).then(({ data }) => {
this.$set( this.$set(
this.searchBarFormConfig[1], this.searchBarFormConfig[1],
'selectOptions', 'selectOptions',
data.map((item) => ({ (data?.list || []).map((item) => ({
name: item.name, name: item.name,
id: item.id, id: item.id,
})) }))

View File

@ -186,7 +186,8 @@ export default {
select: true, select: true,
label: '设备名称', label: '设备名称',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/listAll', // url: '/base/core-equipment/listAll?special=false',
url: '/base/core-equipment/page?special=false&pageNo=1&pageSize=99',
rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }], rules: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
}, },
{ {
@ -244,6 +245,7 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
special: false,
equipmentName: null, equipmentName: null,
createTime: null, createTime: null,
}, },

View File

@ -195,7 +195,8 @@ export default {
select: true, select: true,
label: '保养设备', label: '保养设备',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/listAll', // url: '/base/core-equipment/listAll',
url: '/base/core-equipment/page?special=false&pageNo=1&pageSize=99',
bind: { bind: {
filterable: true, filterable: true,
clearable: true, clearable: true,
@ -301,6 +302,7 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
special: false,
maintainPlanId: null, maintainPlanId: null,
maintainPlanId: null, maintainPlanId: null,
startTime: null, startTime: null,
@ -338,11 +340,15 @@ export default {
}, },
methods: { methods: {
initSearchBar() { initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => { this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 99
}).then(({ data }) => {
this.$set( this.$set(
this.searchBarFormConfig[0], this.searchBarFormConfig[0],
'selectOptions', 'selectOptions',
data.map((item) => ({ (data?.list || []).map((item) => ({
name: item.name, name: item.name,
id: item.id, id: item.id,
})) }))

View File

@ -193,7 +193,8 @@ export default {
select: true, select: true,
label: '设备名称', label: '设备名称',
prop: 'equipmentId', prop: 'equipmentId',
url: '/base/core-equipment/listAll', // url: '/base/core-equipment/listAll',
url: '/base/core-equipment/page?special=false&pageNo=1&pageSize=99',
bind: { bind: {
filterable: true, filterable: true,
clearable: true, clearable: true,
@ -251,6 +252,7 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
special: false,
maintenanceStatus: null, maintenanceStatus: null,
createTime: null, createTime: null,
equipmentId: null, equipmentId: null,
@ -267,11 +269,15 @@ export default {
}, },
methods: { methods: {
initSearchBar() { initSearchBar() {
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => { this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 99,
}).then(({ data }) => {
this.$set( this.$set(
this.searchBarFormConfig[0], this.searchBarFormConfig[0],
'selectOptions', 'selectOptions',
data.map((item) => ({ (data?.list || []).map((item) => ({
name: item.name, name: item.name,
id: item.id, id: item.id,
})) }))

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zhp * @LastEditors: DY
* @LastEditTime: 2023-12-08 13:59:10 * @LastEditTime: 2023-12-14 14:03:27
* @Description: * @Description:
--> -->
<template> <template>

View File

@ -116,7 +116,16 @@ export default {
getGroupClasses(id).then((res) => { getGroupClasses(id).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.form = res.data this.form = res.data
this.form.disableTime = res.data.disableTime || '' this.form.name = res.data.name
this.form.code = res.data.code
this.form.enableTime = res.data.enableTime
// this.form.disableTime = res.data.disableTime || null
this.$set(this.form, 'disableTime', res.data.disableTime || null)
this.form.startTime = res.data.startTime
this.form.endTime = res.data.endTime
this.form.daySpan = res.data.daySpan
this.form.remark = res.data.remark
console.log(this.form)
} }
}) })
} else { } else {

View File

@ -165,7 +165,7 @@ const tableProps1 = [
{ {
prop: 'status', prop: 'status',
label: '状态', label: '状态',
filter: publicFormatter('order_status') filter: publicFormatter('work_order_status')
}, },
{ {
prop: 'startProduceTime', prop: 'startProduceTime',

View File

@ -142,7 +142,9 @@ export default {
console.log(obj); console.log(obj);
this.visible = true; this.visible = true;
// if(obj.id) // if(obj.id)
this.dataForm.id = obj.id ? obj.id : "" if (obj) {
this.dataForm.id = obj.id ? obj.id : ""
}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs["dataForm"].resetFields() this.$refs["dataForm"].resetFields()
if (obj) { if (obj) {

View File

@ -10,8 +10,8 @@
</base-table> </base-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@pagination="getDataList" /> @pagination="getDataList" /> -->
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" width="50%" @cancel="handleCancel" <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" width="50%" @cancel="handleCancel"
@ -168,7 +168,10 @@ export default {
case 'add': case 'add':
this.addOrEditTitle = '新增'; this.addOrEditTitle = '新增';
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.addOrUpdateHandle(); // this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init();
});
break; break;
case 'export': case 'export':
this.handleExport(); this.handleExport();

View File

@ -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-12-13 16:19:04 * @LastEditTime: 2023-12-14 09:36:05
* @Description: * @Description:
*/ */
export default { export default {
@ -54,10 +54,10 @@ export default {
this.getDataList(); this.getDataList();
}, },
// 新增 / 修改 // 新增 / 修改
addOrUpdateHandle(id) { addOrUpdateHandle() {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.init(id); this.$refs.addOrUpdate.init();
}); });
}, },
cancel(id) { cancel(id) {

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-08 13:46:17 * @Date: 2023-12-08 13:46:17
* @LastEditTime: 2023-12-08 16:09:13 * @LastEditTime: 2023-12-15 16:12:08
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -13,26 +13,28 @@
<div class="content"> <div class="content">
<!-- <div class="visual-part"> --> <!-- <div class="visual-part"> -->
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
label-width="100px" label-position="top"> label-width="auto">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="供应商" prop="supplierId"> <el-form-item label="供应商" prop="supplierId"
<el-select v-model="dataForm.supplierId" filterable :disabled="isdetail" style="width: 100%" :rules="[{ required: true, message: '供应商不能为空', trigger: 'change' }]">
placeholder="请选择供应商"> <el-select v-model="dataForm.supplierId" filterable :disabled="isdetail" placeholder="请选择供应商">
<el-option v-for="dict in supplierList" :key=" dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in supplierList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="原料" prop="materialId"> <el-form-item label="原料" prop="materialId"
<el-select v-model="dataForm.materialId" filterable :disabled="isdetail" style="width: 100%" :rules="[{ required: true, message: '原料不能为空', trigger: 'change' }]">
@change="getData" placeholder="请选择原料"> <el-select v-model="dataForm.materialId" filterable :disabled="isdetail" @change="getData"
placeholder="请选择原料">
<el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in materialList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="样品编码" prop="sampleCode"> <el-form-item label="样品编码" prop="sampleCode"
:rules="[{ required: true, message: '样品编号不能为空', trigger: 'blur' }]">
<el-input v-model="dataForm.sampleCode" clearable :disabled="isdetail" placeholder="请输入样品编码" /> <el-input v-model="dataForm.sampleCode" clearable :disabled="isdetail" placeholder="请输入样品编码" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -40,28 +42,79 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="取样人" prop="samplerId"> <el-form-item label="取样人" prop="samplerId">
<el-select v-model="dataForm.samplerId" filterable :disabled="isdetail" style="width: 100%" <el-select v-model="dataForm.samplerId" filterable :disabled="isdetail" placeholder="请选择取样人">
placeholder="请选择取样人">
<el-option v-for="dict in workerList" :key=" dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in workerList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检测人" prop="checkerId"> <el-form-item label="检测人" prop="checkerId"
<el-select v-model="dataForm.checkerId" filterable :disabled="isdetail" style="width: 100%" :rules="[{ required: true, message: '检测人不能为空', trigger: 'change' }]">
placeholder="请选择检测人"> <el-select v-model="dataForm.checkerId" filterable :disabled="isdetail" placeholder="请选择检测人">
<el-option v-for="dict in workerList" :key=" dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in workerList" :key=" dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检测时间" prop="checkTime"> <el-form-item label="检测时间" prop="checkTime"
:rules="[{ required: true, message: '检测时间不能为空', trigger: 'change' }]">
<el-date-picker v-model="dataForm.checkTime" type="datetime" placeholder="选择检测时间"> <el-date-picker v-model="dataForm.checkTime" type="datetime" placeholder="选择检测时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-divider content-position="center">检测结果</el-divider>
<el-row :gutter="24">
<el-form-item label="外观合格" prop="appearance">
<el-radio :disabled="isdetail" v-model="dataForm.appearance" :label="true">合格</el-radio>
<el-radio :disabled="isdetail" v-model="dataForm.appearance" :label="false">不合格</el-radio>
</el-form-item>
</el-row>
<el-row :gutter="24" v-for="(item,index) in ingredientList" :key="item.id">
<el-col :span="8">
<el-form-item label="成分">
{{ item.name }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量"
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
<el-input :disabled="isdetail" style="width: 90%;margin-right: 10px;" :max="item.maxValue"
:min='item.minValue' v-model="dataForm.checkValueList[index].checkValue"
@change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input>
<span v-if="dataForm.checkValueList[index].showIcon">
<!-- <i class="el-icon-success"></i> -->
<svg-icon v-if="dataForm.checkValueList[index].isStandard" icon-class="standards" />
<svg-icon v-else icon-class="noStandards" />
</span>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="判断结果" prop="checkResult">
<el-select :disabled="isdetail" v-model="dataForm.checkResult" placeholder="请选择">
<el-option v-for="item in checkResultList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="原料等级" prop="materialGrade">
<el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注" style="width: 100%;">
</el-input>
</el-form-item>
</el-form> </el-form>
<!-- </div> --> <!-- </div> -->
<div class="attr-list" v-if="idAttrShow"> <div class="attr-list" v-if="idAttrShow">
<!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true"> <!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
@ -101,9 +154,15 @@ import {
getHotMaterialAllList, getHotMaterialAllList,
getSupplierList, getSupplierList,
getWorkerList, getWorkerList,
getMaterialCheckList getMaterialCheckList,
createQualityHotMaterialDet,
updateQualityHotMaterialDet,
getQualityHotMaterialDetList
} from '@/api/base/qualityHotMaterial'; } from '@/api/base/qualityHotMaterial';
import SmallTitle from './SmallTitle'; import SmallTitle from './SmallTitle';
import { DICT_TYPE, getDictDatas } from "@/utils/dict";
import { create } from 'domain';
// 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 {DICT_TYPE, getDictDatas} from "@/utils/dict"; // import {DICT_TYPE, getDictDatas} from "@/utils/dict";
@ -130,7 +189,17 @@ export default {
createURL: createQualityHotMaterial, createURL: createQualityHotMaterial,
updateURL: updateQualityHotMaterial, updateURL: updateQualityHotMaterial,
infoURL: getQualityHotMaterial, infoURL: getQualityHotMaterial,
}, },
gradeList:[],
checkResultList: [{
id: true,
name:'合格',
},
{
id: false,
name: '不合格',
}
],
listQuery: { listQuery: {
pageSize: 10, pageSize: 10,
pageNo: 1, pageNo: 1,
@ -139,7 +208,9 @@ export default {
materialList: [], materialList: [],
workerList: [], workerList: [],
supplierList:[], supplierList:[],
equipmentList:[], equipmentList: [],
ingredientFlag:false,
ingredientList:[],
dataForm: { dataForm: {
id: undefined, id: undefined,
materialId:null, materialId:null,
@ -151,6 +222,10 @@ export default {
appearance: null, appearance: null,
checkResult: null, checkResult: null,
materialGrade: null, materialGrade: null,
checkValueList: [],
checkResult: '',
materialGrade: undefined,
remark:null,
}, },
productAttrList: [], productAttrList: [],
visible: false, visible: false,
@ -168,6 +243,15 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
judgeValue(val, minValue, maxValue, index) {
if (val >= minValue && val <= maxValue) {
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isStandard = true
} else {
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isStandard = false
}
},
dataFormSubmit() { dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (!valid) { if (!valid) {
@ -175,28 +259,111 @@ export default {
} }
// //
if (this.dataForm.id) { if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then(response => { let obj = {
this.$modal.msgSuccess("修改成功"); id: this.dataForm.id,
this.visible = false; materialId: this.dataForm.materialId,
this.$emit("refreshDataList"); supplierId: this.dataForm.supplierId,
sampleCode: this.dataForm.sampleCode,
samplerId: this.dataForm.samplerId,
checkerId: this.dataForm.checkerId,
checkTime: this.dataForm.checkTime,
appearance: this.dataForm.appearance,
checkResult: this.dataForm.checkResult,
materialGrade: this.dataForm.materialGrade,
// checkValueList: [],
checkResult: this.dataForm.checkResult,
materialGrade: this.dataForm.materialGrade,
remark: this.dataForm.remark
}
this.urlOptions.updateURL(obj).then(response => {
let array = []
this.dataForm.checkValueList.forEach(ele => {
array.push(this.updateDet({
mainId: this.dataForm.id,
id:ele.id,
checkDetId: ele.checkDetId,
checkValue: ele.checkValue
}))
})
Promise.all(array).then(res => {
console.log(res)
this.visible = false;
this.$emit("refreshDataList");
}).catch(error => {
// catch
console.log(error)
})
}); });
return; return;
} }
// //
this.urlOptions.createURL(this.dataForm).then(response => { let obj = {
this.$modal.msgSuccess("新增成功"); // id: this.dataForm.id,
this.idAttrShow = true; materialId: this.dataForm.materialId,
this.dataForm.id = res.data supplierId: this.dataForm.supplierId,
this.$emit("refreshDataList"); sampleCode: this.dataForm.sampleCode,
samplerId: this.dataForm.samplerId,
checkerId: this.dataForm.checkerId,
checkTime: this.dataForm.checkTime,
appearance: this.dataForm.appearance,
checkResult: this.dataForm.checkResult,
materialGrade: this.dataForm.materialGrade,
// checkValueList: [],
checkResult: this.dataForm.checkResult,
materialGrade: this.dataForm.materialGrade,
remark:this.dataForm.remark
}
this.urlOptions.createURL(obj).then(response => {
// this.idAttrShow = true;
let array = []
this.dataForm.checkValueList.forEach(ele => {
array.push(this.createDet({
mainId: response.data,
checkDetId: ele.checkDetId,
checkValue: ele.checkValue
}))
})
Promise.all(array).then(res => {
this.$modal.msgSuccess("新增成功");
this.visible = false;
this.$emit("refreshDataList");
}).catch(error => {
// catch
console.log(error)
})
// this.dataForm.id = res.data
}); });
}); });
}, },
createDet(obj) {
return createQualityHotMaterialDet(obj).then((response) => {
return response.data
})
},
updateDet(obj) {
return updateQualityHotMaterialDet(obj).then((response) => {
return response.data
})
},
getData(val) { getData(val) {
console.log(val); console.log(val);
getMaterialCheckList({ getMaterialCheckList({
materialId:val materialId:val
}).then((res) => { }).then((res) => {
console.log(res); this.ingredientList = res.data
this.ingredientFlag = true
this.dataForm.checkValueList = res.data.map((ele) => {
return {
mainId: null,
checkDetId: ele.id,
checkValue: null,
isStandard: true,
showIcon:false,
}
})
// this.$set()
console.log(this.dataForm);
}) })
}, },
// clickTopBtn(val) { // clickTopBtn(val) {
@ -208,7 +375,7 @@ export default {
this.productAttrList.splice(0); this.productAttrList.splice(0);
this.listQuery.total = 0; this.listQuery.total = 0;
}, },
getDict() { async getDict() {
getHotMaterialAllList().then((res) => { getHotMaterialAllList().then((res) => {
this.materialList = res.data this.materialList = res.data
}) })
@ -218,49 +385,52 @@ export default {
getSupplierList().then(res => { getSupplierList().then(res => {
this.supplierList = res.data this.supplierList = res.data
}) })
const res = await getDictDatas(this.DICT_TYPE.EQU_ALARM_LEVEL)
console.log('111', res)
this.gradeList = res
}, },
handleClick(raw) { // handleClick(raw) {
if (raw.type === 'delete') { // if (raw.type === 'delete') {
this.$confirm( // this.$confirm(
`确定对${ // `${
raw.data.materialName // raw.data.materialName
? '[物料名称为' + raw.data.materialName + ']' // ? '[' + raw.data.materialName + ']'
: '[序号为' + raw.data.materialName + ']' // : '[' + raw.data.materialName + ']'
}进行删除操作?`, // }?`,
'提示', // '',
{ // {
confirmButtonText: '确定', // confirmButtonText: '',
cancelButtonText: '取消', // cancelButtonText: '',
type: 'warning', // type: 'warning',
} // }
) // )
.then(() => { // .then(() => {
deleteProcessEquMaterialBomDet(raw.data.id).then(({ data }) => { // deleteProcessEquMaterialBomDet(raw.data.id).then(({ data }) => {
this.$message({ // this.$message({
message: '操作成功', // message: '',
type: 'success', // type: 'success',
duration: 1500, // duration: 1500,
onClose: () => { // onClose: () => {
this.getList(); // this.getList();
}, // },
}); // });
}); // });
}) // })
.catch(() => {}); // .catch(() => {});
} else { // } else {
this.addNew(raw.data.id); // this.addNew(raw.data.id);
} // }
}, // },
getList() { // getList() {
// // //
processEquMaterialBomDetPage({ // processEquMaterialBomDetPage({
...this.listQuery, // ...this.listQuery,
bomId: this.dataForm.id, // bomId: this.dataForm.id,
}).then((response) => { // }).then((response) => {
this.productAttrList = response.data.list; // this.productAttrList = response.data.list;
this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}); // });
}, // },
init(id, isdetail) { init(id, isdetail) {
this.initData() this.initData()
this.getDict() this.getDict()
@ -277,19 +447,51 @@ export default {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
if (this.dataForm.id) { if (this.dataForm.id) {
// //
this.urlOptions.infoURL({ let valueList = []
bomId: id, this.urlOptions.infoURL(id).then(response => {
pageNo: 1,
pageSize:10
}).then(response => {
this.dataForm = response.data this.dataForm = response.data
this.dataForm.unit = String(this.dataForm.unit) getMaterialCheckList({
this.dataForm.materialType = String(this.dataForm.materialType) materialId: response.data.materialId
this.dataForm.productType = String(this.dataForm.productType) }).then((res) => {
}); console.log(res.data);
this.ingredientList = res.data
valueList = this.ingredientList.map((ele) => {
// console.log(ele)
return {
maxValue: ele.maxValue,
minValue: ele.minValue
}
})
getQualityHotMaterialDetList({
mainId: response.data.id
}).then((result) => {
this.dataForm.checkValueList = result.data.map((ele) => {
return {
mainId: ele.mainId,
id: ele.id,
checkDetId: ele.id,
checkValue: ele.checkValue,
isStandard: true,
showIcon: false,
}
})
valueList.forEach((ele,index) => {
console.log(ele);
if (this.dataForm.checkValueList[index].checkValue >= ele.minValue && this.dataForm.checkValueList[index].checkValue <= ele.maxValue) {
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isStandard = true
} else {
this.dataForm.checkValueList[index].showIcon = true
this.dataForm.checkValueList[index].isStandard = false
}
// })
})
})
});
})
// //
this.getList(); // this.getList();
} else { } else {
if (this.urlOptions.isGetCode) { if (this.urlOptions.isGetCode) {
this.getCode() this.getCode()
@ -322,10 +524,6 @@ export default {
flex-direction: column; 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;

View File

@ -77,13 +77,19 @@ export default {
}, },
tableProps, tableProps,
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:quality-inspection-det:update`) this.$auth.hasPermi(`base:quality-hot-material:update`)
? { ? {
type: 'edit', type: 'edit',
btnName: '编辑', btnName: '编辑',
} }
: undefined, : undefined,
this.$auth.hasPermi(`base:quality-inspection-det:delete`) this.$auth.hasPermi(`base:quality-hot-material:detail`)
? {
type: 'detail',
btnName: '详情',
}
: undefined,
this.$auth.hasPermi(`base:quality-hot-material:delete`)
? { ? {
type: 'delete', type: 'delete',
btnName: '删除', btnName: '删除',
@ -132,7 +138,16 @@ export default {
mounted () { mounted () {
this.getDict(); this.getDict();
}, },
methods: { methods: {
otherMethods(val) {
if (val.type === 'detail') {
this.addOrUpdateVisible = true;
this.addOrEditTitle = "详情";
this.$nextTick(() => {
this.$refs.addOrUpdate.init(val.data.id, true);
});
}
},
// //
getDataList() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;

View File

@ -0,0 +1,213 @@
<!--
* @Author: Do not edit
* @Date: 2023-12-13 14:10:04
* @LastEditTime: 2023-12-14 10:18:20
* @LastEditors: DY
* @Description:
-->
<template>
<div>
<el-row style="float: right; margin-bottom: 5px">
<el-button size="small" @click="edit = true">编辑</el-button>
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
</el-row>
<el-table
:data="data"
border
show-summary
style="width: 100%">
<el-table-column
v-for="(item, index) in cols"
:key="index" :prop="item.prop"
:label="item.label"
:align="item.align ? item.align : 'left'">
<el-table-column
v-for="(it, index1) in item.children"
:key="index1"
:prop="it.prop"
:label="it.label"
:align="item.align ? item.align : 'left'">
<el-table-column
v-for="(y, index2) in it.children"
:key="index2"
:prop="y.prop"
:label="y.label">
<template slot-scope="scope">
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
<el-input v-else v-model.number="scope.row[y.prop]"></el-input>
</template>
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
<el-input type="textarea" v-model="sum.remark" placeholder="备注" :disabled="!edit" :autosize="{ minRows: 2, maxRows: 6}"></el-input>
</div>
</template>
<script>
import { updateGlass, updateGlassRemark } from '@/api/report/glass';
const cols = [
{
prop: 'xc',
label: '许昌安彩周原片生产汇总',
align: 'center',
children: [
{
prop: 'lineName',
label: '生产线',
},
{
prop: 'm',
label: '拉引量㎡',
align: 'center',
children: [
{
prop: 'dailyOutputNow',
label: '本周',
},
{
prop: 'dailyOutputHis',
label: '上周',
},
{
prop: 'dailyOutputTrend',
label: '增减',
}
]
},
{
prop: 'y',
label: '原片合计(片/周)',
align: 'center',
children: [
{
prop: 'originalGlassStatisticsNow',
label: '本周',
},
{
prop: 'originalGlassStatisticsHis',
label: '上周',
},
{
prop: 'originalGlassStatisticsTrend',
label: '增减',
}
]
},
{
prop: 's',
label: '实际原片产量㎡',
align: 'center',
children: [
{
prop: 'actualProductNow',
label: '本周',
},
{
prop: 'actualProductHis',
label: '上周',
},
{
prop: 'actualProductTrend',
label: '增减',
}
]
},
{
prop: 'yield',
label: '原片良品率',
children: [
{
prop: 'originalGlassPassNow',
label: '本周',
},
{
prop: 'originalGlassPassHis ',
label: '上周',
},
{
prop: 'originalGlassPassTrend',
label: '增减',
}
]
}
]
}
]
export default {
props: {
data: {
type: Array,
default: () => [],
},
time: {
type: Array,
default: () => [],
},
sum: {
type: Object,
default: () => {},
},
type: {
type: Number,
default: 3,
}
},
data() {
return {
cols,
edit: false,
};
},
watch: {
time: {
immediate: true,
handler(newv, oldv) {
if (newv[0] !== '') {
this.cols[0].label = '许昌安彩周原片生产汇总' + '(' + newv[0] + '-' + newv[1] + ')'
} else {
this.cols[0].label = '许昌安彩周原片生产汇总'
}
}
},
type: {
immediate: true,
handler(newv, oldv) {
let text1 = '', text2 = '', text3 = ''
if (newv === 3) {
text1 = '本周'
text2 = '上周'
text3 = '原片合计(片/周)'
} else if (newv === 4) {
text1 = '本月'
text2 = '上月'
text3 = '原片合计(片/月)'
} else {
text1 = '本年'
text2 = '上年'
text3 = '原片合计(片/年)'
}
this.cols[0].children[1].children[0].label = text1
this.cols[0].children[1].children[1].label = text2
this.cols[0].children[2].children[0].label = text1
this.cols[0].children[2].children[1].label = text2
this.cols[0].children[3].children[0].label = text1
this.cols[0].children[3].children[1].label = text2
this.cols[0].children[2].label = text3
}
}
},
methods: {
updateData() {
updateGlass(this.data).then(response => {
updateGlassRemark(this.sum).then(res => {
this.$modal.msgSuccess("修改成功");
this.edit = false;
this.$emit("refreshDataList");
});
});
}
}
};
</script>

View File

@ -0,0 +1,177 @@
<template>
<div class="app-container">
<div>
<el-form
:model="listQuery"
:inline="true"
ref="dataForm"
class="blueTip">
<el-form-item label="月" prop="reportTime">
<el-date-picker
v-model="reportTime"
type="month"
size="small"
@change="changeTime"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small" @click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
<!-- <pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" /> -->
</div>
</template>
<script>
import { parseTime } from '../../core/mixins/code-filter';
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
import inputTable from './inputTable.vue';
import { getCorePLList } from '@/api/base/coreProductionLine';
export default {
components: { inputTable },
data() {
return {
urlOptions: {
getDataListURL: getGlassPage,
exportURL: exportGlasscExcel
},
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
reportType: 4,
reportTime: []
},
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',
tableData: [],
proLineList: [],
all: {}
};
},
created() {
this.getDict()
},
methods: {
async getDict() {
// 线
const res = await getCorePLList();
this.proLineList = res.data;
},
//
async getDataList() {
this.dataListLoading = true;
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
item.lineName = it.name
}
})
if (item.det === false) {
this.all = {
id: item.id,
remark: item.remark
}
}
return item.det === true
});
this.listQuery.total = response.data.length;
this.dataListLoading = false;
});
},
changeTime(val) {
if(val) {
const timeStamp = val.getMonth(); //
const fullyear = val.getFullYear()
let days = 0
switch (timeStamp) {
case 0, 2, 4, 6, 7, 9, 11:
days = 31
break
case 3, 4, 8, 10:
days = 30
break
case 1:
if ((fullyear % 400 === 0) || (fullyear() % 4 === 0 && fullyear() % 100 !== 0)) {
days = 29
} else {
days = 28
}
}
this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1).getTime()); //
this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()); //
console.log(this.startTimeStamp, this.endTimeStamp)
this.listQuery.reportTime[0] = parseTime(new Date(fullyear, timeStamp, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[1] = parseTime(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
} else {
this.listQuery.reportTime = []
}
},
//yy-mm-dd hh:mm:ss
timeFun(unixtimestamp) {
var unixtimestamp = new Date(unixtimestamp);
var year = 1900 + unixtimestamp.getYear();
var month = "0" + (unixtimestamp.getMonth() + 1);
var date = "0" + unixtimestamp.getDate();
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
},
buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.listQuery };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '原片生产周报.xls');
this.exportLoading = false;
}).catch(() => { });
}
},
};
</script>
<style scoped>
/* .blueTip { */
/* padding-bottom: 10px; */
/* } */
.blueTip::before{
display: inline-block;
content: '';
width: 4px;
height: 18px;
background: #0B58FF;
border-radius: 1px;
margin-right: 8PX;
margin-top: 8px;
}
</style>

View File

@ -0,0 +1,198 @@
<template>
<div class="app-container">
<!-- <search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" /> -->
<div>
<el-form
:model="listQuery"
:inline="true"
ref="dataForm"
class="blueTip">
<el-form-item label="周" prop="reportTime">
<el-date-picker
v-model="reportTime"
type="week"
size="small"
@change="changeTime"
:picker-options="{firstDayOfWeek: 1}"
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
style="width: 350px"
placeholder="选择周">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small" @click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
</div>
</template>
<script>
import { parseTime } from '../../core/mixins/code-filter';
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
import inputTable from './inputTable.vue';
import { getCorePLList } from '@/api/base/coreProductionLine';
export default {
components: { inputTable },
data() {
return {
urlOptions: {
getDataListURL: getGlassPage,
exportURL: exportGlasscExcel
},
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
reportType: 3,
reportTime: []
},
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',
tableData: [],
proLineList: [],
all: {},
formConfig: [
{
type: 'datePicker',
label: '周',
dateType: 'week',
format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
width: 350,
param: 'reportTime',
},
{
type: 'button',
btnName: '查询',
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
{
type: this.$auth.hasPermi('report:glass-weekly:export') ? 'button' : '',
btnName: '导出',
name: 'export',
color: 'primary',
plain: true
},
],
};
},
mounted() {
// const day = new Date().getDay()
// console.log('', day)
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
this.getDict()
},
methods: {
async getDict() {
// 线
await getCorePLList().then(res => {
this.proLineList = res.data;
// this.getDataList()
});
},
//
async getDataList() {
this.dataListLoading = true;
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
item.lineName = it.name
}
})
if (item.det === false) {
this.all = {
id: item.id,
remark: item.remark
}
}
return item.det === true
});
this.listQuery.total = response.data.length;
this.dataListLoading = false;
});
},
changeTime(val) {
if(val) {
let timeStamp = val.getTime(); //
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //
console.log(this.startTimeStamp, this.endTimeStamp)
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 00:00:00').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 23:59:59').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
} else {
this.listQuery.reportTime = []
}
},
//yy-mm-dd hh:mm:ss
timeFun(unixtimestamp) {
var unixtimestamp = new Date(unixtimestamp);
var year = 1900 + unixtimestamp.getYear();
var month = "0" + (unixtimestamp.getMonth() + 1);
var date = "0" + unixtimestamp.getDate();
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
},
buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.listQuery };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '原片生产周报.xls');
this.exportLoading = false;
}).catch(() => { });
}
},
};
</script>
<style scoped>
/* .blueTip { */
/* padding-bottom: 10px; */
/* } */
.blueTip::before{
display: inline-block;
content: '';
width: 4px;
height: 18px;
background: #0B58FF;
border-radius: 1px;
margin-right: 8PX;
margin-top: 8px;
}
</style>

View File

@ -0,0 +1,158 @@
<template>
<div class="app-container">
<div>
<el-form
:model="listQuery"
:inline="true"
ref="dataForm"
class="blueTip">
<el-form-item label="年" prop="reportTime">
<el-date-picker
v-model="reportTime"
type="year"
size="small"
@change="changeTime"
:picker-options="{firstDayOfWeek: 1}"
:format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
style="width: 350px"
placeholder="选择年">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small" @click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-year:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
</div>
</template>
<script>
import { parseTime } from '../../core/mixins/code-filter';
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
import inputTable from './inputTable.vue';
import { getCorePLList } from '@/api/base/coreProductionLine';
export default {
components: { inputTable },
data() {
return {
urlOptions: {
getDataListURL: getGlassPage,
exportURL: exportGlasscExcel
},
listQuery: {
pageSize: 10,
pageNo: 1,
total: 0,
reportType: 5,
reportTime: []
},
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',
tableData: [],
proLineList: [],
all: {},
};
},
created() {
this.getDict()
},
methods: {
async getDict() {
// 线
const res = await getCorePLList();
this.proLineList = res.data;
},
//
async getDataList() {
this.dataListLoading = true;
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
item.lineName = it.name
}
})
if (item.det === false) {
this.all = {
id: item.id,
remark: item.remark
}
}
return item.det === true
});
this.listQuery.total = response.data.length;
this.dataListLoading = false;
});
},
changeTime(val) {
if(val) {
// let timeStamp = val.getTime(); //
this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1).getTime()); //
this.endTimeStamp = this.timeFun(new Date(val.getFullYear(), 11, 31, 23, 59, 59).getTime()); //
this.listQuery.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
} else {
this.listQuery.reportTime = []
}
},
//yy-mm-dd hh:mm:ss
timeFun(unixtimestamp) {
var unixtimestamp = new Date(unixtimestamp);
var year = 1900 + unixtimestamp.getYear();
var month = "0" + (unixtimestamp.getMonth() + 1);
var date = "0" + unixtimestamp.getDate();
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
},
buttonClick(val) {
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
switch (val.btnName) {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.getDataList();
break;
case 'export':
this.handleExport();
break;
default:
console.log(val);
}
},
/** 导出按钮操作 */
handleExport() {
//
let params = { ...this.listQuery };
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '原片生产周报.xls');
this.exportLoading = false;
}).catch(() => { });
}
},
};
</script>
<style scoped>
/* .blueTip { */
/* padding-bottom: 10px; */
/* } */
.blueTip::before{
display: inline-block;
content: '';
width: 4px;
height: 18px;
background: #0B58FF;
border-radius: 1px;
margin-right: 8PX;
margin-top: 8px;
}
</style>

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2023-12-13 15:17:53 * @LastEditTime: 2023-12-14 14:56:38
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -483,7 +483,7 @@ export default {
await updateProductionDataList(updateArr), await updateProductionDataList(updateArr),
]); ]);
if (result[0] == true && result[1] == true) { if (result[0] == true && result[1] == true) {
console.log(res) // console.log(res)
this.disabled = true this.disabled = true
this.isSave = false this.isSave = false
this.getDataList() this.getDataList()

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2023-12-13 16:55:27 * @LastEditTime: 2023-12-14 14:56:40
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -24,100 +24,132 @@
color: '#606266' color: '#606266'
}"> }">
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center"> <el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
<el-table-column prop="glassType" label="品种"> <el-table-column prop="glassType" label="品种" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.glassType" :disabled="disabled"></el-input> <el-input v-if="scope.row.det === true" v-model="scope.row.glassType" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.glassType }} </span> <span v-else>{{ scope.row.glassType }} </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规格"> <el-table-column label="规格" align="center">
<el-table-column prop="inputNow" label="本周"> <el-table-column label="成品" align="center">
<template slot-scope="scope"> <el-table-column :show-header="false">
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input> <template slot-scope="scope">
<span v-else>{{ scope.row.inputNow }} </span> <el-input v-if="scope.row.det === true" v-model="scope.row.productionL" :disabled="disabled"></el-input>
</template> <span v-else>{{ scope.row.productionL }} </span>
</template>
</el-table-column>
<el-table-column :show-header="false">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.productionW" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.productionW }} </span>
</template>
</el-table-column>
<el-table-column :show-header="false">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.productionH" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.productionH }} </span>
</template>
</el-table-column>
</el-table-column> </el-table-column>
<el-table-column prop="inputHis" label="上周"> <el-table-column label="原片">
<template slot-scope="scope"> <el-table-column prop="originalGlassSize">
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input> <template slot-scope="scope">
<span v-else>{{ scope.row.inputHis }} </span> <el-input v-if="scope.row.det === true" v-model="scope.row.originalGlassSize" :disabled="disabled">
</template> </el-input>
</el-table-column> <span v-else>{{ scope.row.originalGlassSize }} </span>
<el-table-column prop="inputTrend" label="增减"> </template>
<template slot-scope="scope"> </el-table-column>
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.inputTrend }} </span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="完成良品产量">
<el-table-column prop="goodProductNow" label="本周">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductNow }} </span>
</template>
</el-table-column>
<el-table-column prop="goodProductHis" label="上周">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductHis }} </span>
</template>
</el-table-column>
<el-table-column prop="goodProductTrend" label="增减">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductTrend }} </span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="原片漏检率">
<el-table-column prop="missCheckNow" label="本周">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckNow }} </span>
</template>
</el-table-column>
<el-table-column prop="missCheckHis" label="上周">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.missCheckHis }} </span>
</template>
</el-table-column>
<el-table-column prop="missCheckTrend" label="增减">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.missCheckTrend }} </span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="综合良品率">
<el-table-column prop="goodProductPassNow" label="本周">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductPassNow }} </span>
</template>
</el-table-column>
<el-table-column prop="goodProductPassHis" label="上周">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductPassHis }} </span>
</template>
</el-table-column>
<el-table-column prop="goodProductPassTrend" label="增减">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
</template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<!-- <el-table-column label="完成良品产量"> -->
<el-table-column prop="customerId" label="用户">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.customerId" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.customerId }} </span>
</template>
</el-table-column>
<el-table-column prop="packageType" label="包装形式">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.packageType" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.packageType }} </span>
</template>
</el-table-column>
<el-table-column prop="orderNum" label="订单数量">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.orderNum" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.orderNum }} </span>
</template>
</el-table-column>
<el-table-column prop="orderFinish" label="订单完成">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.orderFinish" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.orderFinish }} </span>
</template>
</el-table-column>
<el-table-column prop="orderRemaining" label="未完成订单">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.orderRemaining" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.orderRemaining }} </span>
</template>
</el-table-column>
<el-table-column prop="stockLastMonth" label="上月库存">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.stockLastMonth" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.stockLastMonth }} </span>
</template>
</el-table-column>
<el-table-column prop="productNumThisMonth" label="本月生产成品">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.productNumThisMonth" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.productNumThisMonth }} </span>
</template>
</el-table-column>
<el-table-column prop="deliveNum" label="发货量">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.deliveNum" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.deliveNum }} </span>
</template>
</el-table-column>
<el-table-column prop="undeliveNum" label="未发货量">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.undeliveNum" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.undeliveNum }} </span>
</template>
</el-table-column>
<el-table-column prop="undeliveArea" label="未发货面积">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.undeliveArea" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.undeliveArea }} </span>
</template>
</el-table-column>
<el-table-column prop="deliveArea" label="发货面积">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.deliveArea" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.deliveArea }} </span>
</template>
</el-table-column>
<el-table-column prop="productAreaThisMonth" label="本月生产面积">
<template slot-scope="scope">
<el-input v-if="scope.row.det === true" v-model="scope.row.productAreaThisMonth" :disabled="disabled">
</el-input>
<span v-else>{{ scope.row.productAreaThisMonth }} </span>
</template>
</el-table-column>
<!-- </el-table-column> -->
<div style="height: 50px;" class="remark" slot="append"> <div style="height: 50px;" class="remark" slot="append">
<h3 style="float: left;text-align: center;margin-left: 20px;">备注</h3> <h3 style="float: left;text-align: center;margin-left: 20px;">备注</h3>
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input> <el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
@ -143,8 +175,8 @@
<script> <script>
import { import {
getAutoDeliveDataList, getAutoDeliveDataList,
updateProductionDataList, updateSumAutoDeliveDataList,
updateSumProductionDataList updateAutoDeliveDataList
} from '@/api/report/production'; } from '@/api/report/production';
// import Editor from '@/components/Editor'; // import Editor from '@/components/Editor';
import moment from 'moment'; import moment from 'moment';
@ -482,10 +514,10 @@ export default {
// console.log(JSON.stringify(updateArr[1])) // console.log(JSON.stringify(updateArr[1]))
const result = await Promise.all([ const result = await Promise.all([
await updateSumProductionDataList(obj), await updateSumProductionDataList(obj),
await updateProductionDataList(updateArr), await updateAutoDeliveDataList(updateArr),
]); ]);
if (result[0] == true && result[1] == true) { if (result[0] == true && result[1] == true) {
console.log(res) // console.log(res)
this.disabled = true this.disabled = true
this.isSave = false this.isSave = false
this.getDataList() this.getDataList()
@ -519,12 +551,12 @@ export default {
// sum = res.data.list.splice(index, 1) // sum = res.data.list.splice(index, 1)
// } // }
// }) // })
// res.data.forEach((ele,index) => { res.data.forEach((ele,index) => {
// if (ele.det === false) { if (ele.det === false) {
// res.data.list[index].lineId = '' res.data[index].glassType = '合计'
// this.remark = res.data.list[index].remark this.remark = res.data[index].remark
// } }
// }); });
this.list = res.data this.list = res.data
}, },
}, },

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2023-12-13 15:17:39 * @LastEditTime: 2023-12-14 14:56:37
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -410,8 +410,8 @@ export default {
await updateSumProductionDataList(obj), await updateSumProductionDataList(obj),
await updateProductionDataList(updateArr), await updateProductionDataList(updateArr),
]); ]);
if (result[0] == true && result[1] == true) { if (result[0].data == true && result[1].data == true) {
console.log(res) // console.log(res)
this.disabled = true this.disabled = true
this.isSave = false this.isSave = false
this.getDataList() this.getDataList()

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-12 13:45:25 * @Date: 2023-12-12 13:45:25
* @LastEditTime: 2023-12-13 15:16:03 * @LastEditTime: 2023-12-14 14:56:45
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -405,8 +405,8 @@ export default {
await updateSumProductionDataList(obj), await updateSumProductionDataList(obj),
await updateProductionDataList(updateArr), await updateProductionDataList(updateArr),
]); ]);
if (result[0] == true && result[1] == true) { if (result[0].data == true && result[1].data == true) {
console.log(res) // console.log(res)
this.disabled = true this.disabled = true
this.isSave = false this.isSave = false
this.getDataList() this.getDataList()

View File

@ -68,7 +68,6 @@ export default {
} }
obj.name = item obj.name = item
obj.type = 'line' obj.type = 'line'
obj.stack = 'Total'
obj.symbol = 'none' obj.symbol = 'none'
obj.data = data obj.data = data
seriesData.push(obj) seriesData.push(obj)
@ -118,7 +117,7 @@ export default {
} }
}, },
grid: { grid: {
left: '3%', left: '4%',
right: '2%', right: '2%',
bottom: '3%', bottom: '3%',
containLabel: true containLabel: true

View File

@ -56,7 +56,7 @@ const tableProps = [
}, },
{ {
prop: 'code', prop: 'code',
label: '指编码', label: '指编码',
minWidth: 120 minWidth: 120
}, },
{ {

View File

@ -35,13 +35,14 @@
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental' import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
import LineChart from './../../components/lineChart' import LineChart from './../../components/lineChart'
import SearchArea from './../../components/searchArea' import SearchArea from './../../components/searchArea'
import moment from 'moment'
export default { export default {
name: 'Voc', name: 'Voc',
data(){ data(){
return { return {
realtimeList:[], realtimeList:[],
queryParams:{ queryParams:{
checkType: 1, checkType: 3,
timeDim: null, timeDim: null,
timeRange: [] timeRange: []
}, },
@ -51,6 +52,9 @@ export default {
components: { LineChart, SearchArea }, components: { LineChart, SearchArea },
mounted() { mounted() {
this.getMsg() this.getMsg()
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value //
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
this.getTrend()
}, },
methods: { methods: {
getMsg() { getMsg() {
@ -59,19 +63,21 @@ export default {
this.realtimeList = res.data || [] this.realtimeList = res.data || []
}) })
}, },
getTrend(params) { getTrend() {
console.log(params)
this.queryParams.timeDim = params.timeDim
this.queryParams.timeRange[0] = params.startTime
this.queryParams.timeRange[1] = params.endTime
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => { environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
console.log(res)
if (res.code === 0) { if (res.code === 0) {
this.chartData = res.data this.chartData = res.data
} else { } else {
this.chartData = {} this.chartData = {}
} }
}) })
},
submitClick(params) {
console.log(params)
this.queryParams.timeDim = params.timeDim
this.queryParams.timeRange[0] = params.startTime
this.queryParams.timeRange[1] = params.endTime
this.getTrend()
} }
} }
} }

View File

@ -56,7 +56,7 @@ const tableProps = [
}, },
{ {
prop: 'code', prop: 'code',
label: '指编码', label: '指编码',
minWidth: 120 minWidth: 120
}, },
{ {

View File

@ -35,6 +35,7 @@
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental' import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
import LineChart from './../../components/lineChart' import LineChart from './../../components/lineChart'
import SearchArea from './../../components/searchArea' import SearchArea from './../../components/searchArea'
import moment from 'moment'
export default { export default {
name: 'WasteGasManagement', name: 'WasteGasManagement',
data(){ data(){
@ -51,6 +52,9 @@ export default {
components: { LineChart, SearchArea }, components: { LineChart, SearchArea },
mounted() { mounted() {
this.getMsg() this.getMsg()
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value //
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
this.getTrend()
}, },
methods: { methods: {
getMsg() { getMsg() {
@ -59,19 +63,21 @@ export default {
this.realtimeList = res.data || [] this.realtimeList = res.data || []
}) })
}, },
getTrend(params) { getTrend() {
console.log(params)
this.queryParams.timeDim = params.timeDim
this.queryParams.timeRange[0] = params.startTime
this.queryParams.timeRange[1] = params.endTime
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => { environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
console.log(res)
if (res.code === 0) { if (res.code === 0) {
this.chartData = res.data this.chartData = res.data
} else { } else {
this.chartData = {} this.chartData = {}
} }
}) })
},
submitClick(params) {
console.log(params)
this.queryParams.timeDim = params.timeDim
this.queryParams.timeRange[0] = params.startTime
this.queryParams.timeRange[1] = params.endTime
this.getTrend()
} }
} }
} }

View File

@ -56,7 +56,7 @@ const tableProps = [
}, },
{ {
prop: 'code', prop: 'code',
label: '指编码', label: '指编码',
minWidth: 120 minWidth: 120
}, },
{ {

View File

@ -22,7 +22,7 @@
<span>检测指标趋势图</span> <span>检测指标趋势图</span>
</div> </div>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-area @submit="getTrend"/> <search-area @submit="submitClick"/>
<line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim"/> <line-chart :chartData="chartData" v-show='Object.keys(chartData).length !== 0' :timeDim="queryParams.timeDim"/>
<!-- 没有数据 --> <!-- 没有数据 -->
<div class="no-data-bg" v-show='Object.keys(chartData).length === 0'></div> <div class="no-data-bg" v-show='Object.keys(chartData).length === 0'></div>
@ -33,6 +33,7 @@
import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental' import { environmentalCheckRealtime, environmentalCheckRealtimeTrend } from '@/api/safetyEnvironmental/environmental'
import LineChart from './../../components/lineChart' import LineChart from './../../components/lineChart'
import SearchArea from './../../components/searchArea' import SearchArea from './../../components/searchArea'
import moment from 'moment'
export default { export default {
name: 'WasteWaterManagement', name: 'WasteWaterManagement',
data(){ data(){
@ -49,27 +50,31 @@ export default {
components: { LineChart, SearchArea }, components: { LineChart, SearchArea },
mounted() { mounted() {
this.getMsg() this.getMsg()
this.queryParams.timeDim = this.getDictDatas(this.DICT_TYPE.TIME_DIM)[0].value //
this.queryParams.timeRange = [moment().startOf('day')+0, moment().endOf('day')-59*61*1000]
this.getTrend()
}, },
methods: { methods: {
getMsg() { getMsg() {
environmentalCheckRealtime({checkType: 1}).then(res => { environmentalCheckRealtime({checkType: 1}).then(res => {
console.log(res)
this.realtimeList = res.data || [] this.realtimeList = res.data || []
}) })
}, },
getTrend(params) { getTrend() {
console.log(params)
this.queryParams.timeDim = params.timeDim
this.queryParams.timeRange[0] = params.startTime
this.queryParams.timeRange[1] = params.endTime
environmentalCheckRealtimeTrend({...this.queryParams}).then(res => { environmentalCheckRealtimeTrend({...this.queryParams}).then(res => {
console.log(res)
if (res.code === 0) { if (res.code === 0) {
this.chartData = res.data this.chartData = res.data
} else { } else {
this.chartData = {} this.chartData = {}
} }
}) })
},
submitClick(params) {
console.log(params)
this.queryParams.timeDim = params.timeDim
this.queryParams.timeRange[0] = params.startTime
this.queryParams.timeRange[1] = params.endTime
this.getTrend()
} }
} }
} }