加功能

This commit is contained in:
2025-10-22 10:24:50 +08:00
parent 5dbec81e7f
commit eaebed8fa5
5 changed files with 43 additions and 50 deletions

View File

@@ -9,7 +9,7 @@
<span class="filter_label">载具编码</span> <span class="filter_label">载具编码</span>
</view> </view>
<view class="zd-col-18"> <view class="zd-col-18">
<search-box v-model="vehicleCode"/> <search-box v-model="vehicleCode" @handleChange="handleChange" @handleDel="handleDel"/>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
@@ -83,10 +83,10 @@
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-6"> <view class="zd-col-6">
<span class="filter_label">料箱类型</span> <span class="filter_label filter_input_disabled">料箱类型</span>
</view> </view>
<view class="zd-col-18 filter_select"> <view class="zd-col-18">
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select> <input type="text" class="filter_input filter_input_disabled" v-model="boxType" disabled>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
@@ -114,8 +114,8 @@
import NumberInput from '@/components/NumberInput.vue' import NumberInput from '@/components/NumberInput.vue'
import {getDate} from '@/utils/utils.js' import {getDate} from '@/utils/utils.js'
const currentDate = getDate({format: true}) const currentDate = getDate({format: true})
// import {queryGroupQuality, queryBoxType} from '@/utils/mork2.js' // import {queryGroupQuality, queryNowVehicle} from '@/utils/mork2.js'
import {queryGroupQuality, queryBoxType, confirmBox} from '@/utils/getData2.js' import {queryGroupQuality, queryNowVehicle, confirmBox} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -129,8 +129,7 @@
date: currentDate, date: currentDate,
options1: [], options1: [],
index1: '', index1: '',
options2: [], boxType: null,
index2: '',
materialData: {}, materialData: {},
suppData: {}, suppData: {},
pcsn: null, pcsn: null,
@@ -151,7 +150,6 @@
onLoad (options) { onLoad (options) {
this.title = options.title this.title = options.title
this._queryGroupQuality() this._queryGroupQuality()
this._queryBoxType()
}, },
onShow () { onShow () {
if (this.$store.getters.publicObj !== '') { if (this.$store.getters.publicObj !== '') {
@@ -164,6 +162,26 @@
} }
}, },
methods: { methods: {
handleChange (e) {
if (e) {
this._queryNowVehicle(e)
}
},
handleDel () {
this.boxType = ''
},
async _queryNowVehicle (e) {
try {
let res = await queryNowVehicle(e)
if (res) {
this.boxType = res.data.box_type
} else {
this.boxType = ''
}
} catch (e) {
this.boxType = ''
}
},
toJump (name) { toJump (name) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/General/${name}` url: `/pages/General/${name}`
@@ -185,23 +203,11 @@
this.options1 = [] this.options1 = []
} }
}, },
async _queryBoxType () {
try {
let res = await queryBoxType()
if (res && res.data) {
this.options2 = [...res.data]
} else {
this.options2 = []
}
} catch (e) {
this.options2 = []
}
},
toEmpty () { toEmpty () {
this.vehicleCode = '' this.vehicleCode = ''
this.date = currentDate this.date = currentDate
this.index1 = '' this.index1 = ''
this.index2 = '' this.boxType = null
this.materialData = {} this.materialData = {}
this.suppData = {} this.suppData = {}
this.pcsn = null this.pcsn = null
@@ -215,7 +221,7 @@
return return
} }
try { try {
let res = await confirmBox(this.vehicleCode, this.materialData.material_id, this.materialData.material_code, this.materialData.material_name, this.suppData.supp_code, this.suppData.supp_name, this.pcsn, this.date, this.qty, this.index1, this.index2, this.num) let res = await confirmBox(this.vehicleCode, this.materialData.material_id, this.materialData.material_code, this.materialData.material_name, this.suppData.supp_code, this.suppData.supp_name, this.pcsn, this.date, this.qty, this.index1, this.boxType, this.num)
if (res) { if (res) {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,

View File

@@ -114,6 +114,7 @@
let res = await getInvInfoQty(this.val1) let res = await getInvInfoQty(this.val1)
this.kcqty = res.data.ivt_qty this.kcqty = res.data.ivt_qty
this.materialData.qty1 = res.data.ivt_qty this.materialData.qty1 = res.data.ivt_qty
this.materialData.fac_qty = this.kcqty
}, },
async _materialBoxInventoryConfirm () { async _materialBoxInventoryConfirm () {
this.disabled = true this.disabled = true

View File

@@ -24,14 +24,6 @@
/> />
</view> </view>
</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> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
@@ -46,7 +38,6 @@
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {bindEmptyVehicle, unBindEmptyVehicle} from '@/utils/getData1.js' import {bindEmptyVehicle, unBindEmptyVehicle} from '@/utils/getData1.js'
import {queryVehicleType} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -58,7 +49,6 @@
val1: '', val1: '',
val2: '', val2: '',
options: [], options: [],
index: '2',
disabled: false disabled: false
}; };
}, },
@@ -66,28 +56,11 @@
this.title = options.title this.title = options.title
}, },
created () { created () {
this._queryVehicleType()
}, },
methods: { methods: {
async _queryVehicleType () {
try {
let res = await queryVehicleType()
if (res) {
this.options = res.data
} else {
this.options = []
}
} catch (e) {
this.options = []
}
},
selectChange (e) {
this.index = e
},
clearUp () { clearUp () {
this.val1 = '' this.val1 = ''
this.val2 = '' this.val2 = ''
this.index = ''
this.disabled = false this.disabled = false
}, },
async _bindEmptyVehicle () { async _bindEmptyVehicle () {

View File

@@ -56,6 +56,12 @@ export const queryVehicleType = (time, search) => request({
url:'api/pdaGeneralPublic/queryVehicleType', url:'api/pdaGeneralPublic/queryVehicleType',
data: {start_time: time, search: search} data: {start_time: time, search: search}
}) })
// 查询当前载具类型
export const queryNowVehicle = (code) => request({
url:'api/pdaGeneralPublic/queryNowVehicle',
data: {vehicle_code: code}
})
// 确认组箱(入库组箱) // 确认组箱(入库组箱)
export const confirmBox = (scode, id, mcode, mname, spcode, spname, pcsn, time, qty, quality, type, num) => request({ export const confirmBox = (scode, id, mcode, mname, spcode, spname, pcsn, time, qty, quality, type, num) => request({
url:'api/pdaInGroupBox/confirmBox', url:'api/pdaInGroupBox/confirmBox',

View File

@@ -136,4 +136,11 @@ export const updatePointqueryPointInfo = (time, search) => {
] ]
} }
return res return res
}
export const queryNowVehicle = () => {
let res = {
message: 'ok',
data: {box_type: 'aa'}
}
return res
} }