|
|
|
@ -1,47 +1,15 @@
|
|
|
|
|
<template>
|
|
|
|
|
<!-- <el-dialog title="收货地址" :visible.sync="dialogFormVisible">-->
|
|
|
|
|
<el-container>
|
|
|
|
|
<el-header style="width: 100%; height: 80px;font-size: 12px">
|
|
|
|
|
|
|
|
|
|
<el-form :inline="true" label-width="65px" label-position="left">
|
|
|
|
|
<el-form :inline="true" label-width="55px" label-position="right">
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
|
|
<el-col :span="22">
|
|
|
|
|
<el-form-item label="船号:">
|
|
|
|
|
<vxe-pulldown ref="xDown4" transfer >
|
|
|
|
|
<template #default>
|
|
|
|
|
<vxe-input
|
|
|
|
|
v-model="queryParam.dcCh"
|
|
|
|
|
placeholder="船号"
|
|
|
|
|
style="height: 28px;
|
|
|
|
|
line-height: 28px; width: 140px;"
|
|
|
|
|
suffix-icon="vxe-icon--search"
|
|
|
|
|
@keyup="keyupEvent4"
|
|
|
|
|
@focus="focusEvent4"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<template #dropdown>
|
|
|
|
|
<div class="my-dropdown mytable " style="width: 250px">
|
|
|
|
|
<vxe-grid
|
|
|
|
|
highlight-hover-row
|
|
|
|
|
height="auto"
|
|
|
|
|
|
|
|
|
|
:data="projectData"
|
|
|
|
|
:columns="projectColumns"
|
|
|
|
|
@cell-click="cellClickEvent"
|
|
|
|
|
show-overflow
|
|
|
|
|
>
|
|
|
|
|
<template #wgbsEdit="{ row}">
|
|
|
|
|
<vxe-checkbox v-model="row.wgbs" checked-value="Y" unchecked-value="N" disabled ></vxe-checkbox>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-grid>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-pulldown>
|
|
|
|
|
|
|
|
|
|
<ProjectSelect ref="projectSelectRef" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="批量:">
|
|
|
|
|
<el-input v-model="queryParam.dcPl" type="search" placeholder="批量" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="2">
|
|
|
|
|
<el-form-item style="float: right" >
|
|
|
|
@ -87,15 +55,13 @@
|
|
|
|
|
:custom-config="{ storage: true }"
|
|
|
|
|
:edit-config="{ trigger: 'click', mode: 'cell', showStatus: true}"
|
|
|
|
|
highlight-hover-row
|
|
|
|
|
|
|
|
|
|
:scroll-y="{enabled: true}"
|
|
|
|
|
show-overflow
|
|
|
|
|
show-header-overflow
|
|
|
|
|
|
|
|
|
|
@checkbox-all="selectAllEvent"
|
|
|
|
|
@checkbox-change="selectChangeEvent"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-main>
|
|
|
|
|
</el-container>
|
|
|
|
|
</el-container>
|
|
|
|
@ -124,33 +90,28 @@ import {
|
|
|
|
|
yppyzcx,
|
|
|
|
|
yppyzUpdate
|
|
|
|
|
} from "@/api/sjzx/bzzGL";
|
|
|
|
|
import ProjectSelect from "@/components/ProjectSelect/index.vue";
|
|
|
|
|
import {getBFangDwxx} from "@/views/zyjhzx/bfang/comps/api";
|
|
|
|
|
export default {
|
|
|
|
|
name:'xqdwcjcd',
|
|
|
|
|
name:'Yppyz',
|
|
|
|
|
components: {ProjectSelect},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
queryParam: {
|
|
|
|
|
dcCh:'',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},inParam:{
|
|
|
|
|
dcPl:'',
|
|
|
|
|
},
|
|
|
|
|
inParam:{
|
|
|
|
|
rqfw:'',
|
|
|
|
|
zt:""
|
|
|
|
|
},
|
|
|
|
|
qyData:[],
|
|
|
|
|
list: [],
|
|
|
|
|
deptList: [],
|
|
|
|
|
clickList: [],
|
|
|
|
|
checkedList:[],
|
|
|
|
|
projectData:[],
|
|
|
|
|
projectColumns: [
|
|
|
|
|
{field: 'cbbm', title: '船号',width: 110},
|
|
|
|
|
{ field: 'wgbs', title: '完工标识', width: 80,
|
|
|
|
|
slots:{
|
|
|
|
|
default: 'wgbsEdit'
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
dictData:{},
|
|
|
|
|
height: '500px',
|
|
|
|
|
|
|
|
|
|
tableColumn: [
|
|
|
|
|
{ type: 'checkbox', width: 50 ,
|
|
|
|
|
},
|
|
|
|
@ -218,12 +179,6 @@ export default {
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination' }
|
|
|
|
|
},
|
|
|
|
|
// editRender: {
|
|
|
|
|
// name: '$select', options: [],
|
|
|
|
|
// optionProps: {value: 'bm', label: 'bmsm'},
|
|
|
|
|
// props: {clearable: true}
|
|
|
|
|
// , events: {change: this.selectChange}
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
field: 'xj',
|
|
|
|
|
title: '下级',editRender: { name: 'input' },
|
|
|
|
@ -231,14 +186,27 @@ export default {
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination' }
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// field: 'ppch',
|
|
|
|
|
// title: '配盘船号',editRender: { name: 'input' },
|
|
|
|
|
// width: 120,
|
|
|
|
|
// filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
// filterRender: { name: 'FilterCombination' }
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
field: 'qy',
|
|
|
|
|
title: '区域',editRender: { name: '$select',options:[],props: {clearable: true},events:{change:this.qyChange} },
|
|
|
|
|
width: 120,
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'dwh',
|
|
|
|
|
title: '垛位号',editRender: { name: '$select' },
|
|
|
|
|
width: 120,
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'status',
|
|
|
|
|
title: '状态',
|
|
|
|
|
width: 120,
|
|
|
|
|
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
|
|
|
|
|
filterRender: { name: 'FilterCombination' }
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -250,29 +218,8 @@ export default {
|
|
|
|
|
this.getHeight()
|
|
|
|
|
this.initBase()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
cellClickEvent({row}) {
|
|
|
|
|
this.queryParam.dcCh = row.cbbm
|
|
|
|
|
this.$refs.xDown4.hidePanel()
|
|
|
|
|
},
|
|
|
|
|
focusEvent4() {
|
|
|
|
|
this.$refs.xDown4.showPanel()
|
|
|
|
|
},
|
|
|
|
|
keyupEvent4() {
|
|
|
|
|
if (this.queryParam.dcCh) {
|
|
|
|
|
this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcCh.toUpperCase()) > -1)
|
|
|
|
|
} else {
|
|
|
|
|
this.projectData = this.projectData1.slice(0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initBase(){
|
|
|
|
|
getPgdBase({}).then(res=>{
|
|
|
|
|
this.dictData = res.data
|
|
|
|
@ -281,7 +228,6 @@ export default {
|
|
|
|
|
this.projectData1=res.data.cbbm
|
|
|
|
|
const select=this.$refs.xGrid.getColumnByField('dcCh')
|
|
|
|
|
const chList=[]
|
|
|
|
|
console.log(this.projectData1)
|
|
|
|
|
res.data.cbbm.forEach(item=>{
|
|
|
|
|
const data={
|
|
|
|
|
label:item.cbbm,
|
|
|
|
@ -290,53 +236,55 @@ export default {
|
|
|
|
|
chList.push(data)
|
|
|
|
|
})
|
|
|
|
|
select.editRender.options=chList
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const sldw = this.$refs.xGrid.getColumnByField('kw')
|
|
|
|
|
sldw.editRender.options = this.dictData.qgkw
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
getBFangDwxx().then((res)=>{
|
|
|
|
|
this.qyData=res.data
|
|
|
|
|
const qyList=[]
|
|
|
|
|
Object.keys(this.qyData).forEach(key=>{
|
|
|
|
|
const qy={label:key,value:key};
|
|
|
|
|
qyList.push(qy)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// console.log(this.dictData)
|
|
|
|
|
// const xGrid = this.$refs.xGrid
|
|
|
|
|
//
|
|
|
|
|
// const zt = xGrid.getColumnByField('zt')
|
|
|
|
|
// const yzt = xGrid.getColumnByField('yzt')
|
|
|
|
|
// zt.editRender.options = res.data.kwxxs
|
|
|
|
|
// yzt.editRender.options = res.data.kwxxs
|
|
|
|
|
|
|
|
|
|
const qy = this.$refs.xGrid.getColumnByField('qy')
|
|
|
|
|
qy.editRender.options=qyList
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initList() {
|
|
|
|
|
this.queryParam.dcCh=this.$refs.projectSelectRef.getDcch()
|
|
|
|
|
yppyzcx(this.queryParam).then((res) => {
|
|
|
|
|
this.list = res.data
|
|
|
|
|
if (this.$refs.xGrid) {
|
|
|
|
|
this.$refs.xGrid.loadData(this.list)
|
|
|
|
|
res.data?.forEach(item=>{
|
|
|
|
|
Object.values(this.qyData).forEach(dwList=>{
|
|
|
|
|
dwList.forEach(dwxx=>{
|
|
|
|
|
if (dwxx.id===item.dwxxId){
|
|
|
|
|
item.qy=dwxx.qy
|
|
|
|
|
item.dwh=dwxx.dwh
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
this.list = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
plClick(){
|
|
|
|
|
let selectRecords = this.$refs.xGrid.getCheckboxRecords()
|
|
|
|
|
if(selectRecords.length>0){
|
|
|
|
|
for(let i = 0; i < selectRecords.length; i++) {
|
|
|
|
|
if(this.inParam.zt !==''){
|
|
|
|
|
selectRecords[i]. yzt= selectRecords[i]. zt
|
|
|
|
|
selectRecords[i]. zt= this.inParam.zt
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(this.inParam.rqfw !==''){
|
|
|
|
|
selectRecords[i].rqfw = this.inParam.rqfw
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.$refs.xGrid.updateData(this.list)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
qyChange({row}){
|
|
|
|
|
const qy=row.qy
|
|
|
|
|
const dwList=[]
|
|
|
|
|
const qyColumn = this.$refs.xGrid.getColumnByField('dwh')
|
|
|
|
|
this.qyData[qy]?.forEach(item=>{
|
|
|
|
|
const dw={label:item.dwh,value:item.dwh};
|
|
|
|
|
dwList.push(dw)
|
|
|
|
|
})
|
|
|
|
|
qyColumn.editRender.options=dwList
|
|
|
|
|
},
|
|
|
|
|
selectAllEvent() {
|
|
|
|
|
this.checkedList = this.$refs.xGrid.getCheckboxRecords();
|
|
|
|
|
},
|
|
|
|
|
// 单选
|
|
|
|
|
selectChangeEvent() {
|
|
|
|
|
this.checkedList = this.$refs.xGrid.getCheckboxRecords();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectChange(row) {
|
|
|
|
|
this.$refs.xGrid.clearActived() // 清除单元格激活状态
|
|
|
|
|
this.$refs.xGrid.setActiveCell(row.row, row.column.property) // 设置单元格为激活状态
|
|
|
|
@ -354,7 +302,6 @@ export default {
|
|
|
|
|
switch (code) {
|
|
|
|
|
case 'insert':
|
|
|
|
|
this.$refs.xGrid.insertAt({
|
|
|
|
|
|
|
|
|
|
}, -1).then(({ row }) => {
|
|
|
|
|
this.$refs.xGrid.setActiveRow(row)
|
|
|
|
|
})
|
|
|
|
@ -369,8 +316,6 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
break
|
|
|
|
|
case 'save':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (removeRecords.length !== 0) {
|
|
|
|
|
yppyzUpdate({"remove":removeRecords}).then((response) => {
|
|
|
|
|
if (response.success) {
|
|
|
|
@ -387,10 +332,17 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (updateRecords.length !== 0) {
|
|
|
|
|
updateRecords.forEach(item=>{
|
|
|
|
|
Object.values(this.qyData).forEach(dwList=>{
|
|
|
|
|
dwList.forEach(dwxx=>{
|
|
|
|
|
if (dwxx.qy===item.qy&&dwxx.dwh===item.dwh){
|
|
|
|
|
item.dwxxId=dwxx.id
|
|
|
|
|
item.status=1
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
yppyzUpdate({"edit":updateRecords}).then((response) => {
|
|
|
|
|
if (response.success) {
|
|
|
|
|
const xTable = this.$refs.xGrid
|
|
|
|
@ -400,6 +352,16 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (insertRecords.length !== 0) {
|
|
|
|
|
insertRecords.forEach(item=>{
|
|
|
|
|
Object.values(this.qyData).forEach(dwList=>{
|
|
|
|
|
dwList.forEach(dwxx=>{
|
|
|
|
|
if (dwxx.qy===item.qy&&dwxx.dwh===item.dwh){
|
|
|
|
|
item.dwxxId=dwxx.id
|
|
|
|
|
item.status=1
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
yppyzUpdate({"add":insertRecords}).then((response) => {
|
|
|
|
|
if (response.success) {
|
|
|
|
|
this.list = this.list.concat(insertRecords)
|
|
|
|
|