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) { // 基本件列表分页