This commit is contained in:
liushuai
2019-12-12 12:49:13 +08:00
parent 17d72c3eae
commit 49f4eccd99
11 changed files with 152 additions and 82 deletions

View File

@@ -47,6 +47,7 @@
<!--:value="item.value"/>-->
<!--</el-select>-->
<el-input v-model="materialName" placeholder="名称规格" size="small" style="width:120px" clearable @keyup.enter.native="searchTable11()"/>
<el-input v-model="supplierName" placeholder="供货商" size="small" style="width:120px" clearable/>
<el-select v-model="machineValue" placeholder="机床" size="small" clearable filterable>
<el-option
v-for="item in machine"
@@ -78,8 +79,7 @@
range-separator=""
style="width:250px"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="timeChange1()"/>
end-placeholder="结束日期"/>
<el-popover v-model="visible1" placement="top" width="140">
<div style="text-align: right; margin: 0">
<el-select v-model="PersonValue" style="width:100px" placeholder="人员" size="small" filterable clearable>
@@ -109,7 +109,7 @@
</el-row>
<el-row>
<el-table
v-loading=""
v-loading="loading"
:data="tableData11"
:row-class-name="tableRowClassName"
border
@@ -263,6 +263,7 @@
<!--:value="item.value"/>-->
<!--</el-select>-->
<el-input v-model="partNum" placeholder="图号名称规格" size="small" clearable @keyup.enter.native="searchTable12()"/>
<el-input v-model="supplierName" placeholder="供货商" size="small" style="width:120px" clearable/>
<el-select v-model="machineValue" placeholder="机床" size="small" clearable filterable>
<el-option
v-for="item in machine"
@@ -290,8 +291,7 @@
range-separator=""
style="width:250px"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="timeChange2()"/>
end-placeholder="结束日期"/>
<el-button type="success" size="small" style="float: right" @click="visible2 = false;tiaozheng2()">调整采购任务</el-button>
<el-select v-model="PersonValue" style="width:100px;float: right" placeholder="人员" size="small" filterable clearable>
<el-option
@@ -318,7 +318,7 @@
</el-row>
<el-row style="margin-bottom: 10px">
<el-table
v-loading=""
v-loading="loading"
:data="tableData12"
:row-class-name="tableRowClassName2"
border
@@ -1090,7 +1090,7 @@
</template>
<script>
import { timeSearch, timeChange1, timeChange2, tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
import { tiaozheng2, tiaozheng1, getPerson, getBillNum, searchMaterial, searchPart, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
createInquirySheet, deleteInquirySheet, addInquirySheet1, addInquirySheet2, outInquirySheet, searchAllMaterial, materialChange, saveOrder,
submitUseInventory, initProject, searchMachine, searchGroup, searchBaseInfo, editBaseInfo, getExport1, getExport2, searchMerge, changeNum } from '@/api/PurchasingCenter/CreateInquirySheet'
import { mapGetters } from 'vuex'
@@ -1102,8 +1102,9 @@ export default {
name: '', // 创建询价单
data() {
return {
startTime: [],
endTime: [],
startTime: '',
endTime: '',
loading: false,
标准件和外购件流水号: [],
基本件流水号: [],
visible: false,
@@ -1299,7 +1300,7 @@ export default {
}
},
created() {
this.timeSearch()
// this.timeSearch()
this.getPerson()
this.fetchData()
this.projectChange()
@@ -1315,13 +1316,13 @@ export default {
}, 500)
},
methods: {
timeSearch() {
timeSearch().then(response => {
this.startTime = [response.data[0].外购件开始时间, response.data[0].外购件结束时间]
this.endTime = [response.data[0].基本件开始时间, response.data[0].基本件结束时间]
this.searchTable11()
})
},
// timeSearch() {
// timeSearch().then(response => {
// this.startTime = [response.data[0].外购件开始时间, response.data[0].外购件结束时间]
// this.endTime = [response.data[0].基本件开始时间, response.data[0].基本件结束时间]
// this.searchTable11()
// })
// },
changeNumber(row) {
changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
if (response.data[0].result === '1') {
@@ -1356,16 +1357,16 @@ export default {
}
})
},
timeChange1() {
if (this.startTime) {
timeChange1(this.startTime[0], this.startTime[1])
}
},
timeChange2() {
if (this.endTime) {
timeChange2(this.endTime[0], this.endTime[1])
}
},
// timeChange1() {
// if (this.startTime) {
// timeChange1(this.startTime[0], this.startTime[1])
// }
// },
// timeChange2() {
// if (this.endTime) {
// timeChange2(this.endTime[0], this.endTime[1])
// }
// },
Jump() {
window.location.hash = '#PurchasingCenter/CreateInquirySheet'
},
@@ -1747,15 +1748,17 @@ export default {
return row['供货商'].trim() === value
},
searchTable11() { // 查询外购件列表
let check1, check2, check3, check4, check5, check6, check7
this.loading = true
let check1, check2, check3, check4, check5, check6, check7, check8
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
this.projectValue ? check4 = 1 : check4 = 0
this.projectValue ? check4 = 0 : check4 = 0
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
searchMaterial(this.pageCurrent11, this.pageSize11, 3, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.startTime[0], this.startTime[1]).then(response => {
this.supplierName ? check8 = 1 : check8 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, 3, check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.startTime[0], this.startTime[1], check8, this.supplierName).then(response => {
this.tableData11 = response.data.rows
this.total11 = response.data.total
const remark = []
@@ -1774,6 +1777,7 @@ export default {
this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
}
})
this.loading = false
})
},
handleSizeChange11(val) { // 标准件和外购件列表分页
@@ -1786,15 +1790,17 @@ export default {
this.searchTable11()
},
searchTable12() { // 查询基本件列表
let check1, check2, check3, check4, check5, check6, check7
this.loading = true
let check1, check2, check3, check4, check5, check6, check7, check8
this.partNum ? check1 = 1 : check1 = 0
this.partName ? check2 = 1 : check2 = 0
this.partSpec ? check3 = 1 : check3 = 0
this.projectValue ? check4 = 1 : check4 = 0
this.projectValue ? check4 = 0 : check4 = 0
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
this.endTime ? check7 = 1 : (check7 = 0, this.endTime = '')
searchPart(this.pageCurrent12, this.pageSize12, 3, check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1]).then(response => {
this.supplierName ? check8 = 1 : check8 = 0
searchPart(this.pageCurrent12, this.pageSize12, 3, check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, check7, this.endTime[0], this.endTime[1], check8, this.supplierName).then(response => {
this.tableData12 = response.data.rows
this.total12 = response.data.total
const remark = []
@@ -1809,6 +1815,7 @@ export default {
this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
}
})
this.loading = false
})
},
handleSizeChange12(val) { // 基本件列表分页

View File

@@ -56,7 +56,7 @@
<el-input v-model="otherInfo" :disabled="!contractNumValue" size="small" placeholder="其他说明" type="textarea" rows="1" @blur="contractHeaderChange"/>
</el-row>
<el-table :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary tooltip-effect="dark">
<el-table v-loading="loading" :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary tooltip-effect="dark">
<el-table-column label="序号" align="center" width="50" type="index"/>
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
@@ -152,7 +152,7 @@
<div v-show="false">{{ content }}</div>
<!--富文本编辑器-->
<div v-show="!preview" id="tinymce" style="height:850px;">
<tinymce ref="tinymce" :height="700" v-model="contentNew" style="width:800px;margin: 0 auto"/>
<tinymce ref="tinymce" :height="700" v-model="contentNew" style="width:800px;margin: 0 auto;pointer-events: none"/>
</div>
<!--网页预览-->
<div v-show="preview" class="editor-content" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="content"/>
@@ -174,6 +174,7 @@ export default {
data() {
return {
isShowN: false,
loading: false,
supplierValue11: '', // 供应商查询条件
supplier11: [],
quickChangePrice: true,
@@ -463,6 +464,7 @@ export default {
}
},
contractChange() { // 选择合同select
this.loading = true
searchContractHeader(this.contractNumValue).then(response => {
this.deliveryDate = response.data[0].交货日期
this.invoiceInfo = response.data[0].开票信息
@@ -515,6 +517,7 @@ export default {
备注: response.data[i].备注
})
}
this.loading = false
})
},
demoChange() { // 模板change

View File

@@ -24,6 +24,46 @@
<el-card>
<div id="myChart" style="width: 1000px; height: 570px; margin: auto"/>
</el-card>
<el-card style="width: 650px">
<el-table
:data="tableData"
highlight-current-row
border
stripe
size="mini"
style="width: 100%"
height="460">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column
label="采购合同编号"
align="center"
width="140px">
<template slot-scope="scope">{{ scope.row.采购合同编号 }}</template>
</el-table-column>
<el-table-column
label="采购用时"
align="center"
width="80px">
<template slot-scope="scope">{{ scope.row.平均采购时间 }}</template>
</el-table-column>
<el-table-column
label="平均分配日期"
width="170"
align="center">
<template slot-scope="scope">{{ scope.row.平均分配日期 }}</template>
</el-table-column>
<el-table-column
label="合同生成日期"
align="center"
width="170">
<template slot-scope="scope">{{ scope.row.合同生成日期 }}</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
@@ -37,35 +77,30 @@ export default {
date2: ''
}
},
mounted() {},
methods: {
getTableData() {
async getTableData() {
this.tableData = []
getData(this.date1, this.date2).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.tableData.push({
采购合同流水号: response.data[i].采购合同流水号,
采购合同编号: response.data[i].采购合同编号,
合同生成日期: response.data[i].操作日期,
合同生成日期: response.data[i].操作时间,
平均分配日期: '',
平均采购时间: ''
})
}
this.getTableData1(this.tableData)
}).then(() => {
this.drawLine()
})
setTimeout(this.drawLine, 2000)
},
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() {
@@ -73,6 +108,7 @@ export default {
const xData = []
const lineData = []
for (let i = 0; i < this.tableData.length; i++) {
console.log(this.tableData[i].采购合同编号)
xData.push(this.tableData[i].采购合同编号)
lineData.push(this.tableData[i].平均采购时间)
}