change and add two pages

This commit is contained in:
2025-05-22 16:03:37 +08:00
parent bfbf1f6e42
commit 1378696a78
9 changed files with 281 additions and 29 deletions

View File

@@ -72,6 +72,22 @@
}
}
,{
"path" : "pages/manage/hnlgbd",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/manage/hnlgcx",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -15,7 +15,7 @@
<view class="zd_home_wrapper">
<view class="menus_wrap">
<view class="fir_menu_wrap">
<view class="fir_menu-item" v-for="e in menuList" :key="e.id" @tap="toPage(e)">
<view class="fir_menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage(e)">
<image class="menu-img" :src="require('../../static/image/menu/' + e.icon + '.png')" alt="">
<view class="menu-name">{{e.title}}</view>
</view>
@@ -32,12 +32,14 @@
return {
userName: '',
menuList: [
{id: 5, title: '任务管理', icon: 'RF05', path: '/pages/manage/task-manage'},
{id: 6, title: '指令管理', icon: 'RF06', path: '/pages/manage/inst-manage'},
{id: 4, title: '混碾搬运', icon: 'RF01', path: '/pages/manage/hnby'},
{id: 3, title: '扫码出库', icon: 'RF07', path: '/pages/manage/smck'},
{id: 7, title: '压制满料搬运', icon: 'RF02', path: '/pages/manage/yzmlby'},
{id: 8, title: '半成品解绑', icon: 'RF08', path: '/pages/manage/bcpjb'}
{title: '任务管理', icon: 'RF06', path: '/pages/manage/task-manage'},
{title: '指令管理', icon: 'RF05', path: '/pages/manage/inst-manage'},
{title: '混碾搬运', icon: 'RF01', path: '/pages/manage/hnby'},
{title: '扫码出库', icon: 'RF11', path: '/pages/manage/smck'},
{title: '压制满料搬运', icon: 'RF02', path: '/pages/manage/yzmlby'},
{title: '半成品解绑', icon: 'RF08', path: '/pages/manage/bcpjb'},
{title: '混碾料罐绑定', icon: 'RF10', path: '/pages/manage/hnlgbd'},
{title: '料罐物料查询', icon: 'RF09', path: '/pages/manage/hnlgcx'}
],
show: false,
secM: []

View File

@@ -21,27 +21,31 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">重量</span>
<span class="filter_label">条码</span>
</view>
<view class="zd-col-17 filter_select">
<input type="number" class="filter_input" v-model="val1">
<search-box
v-model="val1"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1 || !index2}" :disabled="disabled1" @tap="_pdaHnby">混碾搬运</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1 || !index2 || !val1}" :disabled="disabled1" @tap="_pdaHnby">混碾搬运</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {pdaHnby} from '@/utils/getData2.js'
export default {
components: {
NavBar
NavBar,
SearchBox
},
data() {
return {
@@ -76,7 +80,7 @@
},
async _pdaHnby () {
this.disabled1 = true
if (!this.index1 || !this.index2) {
if (!this.index1 || !this.index2 || !this.val1) {
this.disabled1 = false
return
}

103
pages/manage/hnlgbd.vue Normal file
View File

@@ -0,0 +1,103 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">设备</span>
</view>
<view class="zd-col-17 filter_select">
<zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">条码</span>
</view>
<view class="zd-col-17 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">重量</span>
</view>
<view class="zd-col-17 filter_select">
<input type="number" class="filter_input" v-model="val2">
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1 || !val1 || !val2}" :disabled="disabled1" @tap="_hnlgbd">混碾料罐绑定</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {hnlgbd} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options1: this.generateArray('HNJ', '混碾机', 8),
index1: '',
val1: null,
val2: null,
disabled1: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
generateArray(prefix, name, num) {
const array = []
for (let i = 1; i <= num; i++) {
array.push({
value: `${prefix}${String(i).padStart(2, '0')}`,
text: `${name}${String(i).padStart(2, '0')}`
})
}
return array
},
clearUp () {
this.index1 = ''
this.val1 = null
this.val2 = null
this.disabled1 = false
},
async _hnlgbd () {
this.disabled1 = true
if (!this.index1 || !this.val1 || !this.val2) {
this.disabled1 = false
return
}
try {
let res = await hnlgbd(this.index1, this.val1, this.val2)
this.disabled1 = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
</style>

86
pages/manage/hnlgcx.vue Normal file
View File

@@ -0,0 +1,86 @@
<template>
<view class="zd_container">
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">料罐条码</span>
</view>
<view class="zd-col-17 filter_select">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料编码</span>
</view>
<view class="zd-col-17 filter_select">
<view class="filter_input" style="color: #E9B451; font-weight: 700;">{{code}}</view>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_hnlgcx(val1)">查询</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {hnlgcx} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
code: null,
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
clearUp () {
this.val1 = null
this.code = null
this.disabled = false
},
handleChange (e) {
if (e) {
this._hnlgcx(e)
}
},
async _hnlgcx (e) {
this.disabled = true
try {
let res = await hnlgcx(e)
this.disabled = false
if (res) {
this.code = res.material_code
}
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
.msg_wrapper
height auto
min-height 30%
</style>

View File

@@ -4,10 +4,10 @@
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">扫码出库</span>
<view class="zd-col-7">
<span class="filter_label">木托盘编码</span>
</view>
<view class="zd-col-19 filter_select">
<view class="zd-col-17 filter_select">
<search-box
v-model="val1"
/>
@@ -16,8 +16,9 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_pdaSmck">扫码出</button>
<button class="zd-col-5 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled1" @tap="toSure1"></button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="toSure2">出库</button>
</view>
</view>
</template>
@@ -35,7 +36,8 @@
return {
title: '',
val1: '',
disabled: false
disabled1: false,
disabled2: false
};
},
onLoad (options) {
@@ -44,20 +46,38 @@
methods: {
clearUp () {
this.val1 = null
this.disabled = false
this.disabled1 = false
this.disabled2 = false
},
async _pdaSmck () {
this.disabled = true
toSure1 () {
this.disabled1 = true
if (!this.val1) {
this.disabled1 = false
return
}
this._pdaSmck('1')
},
toSure2 () {
this.disabled2 = true
if (!this.val1) {
this.disabled2 = false
return
}
this._pdaSmck('2')
},
async _pdaSmck (type) {
try {
let res = await pdaSmck(this.val1)
this.disabled = false
let res = await pdaSmck(this.val1, type)
this.disabled1 = false
this.disabled2 = false
this.val1 = ''
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
this.disabled1 = false
this.disabled2 = false
}
}
}

BIN
static/image/menu/RF10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/image/menu/RF11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -24,21 +24,22 @@ export const handLogin = (user, password) => request({
/**
* 混碾搬运
*/
export const pdaHnby = (sp, ep, weight) => request({
export const pdaHnby = (sp, ep, code) => request({
url:'api/pda/hnby',
data: {
startPoint: sp,
endPoint: ep,
weight: weight
barCode: code
}
})
/**
* 扫码出库
* 扫码出
*/
export const pdaSmck = (code) => request({
export const pdaSmck = (code, type) => request({
url:'api/pda/smck',
data: {
barCode: code
barCode: code,
type: type
}
})
/**
@@ -100,3 +101,23 @@ export const handInst = (type, id) => request({
inst_uuid: id
}
})
/**
* 混碾料罐绑定
*/
export const hnlgbd = (code, vcode, weight) => request({
url:'api/pda/hnlgbd',
data: {
deviceCode: code,
barCode: vcode,
weight: weight
}
})
/**
* 料罐物料查询
*/
export const hnlgcx = (vcode) => request({
url:'api/pda/hnlgcx',
data: {
barCode: vcode
}
})