This commit is contained in:
2025-07-08 17:54:02 +08:00
parent 95f2fed261
commit 9e02823637
15 changed files with 487 additions and 181 deletions

View File

@@ -0,0 +1,144 @@
<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">
<search-box
v-model="val2"
@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">
<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-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></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-24 filter_select">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_emptyconfirmIn">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getSect, emptyconfirmIn} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
val2: '',
options: [{text:'托盘', value:'1'},{text:'料箱',value: '2'}],
index: '',
// options2: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
options2: [],
index2: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getSect()
},
methods: {
handleChange (e) {
if (e) {
this._getReturnMaterial(e)
}
},
async _getSect () {
try {
let res = await getSect()
if (res) {
this.options = res
} else {
this.options =[]
}
} catch (e) {
this.options = []
}
},
selectChange (e) {
this.index = e
},
selectChange2 (e) {
this.index2 = e
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.index = ''
this.index2 = ''
this.disabled = false
},
async _emptyconfirmIn () {
this.disabled = true
if (!this.val1 ||!this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await emptyconfirmIn(this.val1, this.val2, this.index2, '1', this.index)
if (res.code === '200') {
uni.showToast({
title: res.msg,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
this.disabled = false
}
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -4,6 +4,17 @@
<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">
<search-box
v-model="val2"
@handleChange="handleChange"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">载具编码</span>
@@ -67,7 +78,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">确认</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_confirmIn">确认</button>
</view>
</view>
</template>
@@ -75,7 +86,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
import {getSect, getVehicleMaterial, confirmIn} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -85,53 +96,74 @@
return {
title: '',
val1: '',
options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
val2: '',
// options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
options: [],
index: '',
disabled: false,
currentData: {},
kwData: {}
currentData: {}
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getSect()
},
methods: {
handleChange (e) {
if (e) {
this._getStructCount(e)
}
},
async _getStructCount (e) {
async _getSect () {
try {
let res = await getStructCount(e)
let res = await getSect()
if (res) {
this.kwData = res
this.options = res
} else {
this.kwData = {}
this.options =[]
}
} catch (e) {
this.kwData = {}
this.options = []
}
},
selectChange (e) {
this.index = e
},
handleChange (e) {
if (e) {
this._getVehicleMaterial(e)
}
},
async _getVehicleMaterial (e) {
try {
let res = await getVehicleMaterial(this.val1, this.val2, this.index)
if (res) {
this.currentData = res
} else {
this.currentData = {}
}
} catch (e) {
this.currentData = {}
}
},
selectChange (e) {
this.index = e
if (e) {
this._getVehicleMaterial(e)
}
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.index = ''
this.disabled = false
this.kwData = {}
this.currentData = {}
},
async _pdaPalletIostorinvIn () {
async _confirmIn () {
this.disabled = true
if (!this.val1 || !this.index) {
if (!this.val1 || !this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await pdaPalletIostorinvIn(this.val1, this.index)
let res = await confirmIn(this.val1, this.val2, this.index)
if (res.code === '200') {
uni.showToast({
title: res.msg,

View File

@@ -9,7 +9,7 @@
<span class="filter_label">源单编码</span>
</view>
<view class="zd-col-17">
<search-box v-model="currentData.yd_code" @handleChange="handleChange" @handleDel="handleDel" />
<search-box v-model="val1" @handleChange="handleChange" @handleDel="handleDel" />
</view>
</view>
<view class="zd-row border-bottom">
@@ -17,7 +17,7 @@
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-17">
<search-box v-model="currentData.vehicle_code" @handleChange="handleChange" @handleDel="handleDel" />
<search-box v-model="val2" @handleChange="handleChange" @handleDel="handleDel" />
</view>
</view>
<view class="zd-row border-bottom">
@@ -72,7 +72,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_groupMaterIn">组盘确认</button>
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_groupPlate">组盘确认</button>
</view>
</view>
</template>
@@ -81,7 +81,8 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import {storList, getStructCount, groupMaterIn} from '@/utils/getData2.js'
import {storList, getStructCount} from '@/utils/getData2.js'
import {groupPlate} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -91,6 +92,8 @@
data() {
return {
title: '',
val1: '',
val2: '',
currentData: {},
options: [],
index: '',
@@ -100,7 +103,6 @@
},
onLoad (options) {
this.title = options.title
this._storList()
},
onShow () {
if (this.$store.getters.publicObj !== '') {
@@ -175,7 +177,7 @@
this.disabled = false
this.kwData = {}
},
async _groupMaterIn () {
async _groupPlate () {
this.disabled = true
if (JSON.stringify(this.currentData) === '{}') {
this.disabled = false
@@ -183,7 +185,7 @@
}
try {
this.currentData.stor_code = this.index
let res = await groupMaterIn(this.index, this.currentData)
let res = await groupPlate(this.currentData.material_id, this.currentData.pcsn, this.currentData.qty, this.val2, this.val1)
uni.showToast({
title: res.msg,
icon: 'none'

View File

@@ -44,7 +44,7 @@
<span class="filter_label filter_input_disabled">物料编号</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
</view>
</view>
<view class="zd-row border-bottom">
@@ -52,7 +52,7 @@
<span class="filter_label filter_input_disabled">物料数量</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
</view>
</view>
<view class="zd-row border-bottom">
@@ -60,14 +60,14 @@
<span class="filter_label filter_input_disabled">物料批次</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.pcsn" disabled>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_pdaPalletIostorinvIn">确认</button>
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !index}" :disabled="disabled" @tap="_confirmReturnMaterial">确认</button>
</view>
</view>
</template>
@@ -75,7 +75,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getStructCount, pdaPalletIostorinvIn} from '@/utils/getData2.js'
import {getSect, getReturnMaterial, confirmReturnMaterial} from '@/utils/getData3.js'
export default {
components: {
NavBar,
@@ -85,34 +85,47 @@
return {
title: '',
val1: '',
options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
// options: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
options: [],
index: '',
disabled: false,
currentData: {},
kwData: {}
currentData: {}
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._getSect()
},
methods: {
handleChange (e) {
if (e) {
this._getStructCount(e)
this._getReturnMaterial(e)
}
},
async _getStructCount (e) {
async _getVehicleMaterial (e) {
try {
let res = await getStructCount(e)
let res = await getVehicleMaterial(this.val1, this.index)
if (res) {
this.kwData = res
this.currentData = res
} else {
this.kwData = {}
this.currentData = {}
}
} catch (e) {
this.kwData = {}
this.currentData = {}
}
},
async _getSect () {
try {
let res = await getSect()
if (res) {
this.options = res
} else {
this.options =[]
}
} catch (e) {
this.options = []
}
},
selectChange (e) {
@@ -122,16 +135,15 @@
this.val1 = ''
this.index = ''
this.disabled = false
this.kwData = {}
},
async _pdaPalletIostorinvIn () {
async _confirmReturnMaterial () {
this.disabled = true
if (!this.val1 || !this.index) {
this.disabled = false
return
}
try {
let res = await pdaPalletIostorinvIn(this.val1, this.index)
let res = await confirmReturnMaterial(this.currentData)
if (res.code === '200') {
uni.showToast({
title: res.msg,