This commit is contained in:
liushuai
2019-12-09 12:14:57 +08:00
parent 3b915a03ad
commit 17d72c3eae
2 changed files with 13 additions and 7 deletions

View File

@@ -347,7 +347,6 @@ export default {
},
// 打开表单
parOut(row) {
this.form.department = '装配车间'
this.locateNumber = row.货位流水号
this.materialNumber = row.物料流水号
this.partnumber = row.货位存量

View File

@@ -19,7 +19,7 @@
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchData1()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="getTableData()">查询</el-button>
</el-card>
<el-card>
<div id="myChart" style="width: 1000px; height: 570px; margin: auto"/>
@@ -33,8 +33,8 @@ export default {
data() {
return {
tableData: [],
data1: '',
data2: ''
date1: '',
date2: ''
}
},
mounted() {},
@@ -57,12 +57,15 @@ export default {
})
},
getTableData1(row) {
console.log(row, 1)
for (let i = 0; i < row.length; i++) {
getData1(row[i].采购合同流水号).then(response => {
console.log(response.data, 2)
this.tableData[i].平均分配日期 = response.data[0].平均分配日期
this.tableData[i].平均采购时间 = response.data[0].平均采购时间
})
}
console.log(this.tableData, 3)
},
// 绘制图形
drawLine() {
@@ -70,8 +73,8 @@ export default {
const xData = []
const lineData = []
for (let i = 0; i < this.tableData.length; i++) {
xData.push(this.tableData[i].采购合同编号.split(' ')[0])
lineData.push(this.tableData[i].平均采购时间.toFixed(2))
xData.push(this.tableData[i].采购合同编号)
lineData.push(this.tableData[i].平均采购时间)
}
myChart.clear()
myChart.setOption({
@@ -94,13 +97,17 @@ export default {
data: xData,
axisPointer: {
type: 'shadow'
},
axisLabel: {
interval: 0,
rotate: 40
}
}
],
yAxis: [
{
type: 'value',
name: '采购用时'
name: '采购用时(H)'
}
],
series: [