Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
550b25203f
|
@ -9,7 +9,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col
|
<el-col
|
||||||
v-for="(item, $index) in formData"
|
v-for="(item, $index) in formData"
|
||||||
v-show="filterBlock(item.parent,item.display_expression,$index,item.field_key)"
|
v-show="filterBlock(item.display_expression,$index,item.field_key)"
|
||||||
:key="$index"
|
:key="$index"
|
||||||
:span="12"
|
:span="12"
|
||||||
style="position: relative"
|
style="position: relative"
|
||||||
|
@ -281,79 +281,71 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
filterBlock(parent,rule,index,field_key){
|
filterBlock(rule,index,field_key){
|
||||||
let that = this;
|
let that = this;
|
||||||
if(parent!==''&&parent!==null&&parent!==undefined){
|
if(rule!==''&&rule!==null&&rule!==undefined){
|
||||||
if(rule!==''&&rule!==null&&rule!==undefined){
|
let reg = /\{(.+?)\}/g;
|
||||||
let reg = /\{(.+?)\}/g;
|
if(rule.indexOf('||')>-1||rule.indexOf('&&')>-1){
|
||||||
//let str = rule.replace(temp,'').replace('$','');//=='有'
|
let tam = '', arr = [];
|
||||||
//let y = that.checkForm[key];
|
if(rule.indexOf('||')>-1){
|
||||||
if(rule.indexOf('||')>-1||rule.indexOf('&&')>-1){
|
arr = rule.split('||');
|
||||||
let tam = '', arr = [];
|
}else{
|
||||||
if(rule.indexOf('||')>-1){
|
arr = rule.split('&&');
|
||||||
arr = rule.split('||');
|
}
|
||||||
}else{
|
for (let i = 0;i<arr.length;i++){
|
||||||
arr = rule.split('&&');
|
//获取判断依据
|
||||||
}
|
let a = '';
|
||||||
for (let i = 0;i<arr.length;i++){
|
a = arr[i].replace(/`/g,'');
|
||||||
//获取判断依据
|
a = '`'+ a+'`';
|
||||||
let a = '';
|
let tem =a.match(reg)[0];
|
||||||
a = arr[i].replace(/`/g,'');
|
let ky = tem.replace(/\{|\}/g, '');//qipao
|
||||||
a = '`'+ a+'`';
|
if(that.checkForm[ky]){
|
||||||
let tem =a.match(reg)[0];
|
//替换变量
|
||||||
let ky = tem.replace(/\{|\}/g, '');//qipao
|
a = a.replace(ky, 'yyy');
|
||||||
if(that.checkForm[ky]){
|
let yyy = "'"+that.checkForm[ky]+"'";
|
||||||
//替换变量
|
if(eval(eval( a))){
|
||||||
a = a.replace(ky, 'yyy');
|
tam += 'true';
|
||||||
let yyy = "'"+that.checkForm[ky]+"'";
|
|
||||||
if(eval(eval( a))){
|
|
||||||
tam += 'true';
|
|
||||||
}else{
|
|
||||||
tam += 'false';
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
tam += 'false';
|
tam += 'false';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
let rea = true;
|
|
||||||
if(rule.indexOf('||')>-1){
|
|
||||||
if( tam.indexOf('true')>-1){
|
|
||||||
rea = true;
|
|
||||||
}else{
|
|
||||||
rea = false;
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
if( tam.indexOf('false')>-1){
|
tam += 'false';
|
||||||
rea = false;
|
|
||||||
}else{
|
|
||||||
rea = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(rea){
|
|
||||||
that.formData[index].is_hidden = false;
|
|
||||||
}else{
|
|
||||||
that.formData[index].is_hidden = true;
|
|
||||||
that.checkForm[field_key] = null;
|
|
||||||
}
|
|
||||||
return rea;
|
|
||||||
}else{
|
|
||||||
let temp =rule.match(reg)[0];
|
|
||||||
let key = temp.replace(/\{|\}/g, '');//qipao
|
|
||||||
let a = rule.replace(key, 'yy');
|
|
||||||
a = a.replace(key, 'yy');
|
|
||||||
let yy = "'"+that.checkForm[key]+"'";
|
|
||||||
if(eval(eval(a))){
|
|
||||||
that.formData[index].is_hidden = false;
|
|
||||||
}else{
|
|
||||||
that.formData[index].is_hidden = true;
|
|
||||||
that.checkForm[field_key] = null;
|
|
||||||
}
|
|
||||||
return eval(eval(a));
|
|
||||||
}
|
}
|
||||||
|
let rea = true;
|
||||||
|
if(rule.indexOf('||')>-1){
|
||||||
|
if( tam.indexOf('true')>-1){
|
||||||
|
rea = true;
|
||||||
|
}else{
|
||||||
|
rea = false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if( tam.indexOf('false')>-1){
|
||||||
|
rea = false;
|
||||||
|
}else{
|
||||||
|
rea = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(rea){
|
||||||
|
that.formData[index].is_hidden = false;
|
||||||
|
}else{
|
||||||
|
that.formData[index].is_hidden = true;
|
||||||
|
that.checkForm[field_key] = null;
|
||||||
|
}
|
||||||
|
return rea;
|
||||||
}else{
|
}else{
|
||||||
that.formData[index].is_hidden = true;
|
let temp =rule.match(reg)[0];
|
||||||
that.checkForm[field_key] = null;
|
let key = temp.replace(/\{|\}/g, '');//qipao
|
||||||
return false;
|
let a = rule.replace(key, 'yy');
|
||||||
|
a = a.replace(key, 'yy');
|
||||||
|
let yy = "'"+that.checkForm[key]+"'";
|
||||||
|
if(eval(eval(a))){
|
||||||
|
that.formData[index].is_hidden = false;
|
||||||
|
}else{
|
||||||
|
that.formData[index].is_hidden = true;
|
||||||
|
that.checkForm[field_key] = null;
|
||||||
|
}
|
||||||
|
return eval(eval(a));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.formData[index].is_hidden = false;
|
that.formData[index].is_hidden = false;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col
|
<el-col
|
||||||
v-for="(item, $index) in formData"
|
v-for="(item, $index) in formData"
|
||||||
v-show="filterBlock(item.parent,item.display_expression,$index,item.field_key)"
|
v-show="filterBlock(item.display_expression,$index,item.field_key)"
|
||||||
:key="$index"
|
:key="$index"
|
||||||
:span="12"
|
:span="12"
|
||||||
style="position: relative"
|
style="position: relative"
|
||||||
|
@ -375,78 +375,73 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
filterBlock(parent,rule,index,field_key){
|
filterBlock(rule,index,field_key){
|
||||||
// debugger;
|
// debugger;
|
||||||
let that = this;
|
let that = this;
|
||||||
if(parent!==''&&parent!==null&&parent!==undefined){
|
if(rule!==''&&rule!==null&&rule!==undefined){
|
||||||
if(rule!==''&&rule!==null&&rule!==undefined){
|
let reg = /\{(.+?)\}/g;
|
||||||
let reg = /\{(.+?)\}/g;
|
debugger;
|
||||||
if(rule.indexOf('||')>-1||rule.indexOf('&&')>-1){
|
if(rule.indexOf('||')>-1||rule.indexOf('&&')>-1){
|
||||||
let tam = '', arr = [];
|
let tam = '', arr = [];
|
||||||
if(rule.indexOf('||')>-1){
|
if(rule.indexOf('||')>-1){
|
||||||
arr = rule.split('||');
|
arr = rule.split('||');
|
||||||
}else{
|
}else{
|
||||||
arr = rule.split('&&');
|
arr = rule.split('&&');
|
||||||
}
|
}
|
||||||
for (let i = 0;i<arr.length;i++){
|
for (let i = 0;i<arr.length;i++){
|
||||||
//获取判断依据
|
//获取判断依据
|
||||||
let a = '';
|
let a = '';
|
||||||
a = arr[i].replace(/`/g,'');
|
a = arr[i].replace(/`/g,'');
|
||||||
a = '`'+ a+'`';
|
a = '`'+ a+'`';
|
||||||
let tem =a.match(reg)[0];
|
let tem =a.match(reg)[0];
|
||||||
let ky = tem.replace(/\{|\}/g, '');//qipao
|
let ky = tem.replace(/\{|\}/g, '');//qipao
|
||||||
if(that.checkForm[ky]){
|
if(that.checkForm[ky]){
|
||||||
//替换变量
|
//替换变量
|
||||||
a = a.replace(ky, 'yyy');
|
a = a.replace(ky, 'yyy');
|
||||||
let yyy = "'"+that.checkForm[ky]+"'";
|
let yyy = "'"+that.checkForm[ky]+"'";
|
||||||
if(eval(eval( a))){
|
if(eval(eval( a))){
|
||||||
tam += 'true';
|
tam += 'true';
|
||||||
}else{
|
|
||||||
tam += 'false';
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
tam += 'false';
|
tam += 'false';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
let rea = true;
|
|
||||||
if(rule.indexOf('||')>-1){
|
|
||||||
if( tam.indexOf('true')>-1){
|
|
||||||
rea = true;
|
|
||||||
}else{
|
|
||||||
rea = false;
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
if( tam.indexOf('false')>-1){
|
tam += 'false';
|
||||||
rea = false;
|
|
||||||
}else{
|
|
||||||
rea = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(rea){
|
|
||||||
that.formData[index].is_hidden = false;
|
|
||||||
}else{
|
|
||||||
that.formData[index].is_hidden = true;
|
|
||||||
that.checkForm[field_key] = null;
|
|
||||||
}
|
|
||||||
return rea;
|
|
||||||
}else{
|
|
||||||
let temp =rule.match(reg)[0];
|
|
||||||
let key = temp.replace(/\{|\}/g, '');//qipao
|
|
||||||
let a = rule.replace(key, 'yy');
|
|
||||||
a = a.replace(key, 'yy');
|
|
||||||
let yy = "'"+that.checkForm[key]+"'";
|
|
||||||
if(eval(eval(a))){
|
|
||||||
that.formData[index].is_hidden = false;
|
|
||||||
}else{
|
|
||||||
that.formData[index].is_hidden = true;
|
|
||||||
that.checkForm[field_key] = null;
|
|
||||||
}
|
|
||||||
return eval(eval(a));
|
|
||||||
}
|
}
|
||||||
|
let rea = true;
|
||||||
|
if(rule.indexOf('||')>-1){
|
||||||
|
if( tam.indexOf('true')>-1){
|
||||||
|
rea = true;
|
||||||
|
}else{
|
||||||
|
rea = false;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if( tam.indexOf('false')>-1){
|
||||||
|
rea = false;
|
||||||
|
}else{
|
||||||
|
rea = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(rea){
|
||||||
|
that.formData[index].is_hidden = false;
|
||||||
|
}else{
|
||||||
|
that.formData[index].is_hidden = true;
|
||||||
|
that.checkForm[field_key] = null;
|
||||||
|
}
|
||||||
|
return rea;
|
||||||
}else{
|
}else{
|
||||||
that.formData[index].is_hidden = true;
|
let temp =rule.match(reg)[0];
|
||||||
that.checkForm[field_key] = null;
|
let key = temp.replace(/\{|\}/g, '');//qipao
|
||||||
return false;
|
let a = rule.replace(key, 'yy');
|
||||||
|
a = a.replace(key, 'yy');
|
||||||
|
let yy = "'"+that.checkForm[key]+"'";
|
||||||
|
if(eval(eval(a))){
|
||||||
|
that.formData[index].is_hidden = false;
|
||||||
|
}else{
|
||||||
|
that.formData[index].is_hidden = true;
|
||||||
|
that.checkForm[field_key] = null;
|
||||||
|
}
|
||||||
|
return eval(eval(a));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
that.formData[index].is_hidden = false;
|
that.formData[index].is_hidden = false;
|
||||||
|
|
|
@ -9,14 +9,21 @@
|
||||||
<Echart
|
<Echart
|
||||||
:options="pieOptions"
|
:options="pieOptions"
|
||||||
id="pieChart"
|
id="pieChart"
|
||||||
height="45vh"
|
:height="domHeight"
|
||||||
></Echart>
|
></Echart>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="chartsTitle">废料原因统计</div>
|
<div class="chartsTitle">废料原因统计</div>
|
||||||
<div id="barChart" style="width:100%;height: 45vh"></div>
|
<charts
|
||||||
|
:id="chartId0"
|
||||||
|
:options="barOptions1"
|
||||||
|
:className="chartsName"
|
||||||
|
:height="domHeight"
|
||||||
|
width="600px"
|
||||||
|
>
|
||||||
|
</charts>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -54,9 +61,9 @@
|
||||||
<div class="chartsTitle">采购物料表</div>
|
<div class="chartsTitle">采购物料表</div>
|
||||||
<charts
|
<charts
|
||||||
:id="chartId1"
|
:id="chartId1"
|
||||||
:options="barOptions"
|
:options="barOptions21"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="45vh"
|
:height="domHeight"
|
||||||
width="600px"
|
width="600px"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -67,9 +74,9 @@
|
||||||
<div class="chartsTitle">采购供应商表</div>
|
<div class="chartsTitle">采购供应商表</div>
|
||||||
<charts
|
<charts
|
||||||
:id="chartId2"
|
:id="chartId2"
|
||||||
:options="barOptions"
|
:options="barOptions22"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="45vh"
|
:height="domHeight"
|
||||||
width="600px"
|
width="600px"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -109,9 +116,9 @@
|
||||||
<div class="chartsTitle">废料来源</div>
|
<div class="chartsTitle">废料来源</div>
|
||||||
<charts
|
<charts
|
||||||
:id="chartId3"
|
:id="chartId3"
|
||||||
:options="barOptions"
|
:options="barOptions3"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="45vh"
|
:height="domHeight"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -157,17 +164,21 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
chartId0: 'chart0',
|
||||||
chartId1: 'chart1',
|
chartId1: 'chart1',
|
||||||
chartId2: 'chart2',
|
chartId2: 'chart2',
|
||||||
chartId3: 'chart3',
|
chartId3: 'chart3',
|
||||||
barChart: null,
|
barChart: null,
|
||||||
barChart1: null,
|
barChart1: null,
|
||||||
pieOptions: {},
|
pieOptions: {},
|
||||||
barOptions: {},
|
barOptions1: {},
|
||||||
|
barOptions21: {},
|
||||||
|
barOptions22: {},
|
||||||
|
barOptions3: {},
|
||||||
activeName: '废料统计',
|
activeName: '废料统计',
|
||||||
chartsName: "chartsName",
|
chartsName: "chartsName",
|
||||||
|
domHeight:'300px',
|
||||||
cdata: {
|
cdata: {
|
||||||
xData: ["气泡", "划痕"],
|
|
||||||
seriesData: [
|
seriesData: [
|
||||||
{value: 10, name: "气泡"},
|
{value: 10, name: "气泡"},
|
||||||
{value: 5, name: "破点"},
|
{value: 5, name: "破点"},
|
||||||
|
@ -175,12 +186,22 @@
|
||||||
{value: 6, name: "其他"},
|
{value: 6, name: "其他"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
chartData: {
|
chartData1: {
|
||||||
xAxisData: ["气泡", "破点", "划伤", "其他"],
|
xAxisData: ["气泡", "破点", "划伤", "其他"],
|
||||||
seriesData: [10, 5, 19, 6],
|
seriesData: [30, 25, 35, 10],
|
||||||
|
},
|
||||||
|
chartData21: {
|
||||||
|
xAxisData: ["物料1", "物料2", "物料3", "物料4", "物料5", "物料6", "物料7"],
|
||||||
|
seriesData: [800, 950, 960, 906, 600, 800, 900],
|
||||||
|
},
|
||||||
|
chartData22: {
|
||||||
|
xAxisData: ["供应商1", "供应商2", "供应商3", "供应商4", "供应商5", "供应商6", "供应商7"],
|
||||||
|
seriesData: [5, 20, 15, 25,10, 10,15],
|
||||||
|
},
|
||||||
|
chartData3: {
|
||||||
|
xAxisData: ["供应商1", "供应商2", "供应商3", "供应商4", "供应商5", "供应商6", "供应商7"],
|
||||||
|
seriesData:[2, 2, 4, 5,1, 0,1],
|
||||||
},
|
},
|
||||||
xAxisbar: ["供应商1", "供应商2", "供应商3", "供应商4", "供应商5", "供应商6", "供应商7"],
|
|
||||||
barData: [80, 95, 96, 96, 96, 98, 99],
|
|
||||||
list: [
|
list: [
|
||||||
{id: 1, name: 'HIehd91', card: '3331', sco: 'REF-31', num: 2, reason: "气泡"},
|
{id: 1, name: 'HIehd91', card: '3331', sco: 'REF-31', num: 2, reason: "气泡"},
|
||||||
{id: 2, name: 'HIehd92', card: '3332', sco: 'REF-32', num: 1, reason: "划痕"},
|
{id: 2, name: 'HIehd92', card: '3332', sco: 'REF-32', num: 1, reason: "划痕"},
|
||||||
|
@ -233,87 +254,22 @@
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
|
this.domHeight =( hei- 20)/2+'px';
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
drawChart() {
|
handleClick() {
|
||||||
let that = this;
|
|
||||||
this.barChart = this.$echarts.init(document.getElementById('barChart'));
|
|
||||||
this.barChart.setOption({
|
|
||||||
grid: {
|
|
||||||
top: '10%',
|
|
||||||
left: '3%',
|
|
||||||
right: '5%',
|
|
||||||
bottom: '1%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
tooltip: {
|
|
||||||
trigger: 'item',
|
|
||||||
formatter: function (params) {
|
|
||||||
let color = params.color;//图例颜色
|
|
||||||
let htmlStr = '<div>';
|
|
||||||
htmlStr += params.seriesName + '<br/>';
|
|
||||||
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
|
||||||
htmlStr += params.name + ':' + params.value + '件';
|
|
||||||
htmlStr += '</div>';
|
|
||||||
return htmlStr;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
axisTick: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: false, //去掉X轴分割线
|
|
||||||
},
|
|
||||||
data: that.chartData.xAxisData,
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
axisLine: {
|
|
||||||
show: true,//y轴线
|
|
||||||
},
|
|
||||||
axisTick: {
|
|
||||||
show: false//Y轴刻度线
|
|
||||||
},
|
|
||||||
axisLabel: {
|
|
||||||
color: '#333333'//Y轴文本颜色
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: true, //Y轴分割线
|
|
||||||
lineStyle: {
|
|
||||||
color: '#dddddd'//Y轴分割线颜色
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
series: [{
|
|
||||||
name: '废料统计',
|
|
||||||
type: 'bar',
|
|
||||||
barWidth: 20,
|
|
||||||
data: that.chartData.seriesData,
|
|
||||||
label: {
|
|
||||||
show: true, //开启显示
|
|
||||||
position: 'top', //在上方显示
|
|
||||||
formatter: '{c}',//显示百分号
|
|
||||||
textStyle: { //数值样式
|
|
||||||
color: 'black',//字体颜色
|
|
||||||
fontSize: 10//字体大小
|
|
||||||
}
|
|
||||||
},
|
|
||||||
itemStyle: {
|
|
||||||
color: '#409EFF'
|
|
||||||
},
|
|
||||||
}]
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleClick(tab) {
|
|
||||||
// console.log(tab);
|
// console.log(tab);
|
||||||
// debugger;
|
// debugger;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.drawChart();
|
let that = this;
|
||||||
this.barOptions = {
|
this.barOptions1 = {
|
||||||
grid: {
|
grid: {
|
||||||
top: '10%',
|
top: '10%',
|
||||||
left: '3%',
|
left: '5%',
|
||||||
right: '5%',
|
right: '5%',
|
||||||
bottom: '1%',
|
bottom: '1%',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
|
@ -323,9 +279,9 @@
|
||||||
formatter: function (params) {
|
formatter: function (params) {
|
||||||
let color = params.color;//图例颜色
|
let color = params.color;//图例颜色
|
||||||
let htmlStr = '<div>';
|
let htmlStr = '<div>';
|
||||||
htmlStr += params.name + '<br/>';
|
htmlStr += params.seriesName + '<br/>';
|
||||||
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
||||||
htmlStr += params.seriesName + ':' + params.value + '%';
|
htmlStr += params.name + ':' + params.value + '件';
|
||||||
htmlStr += '</div>';
|
htmlStr += '</div>';
|
||||||
return htmlStr;
|
return htmlStr;
|
||||||
}
|
}
|
||||||
|
@ -337,7 +293,7 @@
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false, //去掉X轴分割线
|
show: false, //去掉X轴分割线
|
||||||
},
|
},
|
||||||
data: this.xAxisbar,
|
data: that.chartData1.xAxisData,
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
axisLine: {
|
axisLine: {
|
||||||
|
@ -357,10 +313,10 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
name: '成品率',
|
name: '废料统计',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
data: this.barData,
|
data: that.chartData1.seriesData,
|
||||||
label: {
|
label: {
|
||||||
show: true, //开启显示
|
show: true, //开启显示
|
||||||
position: 'top', //在上方显示
|
position: 'top', //在上方显示
|
||||||
|
@ -374,7 +330,202 @@
|
||||||
color: '#409EFF'
|
color: '#409EFF'
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
}
|
};
|
||||||
|
this.barOptions21 = {
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
left: '5%',
|
||||||
|
right: '5%',
|
||||||
|
bottom: '1%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
formatter: function (params) {
|
||||||
|
let color = params.color;//图例颜色
|
||||||
|
let htmlStr = '<div>';
|
||||||
|
htmlStr += '物料采购' + '<br/>';
|
||||||
|
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
||||||
|
htmlStr += params.name + ':' + params.value + '件';
|
||||||
|
htmlStr += '</div>';
|
||||||
|
return htmlStr;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false, //去掉X轴分割线
|
||||||
|
},
|
||||||
|
data: this.chartData21.xAxisData,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
axisLine: {
|
||||||
|
show: true,//y轴线
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false//Y轴刻度线
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#333333'//Y轴文本颜色
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true, //Y轴分割线
|
||||||
|
lineStyle: {
|
||||||
|
color: '#dddddd'//Y轴分割线颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
name: '物料',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
data: this.chartData21.seriesData,
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
formatter: '{c}',//显示百分号
|
||||||
|
textStyle: { //数值样式
|
||||||
|
color: 'black',//字体颜色
|
||||||
|
fontSize: 10//字体大小
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#409EFF'
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
this.barOptions22 = {
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
left: '5%',
|
||||||
|
right: '5%',
|
||||||
|
bottom: '1%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
formatter: function (params) {
|
||||||
|
let color = params.color;//图例颜色
|
||||||
|
let htmlStr = '<div>';
|
||||||
|
htmlStr += params.seriesName + '<br/>';
|
||||||
|
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
||||||
|
htmlStr += params.name + ':' + params.value + '%';
|
||||||
|
htmlStr += '</div>';
|
||||||
|
return htmlStr;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false, //去掉X轴分割线
|
||||||
|
},
|
||||||
|
data: this.chartData22.xAxisData,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
axisLine: {
|
||||||
|
show: true,//y轴线
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false//Y轴刻度线
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#333333'//Y轴文本颜色
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true, //Y轴分割线
|
||||||
|
lineStyle: {
|
||||||
|
color: '#dddddd'//Y轴分割线颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
name: '采购占比',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
data: this.chartData22.seriesData,
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
formatter: '{c}',//显示百分号
|
||||||
|
textStyle: { //数值样式
|
||||||
|
color: 'black',//字体颜色
|
||||||
|
fontSize: 10//字体大小
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#409EFF'
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
this.barOptions3 = {
|
||||||
|
grid: {
|
||||||
|
top: '10%',
|
||||||
|
left: '5%',
|
||||||
|
right: '5%',
|
||||||
|
bottom: '1%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
formatter: function (params) {
|
||||||
|
let color = params.color;//图例颜色
|
||||||
|
let htmlStr = '<div>';
|
||||||
|
htmlStr += params.seriesName + '<br/>';
|
||||||
|
htmlStr += '<span style="height:10px;width:10px;font-size:12px;border-radius:5px;margin-right:5px;font-family:Consolas;display:inline-block;background:' + color + ';"></span>';
|
||||||
|
htmlStr += params.name + ':' + params.value + '件';
|
||||||
|
htmlStr += '</div>';
|
||||||
|
return htmlStr;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisTick: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: false, //去掉X轴分割线
|
||||||
|
},
|
||||||
|
data: this.chartData3.xAxisData,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
axisLine: {
|
||||||
|
show: true,//y轴线
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
show: false//Y轴刻度线
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
color: '#333333'//Y轴文本颜色
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
|
show: true, //Y轴分割线
|
||||||
|
lineStyle: {
|
||||||
|
color: '#dddddd'//Y轴分割线颜色
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
name: '废料来源',
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 20,
|
||||||
|
data: this.chartData3.seriesData,
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
formatter: '{c}',//显示百分号
|
||||||
|
textStyle: { //数值样式
|
||||||
|
color: 'black',//字体颜色
|
||||||
|
fontSize: 10//字体大小
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#409EFF'
|
||||||
|
},
|
||||||
|
}]
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<Echart
|
<Echart
|
||||||
:options="pieOptions"
|
:options="pieOptions"
|
||||||
id="pieChart"
|
id="pieChart"
|
||||||
height="45vh"
|
:height="domHeight"
|
||||||
></Echart>
|
></Echart>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
:id="chartId1"
|
:id="chartId1"
|
||||||
:options="barOptions"
|
:options="barOptions"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="45vh"
|
:height="domHeight"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
:id="chartId2"
|
:id="chartId2"
|
||||||
:options="barOptions1"
|
:options="barOptions1"
|
||||||
:className="chartsName"
|
:className="chartsName"
|
||||||
height="45vh"
|
:height="domHeight"
|
||||||
width="100%"
|
width="100%"
|
||||||
>
|
>
|
||||||
</charts>
|
</charts>
|
||||||
|
@ -54,7 +54,6 @@
|
||||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="订单编号" width="120" show-overflow-tooltip>
|
<el-table-column label="订单编号" width="120" show-overflow-tooltip>
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -64,7 +63,6 @@
|
||||||
<el-table-column label="产品数量">
|
<el-table-column label="产品数量">
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="已交货数量">
|
<el-table-column label="已交货数量">
|
||||||
<template slot-scope="scope">{{ scope.row.delivered_count }}</template>
|
<template slot-scope="scope">{{ scope.row.delivered_count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -168,6 +166,7 @@
|
||||||
{value: 1, name: "逾期率"},
|
{value: 1, name: "逾期率"},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
domHeight:'300px',
|
||||||
xAxisbar:["冷加工", "热弯", "钢化", "镀膜", "夹层", "包边", "装框"],
|
xAxisbar:["冷加工", "热弯", "钢化", "镀膜", "夹层", "包边", "装框"],
|
||||||
barData: [80, 95, 96, 96, 96, 98, 99],
|
barData: [80, 95, 96, 96, 96, 98, 99],
|
||||||
xAxisbar1:[ "2021/09", "2021/10", "2021/11", "2021/12", "2022/01", "2022/02"],
|
xAxisbar1:[ "2021/09", "2021/10", "2021/11", "2021/12", "2022/01", "2022/02"],
|
||||||
|
@ -217,6 +216,10 @@
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||||
|
this.domHeight =( hei- 60)/2+'px';
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
this.orderLoading = true;
|
this.orderLoading = true;
|
||||||
|
@ -378,6 +381,7 @@
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1008,25 +1008,23 @@
|
||||||
handleInspection(scope, index) {
|
handleInspection(scope, index) {
|
||||||
//调该物料对应的检查表
|
//调该物料对应的检查表
|
||||||
let that = this;
|
let that = this;
|
||||||
this.innerIndex = index;
|
that.innerIndex = index;
|
||||||
// this.outerVisible = true;
|
// this.outerVisible = true;
|
||||||
this.wproduct = scope.row.id;//半成品ID
|
that.wproduct = scope.row.id;//半成品ID
|
||||||
debugger;
|
that.listQueryrecordform.material = scope.row.material;
|
||||||
console.log(scope.row.material_check);
|
that.listQueryrecordform.type = 20;
|
||||||
this.listQueryrecordform.material = scope.row.material_check!==null ? scope.row.material_check :scope.row.material;//
|
that.listQueryrecordform.enabled = true;
|
||||||
this.listQueryrecordform.type = 2;
|
that.recordform = null;
|
||||||
this.listQueryrecordform.enabled = true;
|
getrecordformList(that.listQueryrecordform).then((response) => {
|
||||||
this.recordform = null;
|
|
||||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.recordformList = response.data;
|
that.recordformList = response.data;
|
||||||
if (response.data.length === 1) {
|
if (response.data.length === 1) {
|
||||||
that.recordform = response.data[0].id;
|
that.recordform = response.data[0].id;
|
||||||
that.formName = response.data[0].name;
|
that.formName = response.data[0].name;
|
||||||
that.submitrecordform(index);
|
that.submitrecordform(index);
|
||||||
} else {
|
} else {
|
||||||
//弹出列表选择框
|
//弹出列表选择框
|
||||||
this.outerVisible = true;
|
that.outerVisible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1038,8 +1036,6 @@
|
||||||
return item.id === that.recordform;
|
return item.id === that.recordform;
|
||||||
});
|
});
|
||||||
that.formName = arr[0].name;
|
that.formName = arr[0].name;
|
||||||
// this.outerVisible = false;
|
|
||||||
// that.submitrecordform(that.innerIndex);
|
|
||||||
},
|
},
|
||||||
//检验记录
|
//检验记录
|
||||||
checkRecord(scope, index) {
|
checkRecord(scope, index) {
|
||||||
|
|
Loading…
Reference in New Issue