You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.8 KiB

2 years ago
<template>
<el-container style="padding: 0">
<el-header style="width: 100%; height: 22px;font-size: 12px;padding-top: 5px">
<el-form :inline="true" label-width="55px" label-position="right">
<el-row>
<el-col :span="20">
<el-form-item label="船号:">
<ProjectSelect ref="projectSelectRef" />
</el-form-item>
<el-form-item label="批量:">
<el-input v-model="queryParam.dcPl" type="search" placeholder="批量" />
</el-form-item>
<el-form-item label="分段:">
<el-input v-model="queryParam.dcFd" type="search" placeholder="分段" />
11 months ago
</el-form-item>
</el-col>
<el-col :span="4" style="text-align: right">
<el-button type="success" @click="wzxjc"></el-button>
<el-button type="success" @click="bgong"></el-button>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding: 0">
<el-main>
<VxeGrid ref="bFangRef" v-bind="gridOptions" />
</el-main>
11 months ago
</el-container>
2 years ago
</el-container>
</template>
<script>
import tableConfig from "@/views/jhzxgl/components/yppfk";
import ProjectSelect from "@/components/ProjectSelect/index.vue";
import {bgList, yppbg} from "@/api/zyjh";
import {getBFangDwxx} from "@/views/zyjhzx/bfang/comps/api";
11 months ago
export default {
name:'YppFk',
components: {ProjectSelect},
data(){
return{
queryParam:{
dcCh:'',
dcPl:'',
dcFd:'',
11 months ago
},
list:[],
gridOptions:{},
qyData:[],
qyList:[],
}
2 years ago
},
created(){
const {options,columns}=tableConfig()
this.gridOptions=options
this.gridOptions.columns = columns;
this.gridOptions.height=window.innerHeight-150
getBFangDwxx().then((res)=>{
this.qyData=res.data
const qyList=[]
Object.keys(this.qyData).forEach(key=>{
const qy={label:key,value:key};
qyList.push(qy)
11 months ago
})
this.qyList=qyList
})
},
methods:{
bgong(){
const data=this.$refs.bFangRef.getCheckboxRecords()
if(data.length>0){
yppbg(data).then(()=>{
this.$message.success('成功');
this.wzxjc()
11 months ago
})
}
},
wzxjc(){
this.queryParam.dcPl = this.$refs.projectSelectRef.getDcch()
bgList(this.queryParam).then((res) => {
res.data.forEach(item=>{
item.status='已配盘'
Object.values(this.qyData).forEach(dwList=>{
dwList.forEach(dwxx=>{
if (dwxx.id===item.dwxxId){
item.qy=dwxx.qy
item.dwh=dwxx.dwh
}
})
})
11 months ago
})
this.gridOptions.data=res.data
11 months ago
})
},
2 years ago
}
11 months ago
}
2 years ago
</script>