Commit b29c2f6d by T

提交一版(宁波报废筛选)

parent 9818d45e
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
placeholder="请选择仓库" placeholder="请选择仓库"
style="width: 250px;margin-left: 0px" style="width: 250px;margin-left: 0px"
class="filter-item" class="filter-item"
@change="changeWarehouse"> @change="toPostQuery">
<el-option <el-option
v-for="item in warehouseList" v-for="item in warehouseList"
:key="item.name" :key="item.name"
...@@ -21,34 +21,34 @@ ...@@ -21,34 +21,34 @@
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<!-- <el-select v-model="equName" <el-select v-model="equipmentId"
class="filter-item" class="filter-item"
clearable clearable
:filterable="true" :filterable="true"
:filter-method="dataFilter" :filter-method="dataFilter"
placeholder="请选择装备" placeholder="请选择装备"
@change="changeWarehouse" @change="getListEquipmentSize"
style="width: 300px;" > style="width: 300px;" >
<el-option <el-option
v-for="item in equNameList" v-for="item in equipmentList"
:key="item.equName" :key="item.id"
:label="item.equName" :label="item.name"
:value="item.equName"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="sizeId" <el-select v-model="equipmentSizeId"
class="filter-item" class="filter-item"
clearable filterable clearable filterable
placeholder="请选择装备型号名称" placeholder="请选择装备型号名称"
@change="toPostQuery" @change="toPostQuery"
style="width: 300px;"> style="width: 300px;">
<el-option <el-option
v-for="item in equipmentSizeList" v-for="item in equipmentSizeList"
:key="item.id" :key="item.id"
:label="item.sizeName" :label="item.sizeName"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> --> </el-select>
</div> </div>
...@@ -124,6 +124,8 @@ import { quickAddFixed } from '@/api/fixReceiveApply' ...@@ -124,6 +124,8 @@ import { quickAddFixed } from '@/api/fixReceiveApply'
import { initPdata } from '@/api/data' import { initPdata } from '@/api/data'
import { transform } from '@/utils/index' import { transform } from '@/utils/index'
import { getListOrgWarehouse } from '@/api/warehouse' import { getListOrgWarehouse } from '@/api/warehouse'
import { getListEquipmentDetail } from '@/api/equipmentDetail'
import { getListEquipmentSize } from '@/api/equipmentSize'
export default { export default {
mixins: [initData], mixins: [initData],
props: { props: {
...@@ -148,11 +150,13 @@ export default { ...@@ -148,11 +150,13 @@ export default {
equipmentCode: '', equipmentCode: '',
equipmentSizecode: '', equipmentSizecode: '',
equNameList: [], equNameList: [],
equipmentList:[],
equipmentSizeList: [], equipmentSizeList: [],
equId: null, equId: null,
equipmentId: null,
equName:'', equName:'',
equipmentSizeList: [], equipmentSizeList: [],
sizeId: null, equipmentSizeId: null,
form: { form: {
id: '', id: '',
action: 1, action: 1,
...@@ -169,8 +173,7 @@ export default { ...@@ -169,8 +173,7 @@ export default {
components: { equInfoDetail }, components: { equInfoDetail },
created() { created() {
this.getListOrgWarehouse() this.getListOrgWarehouse()
// this.getEquipmentList() this.getEquipmentList()
// this.getListEquipmentSize()
this.initOrgList() this.initOrgList()
this.$nextTick(() => { this.$nextTick(() => {
this.initPost() this.initPost()
...@@ -189,47 +192,38 @@ export default { ...@@ -189,47 +192,38 @@ export default {
if (isFastAdd && this.warehouseList.length > 0) { if (isFastAdd && this.warehouseList.length > 0) {
this.warehouseId = this.warehouseList[0].id this.warehouseId = this.warehouseList[0].id
this.equName = this.equName this.equName = this.equName
console.log(this.equName) this.toPostQuery()
this.changeWarehouse()
} }
}) })
}, },
// //获取装备 //获取装备
// getEquipmentList() { getEquipmentList() {
// this.warehouseId = this.warehouseList[0].id getListEquipmentDetail({}).then(res => {
// this.equipmentList = [] this.equipmentList = res.data
// this.equId = null //保留数据源
// this.changeWarehouse() this.copy = Object.assign(this.equipmentList)
// }, })
// //选择装备,根据装备获取装备型号名称 },
// getListEquipmentSize() { //选择装备,根据装备获取装备型号名称
// this.equipmentSizeList = [] getListEquipmentSize(data) {
// this.sizeId = null this.equipmentSizeList = []
// this.changeWarehouse() this.equipmentSizeId = null
// }, getListEquipmentSize({detailId : this.equipmentId}).then(res => {
changeWarehouse() { this.equipmentSizeList = res.data
this.toPostQuery() this.toPostQuery()
this.url = window._CONFIG['serviceURL'] + '/api/Notice/GetTreeScrapMsg' })
this.params = { page: this.page, size: this.size, orgId : this.orgId || this.$store.state.user.user.baseJpOrganization.id }
const warehouseId = this.warehouseId
const equId = this.equId
const equName = this.equName
const sizeId = this.sizeId
const days = this.days
const scrap = this.scrap
if (warehouseId) { this.params['warehouseId'] = warehouseId }
if (equId) { this.params['equId'] = equId }
if (equName) { this.params['equName'] = equName }
if (sizeId) { this.params['sizeId'] = sizeId }
if (days) { this.params['days'] = days }
if (scrap != null && scrap != undefined) { this.params['scrap'] = scrap }
return true
}, },
beforeInit() { beforeInit() {
this.url = window._CONFIG['serviceURL'] + '/api/Notice/GetTreeScrapMsg' this.url = window._CONFIG['serviceURL'] + '/api/Notice/GetTreeScrapMsg'
this.params = { page: this.page, size: this.size, orgId : this.orgId || this.$store.state.user.user.baseJpOrganization.id } this.params = { page: this.page, size: this.size, orgId : this.orgId || this.$store.state.user.user.baseJpOrganization.id }
const warehouseId = this.warehouseId
const equId = this.equipmentId
const sizeId = this.equipmentSizeId
const days = this.days const days = this.days
const scrap = this.scrap const scrap = this.scrap
if (warehouseId) { this.params['warehouseId'] = warehouseId }
if (equId) { this.params['equId'] = equId }
if (sizeId) { this.params['sizeId'] = sizeId }
if (days) { this.params['days'] = days } if (days) { this.params['days'] = days }
if (scrap != null && scrap != undefined) { this.params['scrap'] = scrap } if (scrap != null && scrap != undefined) { this.params['scrap'] = scrap }
return true return true
...@@ -288,17 +282,10 @@ export default { ...@@ -288,17 +282,10 @@ export default {
table.toggleRowExpansion(row) table.toggleRowExpansion(row)
}, },
getListEquipmentSize() {
if (this.equipmentCode) {
getListEquipmentSize({detailId : this.equipmentCode}).then(res => {
this.equipmentSizeList = res.data
})
}
},
dataFilter(v) { dataFilter(v) {
//对绑定数据赋值 //对绑定数据赋值
this.equipmentList = this.copy.filter((item) => { this.equipmentList = this.copy.filter((item) => {
console.log(item) //console.log(item)
//如果直接包含输入值直接返回true //如果直接包含输入值直接返回true
if (item.name.indexOf(v) !== -1) return true; if (item.name.indexOf(v) !== -1) return true;
//将label拆散成小写拼音数组 //将label拆散成小写拼音数组
...@@ -349,7 +336,7 @@ export default { ...@@ -349,7 +336,7 @@ export default {
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.detailList = val this.detailList = val
// console.log(val) console.log(val)
}, },
// selectionChange(val){ // selectionChange(val){
// this.detailList = val // this.detailList = val
...@@ -358,6 +345,7 @@ export default { ...@@ -358,6 +345,7 @@ export default {
quickScrap(row){ quickScrap(row){
// console.log(row) // console.log(row)
this.form.warehouseId = this.warehouseId this.form.warehouseId = this.warehouseId
console.log(this.form.warehouseId)
this.form.flowType = 'scrap' this.form.flowType = 'scrap'
this.form.detailList = [] this.form.detailList = []
this.detailList.forEach(element => { this.detailList.forEach(element => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论