This commit is contained in:
liushuai
2020-05-14 18:17:03 +08:00
parent e1d611f964
commit 990052a70e
17 changed files with 200 additions and 45 deletions

View File

@@ -144,6 +144,7 @@
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button type="primary" size="small" icon="el-icon-bottom" plain style="margin: 0px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
</el-tooltip>
<span style="font-size: 5px">{{ totalnumber }}条信息选择{{ gouxuan }}</span>
<!--<div class="block" style="margin: 10px 0 0 0;display: inline-block">-->
<!--<el-pagination-->
<!--:current-page="pageCurrent11"-->
@@ -155,7 +156,7 @@
<!--@size-change="handleSizeChange11"-->
<!--@current-change="handleCurrentChange11"/>-->
<!--</div>-->
<div class="block" style="display: inline-block;width:1150px;float: right;">
<div class="block" style="display: inline-block;width:1000px;float: right;">
<div style="display: inline-block;float: right;">
<el-pagination
:current-page="pageCurrent11"
@@ -184,7 +185,7 @@
style="width: 680px;max-height: 500px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange1"
@selection-change="handleSelectionChange2"
@select="handleSelection1">
<el-table-column align="center" width="43" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" width="170" show-overflow-tooltip>
@@ -211,6 +212,7 @@
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button type="primary" size="small" icon="el-icon-bottom" plain style="margin: 5px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
</el-tooltip>
<span style="font-size: 5px">{{ totalnumber1 }}条信息选择{{ gouxuan1 }}</span>
<!--<div class="block" style="display: inline-block">-->
<!--<el-pagination-->
<!--:current-page="pageCurrent22"-->
@@ -222,7 +224,7 @@
<!--@size-change="handleSizeChange22"-->
<!--@current-change="handleCurrentChange22"/>-->
<!--</div>-->
<div class="block" style="display: inline-block;width:1150px;float: right;">
<div class="block" style="display: inline-block;width:1000px;float: right;">
<div style="display: inline-block;float: right;">
<el-pagination
:current-page="pageCurrent22"
@@ -863,7 +865,11 @@ export default {
tongguo: '',
total22: 0,
pageCurrent22: 1,
pageSize22: 20
pageSize22: 20,
gouxuan: 0,
totalnumber: 0,
gouxuan1: 0,
totalnumber1: 0
}
},
computed: {
@@ -1106,14 +1112,14 @@ export default {
tabClick(tab) {
if (tab.name === '外购件') {
this.tabName = '外购件'
this.searchTable11()
} else if (tab.name === '标准件') {
this.tabName = '标准件'
this.searchTable11()
} else if (tab.name === '基本件') {
this.tabName = '基本件'
this.searchTable12()
} else {
this.tabName = '仓库'
this.searchTable22()
}
},
searchTable2() { // 查询离线合同列表
@@ -1623,12 +1629,34 @@ export default {
this.idNumGroup.push(val[i].id)
this.NumGroup.push(val[i].待采购数量)
}
this.gouxuan = val.length
},
handleSelectionChange2(val) { // 标准件和外购件多选
this.标准件和外购件流水号 = []
this.基本件流水号 = []
this.groupPartNumGroup = []
this.groupBasicPartNumGroup = []
this.materielNumGroup = []
this.idNumGroup = []
this.NumGroup = []
for (let i = 0; i < val.length; i++) {
this.标准件和外购件流水号.push(val[i].标准件和外购件流水号)
this.基本件流水号.push(val[i].基本件流水号)
this.groupPartNumGroup.push(val[i].组件零件流水号)
this.groupBasicPartNumGroup.push(val[i].组件零件基本件流水号)
this.materielNumGroup.push(val[i].物料流水号)
this.idNumGroup.push(val[i].id)
this.NumGroup.push(val[i].待采购数量)
}
this.gouxuan1 = val.length
},
selectable(row, index) { // 控制某行是否可选
return Number(row.采购状态编号) < 3 && Number(row.是否确认) === 1 // 未采购&&确认物料修改
},
// 查询外购件列表
searchTable11() {
this.totalnumber = 0
this.gouxuan = 0
let check1, check5, check7
this.loading1 = true
this.materialName ? check1 = 1 : check1 = 0
@@ -1638,6 +1666,7 @@ export default {
if (this.tabName === '标准件') { this.partType = 1 }
searchMaterial1(this.pageCurrent11, this.pageSize11, check1, this.materialName, this.id, check5, this.machineValue, check7, this.startTime[0], this.startTime[1]).then(response => {
this.tableData00 = response.data.rows
this.totalnumber = response.data.rows.length
this.total11 = response.data.total
const remark = []
const supplier = []
@@ -1710,11 +1739,14 @@ export default {
this.searchTable12()
},
searchTable22() {
this.totalnumber1 = 0
this.gouxuan1 = 0
let check1
this.materialName ? check1 = 1 : check1 = 0
this.loading2 = true
searchMaterial22(check1, this.materialName, this.pageCurrent22, this.pageSize22).then(response => {
this.tableData22 = response.data.result
this.totalnumber1 = this.tableData22.length
this.total22 = parseInt(response.data.output[0].ItemCount)
const supplier = []
this.remarkFilters = []

View File

@@ -19,7 +19,7 @@
<el-divider content-position="right"/>
</div>
</el-card>
<el-tabs id="PurchasingCenter/PurchaseTaskAllocate" v-model="tabName" type="border-card" @tab-click="searchTable0();searchTable1();searchTable2();">
<el-tabs id="PurchasingCenter/PurchaseTaskAllocate" v-model="tabName" type="border-card" @tab-click="selecttabs">
<el-tab-pane label="标准件" name="标准件">
<el-row style="margin-bottom: 3px">
<!--<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">-->
@@ -242,6 +242,7 @@
</template>
</el-table-column>
</el-table>
<span style="font-size: 5px">{{ totalnumber }}条信息选择{{ gouxuan }}</span>
</el-row>
<div class="block">
<el-pagination
@@ -447,6 +448,7 @@
</template>
</el-table-column>
</el-table>
<span style="font-size: 5px">{{ totalnumber }}条信息选择{{ gouxuan }}</span>
</el-row>
<div class="block">
<el-pagination
@@ -622,6 +624,7 @@
</template>
</el-table-column>
</el-table>
<span style="font-size: 5px">{{ totalnumber }}条信息选择{{ gouxuan }}</span>
</el-row>
<div class="block">
<el-pagination
@@ -774,7 +777,9 @@ export default {
order: '',
checked: false,
checked2: false,
checked3: false
checked3: false,
gouxuan: 0,
totalnumber: 0
}
},
computed: {
@@ -814,6 +819,18 @@ export default {
clearInterval(this.timer2)
},
methods: {
selecttabs() {
if (this.tabName === '标准件') {
this.searchTable0()
this.gouxuan = 0
} else if (this.tabName === '外购件') {
this.searchTable1()
this.gouxuan = 0
} else if (this.tabName === '基本件') {
this.searchTable2()
this.gouxuan = 0
}
},
Jump() {
window.location.hash = '#PurchasingCenter/PurchaseTaskAllocate'
},
@@ -950,9 +967,11 @@ export default {
this.materialName ? this.check4 = 1 : this.check4 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
this.totalnumber = 0
// this.dateRange ? check4 = 0 : (check4 = 0, this.dateRange = '')
searchTable1(this.pageCurrent0, this.pageSize0, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, parseInt(this.radio), check2, this.materialSpec, check3, this.materialModel, 1, 0, '', '').then(response => {
this.tableData0 = response.data.rows
this.totalnumber = response.data.rows.length
this.total0 = response.data.total
this.loading = false
})
@@ -969,8 +988,10 @@ export default {
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
this.checked2 ? this.radio1 = 2 : this.radio1 = 1
this.totalnumber = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, check0, this.machineValue, check1, this.groupValue, this.check4, this.materialName, parseInt(this.radio1), check2, this.materialSpec, check3, this.materialModel, 2, 0, '', '').then(response => {
this.tableData1 = response.data.rows
this.totalnumber = response.data.rows.length
this.total1 = response.data.total
this.loading = false
})
@@ -986,13 +1007,16 @@ export default {
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
this.checked3 ? this.radio2 = 2 : this.radio2 = 1
this.totalnumber = 0
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, check5, this.machineValue, check6, this.groupValue, parseInt(this.radio2), check1, this.partNum, check2, this.partName, check3, this.partSpec, check4, this.partMaterial).then(response => {
this.tableData2 = response.data.rows
this.totalnumber = response.data.rows.length
this.total2 = response.data.total
this.loading = false
})
},
handleSelectionChange1(val) { // 标准件和外购件多选
this.gouxuan = val.length
this.standardAndPurchase = []
this.groupAndPart = []
this.partNumber = []
@@ -1003,6 +1027,7 @@ export default {
}
},
handleSelectionChange2(val) { // 基本件多选
this.gouxuan = val.length
this.basic = []
this.groupAndPartBasic = []
this.partNumberBasic = []