Compare commits
20 Commits
f685a65a1f
...
a80ce13de1
Author | SHA1 | Date | |
---|---|---|---|
|
a80ce13de1 | ||
|
a027c4ca63 | ||
267ee0015c | |||
9a6aa75171 | |||
41b79ba82c | |||
|
0a1175075d | ||
|
50cfcc3af2 | ||
d44f76b641 | |||
ac36dea881 | |||
|
063532567b | ||
873653b56d | |||
|
b2c6a5fae9 | ||
|
17b675cd13 | ||
|
3aa3361559 | ||
|
6df8c3bcc1 | ||
|
da0aa4aa75 | ||
3b6483f013 | |||
|
e509722ac4 | ||
|
48e7612a78 | ||
679f31af97 |
2
.env.dev
2
.env.dev
@ -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: 2024-03-01 15:27:52
|
# @LastEditTime: 2024-03-05 09:48:49
|
||||||
# @LastEditors: zhp
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
|
@ -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: 2024-02-18 13:53:09
|
* @LastEditTime: 2024-03-01 19:52:55
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -33,14 +33,13 @@
|
|||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.roomNameDict"
|
v-model="dataForm.roomNameDict"
|
||||||
filterable
|
filterable
|
||||||
:disabled="isdetail || isedit"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择车间名称">
|
placeholder="请选择车间名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(dict, index) in getDictDatas('workshop')"
|
v-for="(dict, index) in getDictDatas('workshop')"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="dict.label"
|
:label="dict.label"
|
||||||
:value="dict.value" />
|
:value="Number(dict.value)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -125,6 +124,26 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init(id) {
|
||||||
|
this.dataForm.id = id || "";
|
||||||
|
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
|
||||||
|
// this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (this.urlOptions.isGetCode) {
|
||||||
|
this.getCode()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 工厂列表
|
// 工厂列表
|
||||||
const factoryRes = await getFactoryList();
|
const factoryRes = await getFactoryList();
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
import SmallTitle from './SmallTitle';
|
import SmallTitle from './SmallTitle';
|
||||||
import { getworkerAll } from '@/api/base/materialUseLog';
|
import { getworkerAll } from '@/api/base/materialUseLog';
|
||||||
import Editor from '@/components/Editor';
|
import Editor from '@/components/Editor';
|
||||||
import DialogForm from '@/components/DialogForm';
|
import DialogForm from './DialogForm';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AlarmHandle',
|
name: 'AlarmHandle',
|
||||||
|
520
src/views/equipment/base/alarm/Record/DialogForm.vue
Normal file
520
src/views/equipment/base/alarm/Record/DialogForm.vue
Normal file
@ -0,0 +1,520 @@
|
|||||||
|
<!--
|
||||||
|
filename: dialogForm.vue
|
||||||
|
author: liubin
|
||||||
|
date: 2023-08-15 10:32:36
|
||||||
|
description: 弹窗的表单组件
|
||||||
|
-->
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:label-width="`${labelWidth}px`"
|
||||||
|
:size="size"
|
||||||
|
:label-position="labelPosition"
|
||||||
|
v-loading="formLoading">
|
||||||
|
<el-row :gutter="20" v-for="(row, rindex) in rows" :key="rindex">
|
||||||
|
<el-col v-for="col in row" :key="col.label" :span="24 / row.length">
|
||||||
|
<el-form-item :label="col.label" :prop="col.prop" :rules="col.rules">
|
||||||
|
<el-input
|
||||||
|
v-if="col.input"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
:placeholder="`请输入${col.label}`"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-bind="col.bind" />
|
||||||
|
<el-input
|
||||||
|
v-if="col.textarea"
|
||||||
|
type="textarea"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
:placeholder="`请输入${col.label}`"
|
||||||
|
v-bind="col.bind" />
|
||||||
|
<el-select
|
||||||
|
v-if="col.select"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:placeholder="`请选择${col.label}`"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
v-bind="col.bind">
|
||||||
|
<el-option
|
||||||
|
v-for="opt in optionListOf[col.prop]"
|
||||||
|
:key="opt.value"
|
||||||
|
:label="opt.label"
|
||||||
|
:value="opt.value" />
|
||||||
|
</el-select>
|
||||||
|
<el-date-picker
|
||||||
|
v-if="col.datetime"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
type="datetime"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="`请选择${col.label}`"
|
||||||
|
value-format="timestamp"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
v-bind="col.bind"></el-date-picker>
|
||||||
|
<el-switch
|
||||||
|
v-if="col.switch"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:disabled="disabled"
|
||||||
|
active-color="#0b58ff"
|
||||||
|
inactive-color="#e1e1e1"
|
||||||
|
@change="$emit('update', form)"
|
||||||
|
v-bind="col.bind"></el-switch>
|
||||||
|
<component
|
||||||
|
v-if="col.subcomponent"
|
||||||
|
:key="col.key"
|
||||||
|
:disabled="disabled"
|
||||||
|
:read-only="disabled"
|
||||||
|
:is="col.subcomponent"
|
||||||
|
v-model="form[col.prop]"
|
||||||
|
:inlineStyle="col.style"
|
||||||
|
@on-change="$emit('update', form)"
|
||||||
|
v-bind="col.bind"></component>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="upload-area"
|
||||||
|
:class="uploadOpen ? '' : 'height-48'"
|
||||||
|
ref="uploadArea"
|
||||||
|
:key="col.prop"
|
||||||
|
v-if="col.upload">
|
||||||
|
<span class="close-icon" :class="uploadOpen ? 'open' : ''">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-arrow-right"
|
||||||
|
@click="handleFilesOpen" />
|
||||||
|
</span>
|
||||||
|
<!-- :file-list="uploadedFileList" -->
|
||||||
|
<el-upload
|
||||||
|
v-if="col.upload"
|
||||||
|
class="upload-in-dialog"
|
||||||
|
:key="col.prop + '__el-upload'"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:headers="uploadHeaders"
|
||||||
|
:show-file-list="false"
|
||||||
|
icon="el-icon-upload2"
|
||||||
|
:disabled="disabled"
|
||||||
|
:before-upload="beforeUpload"
|
||||||
|
:on-success="
|
||||||
|
(response, file, fileList) => {
|
||||||
|
handleUploadSuccess(response, file, col.prop);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
v-bind="col.bind">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
:disabled="disabled || col.bind?.disabled || false">
|
||||||
|
<svg-icon
|
||||||
|
icon-class="icon-upload"
|
||||||
|
style="color: inherit"></svg-icon>
|
||||||
|
上传文件
|
||||||
|
</el-button>
|
||||||
|
<div class="el-upload__tip" slot="tip" v-if="col.uploadTips">
|
||||||
|
{{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }}
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
|
<uploadedFile
|
||||||
|
class="file"
|
||||||
|
v-for="file in form[col.prop]"
|
||||||
|
:file="file"
|
||||||
|
:key="file.fileUrl"
|
||||||
|
:disabled="disabled"
|
||||||
|
@delete="!disabled && handleDeleteFile(file, col.prop)" />
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAccessToken } from '@/utils/auth';
|
||||||
|
import tupleImg from '@/assets/images/tuple.png';
|
||||||
|
import cache from '@/utils/cache';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 找到最长的label
|
||||||
|
* @param {*} options
|
||||||
|
*/
|
||||||
|
function findMaxLabelWidth(rows) {
|
||||||
|
let max = 0;
|
||||||
|
rows.forEach((row) => {
|
||||||
|
row.forEach((opt) => {
|
||||||
|
// debugger;
|
||||||
|
if (!opt.label) return 0;
|
||||||
|
if (opt.label.length > max) {
|
||||||
|
max = opt.label.length;
|
||||||
|
if (opt.label.includes('(')) {
|
||||||
|
max = max - 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
const uploadedFile = {
|
||||||
|
name: 'UploadedFile',
|
||||||
|
props: ['file', 'disabled'],
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleDelete() {
|
||||||
|
this.$emit('delete', this.file);
|
||||||
|
},
|
||||||
|
async handleDownload() {
|
||||||
|
const data = await this.$axios({
|
||||||
|
url: this.file.fileUrl,
|
||||||
|
method: 'get',
|
||||||
|
responseType: 'blob',
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.$message.success('开始下载');
|
||||||
|
// create download link
|
||||||
|
const url = window.URL.createObjectURL(data);
|
||||||
|
const link = document.createElement('a');
|
||||||
|
link.href = url;
|
||||||
|
link.download = this.file.fileName;
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
document.body.removeChild(link);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
render: function (h) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
title={this.file.fileName}
|
||||||
|
onClick={this.handleDownload}
|
||||||
|
style={{
|
||||||
|
background: `url(${tupleImg}) no-repeat`,
|
||||||
|
backgroundSize: '14px',
|
||||||
|
backgroundPosition: '0 55%',
|
||||||
|
paddingLeft: '20px',
|
||||||
|
paddingRight: '24px',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
cursor: 'pointer',
|
||||||
|
display: 'inline-block',
|
||||||
|
}}>
|
||||||
|
{this.file.fileName}
|
||||||
|
{!this.disabled && (
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-close"
|
||||||
|
style="float: right; position: relative; top: 2px; left: 8px; z-index: 100"
|
||||||
|
class="dialog__upload_component__close"
|
||||||
|
onClick={this.handleDelete}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DialogForm',
|
||||||
|
model: {
|
||||||
|
prop: 'dataForm',
|
||||||
|
event: 'update',
|
||||||
|
},
|
||||||
|
emits: ['update'],
|
||||||
|
components: { uploadedFile },
|
||||||
|
props: {
|
||||||
|
rows: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
hasFiles: {
|
||||||
|
type: Boolean | Array,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
labelPosition: {
|
||||||
|
type: String,
|
||||||
|
default: 'right',
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
uploadOpen: false,
|
||||||
|
form: {},
|
||||||
|
formLoading: true,
|
||||||
|
optionListOf: {},
|
||||||
|
uploadedFileList: [],
|
||||||
|
dataLoaded: false,
|
||||||
|
uploadHeaders: { Authorization: 'Bearer ' + getAccessToken() },
|
||||||
|
uploadUrl: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 上传有关的headers,url都是固定的
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
labelWidth() {
|
||||||
|
let max = findMaxLabelWidth(this.rows);
|
||||||
|
// 每个汉字占20px
|
||||||
|
return max * 20;
|
||||||
|
// return max * 20 + 'px';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
rows: {
|
||||||
|
handler() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.handleOptions('watch');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: false,
|
||||||
|
},
|
||||||
|
dataForm: {
|
||||||
|
handler(val) {
|
||||||
|
this.form = JSON.parse(JSON.stringify(val));
|
||||||
|
if (this.hasFiles) {
|
||||||
|
if (typeof this.hasFiles == 'boolean' && this.hasFiles) {
|
||||||
|
this.form.files = this.form.files ?? [];
|
||||||
|
} else if (Array.isArray(this.hasFiles)) {
|
||||||
|
this.hasFiles.forEach((prop) => {
|
||||||
|
this.form[prop] = this.form[prop] ?? [];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 处理 options
|
||||||
|
this.handleOptions();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 模拟透传 ref */
|
||||||
|
validate(cb) {
|
||||||
|
return this.$refs.form.validate(cb);
|
||||||
|
},
|
||||||
|
resetFields(args) {
|
||||||
|
return this.$refs.form.resetFields(args);
|
||||||
|
},
|
||||||
|
// getCode
|
||||||
|
async getCode(url) {
|
||||||
|
const response = await this.$axios(url);
|
||||||
|
return response.data;
|
||||||
|
},
|
||||||
|
async handleOptions(trigger = 'monuted') {
|
||||||
|
console.log('[dialogForm:handleOptions]');
|
||||||
|
const promiseList = [];
|
||||||
|
this.rows.forEach((cols) => {
|
||||||
|
cols.forEach((opt) => {
|
||||||
|
if (opt.value && !this.form[opt.prop]) {
|
||||||
|
// 默认值
|
||||||
|
this.form[opt.prop] = opt.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opt.options) {
|
||||||
|
this.$set(this.optionListOf, opt.prop, opt.options);
|
||||||
|
} else if (opt.url) {
|
||||||
|
// 如果有 depends,则暂时先不获取,注册一个watcher
|
||||||
|
if (opt.depends) {
|
||||||
|
this.$watch(
|
||||||
|
() => this.form[opt.depends],
|
||||||
|
(id) => {
|
||||||
|
console.log('<', opt.depends, '>', 'changed', id);
|
||||||
|
if (id == null) return;
|
||||||
|
// 清空原有选项
|
||||||
|
this.form[opt.prop] = null;
|
||||||
|
// 获取新的选项
|
||||||
|
this.$axios({
|
||||||
|
url: `${opt.url}?id=${id}`,
|
||||||
|
}).then((res) => {
|
||||||
|
this.$set(
|
||||||
|
this.optionListOf,
|
||||||
|
opt.prop,
|
||||||
|
res.data.map((item) => ({
|
||||||
|
label: item[opt.labelKey ?? 'name'],
|
||||||
|
value: item[opt.valueKey ?? 'id'],
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: false,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 如果是下拉框,或者新增模式下的输入框,才去请求
|
||||||
|
if (opt.select || (opt.input && !this.form?.id)) {
|
||||||
|
promiseList.push(async () => {
|
||||||
|
const response = await this.$axios(opt.url, {
|
||||||
|
method: opt.method ?? 'get',
|
||||||
|
// data: opt.method == 'post' ? opt.queryParams : null
|
||||||
|
});
|
||||||
|
// console.log('[dialogForm:handleOptions:response]', response);
|
||||||
|
if (opt.select) {
|
||||||
|
// 处理下拉框选项
|
||||||
|
const list =
|
||||||
|
'list' in response.data
|
||||||
|
? response.data.list
|
||||||
|
: response.data;
|
||||||
|
|
||||||
|
if (opt.cache) {
|
||||||
|
cache.store(opt.cache, list);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$set(
|
||||||
|
this.optionListOf,
|
||||||
|
opt.prop,
|
||||||
|
list.map((item) => ({
|
||||||
|
label: item[opt.labelKey ?? 'name'],
|
||||||
|
value: item[opt.valueKey ?? 'id'],
|
||||||
|
}))
|
||||||
|
);
|
||||||
|
} else if (opt.input) {
|
||||||
|
console.log('setting code: ', response.data);
|
||||||
|
// 处理输入框数据
|
||||||
|
this.form[opt.prop] = response.data;
|
||||||
|
// 更新下外部的 dataForm,防止code字段有数据也报空的bug
|
||||||
|
this.$emit('update', this.form);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('[dialogForm:handleOptions] done!');
|
||||||
|
|
||||||
|
// 如果是 watch 触发的,不需要执行进一步的请求
|
||||||
|
if (trigger == 'watch') {
|
||||||
|
this.formLoading = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await Promise.all(promiseList.map((fn) => fn()));
|
||||||
|
this.formLoading = false;
|
||||||
|
this.dataLoaded = true;
|
||||||
|
// console.log("[dialogForm:handleOptions:optionListOf]", this.optionListOf)
|
||||||
|
} catch (error) {
|
||||||
|
console.log('[dialogForm:handleOptions:error]', error);
|
||||||
|
this.formLoading = false;
|
||||||
|
}
|
||||||
|
if (!promiseList.length) this.formLoading = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 上传成功的特殊处理
|
||||||
|
beforeUpload(file) {
|
||||||
|
const checkFileSize = () => {
|
||||||
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
|
if (!isLt2M) {
|
||||||
|
this.$modal.msgError('上传文件大小不能超过 2MB!');
|
||||||
|
}
|
||||||
|
return isLt2M;
|
||||||
|
};
|
||||||
|
const checkFileType = () => {
|
||||||
|
const isJPG =
|
||||||
|
file.type === 'image/jpeg' ||
|
||||||
|
file.type === 'image/png' ||
|
||||||
|
file.type === 'image/jpg';
|
||||||
|
return isJPG;
|
||||||
|
};
|
||||||
|
// return checkFileSize() && checkFileType();
|
||||||
|
return checkFileSize();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 上传前的验证规则可通过 bind 属性传入
|
||||||
|
handleUploadSuccess(response, file, prop) {
|
||||||
|
console.log('[handleUploadSuccess]', response, file, prop);
|
||||||
|
this.form[prop].push({
|
||||||
|
fileName: file.name,
|
||||||
|
fileUrl: response.data,
|
||||||
|
fileType: prop == 'files' ? 2 : 1,
|
||||||
|
});
|
||||||
|
this.$modal.msgSuccess('上传成功');
|
||||||
|
this.$emit('update', this.form);
|
||||||
|
},
|
||||||
|
|
||||||
|
getFileName(fileUrl) {
|
||||||
|
return fileUrl.split('/').pop();
|
||||||
|
},
|
||||||
|
|
||||||
|
handleFilesOpen() {
|
||||||
|
this.uploadOpen = !this.uploadOpen;
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDeleteFile(file, prop) {
|
||||||
|
this.form[prop] = this.form[prop].filter(
|
||||||
|
(item) => item.fileUrl != file.fileUrl
|
||||||
|
);
|
||||||
|
this.$emit('update', this.form);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.el-date-editor,
|
||||||
|
.el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-area {
|
||||||
|
// background: #ccc;
|
||||||
|
// display: grid;
|
||||||
|
// grid-auto-rows: 34px;
|
||||||
|
// grid-template-columns: repeat(6, minmax(32px, max-content));
|
||||||
|
// gap: 8px;
|
||||||
|
// align-items: center;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: height 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-in-dialog {
|
||||||
|
// display: inline-block;
|
||||||
|
margin-right: 24px;
|
||||||
|
// background: #ccc;
|
||||||
|
position: relative;
|
||||||
|
// top: -13px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon {
|
||||||
|
// background: #ccc;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 12px;
|
||||||
|
z-index: 100;
|
||||||
|
transition: transform 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-icon.open {
|
||||||
|
transform: rotateZ(90deg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.dialog__upload_component__close {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
.dialog__upload_component__close:hover {
|
||||||
|
/* color: #777; */
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.height-48 {
|
||||||
|
height: 35px !important;
|
||||||
|
}
|
||||||
|
</style>
|
@ -294,7 +294,7 @@ export default {
|
|||||||
name: undefined,
|
name: undefined,
|
||||||
enName: undefined,
|
enName: undefined,
|
||||||
description: undefined,
|
description: undefined,
|
||||||
collection: undefined,
|
collection: 1,
|
||||||
};
|
};
|
||||||
this.resetForm('form');
|
this.resetForm('form');
|
||||||
},
|
},
|
||||||
|
@ -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: 2024-02-29 14:59:28
|
* @LastEditTime: 2024-03-04 11:14:28
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
v-for="opt in inspectorOptions"
|
v-for="opt in inspectorOptions"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -418,7 +418,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getConfirmed() {
|
getConfirmed() {
|
||||||
return this.$confirm('是否直接确认巡检记录', '提示', {
|
return this.$confirm('是否直接确认巡检单', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@ -431,10 +431,16 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getConfirmed().then(confirm => {
|
this.getConfirmed().then(confirm => {
|
||||||
|
// let checkPersonParam = '';
|
||||||
|
// if (!this.dataForm.checkPerson || this.dataForm.checkPerson.trim() == '') {
|
||||||
|
// /** 如有必要,更新巡检人 */
|
||||||
|
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||||
|
// } else {
|
||||||
|
// checkPersonParam = `&checkPerson=${this.dataForm.checkPerson}`
|
||||||
|
// }
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url:
|
url:
|
||||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
this.$store.getters.userId,
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [this.dataForm.id],
|
data: [this.dataForm.id],
|
||||||
}).then(res =>{
|
}).then(res =>{
|
||||||
|
@ -179,8 +179,14 @@ export default {
|
|||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认所有选中巡检单"?')
|
.confirm('是否确认所有选中巡检单"?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
// let checkPersonParam = '';
|
||||||
|
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||||
|
// /** 如有必要,更新巡检人 */
|
||||||
|
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||||
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId,
|
// url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` + checkPersonParam,
|
||||||
|
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||||
(item) => item.id
|
(item) => item.id
|
||||||
@ -394,11 +400,17 @@ export default {
|
|||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认巡检单"' + row.name + '"?')
|
.confirm('是否确认巡检单"' + row.name + '"?')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
// let checkPersonParam = '';
|
||||||
|
// const nickname = this.$store.getters.nickname;
|
||||||
|
// if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||||
|
// /** 如有必要,更新巡检人 */
|
||||||
|
// checkPersonParam = `&checkPerson=${nickname}`;
|
||||||
|
// } else {
|
||||||
|
// checkPersonParam = `&checkPerson=${row.checkPerson}`
|
||||||
|
// }
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url:
|
url:
|
||||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
this.$store.getters.userId,
|
|
||||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [row.id],
|
data: [row.id],
|
||||||
});
|
});
|
||||||
|
@ -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: 2024-02-29 14:58:37
|
* @LastEditTime: 2024-03-01 19:44:59
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -11,24 +11,18 @@
|
|||||||
:rules="dataRule"
|
:rules="dataRule"
|
||||||
ref="dataForm"
|
ref="dataForm"
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
@keyup.enter.native="dataFormSubmit()"
|
||||||
label-width="120px">
|
label-width="150px">
|
||||||
<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
|
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
|
||||||
v-model="dataForm.name"
|
|
||||||
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
|
<el-input v-model="dataForm.code" placeholder="请输入巡检单编码" />
|
||||||
v-model="dataForm.code"
|
|
||||||
placeholder="请输入巡检单编码" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="部门"
|
label="部门"
|
||||||
@ -57,8 +51,13 @@
|
|||||||
style="width: 100%" />
|
style="width: 100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
<el-row :gutter="20">
|
<el-form-item label="巡检频率(天/次)" prop="checkPeriod">
|
||||||
|
<el-input
|
||||||
|
v-model="dataForm.checkPeriod"
|
||||||
|
placeholder="请输入巡检频率(天/次)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
||||||
<el-input
|
<el-input
|
||||||
@ -83,8 +82,6 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
||||||
@ -96,9 +93,14 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../../../core/mixins/basic-add';
|
import basicAdd from '../../../../core/mixins/basic-add';
|
||||||
import { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
|
import {
|
||||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
getCheckOrder,
|
||||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
getOrderCode,
|
||||||
|
createCheckOrder,
|
||||||
|
updateCheckOrder,
|
||||||
|
} from '@/api/equipment/base/inspection/settings';
|
||||||
|
import { getCoreDepartmentList } from '@/api/base/coreDepartment';
|
||||||
|
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
|
||||||
import { getDictDataLabel } from '@/utils/dict';
|
import { getDictDataLabel } from '@/utils/dict';
|
||||||
// import { getEquipmentAll } from '@/api/base/equipment'
|
// import { getEquipmentAll } from '@/api/base/equipment'
|
||||||
|
|
||||||
@ -121,55 +123,72 @@ export default {
|
|||||||
planCheckTime: null,
|
planCheckTime: null,
|
||||||
confirmTimeLimit: null,
|
confirmTimeLimit: null,
|
||||||
groupClass: null,
|
groupClass: null,
|
||||||
remark: null
|
remark: null,
|
||||||
|
checkPeriod: null
|
||||||
},
|
},
|
||||||
groupOptions: [],
|
groupOptions: [],
|
||||||
departmentOptions: [],
|
departmentOptions: [],
|
||||||
dataRule: {
|
dataRule: {
|
||||||
confirmTimeLimit: [
|
confirmTimeLimit: [
|
||||||
{ required: true, message: '确认时限不能为空', trigger: 'blur' }
|
{ required: true, message: '确认时限不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' }
|
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' }
|
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
planCheckTime: [
|
planCheckTime: [
|
||||||
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' }
|
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
checkPeriod: [
|
||||||
|
{ required: true, message: '巡检频率不能为空', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
type: 'number',
|
||||||
|
message: '请输入正确的数字类型',
|
||||||
|
trigger: 'blur',
|
||||||
|
transform: (val) => Number(val),
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const currenttime = new Date()
|
const currenttime = new Date();
|
||||||
this.dataForm.planCheckTime = new Date(currenttime.getFullYear(), currenttime.getMonth(), currenttime.getDate(), 8, 0, 0).getTime()
|
this.dataForm.planCheckTime = new Date(
|
||||||
console.log('11', this.dataForm.planCheckTime, currenttime)
|
currenttime.getFullYear(),
|
||||||
|
currenttime.getMonth(),
|
||||||
|
currenttime.getDate(),
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
).getTime();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getDict()
|
this.getDict();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init(id) {
|
init(id) {
|
||||||
this.dataForm.id = id || "";
|
this.dataForm.id = id || '';
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
if (this.urlOptions.getOption) {
|
if (this.urlOptions.getOption) {
|
||||||
this.getArr()
|
this.getArr();
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs["dataForm"].resetFields();
|
this.$refs['dataForm'].resetFields();
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.infoURL(id).then(response => {
|
this.urlOptions.infoURL(id).then((response) => {
|
||||||
this.dataForm = response.data
|
this.dataForm = response.data;
|
||||||
if (response.data.groupClass === '') {
|
if (response.data?.groupClass === '') {
|
||||||
this.dataForm.groupClass = []
|
this.dataForm.groupClass = [];
|
||||||
} else {
|
} else {
|
||||||
this.dataForm.groupClass = response.data?.groupClass.split(',') || undefined
|
this.dataForm.groupClass =
|
||||||
|
response.data?.groupClass?.split(',') || undefined;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (this.urlOptions.isGetCode) {
|
if (this.urlOptions.isGetCode) {
|
||||||
this.getCode()
|
this.getCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -179,43 +198,49 @@ export default {
|
|||||||
const res = await getCoreDepartmentList();
|
const res = await getCoreDepartmentList();
|
||||||
this.departmentOptions = res.data || [];
|
this.departmentOptions = res.data || [];
|
||||||
const res1 = await groupClassesListAll();
|
const res1 = await groupClassesListAll();
|
||||||
this.groupOptions = res1.data.map((item) => {
|
this.groupOptions =
|
||||||
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
|
res1.data.map((item) => {
|
||||||
return item
|
item.label =
|
||||||
|
item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict);
|
||||||
|
return item;
|
||||||
}) || [];
|
}) || [];
|
||||||
// const res = await getEquipmentAll()
|
// const res = await getEquipmentAll()
|
||||||
// this.eqList = res.data
|
// this.eqList = res.data
|
||||||
},
|
},
|
||||||
// 表单提交
|
// 表单提交
|
||||||
dataFormSubmit() {
|
dataFormSubmit() {
|
||||||
this.$refs["dataForm"].validate((valid) => {
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 修改的提交
|
// 修改的提交
|
||||||
if (this.dataForm.id) {
|
if (this.dataForm.id) {
|
||||||
this.urlOptions.updateURL({
|
this.urlOptions
|
||||||
|
.updateURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
special: false,
|
special: false,
|
||||||
status: 0,
|
status: 0,
|
||||||
groupClass: this.dataForm.groupClass.join(',')
|
groupClass: this.dataForm.groupClass?.join(','),
|
||||||
}).then(response => {
|
})
|
||||||
this.$modal.msgSuccess("修改成功");
|
.then((response) => {
|
||||||
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit('refreshDataList');
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 添加的提交
|
// 添加的提交
|
||||||
this.urlOptions.createURL({
|
this.urlOptions
|
||||||
|
.createURL({
|
||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
special: false,
|
special: false,
|
||||||
status: 0,
|
status: 0,
|
||||||
groupClass: this.dataForm.groupClass.join(',')
|
groupClass: this.dataForm.groupClass?.join(','),
|
||||||
}).then(response => {
|
})
|
||||||
this.$modal.msgSuccess("新增成功");
|
.then((response) => {
|
||||||
|
this.$modal.msgSuccess('新增成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("refreshDataList");
|
this.$emit('refreshDataList');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -37,9 +37,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="handleConfirm">
|
@confirm="handleConfirm">
|
||||||
<add
|
<add ref="add" @refreshDataList="successSubmit" />
|
||||||
ref="add"
|
|
||||||
@refreshDataList="successSubmit" />
|
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
<!-- 添加巡检,查看详情 -->
|
<!-- 添加巡检,查看详情 -->
|
||||||
<addOrUpdata
|
<addOrUpdata
|
||||||
@ -52,7 +50,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import addOrUpdata from './add-or-updata.vue';
|
import addOrUpdata from './add-or-updata.vue';
|
||||||
import add from './add.vue'
|
import add from './add.vue';
|
||||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
// import { publicFormatter } from '@/utils/dict';
|
// import { publicFormatter } from '@/utils/dict';
|
||||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
@ -71,7 +69,7 @@ export default {
|
|||||||
? {
|
? {
|
||||||
type: 'add',
|
type: 'add',
|
||||||
btnName: '添加',
|
btnName: '添加',
|
||||||
showTip: '添加巡检'
|
showTip: '添加巡检',
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
this.$auth.hasPermi('equipment:check-setting:update')
|
this.$auth.hasPermi('equipment:check-setting:update')
|
||||||
@ -94,16 +92,40 @@ export default {
|
|||||||
: undefined,
|
: undefined,
|
||||||
].filter((v) => v),
|
].filter((v) => v),
|
||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
|
{
|
||||||
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
|
prop: 'name',
|
||||||
|
label: '巡检单名称',
|
||||||
|
width: 110,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'code',
|
||||||
|
label: '巡检单编码',
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
{ prop: 'department', label: '部门', showOverflowtooltip: true },
|
{ prop: 'department', label: '部门', showOverflowtooltip: true },
|
||||||
{ prop: 'planCheckTime', label: '计划巡检时间', width: 150, filter: parseTime },
|
{
|
||||||
{ prop: 'confirmTimeLimit', label: '确认时限', showOverflowtooltip: true },
|
prop: 'planCheckTime',
|
||||||
|
label: '计划巡检时间',
|
||||||
|
width: 150,
|
||||||
|
filter: parseTime,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'confirmTimeLimit',
|
||||||
|
label: '确认时限',
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
||||||
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
|
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
|
||||||
{ prop: 'createTime', label: '创建时间', width: 150, filter: parseTime },
|
{
|
||||||
|
prop: 'createTime',
|
||||||
|
label: '创建时间',
|
||||||
|
width: 150,
|
||||||
|
filter: parseTime,
|
||||||
|
},
|
||||||
// { prop: 'responsible', label: '负责人' },
|
// { prop: 'responsible', label: '负责人' },
|
||||||
{ prop: 'remark', label: '备注' } // TODO: 操作 选项,四个,群里询问
|
{ prop: 'remark', label: '备注' }, // TODO: 操作 选项,四个,群里询问
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
{
|
{
|
||||||
@ -136,7 +158,7 @@ export default {
|
|||||||
name: 'add',
|
name: 'add',
|
||||||
plain: true,
|
plain: true,
|
||||||
color: 'success',
|
color: 'success',
|
||||||
}
|
},
|
||||||
// {
|
// {
|
||||||
// type: this.$auth.hasPermi('equipment:check-setting:export')
|
// type: this.$auth.hasPermi('equipment:check-setting:export')
|
||||||
// ? 'button'
|
// ? 'button'
|
||||||
@ -177,7 +199,11 @@ export default {
|
|||||||
clearable: true,
|
clearable: true,
|
||||||
},
|
},
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: '设备名称不能为空', trigger: 'change' },
|
{
|
||||||
|
required: true,
|
||||||
|
message: '设备名称不能为空',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -196,13 +222,13 @@ export default {
|
|||||||
equipmentId: null,
|
equipmentId: null,
|
||||||
name: null,
|
name: null,
|
||||||
special: false,
|
special: false,
|
||||||
status: 0
|
status: 0,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
basePath: '/base/equipment-check-order',
|
basePath: '/base/equipment-check-order',
|
||||||
mode: null,
|
mode: null,
|
||||||
groupList: []
|
groupList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -212,11 +238,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.$refs.add.dataFormSubmit()
|
this.$refs.add.dataFormSubmit();
|
||||||
},
|
},
|
||||||
successSubmit() {
|
successSubmit() {
|
||||||
this.cancel()
|
this.cancel();
|
||||||
this.getList()
|
this.getList();
|
||||||
},
|
},
|
||||||
initSearchBar() {
|
initSearchBar() {
|
||||||
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
this.http('/base/core-equipment/listAll', 'get').then(({ data }) => {
|
||||||
@ -231,9 +257,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getGroup() {
|
getGroup() {
|
||||||
groupClassesListAll().then(res => {
|
groupClassesListAll().then((res) => {
|
||||||
this.groupList = res.data || []
|
this.groupList = res.data || [];
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
/** 查询列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@ -247,9 +273,9 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$refs.add.formClear()
|
this.$refs.add.formClear();
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.title = ''
|
this.title = '';
|
||||||
// this.reset();
|
// this.reset();
|
||||||
},
|
},
|
||||||
/** 表单重置 */
|
/** 表单重置 */
|
||||||
|
@ -160,6 +160,7 @@ import Editor from "@/components/Editor";
|
|||||||
import { getDictDatas } from "@/utils/dict";
|
import { getDictDatas } from "@/utils/dict";
|
||||||
import { parseTime } from '@/utils/ruoyi'
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
import { getDictDataLabel } from '@/utils/dict';
|
import { getDictDataLabel } from '@/utils/dict';
|
||||||
|
import tupleImg from '@/assets/images/tuple.png';
|
||||||
|
|
||||||
const uploadedFile = {
|
const uploadedFile = {
|
||||||
name: 'UploadedFile',
|
name: 'UploadedFile',
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<!-- 产线名 -->
|
<!-- 产线名 -->
|
||||||
<el-col :span="8">
|
<!-- <el-col :span="8">
|
||||||
<el-form-item label="产线名" prop="lineId">
|
<el-form-item label="产线名" prop="lineId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formFilters.lineId"
|
v-model="formFilters.lineId"
|
||||||
@ -45,10 +45,10 @@
|
|||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</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="sectionId">
|
<el-form-item label="工段名" prop="sectionId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formFilters.sectionId"
|
v-model="formFilters.sectionId"
|
||||||
@ -64,7 +64,7 @@
|
|||||||
:value="opt.value" />
|
:value="opt.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
|
|
||||||
<!-- 设备名称 -->
|
<!-- 设备名称 -->
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -234,7 +234,7 @@
|
|||||||
v-for="opt in workerOptions"
|
v-for="opt in workerOptions"
|
||||||
:key="opt.value"
|
:key="opt.value"
|
||||||
:label="opt.label"
|
:label="opt.label"
|
||||||
:value="opt.value" />
|
:value="opt.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -597,9 +597,9 @@ export default {
|
|||||||
/** 设置默认维修工为用户自己 */
|
/** 设置默认维修工为用户自己 */
|
||||||
setInitWorker() {
|
setInitWorker() {
|
||||||
/** 获取用户自身id */
|
/** 获取用户自身id */
|
||||||
const userId = this.$store.getters.userId;
|
const nickname = this.$store.getters.nickname;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.repairman = [userId];
|
this.form.repairman = [nickname];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -630,8 +630,8 @@ export default {
|
|||||||
/** 获取设备 */
|
/** 获取设备 */
|
||||||
async initEquipment() {
|
async initEquipment() {
|
||||||
const response = await this.$axios('/base/core-equipment/listAll');
|
const response = await this.$axios('/base/core-equipment/listAll');
|
||||||
this.equipmentList = response.data || [];
|
this.equipmentList = response.data.filter(item => item.special === false) || [];
|
||||||
this.equipmentOptions = response.data || [];
|
this.equipmentOptions = response.data.filter(item => item.special === false) || [];
|
||||||
// this.allSpeicalEquipments = equipmentOptions;
|
// this.allSpeicalEquipments = equipmentOptions;
|
||||||
},
|
},
|
||||||
/** 获取维修工 - 同时从用户表和员工表拉取数据 */
|
/** 获取维修工 - 同时从用户表和员工表拉取数据 */
|
||||||
@ -737,6 +737,7 @@ export default {
|
|||||||
fileType: prop == 'files' ? 2 : 1,
|
fileType: prop == 'files' ? 2 : 1,
|
||||||
});
|
});
|
||||||
this.$modal.msgSuccess('上传成功');
|
this.$modal.msgSuccess('上传成功');
|
||||||
|
console.log('为我', this.form.files)
|
||||||
this.$emit('update', this.form);
|
this.$emit('update', this.form);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -60,14 +60,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='6'>
|
<el-col :span='6'>
|
||||||
<el-form-item label="包装要求" prop="packReq">
|
<el-form-item label="包装要求" prop="packReq">
|
||||||
<el-select v-model="form.packReq" placeholder="请选择" style="width: 100%;" clearable>
|
<el-input v-model="form.packReq"></el-input>
|
||||||
<el-option
|
|
||||||
v-for="item in getDictDatas(DICT_TYPE.PACK_SPEC)"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -127,7 +120,7 @@ export default {
|
|||||||
this.form.customerId = res.data.customerId
|
this.form.customerId = res.data.customerId
|
||||||
this.form.planQuantity = res.data.planQuantity
|
this.form.planQuantity = res.data.planQuantity
|
||||||
this.form.deliveTime = res.data.deliveTime ? res.data.deliveTime : null
|
this.form.deliveTime = res.data.deliveTime ? res.data.deliveTime : null
|
||||||
this.form.packReq = res.data.packReq ? res.data.packReq+'' : ''
|
this.form.packReq = res.data.packReq
|
||||||
this.form.remark = res.data.remark
|
this.form.remark = res.data.remark
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getSpecifications(this.form.planProductId)
|
this.getSpecifications(this.form.planProductId)
|
||||||
|
@ -125,7 +125,7 @@ const tableProps = [
|
|||||||
{
|
{
|
||||||
prop: 'packReq',
|
prop: 'packReq',
|
||||||
label: '包装要求',
|
label: '包装要求',
|
||||||
filter: publicFormatter('pack_spec'),
|
// filter: publicFormatter('pack_spec'),
|
||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
showOverflowtooltip: true
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
|
@ -188,8 +188,8 @@ export default {
|
|||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.pageNo = 1;
|
this.listQuery.pageNo = 1;
|
||||||
this.listQuery.pageSize = 10;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.content = val.content ? val.content : undefined;
|
this.listQuery.materialId = val.materialId ? val.materialId : undefined;
|
||||||
this.listQuery.typeId = val.typeId ? val.typeId : undefined;
|
// this.listQuery.typeId = val.typeId ? val.typeId : undefined;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-24 15:15:24
|
* @Date: 2024-01-24 15:15:24
|
||||||
* @LastEditTime: 2024-01-24 15:38:53
|
* @LastEditTime: 2024-03-05 09:36:28
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -63,8 +63,13 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
|
this.getTodayStartTimeAndEndTime()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getTodayStartTimeAndEndTime() {
|
||||||
|
this.reportTime = new Date()
|
||||||
|
this.changeTime(this.reportTime)
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
|
@ -60,6 +60,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getCurrentMonthFirst()
|
||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -67,6 +68,14 @@ export default {
|
|||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
this.proLineList = res.data;
|
this.proLineList = res.data;
|
||||||
|
},
|
||||||
|
getCurrentMonthFirst() {
|
||||||
|
const date = new Date();
|
||||||
|
date.setDate(1);
|
||||||
|
this.reportTime = date
|
||||||
|
// console.log(date)
|
||||||
|
this.changeTime(date)
|
||||||
|
// console.log(date.valueOf());
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
@ -91,23 +100,34 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
|
console.log(val)
|
||||||
if(val) {
|
if(val) {
|
||||||
const timeStamp = val.getMonth(); //标准时间转为时间戳,毫秒级别
|
const timeStamp = val.getMonth(); //标准时间转为时间戳,毫秒级别
|
||||||
const fullyear = val.getFullYear()
|
const fullyear = val.getFullYear()
|
||||||
let days = 0
|
let days = 0
|
||||||
switch (timeStamp) {
|
switch (timeStamp) {
|
||||||
case 0, 2, 4, 6, 7, 9, 11:
|
case 0:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 9:
|
||||||
|
case 11:
|
||||||
days = 31
|
days = 31
|
||||||
break
|
break
|
||||||
case 3, 4, 8, 10:
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 8:
|
||||||
|
case 10:
|
||||||
days = 30
|
days = 30
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
if ((fullyear % 400 === 0) || (fullyear() % 4 === 0 && fullyear() % 100 !== 0)) {
|
if ((fullyear % 400 === 0) || (fullyear % 4 === 0 && fullyear % 100 !== 0)) {
|
||||||
days = 29
|
days = 29
|
||||||
} else {
|
} else {
|
||||||
days = 28
|
days = 28
|
||||||
}
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1).getTime()); //开始时间
|
this.startTimeStamp = this.timeFun(new Date(fullyear, timeStamp, 1).getTime()); //开始时间
|
||||||
this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()); //结束时间
|
this.endTimeStamp = this.timeFun(new Date(fullyear, timeStamp, days, 23, 59, 59).getTime()); //结束时间
|
||||||
|
@ -94,6 +94,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
// const day = new Date().getDay()
|
// const day = new Date().getDay()
|
||||||
// console.log('周四', day)
|
// console.log('周四', day)
|
||||||
|
this.getCurrentWeekStartTimeAndEndTime()
|
||||||
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
|
// this.changeTime(new Date(new Date().getTime() - day * 24 * 60 * 60 * 1000))
|
||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
@ -104,6 +105,10 @@ export default {
|
|||||||
this.proLineList = res.data;
|
this.proLineList = res.data;
|
||||||
// this.getDataList()
|
// this.getDataList()
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
getCurrentWeekStartTimeAndEndTime() {
|
||||||
|
this.reportTime = new Date()
|
||||||
|
this.changeTime(this.reportTime)
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
@ -128,6 +133,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
|
console.log(val);
|
||||||
if(val) {
|
if(val) {
|
||||||
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
||||||
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
||||||
|
@ -60,7 +60,21 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
|
mounted () {
|
||||||
|
this.getCurrentYearFirst()
|
||||||
|
;
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCurrentYearFirst() {
|
||||||
|
let date = new Date();
|
||||||
|
date.setDate(1);
|
||||||
|
date.setMonth(0);
|
||||||
|
this.reportTime = date;
|
||||||
|
this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1).getTime()); //开始时间
|
||||||
|
this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 23, 59, 59).getTime()); //结束时间
|
||||||
|
this.listQuery.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.listQuery.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 产线列表
|
// 产线列表
|
||||||
const res = await getCorePLList();
|
const res = await getCorePLList();
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-01 15:26:38
|
* @LastEditTime: 2024-03-05 09:36:18
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="listQuery" class="demo-form-inline">
|
||||||
<el-form-item label="日" prop="reportTime">
|
<el-form-item label="日" prop="reportTime">
|
||||||
<el-date-picker v-model="dataForm.reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
<el-date-picker clearable v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -27,26 +27,26 @@
|
|||||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineId" label="生产线">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineId }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="本周">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="上周">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -54,21 +54,21 @@
|
|||||||
<el-table-column label="完成良品产量">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="本周">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="上周">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -77,19 +77,19 @@
|
|||||||
<el-table-column label="原片漏检率">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="本周">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上周">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -98,21 +98,21 @@
|
|||||||
<el-table-column label="综合良品率">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="本周">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上周">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -121,7 +121,9 @@
|
|||||||
</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 v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -389,7 +391,8 @@ export default {
|
|||||||
// remark: undefined,
|
// remark: undefined,
|
||||||
// },
|
// },
|
||||||
// 查询参数
|
// 查询参数
|
||||||
dataForm: {
|
reportTime:'',
|
||||||
|
listQuery: {
|
||||||
// workOrderIdList:undefined,
|
// workOrderIdList:undefined,
|
||||||
// productionId: undefined,
|
// productionId: undefined,
|
||||||
// startTime: undefined,
|
// startTime: undefined,
|
||||||
@ -419,6 +422,7 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
|
this.getTodayStartTimeAndEndTime()
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -434,22 +438,27 @@ export default {
|
|||||||
// var s = time.getSeconds();
|
// var s = time.getSeconds();
|
||||||
return time
|
return time
|
||||||
},
|
},
|
||||||
|
getTodayStartTimeAndEndTime() {
|
||||||
|
this.reportTime = new Date()
|
||||||
|
this.changeTime(this.reportTime)
|
||||||
|
},
|
||||||
changeTime(val) {
|
changeTime(val) {
|
||||||
|
console.log(val)
|
||||||
if (val) {
|
if (val) {
|
||||||
// console.log(val)
|
// console.log(val)
|
||||||
// console.log(val.setHours(7, 0, 0))
|
// console.log(val.setHours(7, 0, 0))
|
||||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||||
// let time = this.format(val.setHours(7, 0, 0))
|
// let time = this.format(val.setHours(7, 0, 0))
|
||||||
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.dataForm.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
console.log(this.dataForm.reportTime);
|
console.log(this.listQuery.reportTime);
|
||||||
} else {
|
} else {
|
||||||
this.dataForm.reportTime = []
|
this.listQuery.reportTime = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
let params = { ...this.listQuery };
|
||||||
params.pageNo = undefined;
|
params.pageNo = undefined;
|
||||||
params.pageSize = undefined;
|
params.pageSize = undefined;
|
||||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||||
@ -460,36 +469,36 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
timeSelect() {
|
// timeSelect() {
|
||||||
// switch (this.queryParams.timeDim) {
|
// // switch (this.queryParams.timeDim) {
|
||||||
// case '1':
|
// // case '1':
|
||||||
// if (this.timeValue[1] - this.timeValue[0] > 7 * 24 * 3600000) {
|
// // if (this.timeValue[1] - this.timeValue[0] > 7 * 24 * 3600000) {
|
||||||
// this.$modal.msgError('最大时间范围为7天,请重新选择')
|
// // this.$modal.msgError('最大时间范围为7天,请重新选择')
|
||||||
// this.timeValue = []
|
// // this.timeValue = []
|
||||||
// }
|
// // }
|
||||||
// break
|
// // break
|
||||||
// case '2':
|
// // case '2':
|
||||||
if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
|
||||||
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
|
||||||
this.monthValue = []
|
|
||||||
}
|
|
||||||
// break
|
|
||||||
// case '4':
|
|
||||||
// if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
// if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||||
// this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
// this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||||
// this.monthValue = []
|
// this.monthValue = []
|
||||||
// }
|
// }
|
||||||
// break
|
// // break
|
||||||
// default:
|
// // case '4':
|
||||||
},
|
// // if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||||
transformTime(timeStamp) {// 本月最后一天
|
// // this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||||
let year = moment(timeStamp).format('YYYY')
|
// // this.monthValue = []
|
||||||
let month = moment(timeStamp).format('MM')
|
// // }
|
||||||
let newData = moment(new Date(year, month, 0)).format('YYYY-MM-DD') + ' 23:59:59'
|
// // break
|
||||||
let value = newData
|
// // default:
|
||||||
console.log(value);
|
// },
|
||||||
return value
|
// transformTime(timeStamp) {// 本月最后一天
|
||||||
},
|
// let year = moment(timeStamp).format('YYYY')
|
||||||
|
// let month = moment(timeStamp).format('MM')
|
||||||
|
// let newData = moment(new Date(year, month, 0)).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
|
// let value = newData
|
||||||
|
// console.log(value);
|
||||||
|
// return value
|
||||||
|
// },
|
||||||
// selectTime() {
|
// selectTime() {
|
||||||
// switch (this.queryParams.type) {
|
// switch (this.queryParams.type) {
|
||||||
// case 1:
|
// case 1:
|
||||||
@ -532,23 +541,23 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
if (this.monthValue.length > 0) {
|
// if (this.monthValue.length > 0) {
|
||||||
console.log(this.monthValue)
|
// console.log(this.monthValue)
|
||||||
this.dataForm.reportTime[0] = this.transformTime(this.monthValue[0])
|
// this.listQuery.reportTime[0] = this.transformTime(this.monthValue[0])
|
||||||
// this.queryParams.startTime = this.monthValue[0]
|
// // this.queryParams.startTime = this.monthValue[0]
|
||||||
this.dataForm.reportTime[1] = this.transformTime(this.monthValue[1])
|
// this.listQuery.reportTime[1] = this.transformTime(this.monthValue[1])
|
||||||
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
// this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
||||||
console.log(this.timeTips);
|
// console.log(this.timeTips);
|
||||||
} else {
|
// } else {
|
||||||
// this.$modal.msgError('月范围不能为空')
|
// // this.$modal.msgError('月范围不能为空')
|
||||||
// return false
|
// // return false
|
||||||
}
|
// }
|
||||||
|
|
||||||
console.log(this.dataForm);
|
console.log(this.listQuery);
|
||||||
const res = await this.$axios({
|
const res = await this.$axios({
|
||||||
url: '/base/report-auto-production/page',
|
url: '/base/report-auto-production/page',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.dataForm
|
params: this.listQuery
|
||||||
})
|
})
|
||||||
console.log(res)
|
console.log(res)
|
||||||
// let sum = undefined
|
// let sum = undefined
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-01-24 15:57:10
|
* @LastEditTime: 2024-03-05 09:06:22
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -10,8 +10,8 @@
|
|||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
|
end-placeholder="结束日期" clearable :picker-options="pickerOptions" size="small" style='width:350px;'
|
||||||
size="small" style='width:350px;' @change="timeSelect">
|
@change="timeSelect">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -29,26 +29,26 @@
|
|||||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineId" label="生产线">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineId }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="本周">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="上周">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -56,21 +56,21 @@
|
|||||||
<el-table-column label="完成良品产量">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="本周">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="上周">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -79,19 +79,19 @@
|
|||||||
<el-table-column label="原片漏检率">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="本周">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上周">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -100,21 +100,21 @@
|
|||||||
<el-table-column label="综合良品率">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="本周">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上周">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -123,7 +123,9 @@
|
|||||||
</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 v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -320,9 +322,9 @@ export default {
|
|||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate(date) {
|
// disabledDate(date) {
|
||||||
return date.getTime() > Date.now()
|
// return date.getTime() > Date.now()
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
// tableBtn: [
|
// tableBtn: [
|
||||||
// this.$auth.hasPermi('base:quality-inspection-record:update')
|
// this.$auth.hasPermi('base:quality-inspection-record:update')
|
||||||
@ -403,6 +405,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getCurrentMonthFirst()
|
||||||
|
this.getCurrentMonthLast()
|
||||||
// this.getProductLineList();
|
// this.getProductLineList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -421,6 +425,7 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -437,6 +442,21 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
getCurrentMonthFirst() {
|
||||||
|
const date = new Date();
|
||||||
|
date.setDate(1);
|
||||||
|
this.monthValue[0] = moment(date).format('YYYY-MM-DD')
|
||||||
|
console.log(date)
|
||||||
|
// console.log(date.valueOf());
|
||||||
|
},
|
||||||
|
getCurrentMonthLast() {
|
||||||
|
const date = new Date();
|
||||||
|
const currentMonth = date.getMonth();
|
||||||
|
const nextMonth = currentMonth + 1;
|
||||||
|
const nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1);
|
||||||
|
const oneDay = 24 * 60 * 60 * 1000;
|
||||||
|
this.monthValue[1] = new Date(nextMonthFirstDay - oneDay)
|
||||||
|
},
|
||||||
timeSelect() {
|
timeSelect() {
|
||||||
// switch (this.queryParams.timeDim) {
|
// switch (this.queryParams.timeDim) {
|
||||||
// case '1':
|
// case '1':
|
||||||
@ -446,6 +466,7 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// break
|
// break
|
||||||
// case '2':
|
// case '2':
|
||||||
|
console.log(this.monthValue[1],this.monthValue[0]);
|
||||||
if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||||
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||||
this.monthValue = []
|
this.monthValue = []
|
||||||
@ -467,6 +488,14 @@ export default {
|
|||||||
console.log(value);
|
console.log(value);
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
|
transformStartTime(timeStamp) {// 本月最后一天
|
||||||
|
let year = moment(timeStamp).format('YYYY')
|
||||||
|
let month = moment(timeStamp).format('MM')
|
||||||
|
let newData = moment(new Date(year, month, 1)).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
|
let value = newData
|
||||||
|
console.log(value);
|
||||||
|
return value
|
||||||
|
},
|
||||||
// selectTime() {
|
// selectTime() {
|
||||||
// switch (this.queryParams.type) {
|
// switch (this.queryParams.type) {
|
||||||
// case 1:
|
// case 1:
|
||||||
@ -511,9 +540,9 @@ export default {
|
|||||||
async getDataList() {
|
async getDataList() {
|
||||||
if (this.monthValue.length > 0) {
|
if (this.monthValue.length > 0) {
|
||||||
console.log(this.monthValue)
|
console.log(this.monthValue)
|
||||||
this.dataForm.reportTime[0] = this.transformTime(this.monthValue[0])
|
this.dataForm.reportTime[0] = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' 00:00:00'
|
||||||
// this.queryParams.startTime = this.monthValue[0]
|
// this.queryParams.startTime = this.monthValue[0]
|
||||||
this.dataForm.reportTime[1] = this.transformTime(this.monthValue[1])
|
this.dataForm.reportTime[1] = moment(this.monthValue[1]).format('YYYY-MM-DD') + ' 23:59:59'
|
||||||
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
||||||
console.log(this.timeTips);
|
console.log(this.timeTips);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-01-24 15:50:10
|
* @LastEditTime: 2024-03-04 16:51:18
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker clearable v-model="monthValue" type="monthrange" range-separator="至" start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
|
end-placeholder="结束日期" value-format="timestamp" :clearable="false" :picker-options="pickerOptions"
|
||||||
size="small" style='width:350px;' @change="timeSelect">
|
size="small" style='width:350px;' @change="timeSelect">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="glassType" label="品种" align="center">
|
<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="!disabled" 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>
|
||||||
@ -37,19 +37,19 @@
|
|||||||
<el-table-column label="成品" align="center">
|
<el-table-column label="成品" align="center">
|
||||||
<el-table-column :show-header="false">
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.productionL" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionL" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionL }} </span>
|
<span v-else>{{ scope.row.productionL }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-header="false">
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionW" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionW }} </span>
|
<span v-else>{{ scope.row.productionW }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-header="false">
|
<el-table-column :show-header="false">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.productionH" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.productionH }} </span>
|
<span v-else>{{ scope.row.productionH }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -57,89 +57,88 @@
|
|||||||
<el-table-column label="原片">
|
<el-table-column label="原片">
|
||||||
<el-table-column prop="originalGlassSize">
|
<el-table-column prop="originalGlassSize">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.originalGlassSize" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
<span v-else>{{ scope.row.originalGlassSize }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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 label="完成良品产量"> -->
|
||||||
<el-table-column prop="customerId" label="用户">
|
<el-table-column prop="customerId" label="用户">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.customerId" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.customerId" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.customerId }} </span>
|
<span v-else>{{ scope.row.customerId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="packageType" label="包装形式">
|
<el-table-column prop="packageType" label="包装形式">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.packageType" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.packageType" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.packageType }} </span>
|
<span v-else>{{ scope.row.packageType }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderNum" label="订单数量">
|
<el-table-column prop="orderNum" label="订单数量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.orderNum" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.orderNum" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.orderNum }} </span>
|
<span v-else>{{ scope.row.orderNum }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderFinish" label="订单完成">
|
<el-table-column prop="orderFinish" label="订单完成">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.orderFinish" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.orderFinish" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.orderFinish }} </span>
|
<span v-else>{{ scope.row.orderFinish }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="orderRemaining" label="未完成订单">
|
<el-table-column prop="orderRemaining" label="未完成订单">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.orderRemaining" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.orderRemaining" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.orderRemaining }} </span>
|
<span v-else>{{ scope.row.orderRemaining }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="stockLastMonth" label="上月库存">
|
<el-table-column prop="stockLastMonth" label="上月库存">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.stockLastMonth" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.stockLastMonth" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.stockLastMonth }} </span>
|
<span v-else>{{ scope.row.stockLastMonth }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="productNumThisMonth" label="本月生产成品">
|
<el-table-column prop="productNumThisMonth" label="本月生产成品">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.productNumThisMonth" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.productNumThisMonth" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.productNumThisMonth }} </span>
|
<span v-else>{{ scope.row.productNumThisMonth }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="deliveNum" label="发货量">
|
<el-table-column prop="deliveNum" label="发货量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.deliveNum" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.deliveNum" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.deliveNum }} </span>
|
<span v-else>{{ scope.row.deliveNum }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="undeliveNum" label="未发货量">
|
<el-table-column prop="undeliveNum" label="未发货量">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.undeliveNum" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.undeliveNum" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.undeliveNum }} </span>
|
<span v-else>{{ scope.row.undeliveNum }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="undeliveArea" label="未发货面积">
|
<el-table-column prop="undeliveArea" label="未发货面积">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.undeliveArea" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.undeliveArea" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.undeliveArea }} </span>
|
<span v-else>{{ scope.row.undeliveArea }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="deliveArea" label="发货面积">
|
<el-table-column prop="deliveArea" label="发货面积">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.deliveArea" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.deliveArea" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.deliveArea }} </span>
|
<span v-else>{{ scope.row.deliveArea }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -147,15 +146,19 @@
|
|||||||
|
|
||||||
<el-table-column prop="productAreaThisMonth" label="本月生产面积">
|
<el-table-column prop="productAreaThisMonth" label="本月生产面积">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.productAreaThisMonth" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.productAreaThisMonth" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.productAreaThisMonth }} </span>
|
<span v-else>{{ scope.row.productAreaThisMonth }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<!-- </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 v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="tableInner">
|
|
||||||
<el-input v-model="list[itemProp]" @blur="changeInput" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'InputArea',
|
|
||||||
props: {
|
|
||||||
injectData: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
},
|
|
||||||
itemProp: {
|
|
||||||
type: String
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
list: this.injectData
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
changeInput() {
|
|
||||||
console.log(this.list)
|
|
||||||
this.$emit('emitData', this.list)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.tableInner .el-input__inner {
|
|
||||||
border: none;
|
|
||||||
padding: 0;
|
|
||||||
height: 33px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,468 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2023-12-12 13:45:25
|
|
||||||
* @LastEditTime: 2024-01-24 15:55:48
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
|
||||||
<el-form-item>
|
|
||||||
<el-form-item label="日" prop="reportTime">
|
|
||||||
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form-item>
|
|
||||||
<el-button type="primary" @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>
|
|
||||||
<el-row style="float: right; margin-bottom: 5px">
|
|
||||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
|
||||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
|
||||||
</el-row>
|
|
||||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
|
||||||
background: '#F2F4F9',
|
|
||||||
color: '#606266'
|
|
||||||
}">
|
|
||||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
|
||||||
<el-table-column prop="lineId" label="生产线">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
|
||||||
<span v-else>{{ scope.row.lineId }} </span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="投入数㎡">
|
|
||||||
<el-table-column prop="inputNow" label="本周">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="inputHis" label="上周">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="inputTrend" label="增减">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<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>
|
|
||||||
<div style="height: 50px;" class="remark" slot="append">
|
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</el-table>
|
|
||||||
<!-- 搜索工作栏 -->
|
|
||||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<!-- <base-table :table-props="tableProps" :page="1" :limit="10" :summary-method="getSummaries" show-summary
|
|
||||||
:table-data="list">
|
|
||||||
</base-table> -->
|
|
||||||
<!-- 分页组件 -->
|
|
||||||
<!-- <pagination
|
|
||||||
v-show="total > 0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList" /> -->
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {
|
|
||||||
getProductionDataList,
|
|
||||||
updateProductionDataList,
|
|
||||||
updateSumProductionDataList,
|
|
||||||
exportProductExcel
|
|
||||||
} from '@/api/report/production';
|
|
||||||
// import Editor from '@/components/Editor';
|
|
||||||
import moment from 'moment';
|
|
||||||
// import DialogForm from './dialogForm.vue';
|
|
||||||
|
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|
||||||
const tableProps = [
|
|
||||||
{
|
|
||||||
// width: 128,
|
|
||||||
prop: 'lineId',
|
|
||||||
label: '生产线',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// width: 128,
|
|
||||||
prop: '',
|
|
||||||
label: '投入数㎡',
|
|
||||||
align: 'center',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
prop: 'inputNow',
|
|
||||||
label: '本周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'inputHis',
|
|
||||||
label: '上周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'inputTrend',
|
|
||||||
label: '增减'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// width: 128,
|
|
||||||
prop: '',
|
|
||||||
label: '完成良品产量',
|
|
||||||
align: 'center',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
prop: 'goodProductNow',
|
|
||||||
label: '本周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'goodProductHis',
|
|
||||||
label: '上周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'goodProductTrend',
|
|
||||||
label: '增减'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// width: 128,
|
|
||||||
prop: '',
|
|
||||||
label: '原片漏检率',
|
|
||||||
align: 'center',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
prop: 'missCheckNow',
|
|
||||||
label: '本周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'missCheckHis',
|
|
||||||
label: '上周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'missCheckTrend',
|
|
||||||
label: '增减'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// width: 128,
|
|
||||||
prop: '',
|
|
||||||
label: '综合良品率',
|
|
||||||
align: 'center',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
prop: 'goodProductPassNow',
|
|
||||||
label: '本周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'goodProductPassHis',
|
|
||||||
label: '上周'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'goodProductPassTrend',
|
|
||||||
label: '增减'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
];
|
|
||||||
export default {
|
|
||||||
name: 'statisticalData',
|
|
||||||
// components: {
|
|
||||||
// DialogForm,
|
|
||||||
// },
|
|
||||||
// mixins: [basicPageMixin],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
list: [],
|
|
||||||
remark: '',
|
|
||||||
urlOptions: {
|
|
||||||
// getDataListURL: getGlassPage,
|
|
||||||
exportURL: exportProductExcel
|
|
||||||
},
|
|
||||||
// dynamicProps: [],
|
|
||||||
tableProps,
|
|
||||||
timeTips:'',
|
|
||||||
// dataForm: {
|
|
||||||
// reportTime:undefined
|
|
||||||
// },
|
|
||||||
isSave:false,
|
|
||||||
disabled: true,
|
|
||||||
sumArr: [],
|
|
||||||
weekValue1: null,//最多24周
|
|
||||||
weekValue2: null,
|
|
||||||
searchBarFormConfig: [
|
|
||||||
// {
|
|
||||||
// type: 'select',
|
|
||||||
// label: '工单名称',
|
|
||||||
// placeholder: '请选择工单名称',
|
|
||||||
// param: 'workOrderIdList',
|
|
||||||
// selectOptions: [],
|
|
||||||
// multiple: true,
|
|
||||||
// labelField: 'name',
|
|
||||||
// valueField: 'id',
|
|
||||||
// defaultSelect: []
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 'select',
|
|
||||||
// label: '产品',
|
|
||||||
// placeholder: '请选择产品',
|
|
||||||
// param: 'productionId',
|
|
||||||
// selectOptions: [],
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: 'input',
|
|
||||||
// label: '检测内容',
|
|
||||||
// placeholder: '请输入检测内容',
|
|
||||||
// param: 'inspectionDetContent',
|
|
||||||
// },
|
|
||||||
{
|
|
||||||
type: 'datePicker',
|
|
||||||
label: '时间段',
|
|
||||||
dateType: 'daterange', // datetimerange
|
|
||||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
|
||||||
rangeSeparator: '-',
|
|
||||||
startPlaceholder: '开始日期',
|
|
||||||
endPlaceholder: '结束日期',
|
|
||||||
defaultTime: ['00:00:00', '23:59:59'],
|
|
||||||
param: 'checkTime',
|
|
||||||
// width: 350,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'button',
|
|
||||||
btnName: '查询',
|
|
||||||
name: 'search',
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// type: this.$auth.hasPermi(
|
|
||||||
// 'base:quality-inspection-record:create'
|
|
||||||
// )
|
|
||||||
// ? 'button'
|
|
||||||
// : '',
|
|
||||||
// btnName: '新增',
|
|
||||||
// name: 'add',
|
|
||||||
// plain: true,
|
|
||||||
// color: 'success',
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
pickerOptionsWeek: {
|
|
||||||
disabledDate(time) {
|
|
||||||
let day = Date.now()
|
|
||||||
let limitTime = moment(day).day(-1)
|
|
||||||
return time.getTime() > new Date(limitTime).getTime()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
reportTime:undefined,
|
|
||||||
dataForm: {
|
|
||||||
// workOrderIdList:undefined,
|
|
||||||
// productionId: undefined,
|
|
||||||
// startTime: undefined,
|
|
||||||
// endTime: undefined,
|
|
||||||
reportTime: [],
|
|
||||||
reportType:2
|
|
||||||
// productionLineId: null,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
// this.getProductLineList();
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [
|
|
||||||
// this.$route.params.startTime,
|
|
||||||
// this.$route.params.endTime,
|
|
||||||
// ];
|
|
||||||
// this.queryParams.param = {};
|
|
||||||
// this.$set(
|
|
||||||
// this.queryParams.param,
|
|
||||||
// 'startTime',
|
|
||||||
// this.$route.params.startTime
|
|
||||||
// );
|
|
||||||
// this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
|
|
||||||
// } else {
|
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
|
||||||
// }
|
|
||||||
this.getDataList()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
format(shijianchuo) {
|
|
||||||
//shijianchuo是整数,否则要parseInt转换
|
|
||||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
|
||||||
// console.log(time)
|
|
||||||
// var y = time.getFullYear();
|
|
||||||
// var m = time.getMonth() + 1;
|
|
||||||
// var d = time.getDate();
|
|
||||||
// var h = time.getHours();
|
|
||||||
// var mm = time.getMinutes();
|
|
||||||
// var s = time.getSeconds();
|
|
||||||
return time
|
|
||||||
},
|
|
||||||
changeTime(val) {
|
|
||||||
if (val) {
|
|
||||||
// console.log(val)
|
|
||||||
// console.log(val.setHours(7, 0, 0))
|
|
||||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
|
||||||
// let time = this.format(val.setHours(7, 0, 0))
|
|
||||||
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
console.log(this.dataForm.reportTime);
|
|
||||||
} else {
|
|
||||||
this.dataForm.reportTime = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
editDataList() {
|
|
||||||
this.disabled = false
|
|
||||||
this.isSave = true
|
|
||||||
},
|
|
||||||
async saveDataList() {
|
|
||||||
let obj = {}
|
|
||||||
this.list.forEach((ele, index) => {
|
|
||||||
if (ele.det === false) {
|
|
||||||
this.list[index].lineId = ''
|
|
||||||
this.list[index].remark = this.remark
|
|
||||||
obj = ele
|
|
||||||
this.list.splice(index,1)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let updateArr = this.list
|
|
||||||
// console.log(JSON.stringify(updateArr[1]))
|
|
||||||
const result = await Promise.all([
|
|
||||||
await updateSumProductionDataList(obj),
|
|
||||||
await updateProductionDataList(updateArr),
|
|
||||||
]);
|
|
||||||
if (result[0].data == true && result[1].data == true) {
|
|
||||||
// console.log(res)
|
|
||||||
this.disabled = true
|
|
||||||
this.isSave = false
|
|
||||||
this.getDataList()
|
|
||||||
} else {
|
|
||||||
this.$modal.msgError('更新失败');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleExport() {
|
|
||||||
// 处理查询参数
|
|
||||||
let params = { ...this.dataForm };
|
|
||||||
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(() => { });
|
|
||||||
},
|
|
||||||
async getDataList() {
|
|
||||||
// if (this.weekValue1 && this.weekValue2) {
|
|
||||||
// this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 00:00:00'
|
|
||||||
// // this.queryParams.startTime = this.monthValue[0]
|
|
||||||
// this.dataForm.reportTime[1] = moment(this.weekValue2).day(6).format('YYYY-MM-DD') + ' 23:59:59'
|
|
||||||
// this.timeTips = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' - ' + moment(this.weekValue2).day(0).format('YYYY-MM-DD')
|
|
||||||
// } else {
|
|
||||||
// }
|
|
||||||
this.loading = true;
|
|
||||||
// 执行查询
|
|
||||||
const res = await this.$axios({
|
|
||||||
url: '/base/report-auto-production/page',
|
|
||||||
method: 'get',
|
|
||||||
params: this.dataForm
|
|
||||||
})
|
|
||||||
// console.log(this.queryParams);
|
|
||||||
console.log(res)
|
|
||||||
// let sum = undefined
|
|
||||||
// res.data.list.forEach((ele, index) => {
|
|
||||||
// if (ele.det === false) {
|
|
||||||
// sum = res.data.list.splice(index, 1)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
res.data.list.forEach((ele,index) => {
|
|
||||||
if (ele.det === false) {
|
|
||||||
res.data.list[index].lineId = '合计'
|
|
||||||
this.remark = res.data.list[index].remark
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.list = res.data.list
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-01-24 15:59:13
|
* @LastEditTime: 2024-03-04 16:51:38
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -32,26 +32,26 @@
|
|||||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineId" label="生产线">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineId }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="本周">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="上周">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -59,21 +59,21 @@
|
|||||||
<el-table-column label="完成良品产量">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="本周">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="上周">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -82,19 +82,19 @@
|
|||||||
<el-table-column label="原片漏检率">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="本周">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上周">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -103,21 +103,21 @@
|
|||||||
<el-table-column label="综合良品率">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="本周">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上周">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -126,7 +126,9 @@
|
|||||||
</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 v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -363,9 +365,25 @@ export default {
|
|||||||
// } else {
|
// } else {
|
||||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||||
// }
|
// }
|
||||||
|
this.getCurrentWeekStartTimeAndEndTime()
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCurrentWeekStartTimeAndEndTime() {
|
||||||
|
const current = new Date();
|
||||||
|
// current是本周的第几天
|
||||||
|
let nowDayOfWeek = current.getDay();
|
||||||
|
if (nowDayOfWeek === 0) nowDayOfWeek = 7;
|
||||||
|
const dayNum = 1 * 24 * 60 * 60 * 1000;
|
||||||
|
// 获取本周星期一的时间,星期一作为一周的第一天
|
||||||
|
const firstDate = new Date(current.valueOf() - (nowDayOfWeek - 1) * dayNum);
|
||||||
|
// 获取本周星期天的时间,星期天作为一周的最后一天
|
||||||
|
const lastDate = new Date(new Date(firstDate).valueOf() + 6 * dayNum);
|
||||||
|
// return {
|
||||||
|
this.weekValue1 = new Date(firstDate)
|
||||||
|
this.weekValue2 = new Date(lastDate)
|
||||||
|
// };
|
||||||
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
let params = { ...this.dataForm };
|
||||||
@ -380,6 +398,7 @@ export default {
|
|||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
startWeek() {
|
startWeek() {
|
||||||
|
// console.log(this.weekValue1);
|
||||||
if (this.weekValue1 && this.weekValue2) {
|
if (this.weekValue1 && this.weekValue2) {
|
||||||
let a = new Date(this.weekValue1).getTime()
|
let a = new Date(this.weekValue1).getTime()
|
||||||
let b = new Date(this.weekValue2).getTime()
|
let b = new Date(this.weekValue2).getTime()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-01-24 15:59:21
|
* @LastEditTime: 2024-03-05 09:47:42
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,11 +9,9 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker style='width:170px;' v-model="yearValue1" type="year" :picker-options="pickerOptions"
|
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
|
||||||
value-format="timestamp" placeholder="选择年" @change="startYear" size="small" :clearable="false">
|
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
||||||
</el-date-picker>-
|
style="width: 350px" placeholder="选择年">
|
||||||
<el-date-picker style='width:170px;' v-model="yearValue2" type="year" :picker-options="pickerOptions"
|
|
||||||
value-format="timestamp" placeholder="选择年" @change="endYear" size="small" :clearable="false">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -34,26 +32,26 @@
|
|||||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||||
<el-table-column prop="lineId" label="生产线">
|
<el-table-column prop="lineId" label="生产线">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.lineId }} </span>
|
<span v-else>{{ scope.row.lineId }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="投入数㎡">
|
<el-table-column label="投入数㎡">
|
||||||
<el-table-column prop="inputNow" label="本周">
|
<el-table-column prop="inputNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputNow }} </span>
|
<span v-else>{{ scope.row.inputNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputHis" label="上周">
|
<el-table-column prop="inputHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputHis }} </span>
|
<span v-else>{{ scope.row.inputHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="inputTrend" label="增减">
|
<el-table-column prop="inputTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -61,21 +59,21 @@
|
|||||||
<el-table-column label="完成良品产量">
|
<el-table-column label="完成良品产量">
|
||||||
<el-table-column prop="goodProductNow" label="本周">
|
<el-table-column prop="goodProductNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductHis" label="上周">
|
<el-table-column prop="goodProductHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductTrend" label="增减">
|
<el-table-column prop="goodProductTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -84,19 +82,19 @@
|
|||||||
<el-table-column label="原片漏检率">
|
<el-table-column label="原片漏检率">
|
||||||
<el-table-column prop="missCheckNow" label="本周">
|
<el-table-column prop="missCheckNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckHis" label="上周">
|
<el-table-column prop="missCheckHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="missCheckTrend" label="增减">
|
<el-table-column prop="missCheckTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -105,21 +103,21 @@
|
|||||||
<el-table-column label="综合良品率">
|
<el-table-column label="综合良品率">
|
||||||
<el-table-column prop="goodProductPassNow" label="本周">
|
<el-table-column prop="goodProductPassNow" label="本周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassHis" label="上周">
|
<el-table-column prop="goodProductPassHis" label="上周">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="goodProductPassTrend" label="增减">
|
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
@ -128,7 +126,9 @@
|
|||||||
</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 v-if="!disabled" v-model="remark" :disabled="disabled">
|
||||||
|
</el-input>
|
||||||
|
<span v-else>{{ remark }} </span>
|
||||||
</div>
|
</div>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
@ -158,7 +158,7 @@ import {
|
|||||||
// import Editor from '@/components/Editor';
|
// import Editor from '@/components/Editor';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
|
import { parseTime } from '../../core/mixins/code-filter';
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
@ -265,6 +265,9 @@ export default {
|
|||||||
yearValue2: null,
|
yearValue2: null,
|
||||||
// dynamicProps: [],
|
// dynamicProps: [],
|
||||||
tableProps,
|
tableProps,
|
||||||
|
reportTime: [],
|
||||||
|
startTimeStamp: '',
|
||||||
|
endTimeStamp: '',
|
||||||
dataForm: {
|
dataForm: {
|
||||||
// workOrderIdList:undefined,
|
// workOrderIdList:undefined,
|
||||||
// productionId: undefined,
|
// productionId: undefined,
|
||||||
@ -345,6 +348,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getCurrentYearFirst()
|
||||||
|
|
||||||
// this.getProductLineList();
|
// this.getProductLineList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -366,6 +371,16 @@ export default {
|
|||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCurrentYearFirst() {
|
||||||
|
let date = new Date();
|
||||||
|
date.setDate(1);
|
||||||
|
date.setMonth(0);
|
||||||
|
this.reportTime = date;
|
||||||
|
this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1).getTime()); //开始时间
|
||||||
|
this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 23, 59, 59).getTime()); //结束时间
|
||||||
|
this.dataForm.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.dataForm.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
|
||||||
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
let params = { ...this.dataForm };
|
let params = { ...this.dataForm };
|
||||||
@ -379,34 +394,34 @@ export default {
|
|||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
startYear() {
|
// startYear() {
|
||||||
if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
// if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
||||||
this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')
|
// this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')
|
||||||
this.yearValue1 = null
|
// this.yearValue1 = null
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (this.yearValue1 && this.yearValue2) {
|
// if (this.yearValue1 && this.yearValue2) {
|
||||||
if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
// if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
||||||
this.$modal.msgError('最大时间范围为10年,请重新选择')
|
// this.$modal.msgError('最大时间范围为10年,请重新选择')
|
||||||
this.yearValue1 = null
|
// this.yearValue1 = null
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
endYear() {
|
// endYear() {
|
||||||
if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
// if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
||||||
this.$modal.msgError('结束时间不能早于开始时间,请重新选择')
|
// this.$modal.msgError('结束时间不能早于开始时间,请重新选择')
|
||||||
this.yearValue2 = null
|
// this.yearValue2 = null
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (this.yearValue1 && this.yearValue2) {
|
// if (this.yearValue1 && this.yearValue2) {
|
||||||
if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
// if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
|
||||||
this.$modal.msgError('最大时间范围为10年,请重新选择')
|
// this.$modal.msgError('最大时间范围为10年,请重新选择')
|
||||||
this.yearValue2 = null
|
// this.yearValue2 = null
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
editDataList() {
|
editDataList() {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.isSave = true
|
this.isSave = true
|
||||||
@ -442,15 +457,37 @@ export default {
|
|||||||
let value = newData
|
let value = newData
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
|
changeTime(val) {
|
||||||
|
console.log(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.dataForm.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.dataForm.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.dataForm.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)
|
||||||
|
},
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
|
console.log(this.yearValue1);
|
||||||
if (this.yearValue1 && this.yearValue2) {
|
if (this.yearValue1 && this.yearValue2) {
|
||||||
if (this.yearValue2 < this.yearValue1) {
|
if (this.yearValue2 < this.yearValue1) {
|
||||||
this.$modal.msgError('结束时间不能早于开始时间')
|
this.$modal.msgError('结束时间不能早于开始时间')
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
|
// this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
|
||||||
this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
|
// this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
|
||||||
this.timeTips = this.transformYear(this.yearValue1) + " - " + this.transformYear(this.yearValue1)
|
// this.timeTips = this.transformYear(this.yearValue1) + " - " + this.transformYear(this.yearValue1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
@close="cancel"
|
@close="cancel"
|
||||||
@cancel="cancel"
|
@cancel="cancel"
|
||||||
@confirm="handleConfirm">
|
@confirm="handleConfirm">
|
||||||
<add ref="add" @refreshDataList="successSubmit" />
|
<add ref="add" v-if="open" @refreshDataList="successSubmit" />
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
<!-- 添加巡检,查看详情 -->
|
<!-- 添加巡检,查看详情 -->
|
||||||
<addOrUpdata
|
<addOrUpdata
|
||||||
|
@ -257,16 +257,14 @@ export default {
|
|||||||
this.$message.warning('请选择待确认的巡检单');
|
this.$message.warning('请选择待确认的巡检单');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let checkPersonParam = '';
|
//let checkPersonParam = '';
|
||||||
if (!row.checkPerson || row.checkPerson.trim() == '') {
|
//if (!row.checkPerson || row.checkPerson.trim() == '') {
|
||||||
/** 如有必要,更新巡检人 */
|
// checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
||||||
checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
|
//}
|
||||||
}
|
|
||||||
|
|
||||||
const res = this.$axios({
|
const res = await this.$axios({
|
||||||
url:
|
url: `/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` +
|
// +checkPersonParam,
|
||||||
checkPersonParam,
|
|
||||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: this.$refs['check-order-list-table'].selectedOrder.map(
|
data: this.$refs['check-order-list-table'].selectedOrder.map(
|
||||||
@ -337,8 +335,8 @@ export default {
|
|||||||
|
|
||||||
return this.$axios({
|
return this.$axios({
|
||||||
url:
|
url:
|
||||||
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` +
|
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}`,
|
||||||
checkPersonParam,
|
// + checkPersonParam,
|
||||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data: [id],
|
data: [id],
|
||||||
|
@ -235,7 +235,7 @@ export default {
|
|||||||
...this.dataForm,
|
...this.dataForm,
|
||||||
special: true,
|
special: true,
|
||||||
status: 0,
|
status: 0,
|
||||||
groupClass: this.dataForm.groupClass.join(','),
|
groupClass: this.dataForm.groupClass?.join(','),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
@ -123,7 +123,7 @@
|
|||||||
type: 'number',
|
type: 'number',
|
||||||
message: '请输入正确的数字',
|
message: '请输入正确的数字',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
transform: (val) => Number(val),
|
transform: (val) => Number(val) && parseInt(val) === Number(val),
|
||||||
},
|
},
|
||||||
{ required: true, message: '保养频率不能为空', trigger: 'blur' },
|
{ required: true, message: '保养频率不能为空', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
|
@ -409,7 +409,8 @@ const uploadedFile = {
|
|||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleDelete() {
|
handleDelete(e) {
|
||||||
|
e.stopPropagation();
|
||||||
this.$emit('delete', this.file);
|
this.$emit('delete', this.file);
|
||||||
},
|
},
|
||||||
async handleDownload() {
|
async handleDownload() {
|
||||||
@ -610,7 +611,8 @@ export default {
|
|||||||
const response = await this.$axios('/base/core-equipment/listAll');
|
const response = await this.$axios('/base/core-equipment/listAll');
|
||||||
this.equipmentList = response.data || [];
|
this.equipmentList = response.data || [];
|
||||||
const equipmentOptions = (response.data || [])
|
const equipmentOptions = (response.data || [])
|
||||||
.filter((item) => (type == 'special-equipment' ? item.special : true))
|
// .filter((item) => (type == 'special-equipment' ? item.special : true))
|
||||||
|
.filter((item) => item.special == true)
|
||||||
.map((item) => ({
|
.map((item) => ({
|
||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.id,
|
value: item.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user