分切呼叫送轴修改,add分切下料2

This commit is contained in:
2025-03-14 09:18:00 +08:00
parent e00c1636b0
commit 237bd238a0
6 changed files with 231 additions and 5 deletions

View File

@@ -48,6 +48,7 @@
if (e.target.value.length) {
this.$emit('handleChange', e.target.value)
}
uni.hideKeyboard()
}
}
}

View File

@@ -631,6 +631,14 @@
}
}
,{
"path" : "pages/SecondPhase/slitting/SlittingCutting2",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -43,27 +43,60 @@
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th class="th_2">设备</th>
<th>位置</th>
<th>尺寸</th>
<th>状态</th>
<th>代数</th>
<th>呼叫时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{Number(i) + 1}}</td>
<td class="td_2">{{e.resource_name}}</td>
<td>{{['上轴', '下轴'][Number(e.up_or_down) - 1]}}</td>
<td>{{e.qzz_size}}</td>
<td>{{getStatusText(e.status)}}</td>
<td>{{e.qzz_generation}}</td>
<td>{{e.start_time}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !index2 || (!upL && !upR && !lowL && !lowR)}" :disabled="disabled" @tap="_forcedFeedShaft">送轴</button>
<button class="zd-col-5 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !index2 || (!upL && !upR && !lowL && !lowR)}" :disabled="disabled" @tap="_forcedFeedShaft">送轴</button>
<button class="zd-col-8 btn-submit btn-success" @tap="_showManualView">刷新</button>
</view>
<up-top ref="UT" :scrollTop="top"></up-top>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryProductArea, queryDeviceByarea} from '@/utils/getData2.js'
import UpTop from '@/components/upTop.vue'
import {queryProductArea, queryDeviceByarea, showManualView} from '@/utils/getData2.js'
import {paperQueryPaperMaterial, forcedFeedShaft} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
SearchBox,
UpTop
},
data() {
return {
title: '',
top: 0,
options1: [],
index1: '',
options2: [],
@@ -77,13 +110,18 @@
upR: '',
lowL: '',
lowR: '',
disabled: false
disabled: false,
dataList: []
};
},
onLoad (options) {
this.title = options.title
this._queryProductArea()
this._paperQueryPaperMaterial()
this._showManualView()
},
onPageScroll(e) {
this.$refs.UT.topData(e.scrollTop)
},
methods: {
/** 生产区域下拉框查询 */
@@ -215,6 +253,20 @@
},
showSelector4 () {
this.newaxis4 = this.axis
},
getStatusText(status) {
const statusMap = {
'01': '准备套轴',
'02': '正在配送',
'03': '配送完成'
}
return statusMap[status] || '已完成'
},
async _showManualView () {
let res = await showManualView()
if (res) {
this.dataList = [...res.data]
}
}
}
}

View File

@@ -0,0 +1,154 @@
<template>
<view class="zd_container">
<!-- <nav-bar title="分切下料2"></nav-bar> -->
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label">区域</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">设备</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">子卷号</span>
</view>
<view class="filter_input_wraper mgr20">
<search-box
v-model="val1"
/>
</view>
<button class="zd-col-4 btn-submit btn-success" @tap="handleAdd">添加</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th width="78%">子卷号</th>
<th width="22%">操作</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{e}}</td>
<td><button class="btn-submit btn-success" @tap="handleDelete(i)">删除</button></td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">清空</button>
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !index || !dataList.length}" :disabled="disabled" @tap="_downRolls2">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryProductArea} from '@/utils/getData2.js'
import {slitterDevices, downRolls2} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
options2: [],
index2: '',
val1: '',
dataList: [],
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._queryProductArea()
},
methods: {
selectChange2(e) {
this.index2 = e
if (e) {
this._slitterDevices(e)
} else {
this.index = ''
}
},
/** 生产区域下拉框查询 */
async _queryProductArea () {
let res = await queryProductArea()
this.options2 = [...res.data]
},
async _slitterDevices (e) {
let res = await slitterDevices(e)
this.options = [...res]
},
selectChange (e) {
this.index = e
},
handleAdd () {
if (!this.val1.trim()) {
return
}
const index = this.dataList.findIndex(item => item === this.val1)
if (index !== -1) {
this.dataList.splice(index, 1)
}
this.dataList.push(this.val1)
this.val1 = ''
},
handleDelete (index) {
this.dataList.splice(index, 1)
},
async _downRolls2 () {
this.disabled = true
if (!this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await downRolls2(this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
this.dataList = []
}
} catch (e) {
console.log(e)
}
},
clearUp () {
this.index = ''
this.index2 = ''
this.options = []
this.val1 = ''
this.dataList = []
}
}
}
</script>
<style scoped>
.slide_new table {
table-layout: auto;
}
</style>

View File

@@ -462,3 +462,13 @@ export const remainShaftBack = (code, size, ge, flag) => request({
flag: flag
}
})
/**
* 分切下料2(二期分切管理)
*/
export const downRolls2 = (device, code) => request({
url:'api/pda/slitter/downRolls2',
data: {
device_code: device,
container: code
}
})

View File

@@ -85,6 +85,7 @@ export const allAuthority = () => {
{menu_id: '5', path: 'RF03', title: '分切管理', sonTree: [
{menu_id: '1', title: '分切上料', path: '/pages/SecondPhase/slitting/SlittingFeeding'},
{menu_id: '6', title: '分切下料', path: '/pages/SecondPhase/slitting/SlittingCutting'},
{menu_id: '6', title: '分切下料2', path: '/pages/SecondPhase/slitting/SlittingCutting2'},
{menu_id: '2', title: '空轴套管', path: '/pages/SecondPhase/slitting/ZjCasing'},
{menu_id: '3', title: '空轴配送', path: '/pages/SecondPhase/slitting/ZjDelivery'},
{menu_id: '4', title: '空轴进站', path: '/pages/SecondPhase/slitting/ZjInStore'},