Compare commits

..

No commits in common. "f4eaddf6aebae72ba74babb01abfd64e12776609" and "9fc6f013cce1cfab683ec60b7a7f204ea4a6237e" have entirely different histories.

21 changed files with 826 additions and 1618 deletions

View File

@ -1,10 +1,3 @@
/*
* @Author: zwq
* @Date: 2024-06-28 17:03:29
* @LastEditors: zwq
* @LastEditTime: 2024-09-27 09:24:09
* @Description:
*/
import request from '@/utils/request' import request from '@/utils/request'
// 获取走势分析数据 // 获取走势分析数据
@ -24,15 +17,6 @@ export function exportTrend(data) {
responseType: 'blob' responseType: 'blob'
}) })
} }
// 导出对比分析数据
export function exportCompare(data) {
return request({
url: '/analysis/energy-analysis/exportCompare',
method: 'post',
data: data,
responseType: 'blob'
})
}
// 获取对比分析数据 // 获取对比分析数据
export function getCompare(data) { export function getCompare(data) {
return request({ return request({
@ -51,24 +35,6 @@ export function getYoy(data) {
}) })
} }
// 导出同比分析数据
export function exportYoy(data) {
return request({
url: '/analysis/energy-analysis/exportYoy',
method: 'post',
data: data,
responseType: 'blob'
})
}
// 导出环比分析数据
export function exportChain(data) {
return request({
url: '/analysis/energy-analysis/exportChain',
method: 'post',
data: data,
responseType: 'blob'
})
}
// 获取环比分析数据(1:月,2:周,3:日) // 获取环比分析数据(1:月,2:周,3:日)
export function getQoq(data) { export function getQoq(data) {
return request({ return request({

View File

@ -16,14 +16,6 @@ export function createCoreWO(data) {
}) })
} }
// 获取工艺模式工单预计消耗物料
export function getMaterialCostWorkOrder(data) {
return request({
url: '/extend/process-retrospect/getMaterialCostWorkOrder',
method: 'post',
data: data
})
}
// 更新工单 // 更新工单
export function updateCoreWO(data) { export function updateCoreWO(data) {
return request({ return request({

View File

@ -50,22 +50,6 @@ export function getOrderById(query) {
params: query params: query
}) })
} }
// 订单进度-获取普通模式订单剩余数量
export function getOrderRemainNum(id) {
return request({
url: '/base/order/getOrderRemainNum?id=' + id,
method: 'get'
})
}
// 订单进度-获取工艺模式订单预计消耗物料(计算后)
export function getMaterialCostOrder(data) {
return request({
url: '/extend/process-retrospect/getMaterialCostOrder',
method: 'post',
data: data
})
}
// 获得工艺流程列表 // 获得工艺流程列表
export function getProcessFlowList() { export function getProcessFlowList() {
@ -75,16 +59,6 @@ export function getProcessFlowList() {
}) })
} }
// 获得工艺流程列表
export function getProcessFlowPage(query) {
return request({
url: '/extend/process-flow/page',
method: 'get',
params: query
})
}
// 创建订单 // 创建订单
export function orderCreate(data) { export function orderCreate(data) {
return request({ return request({

View File

@ -150,10 +150,6 @@
<el-button type="primary" size="small" @click="search">查询</el-button> <el-button type="primary" size="small" @click="search">查询</el-button>
<span class="separateStyle"></span> <span class="separateStyle"></span>
<el-button size="small" @click="resetBtn">重置</el-button> <el-button size="small" @click="resetBtn">重置</el-button>
<span class="separateStyle"></span>
<el-button type="primary" size="small" @click="exportData" plain>
导出
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span v-if="isFold" class="foldClass" @click='switchMode'> <span v-if="isFold" class="foldClass" @click='switchMode'>
@ -332,14 +328,6 @@ export default {
}, },
// //
search() { search() {
if (this.validateData()) {
this.queryParams.startTime = this.queryParams.startTime + '';
this.queryParams.endTime = this.queryParams.endTime + '';
this.$emit('submit', this.queryParams);
}
},
//
validateData() {
if (!this.queryParams.energyTypeId) { if (!this.queryParams.energyTypeId) {
this.$modal.msgError('请选择能源类型') this.$modal.msgError('请选择能源类型')
return false return false
@ -409,7 +397,10 @@ export default {
this.$modal.msgError('请选择对象') this.$modal.msgError('请选择对象')
return false return false
} }
return true; this.queryParams.startTime = this.queryParams.startTime + ''
this.queryParams.endTime = this.queryParams.endTime + ''
console.log(this.queryParams)
this.$emit('submit', this.queryParams)
}, },
resetBtn() { resetBtn() {
this.queryParams.energyTypeId = null this.queryParams.energyTypeId = null
@ -445,14 +436,7 @@ export default {
} else { } else {
element.classList.add('divHeight') element.classList.add('divHeight')
} }
},
exportData() {
if (this.validateData()) {
this.queryParams.startTime = this.queryParams.startTime + '';
this.queryParams.endTime = this.queryParams.endTime + '';
this.$emit('exportD', this.queryParams);
} }
},
} }
} }
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container contrastAnalysisBox" id="contrastAnalysisBox"> <div class="app-container contrastAnalysisBox" id="contrastAnalysisBox">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<search-area :isFold="isFold" @submit="getList" @exportD="exportData"/> <search-area :isFold="isFold" @submit="getList"/>
<div v-show="chartData.length"> <div v-show="chartData.length">
<bar-chart <bar-chart
ref="analysisBarChart" ref="analysisBarChart"
@ -18,7 +18,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getCompare ,exportCompare} from "@/api/analysis/energyAnalysis" import { getCompare } from "@/api/analysis/energyAnalysis"
import SearchArea from "./components/searchArea" import SearchArea from "./components/searchArea"
import BarChart from "./components/barChart" import BarChart from "./components/barChart"
import tableHeightMixin from '@/mixins/tableHeightMixin'; import tableHeightMixin from '@/mixins/tableHeightMixin';
@ -85,17 +85,32 @@ export default {
} }
this.tableProps = [{ prop: 'time', label: '时间' }].concat(tempX); this.tableProps = [{ prop: 'time', label: '时间' }].concat(tempX);
}, },
/** 导出按钮操作 */ //
exportData(val) { exportExl() {
// if (this.list.length > 0) {
this.$modal.confirm('是否确认导出对比分析数据?').then(() => { var wb = XLSX.utils.table_to_book(
this.exportLoading = true; document.querySelector('.contrast-out-table')
return exportCompare(val); );
}).then(response => { let fileName = '对比分析.xlsx';
this.$download.excel(response, '对比分析数据.xlsx'); var wbout = XLSX.write(wb, {
this.exportLoading = false; bookType: 'xlsx',
}).catch(() => {}); bookSST: true,
type: 'array',
});
try {
FileSaver.saveAs(
new Blob([wbout], { type: 'application/octet-stream' }),
fileName
);
this.$message.success('导出成功');
} catch (e) {
if (typeof console !== 'undefined') console.log(e, wbout);
} }
return wbout;
} else {
this.$modal.msgWarning('暂无数据导出');
}
},
} }
} }
</script> </script>

