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 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-row>
<el-col :span="15">
<el-form-item>
<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%;" />
<span style="font-size: 13px;color: #606266; margin-left: 4px;margin-right: 4px"></span>
<!-- <el-input v-model="queryParam.endTime" ></el-input>-->
<el-date-picker v-model="queryParam.endTime" value-format="yyyy/MM/dd" type="date" style="width: 33%" />
</el-form-item>
<!-- <el-form-item>-->
<!-- <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%;" />-->
<!-- <span style="font-size: 13px;color: #606266; margin-left: 4px;margin-right: 4px"></span>-->
<!-- &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-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 :span="9">
<el-form-item style="float: right">
@ -91,36 +99,14 @@
:data="list"
:custom-config="{ storage: true }"
:scroll-y="{enabled: true}"
:scroll-x="{enabled: true}"
highlight-hover-row
show-overflow
show-header-overflow
>
<!-- :span-method="rowspanMethod1"-->
</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>
</el-tab-pane>
<el-tab-pane label="线表信息" name="second">
@ -172,7 +158,6 @@
show-overflow
:scroll-y="{enabled: true}"
>
</vxe-grid>
</div>
</el-tab-pane>
@ -215,7 +200,6 @@
highlight-current-row
:data="list3"
:custom-config="{ storage: true }"
:scroll-y="{enabled: true}"
highlight-hover-row
show-overflow
@ -361,7 +345,7 @@ import {
sygdPC,
saveByDcch,
tqSygd,
symxhz,
symxhz, getFilename, listByFileName,
} from '@/api/jhzx/sygd'
import {mapGetters} from 'vuex'
import XEUtils from 'xe-utils'
@ -395,9 +379,11 @@ export default {
haveTltBoms: [],
activeName: 'first',
queryParam: {
fileName:'',
beginTime: '',
endTime: ''
},
fileNameList:[],
list: [],
list1: [],
list2: [],
@ -1216,7 +1202,7 @@ export default {
},
],*/
tableColumn:[
{ type: 'seq', width: 60, title: '序号',fixed: "left"},
{ field: '_index', width: 60, title: '序号',fixed: "left"},
{ field: 'dcCh', title: '船号',width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }},
@ -2832,6 +2818,9 @@ export default {
}
},
methods: {
fileNameChange(){
},
next() {
if (this.active++ > 2) this.active = 0;
},
@ -2846,7 +2835,6 @@ export default {
},
//
rowStyle1({row, rowIndex}){
console.log(row.extData!=='1')
if (row.extData!=='1'){
return {
backgroundColor: '#FF0000FF',
@ -2877,11 +2865,6 @@ export default {
// 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') {
@ -2909,7 +2892,6 @@ export default {
}
symxhz(this.queryParam).then((res) => {
if (res.data) {
console.log(res.data)
this.list1 = res.data.xbList
this.list2 = res.data.plList
this.list3 = res.data.kwList
@ -3076,6 +3058,9 @@ export default {
},
//
initBase() {
getFilename().then(res=>{
this.fileNameList=res.data
})
getCzxx({}).then(res => {
this.dictData = res.data
})
@ -3083,15 +3068,23 @@ export default {
},
//1
initList() {
if (this.queryParam.beginTime === '' || this.queryParam.endTime === '') {
this.$message.warning('选择时间范围')
return
}
const data={
begin:this.queryParam.beginTime,
end:this.queryParam.endTime
}
list(data).then((res) => {
// if (this.queryParam.beginTime === '' || this.queryParam.endTime === '') {
// this.$message.warning('')
// return
// }
// const data={
// begin:this.queryParam.beginTime,
// 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++
}
})
this.list = res.data
})
this.activeName = 'first'
@ -3207,7 +3200,6 @@ export default {
// this.uploadData.isupload = this.isupload
},
beforeAvatarUpload(file) {
//
const isType = file.type === 'application/vnd.ms-excel'
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
@ -3223,10 +3215,12 @@ export default {
handleAvatarSuccess(res, file) {
endLoading()
if (res.success) {
this.$message({ message: '导入成功', type: 'success' })
this.queryParam.fileName=res.data
if (!this.fileNameList.includes(res.data)){
this.fileNameList.push(res.data)
}
this.initList();
} else {
Message({
message: res.message || 'Error',

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

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

@ -59,6 +59,15 @@ export default function () {
return ''
}
const formatKw=function ({cellValue}){
for (const item of this.ycldw) {
if (cellValue===item.bm){
return item.bmsm
}
}
return cellValue;
}
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 },
@ -77,7 +86,11 @@ export default function () {
{field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70},
{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: '' } }],
filterRender: { name: 'FilterCombination', },
},

@ -42,7 +42,6 @@ export default {
},
sockets:{
pwComplete(data){
console.log(data)
const selected=this.$refs.pwfkRef.getCheckboxRecords();
for (const item of selected) {
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){
console.log(data)
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
@ -89,7 +97,7 @@ export default {
},
methods:{
checkboxAll({checked}) {
this.$message.warning('不允许一次报工多条')
this.baogong1()
},
checkboxChange({checked, row}) {
const tmpArr=[{
@ -108,7 +116,7 @@ export default {
let ycldwInfo=null
for (const dw of this.dw) {
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
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){
let ycldwInfo=null
for (const dw of this.dw) {

@ -59,6 +59,15 @@ export default function () {
return ''
}
const formatKw=function ({cellValue}){
for (const item of this.ycldw) {
if (cellValue===item.bm){
return item.bmsm
}
}
return cellValue;
}
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 },
@ -77,7 +86,11 @@ export default function () {
{field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70},
{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: '' } }],
filterRender: { name: 'FilterCombination', },
},

Loading…
Cancel
Save