生产下料、点位更新

This commit is contained in:
2024-03-12 15:23:12 +08:00
parent 6aafccdf0c
commit 6fdce408c4
31 changed files with 373 additions and 463 deletions

View File

@@ -48,8 +48,8 @@
{id: 2, title: '空托盘入库', icon: 'RF02', path: '/pages/manage/empty-tray-in'},
{id: 3, title: '组盘入库', icon: 'RF03', path: '/pages/manage/group-in-storage'},
{id: 4, title: '原料出库', icon: 'RF04', path: '/pages/manage/mater-out-storage'},
{id: 5, title: '生产下料', icon: 'RF05', path: ''},
{id: 6, title: '点位更新', icon: 'RF06', path: ''},
{id: 5, title: '生产下料', icon: 'RF05', path: '/pages/manage/produce-cut'},
{id: 6, title: '点位更新', icon: 'RF06', path: '/pages/manage/point-update'},
{id: 7, title: '定点作业', icon: 'RF07', path: ''},
{id: 8, title: '作业管理', icon: 'RF08', path: ''},
{id: 9, title: '出库确认', icon: 'RF09', path: ''}
@@ -71,13 +71,13 @@
},
toPage (e) {
let url = e.path
let url = e.path + '?title=' + e.title
uni.redirectTo({
url: url
})
},
Quit () {
this.$store.dispatch('delUserInfo')
this.$store.dispatch('delUserInfo', '')
uni.redirectTo({
url: '/pages/login/login'
})
@@ -96,7 +96,8 @@
height 100%
top 0
padding-top calc(var(--status-bar-height) + 86rpx)
background linear-gradient(to bottom, #fae2ca 0%, #fff5ea 20%, #fdfdfd 100%)
// background linear-gradient(to bottom, #fae2ca 0%, #fff5ea 20%, #fdfdfd 100%)
background linear-gradient(to bottom, #f5f6fb 0%, #fff 100%)
.header
position fixed
left 0
@@ -104,7 +105,6 @@
padding-top var(--status-bar-height)
z-index 100
_wh(100%, calc(var(--status-bar-height) + 86rpx))
background-color #f8e6db
_font(36rpx,86rpx,#333,,center)
.userInfo-wrap
_fj()

View File

@@ -6,8 +6,8 @@
<input class="large-input" type="text" placeholder="请输入用户名" v-model="user">
</view>
<div class="input-box">
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password">
<span class="iconfont icon_eye_close" :class="[showPassword ? 'icon_eye_active' : '']" @tap="changePassword">&#xe6a0;</span>
<input class="large-input" :password="!showPassword" placeholder="请输入密码" v-model="password" autocomplete=off>
<uni-icons :type="showPassword ? 'eye-filled' : 'eye'" size="20" :color="showPassword ? '#ff6a00' : '#999'" @tap="showPassword = !showPassword"></uni-icons>
</div>
<view class="radio-box">
<view class="radio-wrap">
@@ -61,9 +61,6 @@
toSaveUser() {
this.saveUser = !this.saveUser
},
changePassword() {
this.showPassword = !this.showPassword
},
setup () {
uni.redirectTo({
url: '/pages/login/setup'
@@ -142,7 +139,7 @@
height 75rpx
border-bottom 1rpx solid #e2e2e2
.large-input
_wh(calc(100% - 40rpx), 74rpx)
_wh(calc(100% - 100rpx), 74rpx)
_font(32rpx,74rpx,#999)
padding-left 10rpx
.radio-box

View File

@@ -1,6 +1,6 @@
<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="zd-row border-bottom">
@@ -12,7 +12,7 @@
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
</picker>
</view>
<view class="uni-icons icon_right">&#xe6b5;</view>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
@@ -54,6 +54,7 @@
},
data() {
return {
title: '',
options1: [],
index1: '',
val1: '',
@@ -61,6 +62,9 @@
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getVehicleType()
},

View File

@@ -1,6 +1,6 @@
<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="zd-row border-bottom">
@@ -12,7 +12,7 @@
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
</picker>
</view>
<view class="uni-icons icon_right">&#xe6b5;</view>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
<!-- <view class="zd-row">
<view class="zd-col-5">
@@ -52,6 +52,7 @@
},
data() {
return {
title: '',
options1: [],
index1: '',
// options2: [],
@@ -60,6 +61,9 @@
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getVehicleType()
},

View File

@@ -1,6 +1,6 @@
<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="zd-row border-bottom">
@@ -12,7 +12,7 @@
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
</picker>
</view>
<view class="uni-icons icon_right">&#xe6b5;</view>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
@@ -64,7 +64,7 @@
<table>
<thead>
<tr>
<th>载具编码</th>
<th class="fontcol1">载具编码</th>
<th>载具类型</th>
<th>物料编码</th>
<th>物料名称</th>
@@ -74,7 +74,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toChose(e)" :class="{'checked': e.vehicle_code === pkId}">
<tr v-for="(e, i) in dataList" :key="i" @click="toChose(e)" :class="{'checked': e.point_code === pkId}">
<td class="fontcol1">{{e.vehicle_code}}</td>
<td><view class="fontbg">{{e.vehicle_type}}</view></td>
<td class="fontcol2">{{e.material_code}}</td>
@@ -143,6 +143,7 @@
},
data() {
return {
title: '',
options1: [],
index1: '',
options2: [],
@@ -163,6 +164,9 @@
disabled4: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getVehicleType()
this._queryMaterial()
@@ -344,5 +348,4 @@
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
</style>

View File

@@ -1,6 +1,6 @@
<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="zd-row border-bottom">
@@ -11,7 +11,7 @@
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @change="selectChange"></zxz-uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-row">
<view class="zd-col-5">
<span class="filter_label">出库点位</span>
</view>
@@ -27,7 +27,7 @@
<table>
<thead>
<tr>
<th>点位编码</th>
<th class="fontcol1">点位编码</th>
<th>点位名称</th>
<th>载具编码</th>
<th>物料编码</th>
@@ -69,6 +69,7 @@
},
data() {
return {
title: '',
options1: [],
index1: '',
val1: '',
@@ -77,6 +78,9 @@
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._queryMaterial()
},
@@ -111,6 +115,7 @@
let res = await fullVehicleOut(this.pkId, this.val1)
this.pkId = ''
this.disabled = false
this._queryLinkMaterial(this.index1)
uni.showToast({
title: res.message,
icon: 'none'
@@ -130,4 +135,5 @@
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
</style>

View File

@@ -0,0 +1,127 @@
<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-5">
<span class="filter_label">当前点位</span>
</view>
<view class="zd-col-19">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">载具类型</span>
</view>
<view class="zd-col-17 filter_picker">
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
</picker>
</view>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
<view class="zd-row">
<view class="zd-col-5">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-19 filter_select">
<search-box
v-model="val2"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
<button class="zd-col-7 button-primary" :class="{'button-info': index1 === '' || !val1 || !val2}" :disabled="disabled1" @tap="_bindVehicle">绑定</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="_unbindVehicle">解绑</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getVehicleType, bindVehicle, unbindVehicle} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
val2: '',
options1: [],
index1: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getVehicleType()
},
methods: {
/** 载具类型下拉框 */
async _getVehicleType () {
let res = await getVehicleType()
this.options1 = [...res]
},
pickerChange (e) {
this.index1 = e.detail.value
},
async _bindVehicle () {
this.disabled1 = true
if (!this.val1 || this.index1 === '' || !this.val2) {
this.disabled1 = false
return
}
try {
let res = await bindVehicle(this.val1, this.index1, this.val2)
this.clearUp()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
async _unbindVehicle () {
this.disabled2 = true
if (!this.val1) {
this.disabled2 = false
return
}
try {
let res = await unbindVehicle(this.val1, this.index1, this.val2)
this.clearUp()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled2 = false
}
},
clearUp () {
this.index1 = ''
this.val1 = ''
this.val2 = ''
this.disabled1 = false
this.disabled2 = false
}
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -0,0 +1,99 @@
<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-5">
<span class="filter_label">当前点位</span>
</view>
<view class="zd-col-19">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row">
<view class="zd-col-5">
<span class="filter_label">下一点位</span>
</view>
<view class="zd-col-19 filter_select">
<zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
<button class="zd-col-11 button-primary" :class="{'button-info': index1 === '' || !val1}" :disabled="disabled" @tap="_createP2pTask">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryEndPointsByStart, createP2pTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
options1: [],
index1: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
handleChange (e) {
this._queryEndPointsByStart(e)
},
/** 下一点位下拉框 */
async _queryEndPointsByStart (e) {
let res = await queryEndPointsByStart(e)
if (res.length > 0) {
res.map(el => {
this.$set(el, 'value', el.point_code2)
this.$set(el, 'text', el.point_name)
})
this.options1 = [...res]
this.index1 = this.options1[0].value
}
},
async _createP2pTask () {
this.disabled = true
if (!this.val1 || this.index1 === '') {
this.disabled = false
return
}
try {
let res = await createP2pTask(this.val1, this.index1)
this.clearUp()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
clearUp () {
this.index1 = ''
this.options1 = []
this.val1 = ''
this.disabled = false
}
}
}
</script>
<style lang="stylus">
</style>