View File

@ -158,33 +158,14 @@ export default {
this.$emit('submit', this.queryParams) this.$emit('submit', this.queryParams)
}, },
exportData() { exportData() {
if (this.objArr.length === 0) { let name
this.$modal.msgError('请选择对象') if (this.queryParams.objId) {
return false name = this.getObjName(this.objList, this.queryParams.objId)
} else { } else {
this.queryParams.objId = this.objArr[this.objArr.length-1] this.$modal.msgWarning("对象不能为空")
}
if (!this.queryParams.type) {
this.$modal.msgError('请选择时间维度')
return false return false
} }
if (!this.queryParams.searchTime) { this.$emit('exportD', {name: name})
this.$modal.msgError('请选择时间')
return false
}
switch (this.queryParams.type) {
case 1:
this.queryParams.searchTime = this.transformTime(this.monthValue)
break;
case 2:
let value = moment(this.weekValue).day(6).format('YYYY-MM-DD') + ' 23:59:59'
this.queryParams.searchTime = new Date(value).getTime()
break;
default:
let value2 = moment(this.dateValue).format('YYYY-MM-DD') + ' 23:59:59'
this.queryParams.searchTime = new Date(value2).getTime()
}
this.$emit('exportD', this.queryParams)
}, },
// name // name
getObjName(list, id) { getObjName(list, id) {

View File

@ -19,7 +19,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getQoq,exportChain } from "@/api/analysis/energyAnalysis" import { getQoq } from "@/api/analysis/energyAnalysis"
import SearchArea from "./components/searchArea" import SearchArea from "./components/searchArea"
import LineChart from "./components/lineChart" import LineChart from "./components/lineChart"
import FileSaver from "file-saver" import FileSaver from "file-saver"
@ -89,14 +89,26 @@ export default {
this.chartData = this.list this.chartData = this.list
}, },
exportData(val) { exportData(val) {
// if (this.list.length > 0) {
this.$modal.confirm('是否确认导出环比分析数据?').then(() => { var wb = XLSX.utils.table_to_book(document.querySelector(".qoq-out-table"))
this.exportLoading = true; let fileName = val.name + "环比分析.xlsx"
return exportChain(val); var wbout = XLSX.write(wb, {
}).then(response => { bookType: "xlsx",
this.$download.excel(response, '环比分析数据.xlsx'); bookSST: true,
this.exportLoading = false; type: "array"
}).catch(() => {}); })
try {
FileSaver.saveAs(
new Blob([wbout], { type: "application/octet-stream" }),
fileName
)
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
}
return wbout
} else {
this.$modal.msgWarning("暂无数据导出")
}
} }
} }
} }

View File

@ -125,26 +125,14 @@ export default {
this.$emit('submit', this.queryParams) this.$emit('submit', this.queryParams)
}, },
exportData() { exportData() {
if (this.objArr.length === 0) { let name
this.$modal.msgError('请选择对象') if (this.queryParams.objId) {
return false name = this.getObjName(this.objList, this.queryParams.objId)
} else { } else {
this.queryParams.objId = this.objArr[this.objArr.length-1] this.$modal.msgWarning("对象不能为空")
}
if (!this.queryParams.type) {
this.$modal.msgError('请选择时间维度')
return false return false
} }
if (!this.queryParams.searchTime) { this.$emit('exportD', {name: name})
this.$modal.msgError('请选择时间')
return false
}
if (this.queryParams.type === 3) {
this.queryParams.searchTime = this.transformTime(this.yearMonth) + ''
} else {
this.queryParams.searchTime = this.transformYear(this.yearValue) + ''
}
this.$emit('exportD', this.queryParams)
}, },
// name // name
getObjName(list, id) { getObjName(list, id) {

View File

@ -20,7 +20,7 @@
</div> </div>
</template> </template>
<script> <script>
import { getYoy,exportYoy } from "@/api/analysis/energyAnalysis" import { getYoy } from "@/api/analysis/energyAnalysis"
import subRate from "./components/subRate.vue" import subRate from "./components/subRate.vue"
import SearchArea from "./components/searchArea" import SearchArea from "./components/searchArea"
import LineChart from "./components/lineChart" import LineChart from "./components/lineChart"
@ -101,14 +101,26 @@ export default {
this.chartData = this.list this.chartData = this.list
}, },
exportData(val) { exportData(val) {
// if (this.list.length > 0) {
this.$modal.confirm('是否确认导出同比分析数据?').then(() => { var wb = XLSX.utils.table_to_book(document.querySelector(".yoy-out-table"))
this.exportLoading = true; let fileName = val.name + "同比分析.xlsx"
return exportYoy(val); var wbout = XLSX.write(wb, {
}).then(response => { bookType: "xlsx",
this.$download.excel(response, '同比分析数据.xlsx'); bookSST: true,
this.exportLoading = false; type: "array"
}).catch(() => {}); })
try {
FileSaver.saveAs(
new Blob([wbout], { type: "application/octet-stream" }),
fileName
)
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
}
return wbout
} else {
this.$modal.msgWarning("暂无数据导出")
}
} }
} }
} }

View File

@ -1,430 +0,0 @@
<!--
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}`" 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}`"
@change="$emit('selectupdate', 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="col.disabled ? col.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 class="upload-in-dialog" v-if="col.upload" :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="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"
@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'],
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}
<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', // headersurl
};
},
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) {
// dependswatcher
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',
});
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;
// dataFormcodebug
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() {},
// 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>

View File

