1.排产前确认基础信息弹窗增加订货计划表

2.弹窗中的查询结果按照工序CD枚举顺序排序
master
xiaoning 10 months ago
parent 6cfecc8bf9
commit 1717c36e34

@ -11,5 +11,8 @@ export function removeGxcd(data) {return request({url: '/sygdpc/removeGxcd', met
export function getSbcnAll() {return request({url: '/sygdpc/getSbcnAll', method: 'get'})}
export function getGxDict() {return request({url: '/sygdpc/getGxDict', method: 'get'})}
export function saveSbcn(data) {return request({url: '/sygdpc/saveSbcn', method: 'post',data})}
export function removeSbcn(data) {return request({url: '/sygdpc/remove', method: 'post',data})}
export function removeSbcn(data) {return request({url: '/sygdpc/removeSbcn', method: 'post',data})}
export function getDhjhAll() {return request({url: '/sygdpc/getDhjhAll', method: 'get'})}
export function saveDhjh(data) {return request({url: '/sygdpc/saveDhjh', method: 'post',data})}
export function removeDhjh(data) {return request({url: '/sygdpc/removeDhjh', method: 'post',data})}

@ -0,0 +1,174 @@
<template>
<div class="mytable">
<el-button size="small" type="primary" @click="getList" >查询</el-button>
<el-button size="small" type="success" @click="add" >新增</el-button>
<el-button size="small" type="danger" @click="remove" >删除</el-button>
<el-button size="small" type="success" @click="saveGxcd" >保存</el-button>
<vxe-grid
id="dhId"
ref="xGridDh"
border
resizable
keep-source
:align="'center'"
:height="height"
:auto-resize="true"
:columns="dhjhTableColumn"
:data="dhjhList"
:custom-config="{storage: true }"
:edit-config="{
trigger: 'click',
mode: 'row',
showStatus: true,
}"
:scroll-x="{enabled: true}"
:scroll-y="{enabled: true}"
:span-method="rowspanMethod"
highlight-current-row
highlight-hover-row
show-overflow
show-header-overflow
>
<template #month_edit="{ row }">
<vxe-input
v-model="row.month"
type="month"
value-format="yyyy/MM"
placeholder=""
transfer
></vxe-input>
</template>
<template #allArriveData_edit="{ row }">
<vxe-input
v-model="row.allArriveData"
type="date"
value-format="yyyy/MM/dd"
placeholder=""
transfer
></vxe-input>
</template>
</vxe-grid>
</div>
</template>
<script>
import {getDhjhAll, saveDhjh, removeDhjh} from '@/api/jhzx/pc'
export default {
name:'GxCD',
props:{
height:{
type:Number,
default:700,
}
},
data(){
return {
dhjhList:[],
dhjhTableColumn:[
{ type: 'checkbox', width: 50 },
{ field: 'month', title: '月份', width: 150,
editRender: { name: "input" },
slots: { edit: "month_edit" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'index', title: '序号', width: 150,
editRender: { name: "input" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'dcch', title: '船只', width: 150,
editRender: { name: "input" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'pls', title: '批量范围', width: 150,
editRender: { name: "input" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'tonnage', title: '吨位', width: 150,
editRender: { name: "input" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'sumWeight', title: '累计重量', width: 150,
editRender: { name: "input" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'allArriveData', title: '到齐日期', width: 150,
editRender: { name: "input" },
slots: { edit: "allArriveData_edit" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'remarks', title: '备注', width: 150,
editRender: { name: "input" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
],
}
},
created() {
this.getList()
},
methods:{
getList(){
getDhjhAll().then((res) => {
this.dhjhList = res.data
})
},
add(){
this.$refs.xGridDh.insertAt({},-1)
},
remove(){
this.$refs.xGridDh.removeCheckboxRow()
},
async saveGxcd(){
const {insertRecords, removeRecords, updateRecords} = this.$refs.xGridDh.getRecordset()
if (insertRecords.length !== 0 ) {
await saveDhjh(insertRecords).then(res => {
this.getList()
})
}
if (updateRecords.length !== 0) {
await saveDhjh(updateRecords).then(res => {
this.getList()
})
}
if (removeRecords.length !== 0) {
await removeDhjh(removeRecords).then(res => {
this.getList()
})
}
},
//
rowspanMethod({row, _rowIndex, column, visibleData}) {
//vxe-grid :scroll-y="{enabled: false}"
//
let fields = ['month'];//
const cellValue = row[column.property];//
if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1];
let nextRow = visibleData[_rowIndex + 1];
if (prevRow && prevRow[column.property] === cellValue) {
//
return {rowspan: 0, colspan: 0};
} else {
//
let countRowspan = 1;
while (nextRow && nextRow[column.property] === cellValue) {
nextRow = visibleData[++countRowspan + _rowIndex];
}
if (countRowspan > 1) {
return {rowspan: countRowspan, colspan: 1};
}
}
}
},
}
}
</script>

@ -63,7 +63,6 @@ export default {
}
},
created() {
this.getList()
getGxDict().then((res)=>{
res.data.forEach(item=>{
// this.gxList.push({label:item.name,value:item.code})
@ -73,22 +72,22 @@ export default {
const gx = xGridGx.getColumnByField('gx')
gx.editRender.options = this.gxList
})
this.getList()
},
methods:{
getList(){
getCdAll().then((res) => {
this.gxCDList = res.data
this.gxCDList=[]
this.gxList.forEach(gx=>{
res.data.forEach(item=>{
if (gx.value===item.gx){
this.gxCDList.push(item)
}
})
})
})
},
formatterGx({cellValue}){
// for (let i = 0; i < this.gxList.length; i++) {
// if (this.gxList[i].value===cellValue){
// return this.gxList[i].label
// }
// }
return cellValue
},
add(){
this.$refs.xGridGx.insertAt({},-1)
},

@ -99,7 +99,6 @@ export default {
}
},
created() {
this.getList()
getGxDict().then((res)=>{
res.data.forEach(item=>{
// this.gxList.push({label:item.name,value:item.code})
@ -109,11 +108,19 @@ export default {
const gx = xGridSbcn.getColumnByField('_工序')
gx.editRender.options = this.gxList
})
this.getList()
},
methods:{
getList(){
getSbcnAll().then((res) => {
this.sbcnList = res.data
this.sbcnList=[]
this.gxList.forEach(gx=>{
res.data.forEach(item=>{
if (gx.value===item._工序){
this.sbcnList.push(item)
}
})
})
})
},
add(){

@ -44,10 +44,17 @@
:data="list9"
:custom-config="{ storage: true }"
:scroll-y="{enabled: true}"
:row-style="rowStyle1"
:tooltip-config="{showAll:true, enterable: true,contentMethod:showErr}"
highlight-hover-row
show-overflow
show-header-overflow
>
<template #tzbh_err="{ row }">
<i class="el-icon-warning" v-show="row.errors.length>0" ></i>
<span > {{ row.tzbh }}</span>
</template>
</vxe-grid>
</div>
</el-tab-pane>
@ -292,27 +299,39 @@
<vxe-modal v-model="dialogVisible2" width="80%" :title="title2">
<template #default>
<el-row class="query_wrapper">
<el-steps :active="active" finish-status="success" align-center>
<el-step title="修改工厂日历" ></el-step>
<el-step title="订货计划"></el-step>
<el-step title="工序间隔周期"></el-step>
<el-step title="设备产能"></el-step>
<el-step title="设备维护/维修情况"></el-step>
<el-step title="人员出勤情况"></el-step>
</el-steps>
<el-row style="float: right;margin-right: 5px;">
<el-button size="small" type="success" v-show="modalShow>1" @click="preModal" plain>上一步</el-button>
<el-button size="small" type="success" v-show="modalShow<5" @click="nextModal" plain>下一步</el-button>
<el-button size="small" type="success" v-show="modalShow==5"@click="paichan" plain>排产</el-button>
<!-- <el-button style="margin-top: 12px;" @click="next"></el-button>-->
<el-button size="small" type="success" v-show="active>0" @click="preModal" plain>上一步</el-button>
<el-button size="small" type="success" v-show="active<5" @click="nextModal" plain>下一步</el-button>
<el-button size="small" type="success" v-show="active==5"@click="paichan" plain>排产</el-button>
</el-row>
</el-row>
<el-row>
<hr/>
<div v-show="modalShow==1">
<div v-show="active==0">
<Gcrl/>
</div>
<div v-show="modalShow==2">
<div v-show="active==1">
<Dhjh/>
</div>
<div v-show="active==2">
<GxCD/>
</div>
<div v-show="modalShow==3">
<div v-show="active==3">
<Sbcnwh/>
</div>
<div v-show="modalShow==4">
<div v-show="active==4">
<Sbwxjh/>
</div>
<div v-show="modalShow==5">
<div v-show="active==5">
<Sbjgry/>
</div>
</el-row>
@ -336,15 +355,17 @@ import {getToken} from '@/utils/auth'
import ScrollPane from "@/layout/components/TagsView/ScrollPane.vue";
import {排产, 生成三月滚动, 获取排产结果,} from "@/api/jhzx/pc";
import Gcrl from '@/components/Gcrl';
import Sbcnwh from '@/views/jhzx/components/sygdpc/Sbcn.vue';
import Sbwxjh from '@/views/sjzx/sbwxjhWH.vue';
import Sbjgry from '@/views/sjzx/sbjgryWH.vue';
import Sbcnwh from '@/views/jhzx/components/sygdpc/Sbcn.vue';
import GxCD from '@/views/jhzx/components/sygdpc/GxCD.vue';
import Dhjh from '@/views/jhzx/components/sygdpc/Dhjh.vue';
export default {
name: 'SymxCX',
components: {ScrollPane,Gcrl,Sbcnwh,Sbwxjh,Sbjgry,GxCD},
components: {ScrollPane,Gcrl,Sbcnwh,Sbwxjh,Sbjgry,GxCD,Dhjh},
data() {
return {
active: 0,
isUser:false,
gcrl:[],
dialogVisible: false,
@ -352,8 +373,7 @@ export default {
dialogVisible2: false,
title: '选择目标船只',
title1: '修改明细信息',
title2: '修改工厂日历(1/5)',
modalShow:1,
title2: '请确认或修改排产依据',
selectMbch: [],
mxList: [],
haveTltBoms: [],
@ -2711,6 +2731,7 @@ export default {
filterRender: { name: 'FilterCombination', },
},
{ field: 'tzbh', title: '套料图号', width: 120,
slots: { default: "tzbh_err" },
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
@ -2763,6 +2784,9 @@ export default {
}
},
methods: {
next() {
if (this.active++ > 2) this.active = 0;
},
rowClassName({row, rowIndex}) {
if (row.dcCh === '合计') {
return {
@ -2772,6 +2796,52 @@ export default {
}
return null
},
//
rowStyle1({row, rowIndex}){
if (row.errors.length > 0) {
return {
backgroundColor: '#FF0000FF',
color: '#fff',
cursor: 'pointer'
}
}
return null
},
showErr({ type, column, row, items, _columnIndex }){
const { field } = column
//
if (type === 'body'){
if (row.errors.length > 0) { var err='';
for (const e of row.errors) {
err=err+e+'\n';
}
return err;
}else {return ''}
// if (field === 'dlzh' || field === 'employeeNumber') {
// if (type === 'body') {
// console.log('type',type)
// console.log('column',column)
// console.log('row',row.zt)
// console.log('items',items)
// console.log('_columnIndex',_columnIndex)
// return column.title ? '' + column.title : ''
// }
// else if (type === 'footer') {
// return items[_columnIndex] ? '\n\n' + items[_columnIndex] : ''
// }
// return row[field] ? '' + row[field] : ''
}else {
return ''
}
// else if (field === 'rate') {
// //
// return ''
// }
// 使
return null
},
//
symxhz() {
@ -2964,8 +3034,9 @@ export default {
getList(this.queryParam).then((res) => {
this.list = res.data.list
})
this.activeName = 'first'
// this.activeName = 'first'
},
formatDate({cellValue}) {
return XEUtils.toDateString(cellValue, 'yyyy/MM/dd')
},
@ -2991,32 +3062,12 @@ export default {
},
confirmModal(){
this.dialogVisible2 = true
},
nextModal(){
this.modalShow=this.modalShow+1
this.changeTitle2()
if (this.active++ > 5) this.active = 0;
},
preModal(){
this.modalShow=this.modalShow-1
this.changeTitle2()
},
changeTitle2(){
if (this.modalShow==1){
this.title2='修改工厂日历(1/5)'
}
if (this.modalShow==2){
this.title2='工序间隔周期(2/5)'
}
if (this.modalShow==3){
this.title2='修改设备产能(3/5)'
}
if (this.modalShow==4){
this.title2='设备维护/维修(4/5)'
}
if (this.modalShow==5){
this.title2='人员出勤情况(5/5)'
}
if (this.active-- < 1) this.active = 0;
},
jgcx(flag=true){
const data={from:this.queryParam.beginTime,to:this.queryParam.endTime}
@ -3064,6 +3115,7 @@ export default {
data.wpcz=bom.wpcz
data.ljsl=bom.ljsl
data._degs=bom.degs
data.errors=bom.errors
list.push(data)
}
}

Loading…
Cancel
Save