This commit is contained in:
2025-07-09 15:09:07 +08:00
parent 10d36c78b6
commit c4d815cef1
35 changed files with 342 additions and 161 deletions

View File

@@ -326,7 +326,7 @@
}
this.disabled = false
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
} catch (e) {

View File

@@ -228,7 +228,7 @@
let obj = Object.assign(this.currentData, {single_weight: this.sWeight, pcsn: this.pcsn, qty: this.qty})
let res = await checkMaterConfirm(obj)
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.disabled = false

View File

@@ -116,13 +116,13 @@
let res = await pdaPalletIostorinvIn(this.val1, this.index)
if (res.code === '200') {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.disabled = false

View File

@@ -120,13 +120,13 @@
let res = await emptyconfirmIn(this.val1, this.val2, this.index2, '1', this.index)
if (res.code === '200') {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.disabled = false

View File

@@ -143,7 +143,7 @@
}
this.disabled = false
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
} catch (e) {

View File

@@ -160,13 +160,13 @@
let res = await confirmIn(this.val1, this.val2, this.index)
if (res.code === '200') {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.disabled = false

View File

@@ -217,7 +217,7 @@
this.currentData.stor_code = this.index
let res = await groupMaterIn(this.index, this.currentData)
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.disabled = false

View File

@@ -9,7 +9,7 @@
<span class="filter_label">源单编码</span>
</view>
<view class="zd-col-17">
<search-box v-model="val1" @handleChange="handleChange" @handleDel="handleDel" />
<search-box v-model="val1"/>
</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="val2" @handleChange="handleChange" @handleDel="handleDel" />
<search-box v-model="val2"/>
</view>
</view>
<view class="zd-row border-bottom">
@@ -49,7 +49,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">
@@ -81,7 +81,6 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import {storList, getStructCount} from '@/utils/getData2.js'
import {groupPlate} from '@/utils/getData3.js'
export default {
components: {
@@ -97,85 +96,27 @@
currentData: {},
options: [],
index: '',
disabled: false,
kwData: {}
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
onShow () {
onShow() {
if (this.$store.getters.publicObj !== '') {
this.currentData = this.$store.getters.publicObj
if(this.currentData.stor_code !== '' && this.currentData.stor_code !== null && this.currentData.stor_code !== undefined) {
this.options.map(el => {
if (el.value === this.currentData.stor_code) {
this.index = el.value
}
})
} else {
if (this.currentData.vehicle_code && this.currentData.vehicle_code.charAt(0).toUpperCase() === 'T') {
this.index ='FStockPallet'
} else {
this.index ='FStockId'
}
}
if (this.currentData.vehicle_code) {
this._getStructCount(this.currentData.vehicle_code)
} else {
this.kwData = {}
}
this.$store.dispatch('setPublicObj', '')
}
},
methods: {
selectChange (e) {
this.index = e
},
async _storList () {
let res = await storList()
if (res.code === '200') {
this.options = [...res.content]
this.options.map(el => {
this.$set(el, 'text', el.label)
})
}
},
toJump () {
uni.navigateTo({
url: '/pages/common/mater-list?title=查询物料'
})
},
handleChange (e) {
if (e) {
if (e.charAt(0).toUpperCase() === 'T') {
this.index ='FStockPallet'
} else {
this.index ='FStockId'
}
this._getStructCount(e)
}
},
async _getStructCount (e) {
try {
let res = await getStructCount(e)
if (res) {
this.kwData = res
} else {
this.kwData = {}
}
} catch (e) {
this.kwData = {}
}
},
handleDel () {
this.index = ''
},
toEmpty () {
this.currentData = {}
this.index = ''
this.disabled = false
this.kwData = {}
},
async _groupPlate () {
this.disabled = true
@@ -187,7 +128,7 @@
this.currentData.stor_code = this.index
let res = await groupPlate(this.currentData.material_id, this.currentData.pcsn, this.currentData.qty, this.val2, this.val1)
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.disabled = false

View File

@@ -104,9 +104,9 @@
this._getReturnMaterial(e)
}
},
async _getVehicleMaterial (e) {
async _getReturnMaterial (e) {
try {
let res = await getVehicleMaterial(this.val1, this.index)
let res = await getReturnMaterial(this.val1)
if (res) {
this.currentData = res
} else {
@@ -146,13 +146,13 @@
let res = await confirmReturnMaterial(this.currentData)
if (res.code === '200') {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
this.disabled = false

View File

@@ -203,7 +203,7 @@
}
this.disabled = false
uni.showToast({
title: res.msg,
title: res.message,
icon: 'none'
})
} catch (e) {