1.作业计划增加工序查看开关,管理生产作业报工时,下道序是否需要上道序完工后才可查看

2.调整各工序查看逻辑,默认下道序需要上道序报工后才能看到
master
董哲奇 8 months ago
parent 9f3560d35d
commit 7bca9babfd

@ -71,3 +71,11 @@ export const getYcldw=function(data={}){
params:data
})
}
export const bgControl=function(data){
return request({
url: '/zyjh/bgControl',
method: 'post',
params: data
})
}

@ -9,7 +9,19 @@
<el-date-picker v-model="queryParam.yf" value-format="yyyy/MM/dd" type="month" />
</el-form-item>
</el-col>
<el-col :span="20">
<el-col :span="4">
<el-form-item>
<el-switch
v-model="bgControl"
active-text="报工完成查看下道序"
inactive-text="随时查看"
active-value="1"
inactive-value="0"
@change="bgControlChange"
/>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item style="float: right" >
<el-button type="success" @click="initList"></el-button>
<el-button type="success" @click="tjydjh"></el-button>
@ -77,6 +89,7 @@ import { mapGetters } from 'vuex'
import XEUtils from 'xe-utils'
import { getToken } from '@/utils/auth'
import ScrollPane from "@/layout/components/TagsView/ScrollPane.vue";
import {bgControl} from "@/api/zyjh";
export default {
name:'YdjhzxGL',
@ -95,6 +108,7 @@ export default {
hxjhrq:null,
qgjhrq:null,
},
bgControl:'1',
queryParam: {
dcch:'',
yf:'',
@ -720,6 +734,9 @@ export default {
this.initBase()
},
methods: {
bgControlChange(val){
bgControl({gx:val})
},
plsr(){
const data=this.$refs.xGrid.getCheckboxRecords()
if (data.length===0){
@ -814,6 +831,9 @@ export default {
},
//
initBase(){
bgControl({gx:null}).then(res=>{
this.bgControl=res.data||'1'
})
getCzxx({}).then(res=>{
this.dictData = res.data
})

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd,getPgd2, zx} from "@/api/zyjh";
import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default {
name:'HxianPgd',
@ -70,10 +70,25 @@ export default {
},
methods:{
initData() {
getPgd2({field:'hxry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data
bgControl({}).then(res=>{
const gx=res.data||'1'
if (gx==='1'){
const data={
zt:'42',
}
getPgd(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
if (gx==='0'){
getPgd2({field:'hxry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
})
},
setWorkers(workers){
this.setExt('workers',workers)

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default {
name:'PwanPgd',
@ -74,10 +74,25 @@ export default {
},
methods:{
initData(){
getPgd2({field:'pwry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
bgControl({}).then(res=>{
const gx=res.data||'1'
if (gx==='1'){
const data={
zt:'21',
}
getPgd(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
if (gx==='0'){
getPgd2({field:'pwry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
})
}
})
},
setWorkers(workers){
this.setExt('workers',workers)

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd,getPgd2, zx} from "@/api/zyjh";
import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default {
name:'QgePgd',
@ -27,32 +27,6 @@ export default {
setExt:null,
}
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
const tmpArr=[{
id:item.id,
pwry:worker.userCode
}]
this.paigong0(tmpArr)
break
}
}
}
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
@ -95,9 +69,25 @@ export default {
},
methods:{
initData() {
getPgd2({field: 'qgry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data
bgControl({}).then(res=>{
const gx=res.data||'1'
if (gx==='1'){
const data={
zt:'42',
ztHx:'52'
}
getPgd(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
if (gx==='0'){
const data={field: 'qgry'}
getPgd2(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
})
},
setWorkers(workers){

Loading…
Cancel
Save