add 分切呼叫送轴

This commit is contained in:
2025-01-12 16:37:21 +08:00
parent 649f50c5b1
commit 2461daff46
4 changed files with 223 additions and 10 deletions

View File

@@ -559,14 +559,22 @@
}
}
,{
"path" : "pages/SecondPhase/production/BoxStock",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/SecondPhase/production/BoxStock",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/SecondPhase/slitting/CallShaft",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -0,0 +1,163 @@
<template>
<view class="zd_container">
<!-- <nav-bar title="分切呼叫送轴"></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="index1" :localdata="options1" @change="selectChange1"></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">
<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="upL" :localdata="axis"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">上轴右</view>
<view class="filter_input_wraper">
<uni-data-select v-model="upR" :localdata="axis"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">下轴左</view>
<view class="filter_input_wraper">
<uni-data-select v-model="lowL" :localdata="axis"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">下轴右</view>
<view class="filter_input_wraper">
<uni-data-select v-model="lowR" :localdata="axis"></uni-data-select>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryProductArea, queryDeviceByarea} from '@/utils/getData2.js'
import {paperQueryPaperMaterial, forcedFeedShaft} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options1: [],
index1: '',
options2: [],
index2: '',
axis: [],
upL: '',
upR: '',
lowL: '',
lowR: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
this._queryProductArea()
this._paperQueryPaperMaterial()
},
methods: {
/** 生产区域下拉框查询 */
async _queryProductArea () {
let res = await queryProductArea()
this.options1 = [...res.data]
},
selectChange1(e) {
this.index1 = e
if (e) {
this._queryDeviceByarea(e)
} else {
this.index2 = ''
}
},
/** 设备下拉框 */
async _queryDeviceByarea (e) {
let res = await queryDeviceByarea(e)
this.options2 = [...res.data]
},
selectChange2(e) {
this.index2 = e
},
async _paperQueryPaperMaterial () {
let res = await paperQueryPaperMaterial()
this.axis = [...res.rows]
},
clearUp () {
this.index1 = ''
this.index2 = ''
this.options2 = []
this.upL = ''
this.upR = ''
this.lowL = ''
this.lowR = ''
this.disabled = false
},
async _forcedFeedShaft () {
this.disabled = true
if (!this.index2 || (!this.upL && !this.upR && !this.lowL && !this.lowR)) {
this.disabled = false
return
}
let deviceT = ''
let upLT = ''
let upRT = ''
let lowLT = ''
let lowRT = ''
this.options2.map(el => {
if (el.value === this.index2) {
deviceT = el.text
}
})
this.axis.map(el => {
if (el.value === this.upL) {
upLT = el.text
}
if (el.value === this.upR) {
upRT = el.text
}
if (el.value === this.lowL) {
lowLT = el.text
}
if (el.value === this.lowR) {
lowRT = el.text
}
})
try {
let res = await forcedFeedShaft(this.index1, deviceT, this.index2, upLT, this.upL, upRT, this.upR, lowLT, this.lowL, lowRT, this.lowR)
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -341,3 +341,26 @@ export const zjInBoundConfirm = (code) => request({
url:'api/pdmBiSubpackagerelation/zjInBoundConfirm',
data: {search: code}
})
/**
* 分切呼叫送轴(分切管理)
*/
export const paperQueryPaperMaterial = () => request({
url:'api/pda/paper/queryPaperMaterial',
data: {}
})
export const forcedFeedShaft = (area, dname, dcode, ulk, ulv, urk, urv, dlk, dlv, drk, drv) => request({
url:'api/pda/slitter/forcedFeedShaft',
data: {
area: area,
device_code: dname,
point_code: dcode,
up_left_size_k: ulk,
up_left_size_v: ulv,
up_right_size_k: urk,
up_right_size_v: urv,
down_left_size_k: dlk,
down_left_size_v: dlv,
down_right_size_k: drk,
down_right_size_v: drv,
}
})

View File

@@ -95,7 +95,8 @@ export const allAuthority = () => {
{menu_id: '8', title: 'AGV放行', path: '/pages/SecondPhase/slitting/AGVPass'},
{menu_id: '8', title: '子卷重量维护', path: '/pages/SecondPhase/slitting/SubRollWeight'},
{menu_id: '8', title: '分切上轴', path: '/pages/SecondPhase/slitting/UpperShaftCut'},
{menu_id: '8', title: '分切上轴2', path: '/pages/SecondPhase/slitting/UpperShaftCut2'}
{menu_id: '8', title: '分切上轴2', path: '/pages/SecondPhase/slitting/UpperShaftCut2'},
{menu_id: '8', title: '分切呼叫送轴', path: '/pages/SecondPhase/slitting/CallShaft'}
]},
{menu_id: '6', path: 'RF04', title: '点位管理', sonTree: [
{menu_id: '1', title: '点位管理', path: '/pages/SecondPhase/point/PointManage'},
@@ -244,7 +245,7 @@ export const queryBoxSpec = () => {
}
export const queryDeviceByarea = () => {
let res = {
data: [{value: '01', text: 'a'}, {value: '02', text: 'bc'}]
data: [{value: '0aa', text: 'aa'}, {value: '0bb', text: 'bb'}]
}
return res
}
@@ -259,4 +260,22 @@ export const doSubRollWeightBindingTip = () => {
tip: '111111'
}
return res
}
export const paperQueryPaperMaterial = () => {
let res = {
rows: [{
"text": "纸制筒管|纸管|3英寸|300",
"value": "482210000000001"
}, {
"text": "纸制筒管|纸管|3英寸|340",
"value": "482210000000002"
}, {
"text": "纸制筒管|纸管|3英寸|350",
"value": "482210000000003"
}, {
"text": "纸制筒管|纸管|3英寸|380",
"value": "482210000000004"
}]
}
return res
}