纸管绑定

This commit is contained in:
2024-06-26 09:11:35 +08:00
parent af03713ac9
commit 650670f2dd
5 changed files with 142 additions and 1 deletions

View File

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

View File

@@ -0,0 +1,117 @@
<template>
<view class="zd_container">
<nav-bar title="纸管绑定"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">托盘号</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">排数</span>
</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val2">
</view>
</view>
<view class="filter_item">
<view class="filter_label">物料</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :searchInput="true" :localdata="newoptions" @change="selectChange" @handleChange="handleChange" @showSelector="showSelector"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-5 btn-submit btn-default" @tap="clearUp">清空</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_operateIvt('1')">绑定</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_operateIvt('2')">清除</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPaperMaterial} from '@/utils/getData2.js'
import {operateIvt} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
val1: '',
val2: '',
options: [],
index: '',
newoptions: [],
disabled: false
};
},
created () {
this._queryPaperMaterial()
},
methods: {
/**查询物料下拉框*/
async _queryPaperMaterial () {
let res = await queryPaperMaterial()
this.options = [...res.rows]
this.newoptions = [...res.rows]
},
/** 选择器 */
selectChange (e) {
this.index = e
},
/** 模糊匹配 */
selectMatchItem (lists, keyWord) {
let resArr = []
lists.filter((item) => {
if (item.text.indexOf(keyWord) > -1) {
resArr.push(item)
}
})
return resArr
},
handleChange (e) {
if (e){
this.index = ''
this.newoptions = this.selectMatchItem(this.options, e)
} else {
this.newoptions = this.options
}
},
showSelector () {
this.newoptions = this.options
},
async _operateIvt (type) {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await operateIvt(type, this.val1, this.val2, this.index)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
} catch (e) {
this.disabled = false
}
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.index = ''
}
}
}
</script>

View File

@@ -259,6 +259,8 @@
background linear-gradient(to right, rgba(83, 191, 194,0.8) 0%, rgba(119, 198, 201,0.8) 100%)
.bgc_7
background linear-gradient(to right, rgba(244, 97, 61,0.8) 0%, rgba(245, 130, 102,0.8) 100%)
.bgc_8
background linear-gradient(to right, rgba(207, 24, 24, .8) 0%, rgba(245, 102, 102, .8) 100%)
.tabs_wrap
border-radius 20rpx 20rpx 0 0
background-color #ecedef

View File

@@ -153,4 +153,11 @@ export const doInitShaftPoint = (code) => request({
export const updatePackageInfo = (ivt, cn) => request({
url:'api/twoPda/vehicle/updatePackageInfo',
data: {ivt_status: ivt, container_name: cn}
})
/**
* 纸管绑定
*/
export const operateIvt = (type, vcode, num, code) => request({
url:'api/bstIvtStockingivt/operateIvt',
data: {type: type, vehicle_code: vcode, row_num: num, material_code: code}
})

View File

@@ -80,7 +80,8 @@ export const authority = () => {
{menu_id: '3', title: '空轴配送', path: '/pages/SecondPhase/slitting/ZjDelivery'},
{menu_id: '4', title: '空轴进站', path: '/pages/SecondPhase/slitting/ZjInStore'},
{menu_id: '5', title: '子卷出站', path: '/pages/SecondPhase/slitting/ZjOutStore'},
{menu_id: '7', title: '穿拔轴初始化', path: '/pages/SecondPhase/slitting/DoInitShaft'}
{menu_id: '7', title: '穿拔轴初始化', path: '/pages/SecondPhase/slitting/DoInitShaft'},
{menu_id: '8', title: '纸管绑定', path: '/pages/SecondPhase/slitting/PaperBind'}
]},
{menu_id: '6', path: 'RF04', title: '点位管理', sonTree: [
{menu_id: '1', title: '点位管理', path: '/pages/SecondPhase/point/PointManage'},
@@ -116,4 +117,10 @@ export const twoPdaIvtbBoxDtlQuery = (no) => {
export const getShaftPoint = () => {
let res = [{"text":"穿拔轴点位1","value":"B_CBJ01"},{"text":"穿拔轴点位2","value":"B_CBJ02"},{"text":"穿拔轴点位3","value":"B_CBJ03"},{"text":"穿拔轴点位4","value":"B_CBJ04"}]
return res
}
export const queryPaperMaterial = () => {
let res = {
rows: [{text: '物料一', value: '001'}, {text: '物料a', value: '002'}, {text: '物料b', value: '003'}]
}
return res
}