change and add two pages
This commit is contained in:
@@ -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
103
pages/manage/hnlgbd.vue
Normal 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
86
pages/manage/hnlgcx.vue
Normal 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>
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user