@ -37,14 +37,12 @@
@close="cancel" @close="cancel"
@cancel="cancel" @cancel="cancel"
@confirm="submitForm"> @confirm="submitForm">
<DialogFormZ <DialogForm
v-if="open" v-if="open"
ref="form" ref="form"
v-model="form" v-model="form"
label-position="top"
:disabled="mode == 'detail'" :disabled="mode == 'detail'"
:has-files="false" :has-files="false"
@selectupdate="updateDialogFormZ"
:rows="rows" /> :rows="rows" />
</base-dialog> </base-dialog>
</div> </div>
@ -53,16 +51,14 @@
<script> <script>
import moment from 'moment'; import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin'; import basicPageMixin from '@/mixins/lb/basicPageMixin';
import DialogFormZ from '../../../DialogFormZ.vue';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import { deleteSparePart } from '@/api/equipment/base/spare-parts/list'; import { deleteSparePart } from '@/api/equipment/base/spare-parts/list';
import { getMaterialTree, getMaterialList } from '@/api/base/material';
const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'); const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
export default { export default {
name: 'EquipmentSparePartsList', name: 'EquipmentSparePartsList',
components: { DialogFormZ }, components: {},
mixins: [basicPageMixin], mixins: [basicPageMixin],
data() { data() {
return { return {
@ -133,44 +129,33 @@ export default {
rows: [ rows: [
[ [
{ {
select: true, input: true,
label: '备件名称', label: '备件名称',
prop: 'productMaterialId', prop: 'name',
options: [],
bind: {
filterable: true,
clearable: false,
},
rules: [ rules: [
{ { required: true, message: '备件名称不能为空', trigger: 'blur' },
required: true,
message: '备件名称不能为空',
trigger: 'change',
},
], ],
}, },
{ {
input: true, input: true,
label: '备件型号', label: '备件编码',
prop: 'model', prop: 'code',
url: '/base/equipment-spare-part/getCode',
rules: [
{ required: true, message: '备件编码不能为空', trigger: 'blur' },
],
}, },
], ],
[ [
{ {
input: true, input: true,
label: '备件编码', label: '备件型号',
prop: 'code', prop: 'model',
bind: {
disabled: true,
},
}, },
{ {
input: true, input: true,
label: '规格', label: '规格',
prop: 'specifications', prop: 'specifications',
bind: {
disabled: true,
},
}, },
], ],
[ [
@ -180,32 +165,27 @@ export default {
prop: 'supplierId', prop: 'supplierId',
url: '/base/core-supplier/listAll', // TODO: url: '/base/core-supplier/listAll', // TODO:
bind: { bind: {
disabled: true, filterable: true,
clearable: true,
}, },
rules: [
{ required: true, message: '供应商不能为空', trigger: 'blur' },
],
}, },
{ {
select: true, select: true,
label: '单位', label: '物料类型',
prop: 'unit', // prop: 'type',
options: this.getDictDatas('material_type'),
// url: '/base/core-equipment/listAll', // TODO:
bind: { bind: {
disabled: true, filterable: true,
clearable: true,
}, },
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT), rules: [
{ required: true, message: '物料类型不能为空', trigger: 'blur' },
],
}, },
// {
// select: true,
// label: '',
// prop: 'type',
// options: this.getDictDatas('material_type'),
// // url: '/base/core-equipment/listAll', // TODO:
// bind: {
// filterable: true,
// clearable: true,
// },
// rules: [
// { required: true, message: '', trigger: 'blur' },
// ],
// },
], ],
[ [
{ {
@ -221,6 +201,14 @@ export default {
}, },
], ],
}, },
{
select: true,
label: '单位',
prop: 'unit', //
options: this.getDictDatas(this.DICT_TYPE.UNIT_DICT),
},
],
[
{ {
input: true, input: true,
label: '备注', label: '备注',
@ -237,23 +225,11 @@ export default {
name: null, name: null,
}, },
// //
form: { form: {},
id: null,
code: null,
name: null,
model: null,
specifications: null,
life: null,
type: null,
supplierId: null,
unit: null,
remark: null,
},
basePath: '/base/equipment-spare-part', basePath: '/base/equipment-spare-part',
mode: null, mode: null,
}; };
}, },
mounted() {},
created() { created() {
// this.initSearchBar(); // this.initSearchBar();
this.getList(); this.getList();
@ -291,8 +267,8 @@ export default {
reset() { reset() {
this.form = { this.form = {
id: null, id: null,
productMaterialId: null,
code: null, code: null,
name: null,
model: null, model: null,
specifications: null, specifications: null,
life: null, life: null,
@ -318,7 +294,6 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = '添加备品备件'; this.title = '添加备品备件';
this.getDict();
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -327,14 +302,13 @@ export default {
this.info({ id }).then((response) => { this.info({ id }).then((response) => {
this.form = response.data; this.form = response.data;
if (this.form.unit !== undefined) { if (this.form.unit !== undefined) {
this.form.unit = String(this.form.unit); this.form.unit = String(this.form.unit)
} }
if (this.form.type !== undefined) { if (this.form.type !== undefined) {
this.form.type = String(this.form.type); this.form.type = String(this.form.type)
} }
this.open = true; this.open = true;
this.title = '修改备品备件'; this.title = '修改备品备件';
this.getDict();
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -381,7 +355,6 @@ export default {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = '修改备品备件'; this.title = '修改备品备件';
this.getDict();
}); });
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
@ -402,30 +375,6 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
async getDict() {
const materRes = await getMaterialTree(); //
let typeId = materRes.data.find((item) => item.product === 2).id;
const listQuery = {
typeId: typeId,
};
const materData = await getMaterialList(listQuery);
this.rows[0][0].options = (materData.data || []).map((item) => ({
label: item.name,
value: item.id,
...item
}));
},
updateDialogFormZ(val) {
const selectData = this.rows[0][0].options.find(
(item) => item.id === val.productMaterialId
);
this.form.productMaterialId = selectData.id;
this.form.name = selectData.name;
this.form.code = selectData.code;
this.form.specifications = selectData.specifications;
this.form.supplierId = selectData.supplierId;
this.form.unit = selectData.unit;
},
}, },
}; };
</script> </script>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zwq * @LastEditors: zhp
* @LastEditTime: 2024-10-15 15:59:48 * @LastEditTime: 2023-11-28 10:34:24
* @Description: * @Description:
--> -->
<template> <template>
@ -26,11 +26,9 @@ import { parseTime } from '../../core/mixins/code-filter';
import { import {
getProcessTraceabilityPage, getProcessTraceabilityPage,
getWorkOrderList, getWorkOrderList,
getCoreProduct
// exportEnergyPlcExcel // exportEnergyPlcExcel
} from '@/api/quality/processTraceability'; } from '@/api/quality/processTraceability';
import {
getProductMaterial,
} from '@/api/base/material';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
const tableProps = [ const tableProps = [
{ {
@ -64,14 +62,6 @@ const tableProps = [
prop: 'actualQuantity', prop: 'actualQuantity',
label: '生产数量' label: '生产数量'
}, },
{
prop: 'lineName',
label: '产线名称'
},
{
prop: 'lineNum',
label: '产线预计产量'
},
{ {
prop: 'planProductUnit', prop: 'planProductUnit',
label: '单位', label: '单位',
@ -197,7 +187,7 @@ export default {
if (val.type === "processDetail") { if (val.type === "processDetail") {
console.log(val); console.log(val);
let specificationsData ='' let specificationsData =''
getProductMaterial(val.data.planProductId).then((res) => { getCoreProduct(val.data.planProductId).then((res) => {
console.log(res) console.log(res)
this.$router.push({ this.$router.push({
@ -209,7 +199,6 @@ export default {
specifications: res.data.specifications, specifications: res.data.specifications,
productName: val.data.planProductName, productName: val.data.planProductName,
processFlowName: val.data.processFlowName, processFlowName: val.data.processFlowName,
lineId: val.data.lineId,
// planProductId: val.data.planProductId // planProductId: val.data.planProductId
// equipmentName, // equipmentName,
}, },

View File

@ -185,7 +185,6 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
orderId: this.$route.query.orderId, orderId: this.$route.query.orderId,
lineId: this.$route.query.lineId,
flowDetId: [this.detId], flowDetId: [this.detId],
// orderId: this.$route.query.orderId, // orderId: this.$route.query.orderId,
@ -233,7 +232,6 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
orderId: this.$route.query.orderId, orderId: this.$route.query.orderId,
lineId: this.$route.query.lineId,
flowDetId: [this.detId], flowDetId: [this.detId],
// orderId: this.$route.query.orderId, // orderId: this.$route.query.orderId,
@ -265,7 +263,6 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
orderId: this.$route.query.orderId, orderId: this.$route.query.orderId,
lineId: this.$route.query.lineId,
flowDetId: [this.detId], flowDetId: [this.detId],
}).then((res) => { }).then((res) => {
console.log(res); console.log(res);

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2024-10-14 09:26:29 * @LastEditTime: 2024-08-14 15:26:32
* @Description: * @Description:
--> -->
<template> <template>
@ -252,8 +252,10 @@ export default {
}); });
}, },
async getDict() { async getDict() {
const materRes = await getMaterialTree();// const materRes = await getMaterialTree();
let typeId = materRes.data.find(item=>item.product === 1).id let typeId = materRes.data[0].product
? materRes.data[0].id
: materRes.data[1].id;
const listQuery = { const listQuery = {
typeId: typeId, typeId: typeId,
}; };

View File

@ -117,8 +117,8 @@ export default {
methods: { methods: {
async getDict() { async getDict() {
// //
const materRes = await getMaterialTree(); // const materRes = await getMaterialTree();
let typeId = materRes.data.find(item=>item.product === 1).id let typeId = materRes.data[0].product?materRes.data[1].id:materRes.data[0].id
const listQuery= { const listQuery= {
typeId:typeId typeId:typeId
} }

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2024-10-14 09:26:53 * @LastEditTime: 2024-08-14 15:27:50
* @Description: * @Description:
--> -->
<template> <template>
@ -207,8 +207,8 @@ export default {
}, },
methods: { methods: {
async getDictData() { async getDictData() {
const materRes = await getMaterialTree(); // const materRes = await getMaterialTree();
let typeId = materRes.data.find(item=>item.product === 0).id let typeId = materRes.data[0].product?materRes.data[1].id:materRes.data[0].id
const listQuery= { const listQuery= {
typeId:typeId typeId:typeId
} }

View File

@ -283,7 +283,7 @@ export default {
}, },
// //
returnOrderManage() { returnOrderManage() {
this.$router.go(-1); this.$router.push({path: '/order/base/order-manage'})
} }
} }
} }

View File

@ -5,103 +5,89 @@
<span class="blueTitle"></span> <span class="blueTitle"></span>
<span>订单编码: {{orderMsg.code}}</span> <span>订单编码: {{orderMsg.code}}</span>
</div> </div>
<el-button <el-button type="primary" plain size="small" style="float: right;" @click="returnOrderManage">
type="primary" <svg-icon icon-class="return" /> 返回
plain
size="small"
style="float: right; margin-top: -10px"
@click="returnOrderManage">
<svg-icon icon-class="return" />
返回
</el-button> </el-button>
<div style="padding-left: 14px; margin-top: 20px"> <div style="padding-left: 14px;">
<el-row> <el-row>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">订单名</div> <div class="blodTip">订单名</div>
<div class="lightTip">{{orderMsg.name}}</div> <div class="lightTip">{{orderMsg.name}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">产品信息</div> <div class="blodTip">产品信息</div>
<div class="lightTip">{{orderMsg.productName}}</div> <div class="lightTip">{{orderMsg.productName}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">产品规格</div> <div class="blodTip">产品规格</div>
<div class="lightTip">{{orderMsg.specifications}}</div> <div class="lightTip">{{orderMsg.specifications}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">客户</div> <div class="blodTip">客户</div>
<div class="lightTip">{{orderMsg.customerName}}</div> <div class="lightTip">{{orderMsg.customerName}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">包装规格</div> <div class="blodTip">包装规格</div>
<div class="lightTip"> <div class="lightTip">{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec)}}</div>
{{ getDictDataLabel(DICT_TYPE.PACK_SPEC, orderMsg.packSpec) }}
</div>
</el-col> </el-col>
<!-- <el-col :span='3'> <!-- <el-col :span='3'>
<div class="blodTip">物料计算方式</div> <div class="blodTip">物料计算方式</div>
<div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}} <div class="lightTip">{{orderMsg.materialMethod ? (orderMsg.materialMethod === 1 ? '产品基础' : '工艺扩展') : ''}}
</div> </div>
</el-col> --> </el-col> -->
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">创建时间</div> <div class="blodTip">创建时间</div>
<div class="lightTip">{{ parseTime(orderMsg.createTime) }}</div> <div class="lightTip">{{ parseTime(orderMsg.createTime) }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">计划开始时间</div> <div class="blodTip">计划开始时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div> <div class="lightTip">{{ parseTime(orderMsg.planStartTime) }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">计划完成时间</div> <div class="blodTip">计划完成时间</div>
<div class="lightTip">{{ parseTime(orderMsg.planFinishTime) }}</div> <div class="lightTip">{{ parseTime(orderMsg.planFinishTime) }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">计划加工数量</div> <div class="blodTip">计划加工数量</div>
<div class="lightTip">{{orderMsg.planQuantity}}</div> <div class="lightTip">{{orderMsg.planQuantity}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">加工平方数(平方米)</div> <div class="blodTip">加工平方数(平方米)</div>
<div class="lightTip">{{orderMsg.planArea}}</div> <div class="lightTip">{{orderMsg.planArea}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">预计用时()</div> <div class="blodTip">预计用时()</div>
<div class="lightTip">{{ orderMsg.expectTime }}</div> <div class="lightTip">{{ orderMsg.expectTime }}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">状态</div> <div class="blodTip">状态</div>
<div class="lightTip"> <div class="lightTip">{{getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status)}}</div>
{{ getDictDataLabel(DICT_TYPE.ORDER_STATUS, orderMsg.status) }}
</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">实际开始时间</div> <div class="blodTip">实际开始时间</div>
<div class="lightTip"> <div class="lightTip">{{ parseTime(orderMsg.startProduceTime) }}</div>
{{ parseTime(orderMsg.startProduceTime) }}
</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">实际完成时间</div> <div class="blodTip">实际完成时间</div>
<div class="lightTip"> <div class="lightTip">{{ parseTime(orderMsg.finishProduceTime) }}</div>
{{ parseTime(orderMsg.finishProduceTime) }}
</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">实际生产数量</div> <div class="blodTip">实际生产数量</div>
<div class="lightTip">{{orderMsg.actualQuantity }}</div> <div class="lightTip">{{orderMsg.actualQuantity }}</div>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">完成比%</div> <div class="blodTip">完成比%</div>
<div class="lightTip">{{orderMsg.completeProp}}</div> <div class="lightTip">{{orderMsg.completeProp}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">废片数量</div> <div class="blodTip">废片数量</div>
<div class="lightTip">{{orderMsg.nokQuantity}}</div> <div class="lightTip">{{orderMsg.nokQuantity}}</div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span='3'>
<div class="blodTip">负责人</div> <div class="blodTip">负责人</div>
<div class="lightTip">{{orderMsg.workers}}</div> <div class="lightTip">{{orderMsg.workers}}</div>
</el-col> </el-col>
@ -118,138 +104,109 @@
<span>工单信息</span> <span>工单信息</span>
</div> --> </div> -->
<div class="toggleTabBox"> <div class="toggleTabBox">
<div <div :class="{ active: activeModule === 'orderInfo' }" @click="toggleTab('orderInfo')">子订单信息</div>
:class="{ active: activeModule === 'orderInfo' }" <!-- <div :class="{ active: activeModule === 'useInfo' }" @click="toggleTab('useInfo')">用料信息</div> -->
@click="toggleTab('orderInfo')">
子订单信息
</div>
<div
:class="{ active: activeModule === 'useInfo' }"
@click="toggleTab('useInfo')">
用料信息
</div>
</div> </div>
<!-- 列表 --> <!-- 列表 -->
<el-row v-show="activeModule === 'orderInfo'"> <el-row v-show="activeModule === 'orderInfo'">
<el-col :span="6"> <el-col :span="6">
<el-tree <el-tree :data="treeData" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
:data="treeData"
:props="defaultProps"
@node-click="handleNodeClick"></el-tree>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<base-table <base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps1"
:page="queryParams.pageNo" :table-data="list1" :max-height="tableH" />
:limit="queryParams.pageSize"
:table-props="tableProps1"
:table-data="list1"
:max-height="tableH" />
</el-col> </el-col>
</el-row> </el-row>
<base-table <!-- <base-table v-show="activeModule === 'useInfo'" :page="queryParams.pageNo" :limit="queryParams.pageSize"
v-show="activeModule === 'useInfo'" :table-props="tableProps2" :table-data="list2" :max-height="tableH" /> -->
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:table-props="tableProps2"
:table-data="list2"
:max-height="tableH" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { parseTime } from '@/utils/ruoyi'; import { parseTime } from '@/utils/ruoyi'
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict'
import { import { getProcessFlowList } from '@/api/base/orderManage'
getProcessFlowList, import { orderDetail, bomUseNum, getDetailTree, getDetailTreeInfo } from '@/api/base/orderManage'
getOrderRemainNum,
getMaterialCostOrder,
} from '@/api/base/orderManage';
import {
orderDetail,
bomUseNum,
getDetailTree,
getDetailTreeInfo,
} from '@/api/base/orderManage';
const tableProps1 = [ const tableProps1 = [
{ {
prop: 'issueTime', prop: 'issueTime',
label: '下发时间', label: '下发时间',
filter: parseTime, filter: parseTime,
minWidth: 160, minWidth: 160
}, },
{ {
prop: 'name', prop: 'name',
label: '工单名', label: '工单名',
minWidth: 100, minWidth: 100,
showOverflowtooltip: true, showOverflowtooltip: true
}, },
{ {
prop: 'code', prop: 'code',
label: '工单编码', label: '工单编码',
minWidth: 150, minWidth: 150
}, },
{ {
prop: 'planAssignmentQuantity', prop: 'planAssignmentQuantity',
label: '计划加工量', label: '计划加工量',
width: 100, width: 100
}, },
{ {
prop: 'actualQuantity', prop: 'actualQuantity',
label: '实际加工量', label: '实际加工量',
width: 100, width: 100
}, },
{ {
prop: 'actualArea', prop: 'actualArea',
label: '加工平方数', label: '加工平方数',
width: 100, width: 100
}, },
{ {
prop: 'status', prop: 'status',
label: '状态', label: '状态',
filter: publicFormatter('order_status'), filter: publicFormatter('order_status')
}, },
{ {
prop: 'startProduceTime', prop: 'startProduceTime',
label: '开始时间', label: '开始时间',
filter: parseTime, filter: parseTime,
minWidth: 160, minWidth: 160
}, },
{ {
prop: 'finishProduceTime', prop: 'finishProduceTime',
label: '结束时间', label: '结束时间',
filter: parseTime, filter: parseTime,
minWidth: 160, minWidth: 160
}, },
{ {
prop: 'productLineNames', prop: 'productLineNames',
label: '关联产线', label: '关联产线',
filter: (val) => (val ? val.join(',') : ''), filter: (val) => val ? val.join(',') : '',
showOverflowtooltip: true, showOverflowtooltip: true
}, },
{ {
prop: 'workers', prop: 'workers',
label: '负责人', label: '负责人'
}, },
{ {
prop: 'remark', prop: 'remark',
label: '备注', label: '备注'
}, }
]; ]
const tableProps2 = [ const tableProps2 = [
{ {
prop: 'materialName', prop: 'materialName',
label: '物料名称', label: '物料名称'
}, },
{ {
prop: 'unit', prop: 'unit',
label: '单位', label: '单位',
filter: publicFormatter('unit_dict'), filter: publicFormatter('unit_dict')
}, },
{ {
prop: 'num', prop: 'num',
label: '剩余生产预计消耗', label: '剩余生产预计消耗'
}, }
]; ]
export default { export default {
name: 'OrderDetailData', name: 'OrderDetailData',
data() { data() {
@ -265,108 +222,97 @@ export default {
// //
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 500, pageSize: 500
}, },
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name', label: 'name'
}, },
orderMsg: {}, orderMsg: {},
processFlowName: '', processFlowName: ''
}; }
}, },
mounted() { mounted() {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(510) / 2; this.tableH = this.tableHeight(510) / 2
}); })
this.orderId = location.href.split('?')[1].split('=')[1]; this.orderId = location.href.split('?')[1].split('=')[1]
this.getMsg(); this.getMsg()
}, },
watch: { watch: {
$route: 'initData', $route: 'initData'
}, },
methods: { methods: {
toggleTab(val) { toggleTab(val) {
this.activeModule = val; this.activeModule = val
}, },
handleNodeClick(val) { handleNodeClick(val) {
console.log(val); console.log(val)
getDetailTreeInfo({ getDetailTreeInfo({
id: val.id, id: val.id
}).then((res) => { }).then(res => {
this.list1 = res.data.order; this.list1 = res.data.order
console.log(res); console.log(res)
}); })
}, },
initData(to) { initData(to) {
if (to.name === 'OrderDetailData') { if (to.name === 'OrderDetailData') {
this.orderId = location.href.split('?')[1].split('=')[1]; this.orderId = location.href.split('?')[1].split('=')[1]
this.getMsg(); this.getMsg()
} }
}, },
getMsg() { getMsg() {
orderDetail({ orderDetail({
id: this.orderId, id: this.orderId
}).then((res) => { }).then(res => {
this.orderMsg = res.data; this.orderMsg = res.data
this.list1 = res.data.coreWorkOrderRespVOS; this.list1 = res.data.coreWorkOrderRespVOS
getOrderRemainNum(this.orderId).then((resNum) => {
bomUseNum({ bomUseNum({
productId: this.orderMsg.planProductId, productId: this.orderMsg.planProductId
}).then((res2) => { }).then(res2 => {
if (res2.data && res2.data.length > 0) { if (res2.data && res2.data.length > 0) {
let arr = res2.data; let arr = res2.data
arr.map((item) => { arr.map(item => {
if (item) { if (item) {
let a = item.num * resNum.data; let a = item.num * this.orderMsg.remainingQuantity
item.num = !isNaN(parseFloat(a)) && isFinite(a) ? a : ''; item.num = !isNaN(parseFloat(a)) && isFinite(a) ? a : ''
} }
}); })
this.list2 = arr; this.list2 = arr
this.getMaterialCostOrder(this.orderId);
}else { }else {
this.list2 = []; this.list2 = []
} }
}); })
});
getDetailTree({ getDetailTree({
id: this.orderId, id: this.orderId
}).then((res) => { }).then(res => {
console.log(res); console.log(res)
this.treeData = res.data; this.treeData =res.data
}); })
// //
getProcessFlowList().then((res) => { getProcessFlowList().then(res => {
let arr = res.data || []; let arr = res.data || []
if (arr.length > 0) { if (arr.length > 0) {
arr.map((item) => { arr.map(item => {
if (item.id === this.orderMsg.processFlowId) { if (item.id === this.orderMsg.processFlowId) {
this.processFlowName = item.name; this.processFlowName = item.name
} }
}); })
} }
}); })
}); })
},
getMaterialCostOrder(id) {
getMaterialCostOrder({ id }).then((res) => {
this.list2.push(...res.data);
});
}, },
// //
returnOrderManage() { returnOrderManage() {
this.$router.go(-1); this.$router.go(-1);
}, }
}, }
}; }
</script> </script>
<style lang="scss" scoped> <style lang='scss' scoped>
.orderDetailData { .orderDetailData {
background-color: rgb(242, 244, 249); background-color: rgb(242, 244, 249);
.box1, .box1, .box2, .box3 {
.box2,
.box3 {
background-color: #fff; background-color: #fff;
border-radius: 9px; border-radius: 9px;
} }
@ -385,7 +331,7 @@ export default {
} }
.active { .active {
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
border-bottom-color: #0b58ff; border-bottom-color: #0B58FF;
} }
} }
} }

View File

@ -1,252 +1,125 @@
<template> <template>
<el-form <el-form ref="dataForm" :rules="rules" label-width="130px" :model="dataForm" label-position="top">
ref="dataForm"
:rules="rules"
label-width="130px"
:model="dataForm"
label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="工单名称" prop="name"> <el-form-item label="工单名称" prop="name">
<el-input <el-input v-model="dataForm.name" placeholder="请输入工单名称"></el-input>
v-model="dataForm.name"
placeholder="请输入工单名称"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="工单编码" prop="code"> <el-form-item label="工单编码" prop="code">
<el-input <el-input v-model="dataForm.code" disabled placeholder="请输入工单编码"></el-input>
v-model="dataForm.code"
disabled
placeholder="请输入工单编码"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="产品名称" prop="planProductId"> <el-form-item label="产品名称" prop="planProductId">
<el-select <el-select v-model="dataForm.planProductId" placeholder="请选择产品" style="width: 100%;" filterable
v-model="dataForm.planProductId"
placeholder="请选择产品"
style="width: 100%"
filterable
@change="selectProduct"> @change="selectProduct">
<el-option <el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
v-for="item in productList" </el-option>
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="产品规格" prop="specifications"> <el-form-item label="产品规格" prop="specifications">
<el-input <el-input v-model="dataForm.specifications" placeholder="请输入产品规格" />
v-model="dataForm.specifications"
placeholder="请输入产品规格" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="计划开始时间"> <el-form-item label="计划开始时间">
<el-date-picker <el-date-picker v-model="dataForm.planStartTime" type="datetime" value-format="timestamp" style="width: 100%;"
v-model="dataForm.planStartTime" placeholder="请选择计划开始时间">
type="datetime" </el-date-picker>
value-format="timestamp"
style="width: 100%"
placeholder="请选择计划开始时间"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="计划完成时间"> <el-form-item label="计划完成时间">
<el-date-picker <el-date-picker v-model="dataForm.planFinishTime" type="datetime" value-format="timestamp"
v-model="dataForm.planFinishTime" style="width: 100%;" placeholder="请选择计划完成时间">
type="datetime" </el-date-picker>
value-format="timestamp"
style="width: 100%"
placeholder="请选择计划完成时间"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="计划投入数量" prop="planAssignQuantity"> <el-form-item label="计划投入数量" prop="planAssignQuantity">
<el-input-number <el-input-number v-model="dataForm.planAssignQuantity" :min="0" :max="9999999999999" style="width: 100%;"
v-model="dataForm.planAssignQuantity"
:min="0"
:max="9999999999999"
style="width: 100%"
placeholder="请输入计划投入数量"></el-input-number> placeholder="请输入计划投入数量"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="计划生产数量" prop="planQuantity"> <el-form-item label="计划生产数量" prop="planQuantity">
<el-input-number <el-input-number v-model="dataForm.planQuantity" :min="0" :max="9999999999999" style="width: 100%;"
v-model="dataForm.planQuantity"
:min="0"
:max="9999999999999"
style="width: 100%"
placeholder="请输入计划生产数量"></el-input-number> placeholder="请输入计划生产数量"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="优先级" prop="priority"> <el-form-item label="关联工艺" prop="processFlowId">
<el-select <el-select v-model="dataForm.processFlowId" placeholder="请选择关联工艺" clearable filterable style="width: 100%;"
v-model="dataForm.priority" @change="processFlowIdChange">
placeholder="请选择优先级" <el-option v-for="item in processFlowList" :key="item.id" :label="item.name" :value="item.id">
style="width: 100%"> </el-option>
<el-option
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span='8'>
<el-form-item label="工单类型" prop="type"> <el-form-item label="物料计算方式" prop="materialMethod">
<el-select <!-- <el-radio-group v-model="dataForm.materialMethod" @change="materialMethodChange">
v-model="dataForm.type"
placeholder="请选择工单类型"
style="width: 100%">
<el-option
v-for="item in workOrderTypeList"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="负责部门" prop="deptId">
<el-select
v-model="dataForm.deptId"
placeholder="请选择关联产线"
style="width: 100%">
<el-option
v-for="item in deptList"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="负责人" prop="workers">
<el-input
v-model="dataForm.workers"
placeholder="请输入负责人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<span style="margin: 0 20px 15px 0; display: inline-block">
物料计算方式
</span>
<el-radio-group
v-model="dataForm.materialMethod"
@change="materialMethodChange">
<el-radio :label="1">产品基础BOM</el-radio> <el-radio :label="1">产品基础BOM</el-radio>
<el-radio :label="2">工艺扩展BOM</el-radio> <el-radio :label="2">工艺扩展BOM</el-radio>
</el-radio-group> </el-radio-group> -->
<!-- <el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;" <el-select v-model="dataForm.materialMethod" placeholder="请选择物料计算方式" style="width: 100%;"
@change="materialMethodChange"> @change="materialMethodChange">
<el-option key="1" label="产品基础BOM" :value="1" /> <el-option key="1" label="产品基础BOM" :value="1" />
<el-option key="2" label="工艺扩展BOM" :value="2" /> <el-option key="2" label="工艺扩展BOM" :value="2" />
</el-select> --> </el-select>
</el-form-item>
</el-col>
<el-col :span='8'>
<el-form-item label="优先级" prop="priority">
<el-select v-model="dataForm.priority" placeholder="请选择优先级" style="width: 100%;">
<el-option v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span='8'>
<el-form-item label="工单类型" prop="type">
<el-select v-model="dataForm.type" placeholder="请选择工单类型" style="width: 100%;">
<el-option v-for="item in workOrderTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<div v-if="dataForm.materialMethod === 1">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span='8'>
<span style="margin: 8px 0; display: inline-block">关联产线</span> <el-form-item label="关联产线" prop="productLineIds">
<el-button style="margin-left: 20px" type="text" @click="addBind"> <el-select v-model="dataForm.productLineIds" placeholder="请选择关联产线" multiple style="width: 100%;">
新增 <el-option v-for="item in productLineList" :key="item.id" :label="item.name" :value="item.id">
</el-button> </el-option>
</el-col>
</el-row>
<el-row
:gutter="20"
v-for="(item, index) in dataForm.productLineIds"
:key="index + 'line'"
style="margin-bottom: 8px">
<el-col :span="8">
<el-select
v-model="item.lineId"
placeholder="请选择产线"
style="width: 100%">
<el-option
v-for="item in productLineList"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-input-number <el-form-item label="负责部门" prop="deptId">
style="width: 100%" <el-select v-model="dataForm.deptId" placeholder="请选择关联产线" style="width: 100%;">
v-model="item.num" <el-option v-for="item in deptList" :key="item.id" :label="item.name" :value="item.id">
placeholder="请输入数量" </el-option>
:step="1"
:min="0"
step-strictly />
</el-col>
</el-row>
</div>
<div v-else>
<el-row :gutter="20">
<el-col :span="24">
<span style="margin: 8px 0; display: inline-block">
关联产线及工艺
</span>
<el-button style="margin-left: 20px" type="text" @click="addBind">
新增
</el-button>
</el-col>
</el-row>
<el-row
:gutter="20"
v-for="(item, index) in dataForm.productLineIds"
:key="index + 'process'"
style="margin-bottom: 8px">
<el-col :span="8">
<el-select
v-model="item.lineId"
placeholder="请选择产线"
style="width: 100%"
@change="processLineIdChange">
<el-option
v-for="item in productLineList"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span='8'>
<el-select <el-form-item label="负责人" prop="workers">
v-model="item.processId" <el-input v-model="dataForm.workers" placeholder="请输入负责人"></el-input>
placeholder="请选择工艺" </el-form-item>
filterable
style="width: 100%">
<el-option
v-for="item in processFlowList"
:key="item.id"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="8">
<el-input-number
style="width: 100%"
v-model="item.num"
:step="1"
:min="0"
step-strictly />
</el-col> </el-col>
</el-row> </el-row>
</div>
<!-- <el-row> <!-- <el-row>
<el-col :span='12'> <el-col :span='12'>
<el-form-item label="计划分配订单量" prop="planAssignmentQuantity"> <el-form-item label="计划分配订单量" prop="planAssignmentQuantity">
@ -257,15 +130,10 @@
</el-form> </el-form>
</template> </template>
<script> <script>
import { getProductAll } from '@/api/base/product'; import { getProductAll } from '@/api/base/product'
import { getProcessFlowPage, workOrderList } from '@/api/base/orderManage'; import { getProcessFlowList, workOrderList } from '@/api/base/orderManage'
import { import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder'
createCoreWO, import { getLineAll } from '@/api/base/productionLine'
updateCoreWO,
getCode,
getCoreWO,
} from '@/api/base/coreWorkOrder';
import { getLineAll } from '@/api/base/productionLine';
import basicAdd from '../../core/mixins/basic-add'; import basicAdd from '../../core/mixins/basic-add';
import { listDept } from '@/api/system/dept'; import { listDept } from '@/api/system/dept';
export default { export default {
@ -278,7 +146,7 @@ export default {
codeURL: getCode, codeURL: getCode,
createURL: createCoreWO, createURL: createCoreWO,
updateURL: updateCoreWO, updateURL: updateCoreWO,
infoURL: getCoreWO, infoURL: getCoreWO
}, },
dataForm: { dataForm: {
id: undefined, id: undefined,
@ -292,27 +160,21 @@ export default {
planFinishTime: '', planFinishTime: '',
planAssignQuantity: 0, planAssignQuantity: 0,
planQuantity: 0, planQuantity: 0,
processFlowId: '',
materialMethod: 1, materialMethod: 1,
triggerOrigin: 1, triggerOrigin: 1,
priority: '', priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }], productLineIds: [],
type: '', type: '',
workers: '', workers: '',
status: 1, status: 1
}, },
rules: { rules: {
name: [ name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
{ required: true, message: '工单名称不能为空', trigger: 'blur' }, planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
], planAssignQuantity: [{ required: true, message: "计划投入数量不能为空", trigger: "blur" }],
planProductId: [ planQuantity: [{ required: true, message: "计划生产数量不能为空", trigger: "blur" }],
{ required: true, message: '产品名称不能为空', trigger: 'change' }, productLineIds: [{ required: true, message: "关联产线不能为空", trigger: "change" }]
],
planAssignQuantity: [
{ required: true, message: '计划投入数量不能为空', trigger: 'blur' },
],
planQuantity: [
{ required: true, message: '计划生产数量不能为空', trigger: 'blur' },
],
}, },
productList: [], productList: [],
processFlowList: [], processFlowList: [],
@ -320,125 +182,94 @@ export default {
deptList:[], deptList:[],
workOrderTypeList: [ workOrderTypeList: [
{id: 1,name:'普通'}, {id: 1,name:'普通'},
{ id: 2, name: '特殊' }, {id: 2, name:'特殊'}
], ],
planStartTime: '', planStartTime: '',
planFinishTime: '', planFinishTime: '',
isBind: false, isBind: false,
workOrderList: [], workOrderList: []
}; }
}, },
mounted() { mounted() {
this.getDict(); this.getDict()
}, },
methods: { methods: {
// //
materialMethodChange(val) { materialMethodChange(val) {
console.log(val); if (val === 2 && !this.dataForm.processFlowId) {
this.processFlowList = []; this.dataForm.materialMethod = 1
this.dataForm.productLineIds = []; this.$modal.msgError("请先选择关联工艺");
const obj = { lineId: null, processId: null, num: null }; }
this.dataForm.productLineIds.push(obj);
// if (val === 2 && !this.dataForm.processFlowId) {
// this.dataForm.materialMethod = 1;
// this.$modal.msgError('');
// }
}, },
// 线 //
processLineIdChange(val) { processFlowIdChange(val) {
const params = { console.log(val)
pageNo: 1, if (!val) {
pageSize: 100, this.dataForm.materialMethod = 1
lineId: val, }
};
//
getProcessFlowPage(params).then((res) => {
this.processFlowList = res.data.list || [];
});
}, },
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();
this.planStartTime = ''; this.planStartTime = ''
this.planFinishTime = ''; this.planFinishTime = ''
if (this.dataForm.id) { if (this.dataForm.id) {
getCoreWO(id).then((response) => { getCoreWO(id).then(response => {
this.dataForm = response.data; this.dataForm = response.data;
if (this.dataForm.priority !== undefined) { if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority); this.dataForm.priority = String(this.dataForm.priority)
} }
this.dataForm.priority; this.dataForm.priority
}); });
} else { } else {
if (this.urlOptions.isGetCode) { if (this.urlOptions.isGetCode) {
this.getCode(); this.getCode()
} }
} }
}); });
}, },
// //
dataFormSubmit() { dataFormSubmit() {
this.$refs['dataForm'].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (!valid) { if (!valid) {
return false; return false;
} }
let isContinue = true;
if (this.dataForm.materialMethod === 1) {
this.dataForm.productLineIds.forEach((item) => {
if (!item.lineId) {
this.$message('关联产线不能为空');
isContinue = false;
}
});
} else {
this.dataForm.productLineIds.forEach((item) => {
if (!item.lineId || !item.processId) {
this.$message('关联产线及工艺不能为空');
isContinue = false;
}
});
}
// //
if (this.dataForm.id && isContinue) { if (this.dataForm.id) {
this.urlOptions.updateURL(this.dataForm).then((response) => { this.urlOptions.updateURL(this.dataForm).then(response => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess("修改成功");
this.visible = false; this.visible = false;
this.$emit('refreshDataList'); this.$emit("refreshDataList");
}); });
return; return;
} }
// //
if (isContinue) { this.urlOptions.createURL(this.dataForm).then(response => {
this.urlOptions.createURL(this.dataForm).then((response) => { this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess('新增成功');
this.visible = false; this.visible = false;
this.$confirm('是否添加预使用主原料信息?', '提示', { this.$confirm('是否添加预使用主原料信息?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) }).then(() => {
.then(() => { console.log('121', this.dataForm.name)
console.log('121', this.dataForm.name); this.$emit("refreshDataList", {
this.$emit('refreshDataList', {
id: response.data, id: response.data,
name: this.dataForm.name, name: this.dataForm.name
}); });
}) }).catch(() => {
.catch(() => { this.$emit("refreshDataList");
this.$emit('refreshDataList');
}); });
}); });
}
}); });
}, },
getCode() { getCode() {
this.urlOptions this.urlOptions.codeURL()
.codeURL()
.then(({ data: res }) => { .then(({ data: res }) => {
this.dataForm.code = res; this.dataForm.code = res;
}) })
@ -446,39 +277,39 @@ export default {
}, },
getDict() { getDict() {
// //
getProductAll().then((res) => { getProductAll().then(res => {
this.productList = res.data || []; this.productList = res.data || []
}); })
// 线 // 线
getLineAll().then((res) => { getLineAll().then(res => {
this.productLineList = res.data || []; this.productLineList = res.data || []
}); })
listDept().then((res) => { listDept().then(res => {
this.deptList = res.data || []; this.deptList = res.data || []
}); })
//
getProcessFlowList().then(res => {
this.processFlowList = res.data || []
})
// list // list
workOrderList({ workOrderList({
status: 1, status: 1
}).then((res) => { }).then(res => {
this.workOrderList = res.data || []; this.workOrderList = res.data || []
}); })
}, },
// //
selectProduct(val) { selectProduct(val) {
if (val) { if (val) {
this.productList.map((item) => { this.productList.map(item => {
if (val === item.id) { if (val === item.id) {
this.dataForm.specifications = item.specifications; this.dataForm.specifications = item.specifications
} }
}); })
} else { } else {
this.dataForm.specifications = ''; this.dataForm.specifications = ''
}
}
}
} }
},
addBind() {
const obj = { lineId: null, processId: null, num: null };
this.dataForm.productLineIds.push(obj);
},
},
};
</script> </script>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zhp
* @LastEditTime: 2024-10-15 16:16:22 * @LastEditTime: 2024-09-11 10:27:13
* @Description: * @Description:
--> -->
<template> <template>
@ -157,7 +157,7 @@
<script> <script>
// import basicAdd from '../../core/mixins/basic-add'; // import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById,getMaterialCostWorkOrder } from "@/api/base/coreWorkOrder"; import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
import tableHeightMixin from '@/mixins/tableHeightMixin'; import tableHeightMixin from '@/mixins/tableHeightMixin';
import { getOrderEnergyData } from "@/api/monitoring/orderEnergy"; import { getOrderEnergyData } from "@/api/monitoring/orderEnergy";
// import { orderList } from "@/api/base/orderManage"; // import { orderList } from "@/api/base/orderManage";
@ -215,7 +215,7 @@ const tableProps1 = [
filter: publicFormatter('unit_dict') filter: publicFormatter('unit_dict')
}, },
{ {
prop: 'remainingNum', prop: 'num',
label: '剩余生产预计消耗' label: '剩余生产预计消耗'
}, },
]; ];
@ -390,8 +390,8 @@ export default {
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;
}); });
}else if (this.activeName === 'material') { }else if (this.activeName === 'material') {
getMaterialCostWorkOrder({ getConOrderList({
id: this.dataForm.id, workOrderId: this.dataForm.id,
}).then((response) => { }).then((response) => {
this.materialList = response.data; this.materialList = response.data;
// this.listQuery.total = response.data.total; // this.listQuery.total = response.data.total;

View File

@ -102,14 +102,14 @@ export default {
bottom: '3%', bottom: '3%',
bottom: '55%', bottom: '55%',
}, },
// { {
// containLabel: true, containLabel: true,
// top: 40, top: 40,
// left: '4%', left: '4%',
// right: '2%', right: '2%',
// bottom: '3%', bottom: '3%',
// top: '55%', top: '55%',
// }, },
], ],
xAxis: [ xAxis: [
{ {
@ -128,22 +128,22 @@ export default {
}, },
}, },
}, },
// { {
// type: 'category', type: 'category',
// data: nameArr, data: nameArr,
// gridIndex: 1, gridIndex: 1,
// axisTick: { axisTick: {
// alignWithLabel: true, alignWithLabel: true,
// }, },
// axisLabel: { axisLabel: {
// color: '#979797', color: '#979797',
// }, },
// axisLine: { axisLine: {
// lineStyle: { lineStyle: {
// color: '#979797', color: '#979797',
// }, },
// }, },
// }, },
], ],
yAxis: [ yAxis: [
{ {
@ -159,19 +159,19 @@ export default {
color: '#979797', color: '#979797',
}, },
}, },
// { {
// gridIndex: 1, gridIndex: 1,
// name: '使', name: '剩余使用天数',
// axisTick: { axisTick: {
// show: false, show: false,
// }, },
// splitArea: { splitArea: {
// show: false, show: false,
// }, },
// axisLabel: { axisLabel: {
// color: '#979797', color: '#979797',
// }, },
// }, },
], ],
series: [ series: [
{ {
@ -181,15 +181,15 @@ export default {
data: valueArr, data: valueArr,
animationDuration, animationDuration,
}, },
// { {
// name: '', name: '天数',
// type: 'bar', type: 'bar',
// barWidth: '20', barWidth: '20',
// data: dayArr, data: dayArr,
// animationDuration, animationDuration,
// xAxisIndex: 1, xAxisIndex: 1,
// yAxisIndex: 1, yAxisIndex: 1,
// }, },
], ],
}); });
}, },