操作屏接口
This commit is contained in:
@@ -4,64 +4,82 @@
|
||||
<el-col :span="5" class="height-100 ver-justify">
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT1' in pointState)}" @click="showPop(3, 'OUT1')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT1' in pointState)}" @click="showPop(4, 'OUT1')">Scaner</div>
|
||||
</el-col>
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2"><p>OUT1</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT1' in pointState)}">
|
||||
<p class="p1">OUT1</p>
|
||||
<p v-show="'OUT1' in pointState" class="p2">{{ pointState.OUT1 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT3' in pointState)}" @click="showPop(3, 'OUT3')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT3' in pointState)}" @click="showPop(4, 'OUT3')">Scaner</div>
|
||||
</el-col>
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2" @click="showPop(3)"><p>OUT3</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT3' in pointState)}">
|
||||
<p class="p1">OUT3</p>
|
||||
<p v-show="'OUT3' in pointState" class="p2">{{ pointState.OUT3 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="9" class="height-100 ver-justify mg2">
|
||||
<div class="m-content ver-center" @click="showPop(1)">
|
||||
<p>{{ pkObj.label }}</p>
|
||||
<p>{{ JSON.stringify(pkObj) !== '{}' ? pkObj.label : 'MACHINE' }}</p>
|
||||
</div>
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap-2">
|
||||
<el-col :span="7" class="height-100">
|
||||
<div class="s-btn-2" @click="showPop(2)"><p>N1</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('N1' in pointState)}" @click="showPop(2, 'N1')">
|
||||
<p class="p1">N1</p>
|
||||
<p v-show="'N1' in pointState" class="p2">{{ pointState.N1 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="height-100 ver-center">
|
||||
<div class="s-btn-1"><p>√</p></div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('N1' in pointState)}"><p>√</p></div>
|
||||
</el-col>
|
||||
<el-col :span="7" class="height-100">
|
||||
<div class="s-btn-2"><p>N2</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('N2' in pointState)}" @click="showPop(2, 'N2')">
|
||||
<p class="p1">N2</p>
|
||||
<p v-show="'N2' in pointState" class="p2">{{ pointState.N2 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="4" class="height-100 ver-center">
|
||||
<div class="s-btn-1"><p>√</p></div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('N2' in pointState)}"><p>√</p></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="5" class="height-100 ver-justify">
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2"><p>OUT2</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT2' in pointState)}">
|
||||
<p class="p1">OUT2</p>
|
||||
<p v-show="'OUT2' in pointState" class="p2">{{ pointState.OUT2 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT2' in pointState)}" @click="showPop(3, 'OUT2')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT2' in pointState)}" @click="showPop(4, 'OUT2')">Scaner</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="btns-wrap">
|
||||
<el-col :span="13" class="height-100">
|
||||
<div class="s-btn-2"><p>OUT4</p></div>
|
||||
<div class="s-btn-2" :class="{'s-btn-2_dis': !('OUT4' in pointState)}">
|
||||
<p class="p1">OUT4</p>
|
||||
<p v-show="'OUT4' in pointState" class="p2">{{ pointState.OUT4 }}</p>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="9" class="height-100 ver-justify">
|
||||
<div class="s-btn-1">Container</div>
|
||||
<div class="s-btn-1">Scaner</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT4' in pointState)}" @click="showPop(3, 'OUT4')">Container</div>
|
||||
<div class="s-btn-1" :class="{'s-btn-1_dis': !('OUT4' in pointState)}" @click="showPop(4, 'OUT4')">Scaner</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="pop-wraper" :class="{'popshow': show, 'pophide': !show, 'pop-wraper-1': type === 3}">
|
||||
<div class="pop-wraper" :class="{'popshow': show, 'pophide': !show, 'pop-wraper-1': type === 3 || type === 4}">
|
||||
<div v-show="type === 1" class="pop-h1">选择设备</div>
|
||||
<div v-show="type === 1" class="pop-grid">
|
||||
<el-table
|
||||
@@ -84,7 +102,7 @@
|
||||
</div>
|
||||
<el-row v-show="type === 1" class="pop-btns">
|
||||
<el-col :span="3" :offset="6" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure">确定</div>
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure1">确定</div>
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="6" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false, vechineList = []">取消</div>
|
||||
@@ -102,32 +120,32 @@
|
||||
@current-change="handleCurrentChange2"
|
||||
>
|
||||
<el-table-column
|
||||
prop="order"
|
||||
label="订单编码"
|
||||
prop="order_code"
|
||||
label="订单号"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="work_code"
|
||||
label="工序编码"
|
||||
prop="region_code"
|
||||
label="工序"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_code"
|
||||
label="物料编码"
|
||||
prop="material_id"
|
||||
label="物料号"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_type"
|
||||
label="物料类型"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="material_name"
|
||||
label="物料名称"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="qty"
|
||||
label="额定数量"
|
||||
prop="material_qty"
|
||||
label="物料数量"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="plan_date"
|
||||
label="交货日期"
|
||||
label="交期时间"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="custom"
|
||||
label="客户编码"
|
||||
/>
|
||||
</el-table>
|
||||
</el-col>
|
||||
@@ -140,21 +158,21 @@
|
||||
style="width: 100%"
|
||||
@current-change="handleCurrentChange3"
|
||||
>
|
||||
<el-table-column
|
||||
prop="载具编码"
|
||||
label="载具编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="order"
|
||||
label="订单编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="qty"
|
||||
label="物料数量"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_code"
|
||||
label="所在货位"
|
||||
label="点位编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="region_code"
|
||||
label="工序编码"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_type"
|
||||
label="点位类型"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="point_status_name"
|
||||
label="点位状态"
|
||||
/>
|
||||
</el-table>
|
||||
</el-col>
|
||||
@@ -173,41 +191,59 @@
|
||||
</el-row>
|
||||
<div v-show="type === 3" class="pop-grid">
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">订单编号</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
<el-col :span="5" class="p-label">点位</el-col>
|
||||
<el-col :span="18"><input v-model="emptyObj.device_code" type="text" class="p-value" disabled></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">额定数量</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
<el-col :span="5" class="p-label">托盘类型</el-col>
|
||||
<el-col :span="18"><input v-model="emptyObj.vehicle_type" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">工序</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">合格品</el-col>
|
||||
<el-col :span="18"><input type="number" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<!-- <el-checkbox v-model="checked">备选项</el-checkbox> -->
|
||||
<el-col :span="5" class="p-label">是否报功</el-col>
|
||||
<el-col :span="18"><el-checkbox v-model="checked" /></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">托盘编码</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">地面点位</el-col>
|
||||
<el-col :span="18"><input type="text" class="p-value"></el-col>
|
||||
<el-col :span="5" class="p-label">设备工序</el-col>
|
||||
<el-col :span="18"><input v-model="emptyObj.regin_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row v-show="type === 3" class="pop-btns">
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false">确定</div>
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure3">确定</div>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false">取消</div>
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false, emptyObj = {}">取消</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-show="type === 4" class="pop-grid">
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">订单编号</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.order_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">合格数量</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.material_qty" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">设备工序</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.region_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<!-- <el-checkbox v-model="checked">备选项</el-checkbox> -->
|
||||
<el-col :span="5" class="p-label">是否报功</el-col>
|
||||
<el-col :span="18"><el-checkbox v-model="sendObj.has_report" /></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">载具编码</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.vehicle_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
<el-row class="filter-wraper" type="flex" justify="space-between">
|
||||
<el-col :span="5" class="p-label">地面点位</el-col>
|
||||
<el-col :span="18"><input v-model="sendObj.device_code" type="text" class="p-value"></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row v-show="type === 4" class="pop-btns">
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="toSure4">确定</div>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="5" class="height-100">
|
||||
<div class="s-btn-1 s-btn-3" @click="show = false, sendObj = {}">取消</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -216,7 +252,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { machine, n1list, n1list2 } from '@/views/wms/produceScreen/produceScreen'
|
||||
import crudProduceScreen from './produceScreen'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -224,57 +260,101 @@ export default {
|
||||
show: false,
|
||||
machineData: [],
|
||||
n1List: [],
|
||||
buttonName: '',
|
||||
vechineList: [],
|
||||
currentRow1: null,
|
||||
currentRow2: null,
|
||||
currentRow3: null,
|
||||
pkObj: { label: 'MACHINE' },
|
||||
checked: false
|
||||
pkObj: {},
|
||||
checked: false,
|
||||
pointState: {},
|
||||
emptyObj: {},
|
||||
sendObj: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showPop(type) {
|
||||
showPop(type, name) {
|
||||
this.type = type
|
||||
this.buttonName = name
|
||||
if (type === 1) {
|
||||
this._machine()
|
||||
} else if (type === 2) {
|
||||
this._n1list()
|
||||
} else if (type === 3) {
|
||||
crudProduceScreen.regionList().then(res => {
|
||||
this.machineData = [...res]
|
||||
this.show = true
|
||||
})
|
||||
} else if (type === 2 && name in this.pointState) {
|
||||
crudProduceScreen.regionOrder(this.pointState[name]).then(res => {
|
||||
this.n1List = [...res.content]
|
||||
this.vechineList = []
|
||||
this.show = true
|
||||
})
|
||||
} else if (type === 3 && name in this.pointState) {
|
||||
this.show = true
|
||||
this.emptyObj.device_code = this.pointState[name]
|
||||
this.emptyObj.vehicle_type = ''
|
||||
this.emptyObj.regin_code = ''
|
||||
} else if (type === 4 && name in this.pointState) {
|
||||
this.show = true
|
||||
this.sendObj.device_code = this.pointState[name]
|
||||
this.emptyObj.vehicle_code = ''
|
||||
this.emptyObj.order_code = ''
|
||||
this.emptyObj.material_qty = ''
|
||||
this.emptyObj.region_code = ''
|
||||
this.emptyObj.has_report = false
|
||||
}
|
||||
},
|
||||
async _machine() {
|
||||
const res = await machine()
|
||||
this.machineData = [...res]
|
||||
this.show = true
|
||||
},
|
||||
async _n1list() {
|
||||
const res = await n1list()
|
||||
this.n1List = [...res]
|
||||
this.vechineList = []
|
||||
this.show = true
|
||||
},
|
||||
async _n1list2() {
|
||||
const res = await n1list2()
|
||||
this.vechineList = [...res]
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.currentRow1 = val
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.currentRow2 = val
|
||||
this._n1list2()
|
||||
crudProduceScreen.getMaterListByOrder(this.pointState[this.buttonName], val.order_code).then(res => {
|
||||
res.content.map(el => {
|
||||
this.$set(el, 'point_status_name', ['无货', '空托盘', '有料'][Number(el.point_status)])
|
||||
})
|
||||
this.vechineList = [...res.content]
|
||||
})
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.currentRow3 = val
|
||||
},
|
||||
toSure1() {
|
||||
if (this.currentRow1 === null) {
|
||||
this.$message.error('请选择设备!')
|
||||
return
|
||||
}
|
||||
this.pkObj = this.currentRow1
|
||||
this.show = false
|
||||
crudProduceScreen.regionPoints(this.pkObj.value).then(res => {
|
||||
this.pointState = res
|
||||
})
|
||||
},
|
||||
toSure() {
|
||||
if (this.currentRow1 === null) {
|
||||
this.$message.error('请选择设备!')
|
||||
return
|
||||
}
|
||||
this.pkObj = this.currentRow1
|
||||
this.show = false
|
||||
},
|
||||
toCall() {
|
||||
this.$message('操作成功')
|
||||
crudProduceScreen.callMater(this.currentRow3).then(res => {
|
||||
this.$message(res.msg)
|
||||
})
|
||||
this.show = false
|
||||
},
|
||||
toSure3() {
|
||||
crudProduceScreen.callEmp(this.emptyObj).then(res => {
|
||||
this.$message(res.msg)
|
||||
})
|
||||
this.show = false
|
||||
this.emptyObj = {}
|
||||
},
|
||||
toSure4() {
|
||||
crudProduceScreen.sendMater(this.sendObj).then(res => {
|
||||
this.$message(res.msg)
|
||||
})
|
||||
this.show = false
|
||||
this.sendObj = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,13 +400,16 @@ export default {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 45%;
|
||||
font-size: 14px;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
padding: 0 15px;
|
||||
background: center / 100% 100% url('~@/assets/images/screen_1.png') no-repeat;
|
||||
}
|
||||
.s-btn-1_dis {
|
||||
background-image: url('~@/assets/images/screen_5.png');
|
||||
}
|
||||
.s-btn-2 {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
@@ -343,7 +426,7 @@ export default {
|
||||
background-image: linear-gradient(to bottom, #66b1ff, #a0cfff);
|
||||
border-radius: 16px;
|
||||
}
|
||||
p {
|
||||
.p1 {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -356,6 +439,23 @@ export default {
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
.p2 {
|
||||
position: absolute;
|
||||
bottom: 22%;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.s-btn-2_dis {
|
||||
background-color: #a2b1c1;
|
||||
border: 1px solid #393f44;
|
||||
&::before {
|
||||
background-image: linear-gradient(to bottom, #666e77, #a8b5c3);
|
||||
}
|
||||
}
|
||||
.s-btn-3 {
|
||||
height: 100%;
|
||||
@@ -513,6 +613,7 @@ export default {
|
||||
text-align: left;
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
background: rgba(45,88,184,0.25);
|
||||
border: 1px solid #21D0F2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user