1.按月度计划名称查询月度计划导入内容,月度计划按导入excel查看

2.月度计划导入时按照基础数据计算各工序实际数量
3.优化月度计划导入功能
4.看板增加组立流向
5.批量修改作业区
6.调整线表计划,取消已完工船只
master
董哲奇 4 months ago
parent 1211d12309
commit 7b183b7e4e

@ -24,3 +24,8 @@ export function ydjhxf(data) {return request({url: '/dmYdjh/xf', method: 'post',
export function cgjhdhqk(data={}) {return request({url: '/dmSygdMx/cgjhdhqk', method: 'post',data})} export function cgjhdhqk(data={}) {return request({url: '/dmSygdMx/cgjhdhqk', method: 'post',data})}
export function saveData(data={}) {return request({url: '/dmYdjh/save', method: 'post',data})} export function saveData(data={}) {return request({url: '/dmYdjh/save', method: 'post',data})}
//获取导入的月度计划文件名称
export function getFilename() {return request({url: '/dmSygdMx/getFileNameList', method: 'get',})}
export function listByFileName(data) {return request({url: '/dmSygdMx/listByFileName', method: 'get', params:data})}

@ -4,13 +4,21 @@
<el-form :inline="true" label-width="65px" label-position="left"> <el-form :inline="true" label-width="65px" label-position="left">
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-form-item> <!-- <el-form-item>-->
<span style="font-size: 13px;color: #606266; margin-left: 4px;margin-right: 4px">小组需求时间范围:</span> <!-- <span style="font-size: 13px;color: #606266; margin-left: 4px;margin-right: 4px">小组需求时间范围:</span>-->
<el-date-picker v-model="queryParam.beginTime" value-format="yyyy/MM/dd" type="date" style="width: 33%;" /> <!-- <el-date-picker v-model="queryParam.beginTime" value-format="yyyy/MM/dd" type="date" style="width: 33%;" />-->
<span style="font-size: 13px;color: #606266; margin-left: 4px;margin-right: 4px"></span> <!-- <span style="font-size: 13px;color: #606266; margin-left: 4px;margin-right: 4px"></span>-->
<!-- <el-input v-model="queryParam.endTime" ></el-input>--> <!-- &lt;!&ndash; <el-input v-model="queryParam.endTime" ></el-input>&ndash;&gt;-->
<el-date-picker v-model="queryParam.endTime" value-format="yyyy/MM/dd" type="date" style="width: 33%" /> <!-- <el-date-picker v-model="queryParam.endTime" value-format="yyyy/MM/dd" type="date" style="width: 33%" />-->
</el-form-item> <!-- </el-form-item>-->
<el-select v-model="queryParam.fileName" filterable placeholder="计划名称" @change="fileNameChange" >
<el-option
v-for="(item,index) in fileNameList"
:key="index"
:label="item"
:value="item">
</el-option>
</el-select>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item style="float: right"> <el-form-item style="float: right">
@ -91,36 +99,14 @@
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{enabled: true}" :scroll-y="{enabled: true}"
:scroll-x="{enabled: true}"
highlight-hover-row highlight-hover-row
show-overflow show-overflow
show-header-overflow show-header-overflow
> >
<!-- :span-method="rowspanMethod1"-->
</vxe-grid> </vxe-grid>
<!-- <vxe-grid-->
<!-- id="id"-->
<!-- ref="xGrid"-->
<!-- border-->
<!-- resizable-->
<!-- keep-source-->
<!-- :align="'center'"-->
<!-- :height="height"-->
<!-- :auto-resize="true"-->
<!-- :columns="tableColumn"-->
<!-- :data="list"-->
<!-- :custom-config="{ storage: true }"-->
<!-- :edit-config="{-->
<!-- trigger: 'click',-->
<!-- mode: 'row',-->
<!-- showStatus: true,-->
<!-- }"-->
<!-- @checkbox-all="selectAllEvent"-->
<!-- @checkbox-change="selectChangeEvent"-->
<!-- highlight-current-row-->
<!-- highlight-hover-row-->
<!-- show-overflow-->
<!-- :scroll-y="{enabled: true}"-->
<!-- >-->
<!-- </vxe-grid>-->
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="线表信息" name="second"> <el-tab-pane label="线表信息" name="second">
@ -172,7 +158,6 @@
show-overflow show-overflow
:scroll-y="{enabled: true}" :scroll-y="{enabled: true}"
> >
</vxe-grid> </vxe-grid>
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -215,7 +200,6 @@
highlight-current-row highlight-current-row
:data="list3" :data="list3"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{enabled: true}" :scroll-y="{enabled: true}"
highlight-hover-row highlight-hover-row
show-overflow show-overflow
@ -361,7 +345,7 @@ import {
sygdPC, sygdPC,
saveByDcch, saveByDcch,
tqSygd, tqSygd,
symxhz, symxhz, getFilename, listByFileName,
} from '@/api/jhzx/sygd' } from '@/api/jhzx/sygd'
import {mapGetters} from 'vuex' import {mapGetters} from 'vuex'
import XEUtils from 'xe-utils' import XEUtils from 'xe-utils'
@ -395,9 +379,11 @@ export default {
haveTltBoms: [], haveTltBoms: [],
activeName: 'first', activeName: 'first',
queryParam: { queryParam: {
fileName:'',
beginTime: '', beginTime: '',
endTime: '' endTime: ''
}, },
fileNameList:[],
list: [], list: [],
list1: [], list1: [],
list2: [], list2: [],
@ -1216,7 +1202,7 @@ export default {
}, },
],*/ ],*/
tableColumn:[ tableColumn:[
{ type: 'seq', width: 60, title: '序号',fixed: "left"}, { field: '_index', width: 60, title: '序号',fixed: "left"},
{ field: 'dcCh', title: '船号',width: 100, { field: 'dcCh', title: '船号',width: 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', }},
@ -2832,6 +2818,9 @@ export default {
} }
}, },
methods: { methods: {
fileNameChange(){
},
next() { next() {
if (this.active++ > 2) this.active = 0; if (this.active++ > 2) this.active = 0;
}, },
@ -2846,7 +2835,6 @@ export default {
}, },
// //
rowStyle1({row, rowIndex}){ rowStyle1({row, rowIndex}){
console.log(row.extData!=='1')
if (row.extData!=='1'){ if (row.extData!=='1'){
return { return {
backgroundColor: '#FF0000FF', backgroundColor: '#FF0000FF',
@ -2877,11 +2865,6 @@ export default {
// if (field === 'dlzh' || field === 'employeeNumber') { // if (field === 'dlzh' || field === 'employeeNumber') {
// if (type === 'body') { // 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 : '' // return column.title ? '' + column.title : ''
// } // }
// else if (type === 'footer') { // else if (type === 'footer') {
@ -2909,7 +2892,6 @@ export default {
} }
symxhz(this.queryParam).then((res) => { symxhz(this.queryParam).then((res) => {
if (res.data) { if (res.data) {
console.log(res.data)
this.list1 = res.data.xbList this.list1 = res.data.xbList
this.list2 = res.data.plList this.list2 = res.data.plList
this.list3 = res.data.kwList this.list3 = res.data.kwList
@ -3076,6 +3058,9 @@ export default {
}, },
// //
initBase() { initBase() {
getFilename().then(res=>{
this.fileNameList=res.data
})
getCzxx({}).then(res => { getCzxx({}).then(res => {
this.dictData = res.data this.dictData = res.data
}) })
@ -3083,15 +3068,23 @@ export default {
}, },
//1 //1
initList() { initList() {
if (this.queryParam.beginTime === '' || this.queryParam.endTime === '') { // if (this.queryParam.beginTime === '' || this.queryParam.endTime === '') {
this.$message.warning('选择时间范围') // this.$message.warning('')
return // return
} // }
const data={ // const data={
begin:this.queryParam.beginTime, // begin:this.queryParam.beginTime,
end:this.queryParam.endTime // end:this.queryParam.endTime
// }
listByFileName({fileName:this.queryParam.fileName}).then((res) => {
const data=res.data
let i=1
data.forEach((item,index)=>{
if(index%2!==1){
item._index=i
i++
} }
list(data).then((res) => { })
this.list = res.data this.list = res.data
}) })
this.activeName = 'first' this.activeName = 'first'
@ -3207,7 +3200,6 @@ export default {
// this.uploadData.isupload = this.isupload // this.uploadData.isupload = this.isupload
}, },
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
// //
const isType = file.type === 'application/vnd.ms-excel' const isType = file.type === 'application/vnd.ms-excel'
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
@ -3223,10 +3215,12 @@ export default {
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
endLoading() endLoading()
if (res.success) { if (res.success) {
this.$message({ message: '导入成功', type: 'success' }) this.$message({ message: '导入成功', type: 'success' })
this.queryParam.fileName=res.data
if (!this.fileNameList.includes(res.data)){
this.fileNameList.push(res.data)
}
this.initList(); this.initList();
} else { } else {
Message({ Message({
message: res.message || 'Error', message: res.message || 'Error',

@ -46,6 +46,7 @@
type="year" type="year"
value-format="yyyy" value-format="yyyy"
placeholder="" placeholder=""
@change="nrStartChange"
> >
</el-date-picker> </el-date-picker>
<div class="distance">~</div> <div class="distance">~</div>
@ -61,7 +62,7 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="版本号:" label-width="60px"> <el-form-item label="版本号:" label-width="60px">
<el-select v-model="version"> <el-select v-model="version" filterable clearable>
<el-option <el-option
v-for="item in this.versions" v-for="item in this.versions"
:key="item.version" :key="item.version"
@ -151,7 +152,7 @@ export default {
name: "xbjhWH", name: "xbjhWH",
data() { data() {
return { return {
version:null, version:'',
versions:[], versions:[],
request: { request: {
dcCh: "", dcCh: "",
@ -200,14 +201,21 @@ export default {
this.getCzxx(); this.getCzxx();
this.getHeight(); this.getHeight();
this.getNowTime(); this.getNowTime();
this.initList(); // this.getV()
}, },
methods: { methods: {
nrStartChange(){
if (this.nrStart!==this.nrEnd){
this.version=''
}
this.getV()
},
getV(){ getV(){
this.versions=''
getVersion({nf:this.nrStart}).then(res=>{ getVersion({nf:this.nrStart}).then(res=>{
this.versions=res.data this.versions=res.data
console.log(this.versions)
this.version=res.data[res.data.length-1].version this.version=res.data[res.data.length-1].version
this.initList(); //
}) })
}, },
getNowTime(){ getNowTime(){
@ -407,7 +415,6 @@ export default {
} else { } else {
this.request.nf = ""; this.request.nf = "";
} }
// if()
params.version=this.version; params.version=this.version;
getList(params).then((res) => { getList(params).then((res) => {
if (res.success) { if (res.success) {
@ -415,12 +422,18 @@ export default {
this.getTableList(res.data); this.getTableList(res.data);
} }
}); });
if (this.version!==this.versions[this.versions.length-1]){ // if (this.version){
getByVersion({nf:this.nrStart,version:this.version}).then((res) => { // getByVersion({nf:this.nrStart,version:this.version}).then((res) => {
console.log(res) // this.getTableList(res.data);
}) // })
} // }else{
this.getV() // getList(params).then((res) => {
// if (res.success) {
// this.checkedList = {};
// this.getTableList(res.data);
// }
// });
// }
}, },
// //
total(list, field) { total(list, field) {

@ -30,7 +30,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="16"> <el-col :span="20">
<el-form-item label="上料计划日期:"> <el-form-item label="上料计划日期:">
<el-date-picker v-model="plParam.sljhrq" value-format="yyyy/MM/dd" format="yyyy/MM/dd" type="date"/> <el-date-picker v-model="plParam.sljhrq" value-format="yyyy/MM/dd" format="yyyy/MM/dd" type="date"/>
</el-form-item> </el-form-item>
@ -43,6 +43,16 @@
<el-form-item label="切割计划日期:"> <el-form-item label="切割计划日期:">
<el-date-picker v-model="plParam.qgjhrq" value-format="yyyy/MM/dd" format="yyyy/MM/dd" type="date"/> <el-date-picker v-model="plParam.qgjhrq" value-format="yyyy/MM/dd" format="yyyy/MM/dd" type="date"/>
</el-form-item> </el-form-item>
<el-form-item>
<el-select v-model="plParam.zyq" filterable placeholder="作业区">
<el-option
v-for="(item,index) in zyqList"
:key="index"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="success" @click="plsr"></el-button> <el-button type="success" @click="plsr"></el-button>
</el-form-item> </el-form-item>
@ -108,12 +118,13 @@ export default {
pwjhrq:null, pwjhrq:null,
hxjhrq:null, hxjhrq:null,
qgjhrq:null, qgjhrq:null,
zyq:'',
}, },
bgControl:'1', bgControl:'1',
queryParam: { queryParam: {
dcch:'', dcch:'',
yf:'', yf:'',
zt: '0' zt: '11'
}, },
zyqList:[ zyqList:[
{label:'二区',value:'FP2Q'}, {label:'二区',value:'FP2Q'},
@ -778,6 +789,7 @@ export default {
item.pwjhrq=this.plParam.pwjhrq||item.pwjhrq item.pwjhrq=this.plParam.pwjhrq||item.pwjhrq
item.hxjhrq=this.plParam.hxjhrq||item.hxjhrq item.hxjhrq=this.plParam.hxjhrq||item.hxjhrq
item.qgjhrq=this.plParam.qgjhrq||item.qgjhrq item.qgjhrq=this.plParam.qgjhrq||item.qgjhrq
item.zyq=this.plParam.zyq||item.zyq
} }
}, },
formatterZt({cellValue}){ formatterZt({cellValue}){

@ -59,6 +59,15 @@ export default function () {
return '' return ''
} }
const formatKw=function ({cellValue}){
for (const item of this.ycldw) {
if (cellValue===item.bm){
return item.bmsm
}
}
return cellValue;
}
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 }, { type: 'seq',title:'序号', width: 50 },
@ -77,7 +86,11 @@ export default function () {
{field: 'wpgg', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70}, {field: 'wpxh', title: '规格', width: 70},
{field: 'sllph', title: '炉批号', width: 100}, {field: 'sllph', title: '炉批号', width: 100},
{field: '_lx', title: '流向', width: 80,formatter:formatLx, {field: 'zl', title: '组立', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{field: 'kw', title: '流向', width: 80,formatter:formatKw,
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', },
}, },

@ -42,7 +42,6 @@ export default {
}, },
sockets:{ sockets:{
pwComplete(data){ pwComplete(data){
console.log(data)
const selected=this.$refs.pwfkRef.getCheckboxRecords(); const selected=this.$refs.pwfkRef.getCheckboxRecords();
for (const item of selected) { for (const item of selected) {
if (item.dcCh===data.czbh&&item.dcPl===data.pl&&item.tzbh===data.tlth){ if (item.dcCh===data.czbh&&item.dcPl===data.pl&&item.tzbh===data.tlth){
@ -51,6 +50,15 @@ export default {
} }
} }
}, },
pwComplete1(data){
const selected=this.$refs.pwfkRef.getCheckboxRecords();
for (const item of selected) {
if (item.dcCh===data.dcCh&&item.dcPl===data.dcPl&&item.tzbh===data.tzbh){
this.$refs.pwfkRef.remove(item)
break;
}
}
},
zyjhzx(data){ zyjhzx(data){
console.log(data) console.log(data)
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){ if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
@ -89,7 +97,7 @@ export default {
}, },
methods:{ methods:{
checkboxAll({checked}) { checkboxAll({checked}) {
this.$message.warning('不允许一次报工多条') this.baogong1()
}, },
checkboxChange({checked, row}) { checkboxChange({checked, row}) {
const tmpArr=[{ const tmpArr=[{
@ -108,7 +116,7 @@ export default {
let ycldwInfo=null let ycldwInfo=null
for (const dw of this.dw) { for (const dw of this.dw) {
for (const info of dw.list) { for (const info of dw.list) {
if (data.dcCh===info.czbh&&data.dcPl===info.pl&&data.dcFd===info.fd&&data.tzbh===info.tlth){ if (data.dcCh===info.czbh&&data.dcPl===info.pl&&data.tzbh===info.tlth){
ycldwInfo=info ycldwInfo=info
break break
} }
@ -131,6 +139,34 @@ export default {
} }
}) })
}, },
baogong1(){
const data=this.$refs.pwfkRef.getCheckboxRecords();
const tmpArr=[]
for (const item of data) {
const data={
id:item.id,
pwfkry: this.$props.worker().userCode,
zt:item.zt,
dcCh:item.dcCh,
dcPl:item.dcPl,
dcFd:item.dcFd,
tzbh:item.tzbh,
}
tmpArr.push(data)
}
VXETable.modal.confirm('您确定报工吗?').then(res => {
res === 'confirm' && zx({
field:'pwfkrq',
zxZtName:'PWFK',
list:tmpArr,
}).then(res=>{
if (res.success){
window.localStorage.removeItem('zyjh')
//this.initData(this.$props.worker().userCode,'31')
}
})
})
},
baogong0(tmpArr,data){ baogong0(tmpArr,data){
let ycldwInfo=null let ycldwInfo=null
for (const dw of this.dw) { for (const dw of this.dw) {

@ -59,6 +59,15 @@ export default function () {
return '' return ''
} }
const formatKw=function ({cellValue}){
for (const item of this.ycldw) {
if (cellValue===item.bm){
return item.bmsm
}
}
return cellValue;
}
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 }, { type: 'seq',title:'序号', width: 50 },
@ -77,7 +86,11 @@ export default function () {
{field: 'wpgg', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70}, {field: 'wpxh', title: '规格', width: 70},
{field: 'sllph', title: '炉批号', width: 100}, {field: 'sllph', title: '炉批号', width: 100},
{field: '_lx', title: '流向', width: 80,formatter:formatLx, {field: 'zl', title: '组立', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{field: 'kw', title: '流向', width: 80,formatter:formatKw,
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', },
}, },

Loading…
Cancel
Save