1.预配盘和前方需求相关

master
董哲奇 2 years ago
parent 33a0db5dbd
commit 9d0f2c35a9

@ -24,4 +24,10 @@ export function getList(data) {return request({url: '/ypp/getList', method: 'pos
export function getLjxx(data) {return request({url: '/ypp/getLjxx', method: 'post', data})} export function getLjxx(data) {return request({url: '/ypp/getLjxx', method: 'post', data})}
export function getPpxx(data) {return request({url: '/ypp/getPpxx', method: 'post', data})}
export function checkBfwz(data) {return request({url: '/ypp/checkBfwz', method: 'post', data})} export function checkBfwz(data) {return request({url: '/ypp/checkBfwz', method: 'post', data})}
export function yppZx(data) {return request({url: '/ypp/zx', method: 'post', data})}
export function yppQr(data) {return request({url: '/ypp/qr', method: 'post', data})}

@ -1,14 +1,14 @@
<template> <template>
<el-container> <el-container>
<el-header style="width: 100%; height: 80px;font-size: 12px"> <el-header style="width: 100%;height: 35px">
<el-form :inline="true" label-width="65px" label-position="left"> <el-form ref="requestForm" :model="request" label-width="65px">
<el-row> <el-row>
<el-col :span="22"> <el-col :span="3">
<el-form-item label="船号:"> <el-form-item label="船号:">
<vxe-pulldown ref="xDown4" transfer > <vxe-pulldown ref="xDown4" transfer >
<template #default> <template #default>
<vxe-input <vxe-input
v-model="queryParam.dcCh" v-model="request.dcCh"
placeholder="船号" placeholder="船号"
style="height: 28px; style="height: 28px;
line-height: 28px; width: 150px;" line-height: 28px; width: 150px;"
@ -22,7 +22,6 @@
<vxe-grid <vxe-grid
highlight-hover-row highlight-hover-row
height="auto" height="auto"
:data="projectData" :data="projectData"
:columns="projectColumns" :columns="projectColumns"
@cell-click="cellClickEvent" @cell-click="cellClickEvent"
@ -36,85 +35,46 @@
</template> </template>
</vxe-pulldown> </vxe-pulldown>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="批量:"> <el-form-item label="批量:">
<el-input v-model="queryParam.dcPl" type="search" placeholder="批量" ></el-input> <el-input v-model="request.dcPl" type="search" placeholder="批量" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="3">
<el-form-item style="float: right" > <el-form-item label="分段:">
<el-button type="success" @click="initList"></el-button> <el-input v-model="request.dcFd" type="search" placeholder="分段" ></el-input>
<el-button type="success" @click="qr"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="4">
<el-row> <el-form-item label="在建船只:" label-width="105px">
<el-col :span="22"> <el-checkbox v-model="request.zjcz" type="search" placeholder="合同号" ></el-checkbox>
<el-form-item label="状态:">
<el-select v-model="queryParam.zt" disabled placeholder="状态" @change="czbhChange" >
<el-option
v-for="item in zt"
:key="item.bm"
:label="item.bmsm"
:value="item.bm">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
<el-button type="success" @click="qr"></el-button>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-header> </el-header>
<el-container style="padding-top: 0px"> <Yppfk0 ref="yppfk0" />
<el-container>
<el-main>
<div class="mytable">
<vxe-grid
id="id"
ref="xGrid"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn"
highlight-current-row
:data="list"
:custom-config="{ storage: true }"
highlight-hover-row
show-overflow
show-header-overflow
>
</vxe-grid>
</div>
</el-main>
</el-container>
</el-container>
</el-container> </el-container>
</template> </template>
<script> <script>
import {
getList,
getCzxx
} from '@/api/jhzx/qfxq'
import { mapGetters } from 'vuex'
import XEUtils from 'xe-utils'
import {null2str} from "@/utils/rpkj";
import { getToken } from '@/utils/auth'
import {getCzplBase} from "@/api/sjzx/jcsj"; import {getCzplBase} from "@/api/sjzx/jcsj";
import {getBfwz, yppQr} from "@/api/jhzxgl/ypp";
import Yppfk0 from "@/views/jhzxgl/components/Yppfk0.vue";
export default { export default {
name:'QfxqCX', name: "Cgjhdh",
components: { Yppfk0},
data() { data() {
return { return {
queryParam: { yppTqShow:false,
dcCh:'', height: "500px",
dcPl:'',
zt:'2'
},
list:[], list:[],
projectData:[],
projectData1:[],
projectColumns: [ projectColumns: [
{field: 'cbbm', title: '船号',width: 110}, {field: 'cbbm', title: '船号',width: 110},
{ field: 'wgbs', title: '完工标识', width: 80, { field: 'wgbs', title: '完工标识', width: 80,
@ -123,208 +83,129 @@ export default {
}, },
}, },
], ],
filedis:true, qyList:[],
uploadData:{ dwList:[],
}, bfwzList:[],
heads: { token: getToken() }, projectData:[],
uploadAction: process.env.VUE_APP_BASE_API + '/dmQfxq/upload', request:{
dictData:{ dcCh:'',
cbbm:[] dcPl:'',
}, dcFd:'',
zt:[], zjcz:true,
height: '500px',
tableColumn: [
{ type: 'seq', width: 60, title: '序号' },
{ field: 'dcCh', title: '船号', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcPl', title: '批量', width: 100,editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcFd', title: '分段', width: 100, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pscd', title: '配送场地', width: 120, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'cjzg', title: '车间主管', width: 120, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'db', title: '大板', width: 120, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xc', title: '型材', width: 120, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'txc', title: 'T型材', width: 120, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'bz', title: '备注', width: 120, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zt', title: '状态', width: 100,formatter: ['dictFormat','ZTLX']
},
{ field: 'bzry', title: '编制人员', width: 110, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'bzrq', title: '编制日期', width: 110, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'shry', title: '审核人员', width: 110, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
}, },
]
} }
}, },
computed: {
...mapGetters(['name', 'bmbm'])
},
created() { created() {
window.addEventListener('resize', this.getHeight) window.addEventListener("resize", this.getHeight);
this.getHeight() this.getHeight();
this.initBase() this.initProject()
this.initList() this.initBfwz()
}, },
methods: { methods: {
cellClickEvent({row}) { qr(){
this.queryParam.dcCh = row.cbbm const data=this.$refs.yppfk0.getSelectQfxq();
this.$refs.xDown4.hidePanel() if (data.length==0){
}, this.$message.warning('请选择待执行的数据');
focusEvent4() { return;
this.$refs.xDown4.showPanel()
},
keyupEvent4() {
if (this.queryParam.dcch) {
this.projectData = this.projectData1.filter(row => row.project.indexOf(this.queryParam.dcch.toUpperCase()) > -1)
} else {
this.projectData = this.projectData1.slice(0)
} }
yppQr(data).then(res=>{
this.$message.success('成功');
})
}, },
initBase(){ initList(){
getCzxx({}).then(res=>{ this.$refs.yppfk0.initXqjh(this.request)
this.dictData.cbbm = res.data },
initBfwz(){
getBfwz().then(res=>{
this.bfwzList=res.data
const _qyList=[]
const _dwhList=[]
const table=this.$refs.tableRef
const qyColumn=table.getColumnByField('qy')
const dwColumn=table.getColumnByField('dwh')
this.bfwzList.forEach(item=>{
_qyList.push({label:item.qy,value:item.qy})
_dwhList.push({label:item.dwh,value:item.dwh,_parent:item.qy})
}) })
qyColumn.editRender.options=_qyList
dwColumn.editRender.options=_dwhList
this.qyList=_qyList;
this.dwList=_dwhList
})
},
initProject(){
getCzplBase({}).then(res=>{ getCzplBase({}).then(res=>{
this.projectData=res.data.cbbm this.projectData=res.data.cbbm
this.projectData1=res.data.cbbm
}) })
const dict=window.localStorage.getItem('ZTLX');
this.zt=JSON.parse(dict)
}, },
qr(){ cellClickEvent({row}){
this.request.dcCh = row.cbbm
this.$refs.xDown4.hidePanel()
}, },
initList() { focusEvent4(){
getList(this.queryParam).then((res) => { this.$refs.xDown4.showPanel()
this.list = res.data
if (this.$refs.xGrid) {
this.$refs.xGrid.loadData(this.list)
}
})
}, },
czbhChange(){ keyupEvent4(){
if (this.queryParam.dcCh === '') { if (this.request.dcCh) {
this.filedis=true this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.request.dcCh.toUpperCase()) > -1)
} else { } else {
this.filedis=false this.projectData = this.projectData1.slice(0)
} }
}, },
selectChange(row) {
// this.$refs.xGrid.clearActived() //
this.$refs.xGrid.clearEdit() //
// this.$refs.xGrid.setEditCell(row.row, row.column.property) //
null2str(row.row)
},
formatDate ({ cellValue }) {
return XEUtils.toDateString(cellValue, 'yyyy/MM/dd')
},
getHeight() { getHeight() {
this.height = window.innerHeight - 190 this.height = window.innerHeight - 160;
}, },
} }
} };
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >
.el-header {
.el-header{margin:0;padding: 5px;height:auto; margin: 0;
.el-input{ padding: 5px 0;
width: 140px; height: auto;
} }
.el-select{ .el-container {
width: 140px; padding: 0;
margin: 0;
} }
.el-main {
padding: 0;
}
.el-col {
padding: 0;
}
.el-aside {
background: #fff;
padding: 0;
}
.el-container {
padding: 0;
}
.el-row {
margin-bottom: 5px;
}
.el-row:last-child {
margin-bottom: 0;
} }
.el-container{padding: 0;margin:0;}
.el-main{padding: 0;}
.el-col{padding: 0;height: 32px;}
.el-aside{background: #fff;padding: 0}
.el-container{padding: 0}
.el-row {}
.el-row:last-child {margin-bottom: 0; }
.tableStyles { .tableStyles {
background: #0a76a4; background: #0a76a4;
} }
.my-dropdown { .my-dropdown {
width: 400px; width: 450px;
height: 400px; height: 250px;
background-color: #fff; background-color: #fff;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1); box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
font-size: 12px; font-size: 12px;
}
.mytable1{
}
.borderClass{
}
.vxe-input {
display: inline-block !important;
position: relative !important;
width: auto;
} }
.el-input { ::v-deep .mytable .vxe-input {
display: inline-block !important; display: flex !important;
position: relative !important;
width: auto;
} }
.keyword-lighten { ::v-deep .el-form-item {
color: #000; margin-bottom: 0px !important;
background-color: #FFFF00;
} }
.vxe-textarea--inner { ::v-deep .el-input{
line-height: inherit; width: auto !important;
} }
.el-form-item__label-wrap {
margin-left: 0px !important;
float: left;
}
.fontClass{
font-size: 12px;
font-weight: bold;
}
</style> </style>

@ -1,14 +1,14 @@
<template> <template>
<el-container> <el-container>
<el-header style="width: 100%; height: 80px;font-size: 12px"> <el-header style="width: 100%;height: 35px">
<el-form :inline="true" label-width="65px" label-position="left"> <el-form ref="requestForm" :model="request" label-width="65px">
<el-row> <el-row>
<el-col :span="22"> <el-col :span="3">
<el-form-item label="船号:"> <el-form-item label="船号:">
<vxe-pulldown ref="xDown4" transfer > <vxe-pulldown ref="xDown4" transfer >
<template #default> <template #default>
<vxe-input <vxe-input
v-model="queryParam.dcCh" v-model="request.dcCh"
placeholder="船号" placeholder="船号"
style="height: 28px; style="height: 28px;
line-height: 28px; width: 150px;" line-height: 28px; width: 150px;"
@ -22,7 +22,6 @@
<vxe-grid <vxe-grid
highlight-hover-row highlight-hover-row
height="auto" height="auto"
:data="projectData" :data="projectData"
:columns="projectColumns" :columns="projectColumns"
@cell-click="cellClickEvent" @cell-click="cellClickEvent"
@ -36,85 +35,49 @@
</template> </template>
</vxe-pulldown> </vxe-pulldown>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="批量:"> <el-form-item label="批量:">
<el-input v-model="queryParam.dcPl" type="search" placeholder="批量" ></el-input> <el-input v-model="request.dcPl" type="search" placeholder="批量" ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="3">
<el-form-item style="float: right" > <el-form-item label="分段:">
<el-button type="success" @click="initList"></el-button> <el-input v-model="request.dcFd" type="search" placeholder="分段" ></el-input>
<el-button type="success" @click="zx"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> <el-col :span="4">
<el-row> <el-form-item label="在建船只:" label-width="105px">
<el-col :span="22"> <el-checkbox v-model="request.zjcz" type="search" placeholder="合同号" ></el-checkbox>
<el-form-item label="状态:">
<el-select v-model="queryParam.zt" disabled placeholder="状态" @change="czbhChange" >
<el-option
v-for="item in zt"
:key="item.bm"
:label="item.bmsm"
:value="item.bm">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
<el-button type="success" @click="zx"></el-button>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-header> </el-header>
<el-container style="padding-top: 0px"> <Yppfk0 ref="yppfk0" />
<el-container> <QfxqzxPrint ref="qfxqzxprintRef" v-show="printCompShow" @showPrintComp="showPrintComp" />
<el-main>
<div class="mytable">
<vxe-grid
id="id"
ref="xGrid"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="tableColumn"
highlight-current-row
:data="list"
:custom-config="{ storage: true }"
highlight-hover-row
show-overflow
show-header-overflow
>
</vxe-grid>
</div>
</el-main>
</el-container>
</el-container>
</el-container> </el-container>
</template> </template>
<script> <script>
import {
getList,
getCzxx
} from '@/api/jhzx/qfxq'
import { mapGetters } from 'vuex'
import XEUtils from 'xe-utils'
import {null2str} from "@/utils/rpkj";
import { getToken } from '@/utils/auth'
import {getCzplBase} from "@/api/sjzx/jcsj"; import {getCzplBase} from "@/api/sjzx/jcsj";
import Yppfk0 from "@/views/jhzxgl/components/Yppfk0.vue";
import QfxqzxPrint from "@/views/jhzxgl/components/QfxqzxPrint.vue";
import {yppZx} from "@/api/jhzxgl/ypp";
export default { export default {
name:'QfxqCX', name: "Cgjhdh",
components: {QfxqzxPrint, Yppfk0},
data() { data() {
return { return {
queryParam: { printCompShow:false,
dcCh:'', yppTqShow:false,
dcPl:'', height: "500px",
zt:'2'
},
list:[], list:[],
projectData:[],
projectData1:[],
projectColumns: [ projectColumns: [
{field: 'cbbm', title: '船号',width: 110}, {field: 'cbbm', title: '船号',width: 110},
{ field: 'wgbs', title: '完工标识', width: 80, { field: 'wgbs', title: '完工标识', width: 80,
@ -123,252 +86,117 @@ export default {
}, },
}, },
], ],
filedis:true, qyList:[],
uploadData:{ dwList:[],
}, bfwzList:[],
heads: { token: getToken() }, projectData:[],
uploadAction: process.env.VUE_APP_BASE_API + '/dmQfxq/upload', request:{
dictData:{ dcCh:'',
cbbm:[] dcPl:'',
}, dcFd:'',
zt:[], zjcz:true,
height: '500px',
tableColumn: [
{ type: 'checkbox', width: 50 },
{ type: 'seq', width: 60, title: '序号' },
{ field: 'dcCh', title: '船只', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcPl', title: '批量号', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zdh', title: '总段号', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcFd', title: '分段号', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dzjz', title: '大组极重', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zxfdxq', title: '总装部最新分段需求期', minWidth: "90",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xzglxq', title: '钢料需求(小组)', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dzglxq', title: '钢料需求(大组)', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xdb', title: 'X大板', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xskj', title: 'X数控件', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xpt', title: 'X平铁', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xyw', title: 'X压弯', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xxc', title: 'X型材', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xtxc', title: 'X二次装T型材', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ddb', title: 'D大板', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dqb', title: 'D曲板', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dxc', title: 'D型材T', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dsj', title: 'D散件', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xqzt', title: '需求状态', minWidth: "100",formatter:this.formatterZt,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'drcs', title: '导入次数', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xzglxqOld', title: '原需求期', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zt', title: '状态', width: 100,formatter: ['dictFormat','ZTLX']
},
{ field: 'shry', title: '审核人员', width: 110, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
}, },
{ field: 'shrq', title: '审核日期', width: 110, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
}
]
} }
}, },
computed: {
...mapGetters(['name', 'bmbm'])
},
created() { created() {
window.addEventListener('resize', this.getHeight) window.addEventListener("resize", this.getHeight);
this.getHeight() this.getHeight();
this.initBase() this.initProject()
this.initList()
}, },
methods: { methods: {
cellClickEvent({row}) { zx(){
this.queryParam.dcCh = row.cbbm const data=this.$refs.yppfk0.getSelectQfxq();
this.$refs.xDown4.hidePanel() if (data.length==0){
this.$message.warning('请选择待执行的数据');
return;
}
yppZx(data).then(res=>{
this.$refs.qfxqzxprintRef.show(res.data)
})
}, },
focusEvent4() { showPrintComp(){
this.$refs.xDown4.showPanel() this.printCompShow=true
setTimeout(()=>{
this.$print(this.$refs.qfxqzxprintRef)
this.printCompShow=false
},500)
}, },
keyupEvent4() { initList(){
this.$refs.yppfk0.initXqjh(this.request)
if (this.queryParam.dcch) {
this.projectData = this.projectData1.filter(row => row.project.indexOf(this.queryParam.dcch.toUpperCase()) > -1)
} else {
this.projectData = this.projectData1.slice(0)
}
}, },
initBase(){ initProject(){
getCzxx({}).then(res=>{
this.dictData.cbbm = res.data
})
getCzplBase({}).then(res=>{ getCzplBase({}).then(res=>{
this.projectData=res.data.cbbm this.projectData=res.data.cbbm
this.projectData1=res.data.cbbm
}) })
const dict=window.localStorage.getItem('ZTLX');
this.zt=JSON.parse(dict)
}, },
zx(){ cellClickEvent({row}){
this.request.dcCh = row.cbbm
this.$refs.xDown4.hidePanel()
}, },
initList() { focusEvent4(){
getList(this.queryParam).then((res) => { this.$refs.xDown4.showPanel()
this.list = res.data
if (this.$refs.xGrid) {
this.$refs.xGrid.loadData(this.list)
}
})
}, },
czbhChange(){ keyupEvent4(){
if (this.queryParam.dcCh === '') { if (this.request.dcCh) {
this.filedis=true this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.request.dcCh.toUpperCase()) > -1)
} else { } else {
this.filedis=false this.projectData = this.projectData1.slice(0)
} }
}, },
selectChange(row) {
// this.$refs.xGrid.clearActived() //
this.$refs.xGrid.clearEdit() //
// this.$refs.xGrid.setEditCell(row.row, row.column.property) //
null2str(row.row)
},
formatDate ({ cellValue }) {
return XEUtils.toDateString(cellValue, 'yyyy/MM/dd')
},
getHeight() { getHeight() {
this.height = window.innerHeight - 190 this.height = window.innerHeight - 160;
}, },
} }
} };
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >
.el-header {
.el-header{margin:0;padding: 5px;height:auto; margin: 0;
.el-input{ padding: 5px 0;
width: 140px; height: auto;
} }
.el-select{ .el-container {
width: 140px; padding: 0;
margin: 0;
} }
.el-main {
padding: 0;
}
.el-col {
padding: 0;
}
.el-aside {
background: #fff;
padding: 0;
}
.el-container {
padding: 0;
}
.el-row {
margin-bottom: 5px;
}
.el-row:last-child {
margin-bottom: 0;
} }
.el-container{padding: 0;margin:0;}
.el-main{padding: 0;}
.el-col{padding: 0;height: 32px;}
.el-aside{background: #fff;padding: 0}
.el-container{padding: 0}
.el-row {}
.el-row:last-child {margin-bottom: 0; }
.tableStyles { .tableStyles {
background: #0a76a4; background: #0a76a4;
} }
.my-dropdown { .my-dropdown {
width: 400px; width: 450px;
height: 400px; height: 250px;
background-color: #fff; background-color: #fff;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1); box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
font-size: 12px; font-size: 12px;
}
.mytable1{
}
.borderClass{
} }
.vxe-input { ::v-deep .mytable .vxe-input {
display: inline-block !important; display: flex !important;
position: relative !important;
width: auto;
} }
.el-input { ::v-deep .el-form-item {
display: inline-block !important; margin-bottom: 0px !important;
position: relative !important;
width: auto;
}
.keyword-lighten {
color: #000;
background-color: #FFFF00;
} }
.vxe-textarea--inner { ::v-deep .el-input{
line-height: inherit; width: auto !important;
}
.el-form-item__label-wrap {
margin-left: 0px !important;
float: left;
}
.fontClass{
font-size: 12px;
font-weight: bold;
} }
</style> </style>

@ -0,0 +1,139 @@
<template>
<div ref="_printRef" class="print" style="width:756px;">
<div v-for="(map,index) in data" :key="index" :style="{width:'100%',marginTop:(index+1)%2===0?'40px':'0px'}">
<div style="width: 100%;position: relative">
<div style="width: 100%;text-align: center;line-height: 40px;font-size: 20px;font-weight: bold">大连船舶重工集团钢加有限公司</div>
<div style="width: 100%;text-align: center;line-height: 30px;font-size: 16px;font-weight: bold">配送交接单</div>
<div style="line-height: 20px">编号: {{ map.bh }}</div>
<div class="table-head">
<span style="width:4%;">序号</span>
<span style="width:11%;">船号</span>
<span style="width:9%;">批号</span>
<span style="width:13%;">托盘表号</span>
<span style="width:16%;">附件名称</span>
<span style="width:23.5%;">图号/规格</span>
<span style="width:7%;">材质</span>
<span style="width:4%;">数量</span>
<span style="width:10.1%;">入库地点</span>
</div>
<div class="table-content" v-for="(item,index) in map.list">
<span style="width:4%;text-align: center;">{{ item.jhxh }}</span>
<span style="width:11%;text-align: center;">{{ item.czbh }}</span>
<span style="width:9%;text-align: center;">{{ item.ph }}</span>
<span style="width:13%;text-align: center;">{{ item.tpbh }}</span>
<span style="width:16%;text-align: center;">{{ item.wpmc }}</span>
<span style="width:23.5%;text-align: center;">{{ item.wpgg }}</span>
<span style="width:7%;text-align: center;">{{ item.wpxh }}</span>
<span style="width:4%;text-align: center;">{{ item.pssl }}</span>
<span style="width:10.1%;text-align: center;">{{ item.ckh }}</span>
</div>
<div class="table-foot" style="border:1px solid">
<span colspan="3" style="text-align: left;padding-left: 15px;border-right: 0">交货人: {{ map.psry }}</span>
<span colspan="3" style="text-align: right;margin-left: 100px">
<span style="margin-left: 25px"> </span>
</span>
<span style="text-align: center"> 合计: </span>
<span style="text-align: center"> {{ map.count }}</span>
</div>
<div style="font-size: 18px;margin-top: 2px">
<span style="margin-left: 5px">质检员:</span>
<span style="margin-left: 30%">收货单位:</span>
<span style="margin-left: 30%">收货人:</span>
</div>
</div>
<div v-if="index>0&&((index+1)%2===0)" class="pageEnd"></div>
</div>
</div>
</template>
<script>
export default {
name:'QfxqzxPrint',
data(){
return {
data:[],
}
},
methods:{
show(_data){
//
//
const pageSize=7;
const tmpData=[]
// for (const item of _data) {
// if (item.list.length>pageSize){
// const _arr=this.sliceToPage(item.list,pageSize);
// for (const _item of _arr) {
// const tmpItem=JSON.parse(JSON.stringify(item))
// tmpItem.list=_item
// const o=pageSize-_item.length
// for(let i=0;i<o;i++){
// _item.push({})
// }
// tmpData.push(tmpItem)
// }
// }else{
// const o=pageSize-item.list.length
// for(let i=0;i<o;i++){
// item.list.push({})
// }
// tmpData.push(item)
// }
// }
tmpData.push({})
this.data=tmpData
this.$emit('showPrintComp')
},
sliceToPage(data,len){
let index=0,_newArr=[]
while (index<data.length){
let size=len;
if ((index+len)>=data.length){
size=data.length-index;
}
_newArr.push(data.slice(index, index += size));
}
return _newArr;
}
}
}
</script>
<style>
.table-head span{
font-size: 14px;
text-align: center;
display: inline-block;
border: 1px solid;
}
.table-content span{
display: inline-block;
font-size: 14px;
text-align: center;
border: 1px solid;
height: 40px;
vertical-align:middle;
word-break: normal;
white-space: pre-wrap;
word-wrap: break-word;
overflow-y: hidden;
}
.QRCode{
width:110px;
position: absolute;
left:610px;
/*top:10px;*/
}
@media print {
.noPrint {
display: none;
}
.pageEnd {
page-break-after: always;
}
}
</style>

@ -65,7 +65,7 @@
:auto-resize="true" :auto-resize="true"
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:cell-dblclick="dblclick" @cell-dblclick="dblclick"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
highlight-current-row highlight-current-row
highlight-hover-row highlight-hover-row
@ -99,6 +99,7 @@ export default {
dcCh:'', dcCh:'',
dcPl:'', dcPl:'',
dcFd:'', dcFd:'',
zt:'0'
}, },
projectData:[], projectData:[],
monthList:[], monthList:[],
@ -223,12 +224,14 @@ export default {
this.initProject() this.initProject()
}, },
methods: { methods: {
dblclick(){ dblclick({row}){
getLjxx().then(res=>{ getLjxx(row).then(res=>{
this.$parent.add(res.data) if (res.data.length>0){
this.initList0(); this.$emit('add',res.data)
this.list=[]
this.dialogVisible=false this.dialogVisible=false
return;
}
this.$message.warning('暂无零件数据')
}) })
}, },
show(){ show(){

@ -15,7 +15,7 @@
:columns="xqjhColumn" :columns="xqjhColumn"
:data="xqjhList" :data="xqjhList"
:scroll-y="{ enabled: true }" :scroll-y="{ enabled: true }"
:cell-dblclick="initLj" @cell-dblclick="getPpxx"
highlight-hover-row highlight-hover-row
> >
</vxe-grid> </vxe-grid>
@ -46,7 +46,7 @@
<script> <script>
import {getQfxq} from "@/api/jhzx/qfxq"; import {getQfxq} from "@/api/jhzx/qfxq";
import {getList} from "@/api/jhzxgl/ypp"; import {getBfwz, getList, getPpxx} from "@/api/jhzxgl/ypp";
export default { export default {
name: "Yppfk0", name: "Yppfk0",
@ -55,19 +55,102 @@ export default {
height:'500px', height:'500px',
activeName:'first', activeName:'first',
xqjhColumn:[ xqjhColumn:[
{type: "seq", width: "50", title: "序号", align: "center", fixed: "left",}, { type: 'checkbox', width: 50 },
{ field: 'dcCh', title: '船只', width: 120,align: "center", { type: 'seq', width: 60, title: '序号' },
{ field: 'dcCh', title: '船只', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'dcPl', title: '批量', width: 120,align: "center", { field: 'dcPl', title: '批量号', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'dcFd', title: '分段号', width: 120,align: "center", { field: 'zdh', title: '总段号', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcFd', title: '分段号', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dzjz', title: '大组极重', minWidth: "70",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zxfdxq', title: '总装部最新分段需求期', minWidth: "90",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xzglxq', title: '钢料需求(小组)', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dzglxq', title: '钢料需求(大组)', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xdb', title: 'X大板', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xskj', title: 'X数控件', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xpt', title: 'X平铁', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xyw', title: 'X压弯', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xxc', title: 'X型材', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xtxc', title: 'X二次装T型材', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ddb', title: 'D大板', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'dqb', title: 'D曲板', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dxc', title: 'D型材T', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dsj', title: 'D散件', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xqzt', title: '需求状态', minWidth: "100",formatter:this.formatterZt,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'drcs', title: '导入次数', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'xzglxqOld', title: '原需求期', minWidth: "100",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zt', title: '状态', width: 100,formatter: ['dictFormat','ZTLX']
},
{ field: 'shry', title: '审核人员', width: 110, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'shrq', title: '审核日期', width: 110, editRender: { name: 'input' },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
}
], ],
ljColumn:[ ljColumn:[
{type: "seq", width: "50", title: "序号", align: "center", fixed: "left",}, {type: "seq", width: "50", title: "序号", align: "center", fixed: "left",},
@ -99,6 +182,10 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'dcYs', title: '页数', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcPb', title: '拼板', width: 120,align: "center", { field: 'dcPb', title: '拼板', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
@ -111,6 +198,10 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'dcTpmc', title: '托盘名称', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'jldw1', title: '单价重量计量单位', width: 120,align: "center", { field: 'jldw1', title: '单价重量计量单位', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
@ -187,17 +278,50 @@ export default {
} }
}, },
getSelectQfxq(){
return this.$refs.xqjhTableRef.getCheckboxRecords();
},
initXqjh(req){ initXqjh(req){
getQfxq(req).then(res=>{ getQfxq(req).then(res=>{
this.xqjhList=res.data this.xqjhList=res.data
}) })
}, },
initLj({row}){ getPpxx({row}){
this.activeName='second' this.activeName='second'
getList(row).then(res=>{ getList(row).then(res=>{
this.ljList=res.data this.ljList=res.data
}) })
}, },
initBfwz(){
getBfwz().then(res=>{
this.bfwzList=res.data
const _qyList=[]
const _dwhList=[]
const table=this.$refs.tableRef
const qyColumn=table.getColumnByField('qy')
const dwColumn=table.getColumnByField('dwh')
this.bfwzList.forEach(item=>{
_qyList.push({label:item.qy,value:item.qy})
_dwhList.push({label:item.dwh,value:item.dwh,_parent:item.qy})
})
qyColumn.editRender.options=_qyList
dwColumn.editRender.options=_dwhList
this.qyList=_qyList;
this.dwList=_dwhList
})
},
formatterZt({cellValue}){
if(cellValue==='0'){
return '正常'
}
if(cellValue==='1'){
return '提前'
}
if (cellValue==='2'){
return '拖期'
}
return cellValue
},
handleClick(){ handleClick(){
}, },

@ -1,6 +1,6 @@
<template> <template>
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%;height: 35px">
<el-form ref="requestForm" :model="request" label-width="65px"> <el-form ref="requestForm" :model="request" label-width="65px">
<el-row> <el-row>
<el-col :span="3"> <el-col :span="3">
@ -8,7 +8,7 @@
<vxe-pulldown ref="xDown4" transfer > <vxe-pulldown ref="xDown4" transfer >
<template #default> <template #default>
<vxe-input <vxe-input
v-model="request.wjwz" v-model="request.dcCh"
placeholder="船号" placeholder="船号"
style="height: 28px; style="height: 28px;
line-height: 28px; width: 150px;" line-height: 28px; width: 150px;"
@ -37,29 +37,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="区域:"> <el-form-item label="批量:">
<el-select v-model="request.dwh" placeholder="区域" clearable> <el-input v-model="request.dcPl" type="search" placeholder="批量" ></el-input>
<el-option
v-for="item in qyList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="垛位:"> <el-form-item label="分段:">
<el-select v-model="request.dwh" placeholder="垛位" clearable> <el-input v-model="request.dcFd" type="search" placeholder="分段" ></el-input>
<el-option
v-for="item in dwList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
@ -68,49 +52,24 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" style="text-align: right"> <el-col :span="11" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button> <el-button type="primary" @click="initList"></el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <Yppfk0 ref="yppfk0" />
<el-container>
<el-main>
<div class="mytable">
<vxe-grid
id="id"
border
ref="tableRef"
resizable
keep-source
:height="height"
:auto-resize="true"
:columns="tableColumn"
:data="list"
:edit-config="{trigger: 'click', mode: 'row', showStatus: true,}"
:custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row
>
</vxe-grid>
</div>
</el-main>
</el-container>
</el-container>
<YppTq ref="yppTqRef" />
</el-container> </el-container>
</template> </template>
<script> <script>
import {getGhs} from "@/api/sjzx/sbxxWH";
import {getCzplBase} from "@/api/sjzx/jcsj"; import {getCzplBase} from "@/api/sjzx/jcsj";
import {cgjhdhqk} from "@/api/jhzx/sygd";
import YppTq from "@/views/jhzxgl/components/YppTq.vue"; import YppTq from "@/views/jhzxgl/components/YppTq.vue";
import {getBfwz} from "@/api/jhzxgl/ypp"; import {getBfwz} from "@/api/jhzxgl/ypp";
import Yppfk0 from "@/views/jhzxgl/components/Yppfk0.vue";
export default { export default {
name: "Cgjhdh", name: "Cgjhdh",
components: {YppTq}, components: {Yppfk0, YppTq},
data() { data() {
return { return {
yppTqShow:false, yppTqShow:false,
@ -129,111 +88,11 @@ export default {
bfwzList:[], bfwzList:[],
projectData:[], projectData:[],
request:{ request:{
wjwz:'', dcCh:'',
dwh:'', dcPl:'',
dcFd:'',
zjcz:true zjcz:true
}, },
tableColumn: [
{type: "seq", width: "50", title: "序号", align: "center", fixed: "left",},
{ field: 'dcCh', title: '船只', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcPl', title: '批量', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcFd', title: '分段号', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcTh', title: '图号', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcZl', title: '组立', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcTz', title: '特征', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcYj', title: '依据', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcPb', title: '拼板', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcLph', title: '炉批号', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcTpbh', title: '托盘编号', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'jldw1', title: '单价重量计量单位', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'wpmc', title: '物品名称', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'wpgg', title: '规格', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'wpxh', title: '材质', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'qy', title: '区域', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
editRender:{type:'$select',options:[],props:{clearable:true}}
},
{ field: 'dwh', title: '垛位号', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
editRender:{type:'$select',options:[],props:{clearable:true}}
},
{ field: 'wpjb', title: '物品级别', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'wpflm', title: '物品分类', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'abclx', title: 'ABC分类', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'gzlx', title: '加工进度', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ylzd1', title: '配套表类型', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'lcm1', title: '流程码', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'zt', title: '状态', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'tpxx', title: '托盘信息', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
],
} }
}, },
created() { created() {
@ -243,8 +102,11 @@ export default {
this.initBfwz() this.initBfwz()
}, },
methods: { methods: {
qtjc(){
this.$refs.yppfk0.qtjc()
},
initList(){ initList(){
this.$refs.yppfk0.initXqjh(this.request)
}, },
initBfwz(){ initBfwz(){
getBfwz().then(res=>{ getBfwz().then(res=>{
@ -270,15 +132,15 @@ export default {
}) })
}, },
cellClickEvent({row}){ cellClickEvent({row}){
this.request.wjwz = row.cbbm this.request.dcCh = row.cbbm
this.$refs.xDown4.hidePanel() this.$refs.xDown4.hidePanel()
}, },
focusEvent4(){ focusEvent4(){
this.$refs.xDown4.showPanel() this.$refs.xDown4.showPanel()
}, },
keyupEvent4(){ keyupEvent4(){
if (this.request.wjwz) { if (this.request.dcCh) {
this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.request.wjwz.toUpperCase()) > -1) this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.request.dcCh.toUpperCase()) > -1)
} else { } else {
this.projectData = this.projectData1.slice(0) this.projectData = this.projectData1.slice(0)
} }

@ -66,7 +66,7 @@
import {getCzplBase} from "@/api/sjzx/jcsj"; import {getCzplBase} from "@/api/sjzx/jcsj";
import YppTq from "@/views/jhzxgl/components/YppTq.vue"; import YppTq from "@/views/jhzxgl/components/YppTq.vue";
import {getBfwz} from "@/api/jhzxgl/ypp"; import {getBfwz} from "@/api/jhzxgl/ypp";
import Yppfk0 from "@/views/jhzxgl/components/YppfkComponent.vue"; import Yppfk0 from "@/views/jhzxgl/components/Yppfk0.vue";
export default { export default {
name: "Cgjhdh", name: "Cgjhdh",

@ -8,7 +8,7 @@
<vxe-pulldown ref="xDown4" transfer > <vxe-pulldown ref="xDown4" transfer >
<template #default> <template #default>
<vxe-input <vxe-input
v-model="request.wjwz" v-model="request.dcCh"
placeholder="船号" placeholder="船号"
style="height: 28px; style="height: 28px;
line-height: 28px; width: 150px;" line-height: 28px; width: 150px;"
@ -38,7 +38,7 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="区域:"> <el-form-item label="区域:">
<el-select v-model="request.dwh" placeholder="区域" clearable> <el-select v-model="request.qy" placeholder="区域" clearable>
<el-option <el-option
v-for="item in qyList" v-for="item in qyList"
:key="item.value" :key="item.value"
@ -89,7 +89,7 @@
:auto-resize="true" :auto-resize="true"
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:edit-config="{trigger: 'click', mode: 'row', showStatus: true,}" :edit-config="{ trigger: 'click', mode: 'row', showStatus: true }"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }" :scroll-y="{ enabled: true }"
highlight-hover-row highlight-hover-row
@ -99,7 +99,7 @@
</el-main> </el-main>
</el-container> </el-container>
</el-container> </el-container>
<YppTq ref="yppTqRef" /> <YppTq ref="yppTqRef" @add="add" />
</el-container> </el-container>
</template> </template>
@ -164,6 +164,10 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'dcYs', title: '页数', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcPb', title: '拼板', width: 120,align: "center", { field: 'dcPb', title: '拼板', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
@ -176,6 +180,10 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: 'dcTpmc', title: '托盘名称', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'jldw1', title: '单价重量计量单位', width: 120,align: "center", { field: 'jldw1', title: '单价重量计量单位', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
@ -195,12 +203,12 @@ export default {
{ field: 'qy', title: '区域', width: 120,align: "center", { field: 'qy', title: '区域', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
editRender:{type:'$select',options:[],props:{clearable:true},events:{change:this.bfwzChanged}} editRender:{name:'$select',options:[],props:{clearable:true},events:{change:this.bfwzChanged}}
}, },
{ field: 'dwh', title: '垛位号', width: 120,align: "center", { field: 'dwh', title: '垛位号', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
editRender:{type:'$select',options:[],props:{clearable:true},events:{change:this.bfwzChanged}} editRender:{name:'$select',options:[],props:{clearable:true},events:{change:this.bfwzChanged}}
}, },
{ field: 'wpjb', title: '物品级别', width: 120,align: "center", { field: 'wpjb', title: '物品级别', width: 120,align: "center",
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
@ -246,10 +254,19 @@ export default {
methods: { methods: {
save(){ save(){
const {insertRecords,updateRecords}=this.$refs.tableRef.getRecordset() const {insertRecords,updateRecords}=this.$refs.tableRef.getRecordset()
const list={...insertRecords,...updateRecords} const list=[...insertRecords,...updateRecords]
if (list.length>0){
for (const item of list) {
if (!item.dwh){
this.$message.error('请选择摆放位置');
return;
}
}
saveDmppxxb(list).then(res=>{ saveDmppxxb(list).then(res=>{
this.$message.success('保存成功') this.$message.success('保存成功')
this.$refs.tableRef.reloadData(list)
}) })
}
}, },
bfwzChanged({row}){ bfwzChanged({row}){
checkBfwz([row]).then(res=>{ checkBfwz([row]).then(res=>{
@ -259,7 +276,7 @@ export default {
}) })
}, },
add(list){ add(list){
this.list=list this.$refs.tableRef.insertAt(list)
}, },
initList(){ initList(){
if (this.request.dcCh === '') { if (this.request.dcCh === '') {
@ -275,37 +292,54 @@ export default {
}, },
initBfwz(){ initBfwz(){
getBfwz().then(res=>{ getBfwz().then(res=>{
this.bfwzList=res.data this.bfwzList=this.groupBy(res.data,(item)=>{
return item.qy
})
console.log(this.bfwzList)
const _qyList=[] const _qyList=[]
const _dwhList=[] const _dwhList=[]
const table=this.$refs.tableRef const table=this.$refs.tableRef
const qyColumn=table.getColumnByField('qy') const qyColumn=table.getColumnByField('qy')
const dwColumn=table.getColumnByField('dwh') const dwColumn=table.getColumnByField('dwh')
this.bfwzList.forEach(item=>{ Object.keys(this.bfwzList).forEach(key=>{
_qyList.push({label:item.qy,value:item.qy}) const list=this.bfwzList[key];
const _key=key.replaceAll('"','');
_qyList.push({label:_key,value:_key})
list.forEach(item=>{
_dwhList.push({label:item.dwh,value:item.dwh,_parent:item.qy}) _dwhList.push({label:item.dwh,value:item.dwh,_parent:item.qy})
}) })
})
qyColumn.editRender.options=_qyList qyColumn.editRender.options=_qyList
dwColumn.editRender.options=_dwhList dwColumn.editRender.options=_dwhList
this.qyList=_qyList; this.qyList=_qyList;
this.dwList=_dwhList this.dwList=_dwhList
}) })
}, },
groupBy(obj,fn){
const groups={};
obj.forEach(o=>{
const group = JSON.stringify(fn(o));
groups[group] = groups[group] || [];
groups[group].push(o);
})
return groups;
},
initProject(){ initProject(){
getCzplBase({}).then(res=>{ getCzplBase({}).then(res=>{
this.projectData=res.data.cbbm this.projectData=res.data.cbbm
}) })
}, },
cellClickEvent({row}){ cellClickEvent({row}){
this.request.wjwz = row.cbbm this.request.dcCh = row.cbbm
this.$refs.xDown4.hidePanel() this.$refs.xDown4.hidePanel()
}, },
focusEvent4(){ focusEvent4(){
this.$refs.xDown4.showPanel() this.$refs.xDown4.showPanel()
}, },
keyupEvent4(){ keyupEvent4(){
if (this.request.wjwz) { if (this.request.dcCh) {
this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.request.wjwz.toUpperCase()) > -1) this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.request.dcCh.toUpperCase()) > -1)
} else { } else {
this.projectData = this.projectData1.slice(0) this.projectData = this.projectData1.slice(0)
} }

Loading…
Cancel
Save