加功能
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<search-box v-model="vehicleCode"/>
|
||||
<search-box v-model="vehicleCode" @handleChange="handleChange" @handleDel="handleDel"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -83,10 +83,10 @@
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">料箱类型</span>
|
||||
<span class="filter_label filter_input_disabled">料箱类型</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="boxType" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -114,8 +114,8 @@
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {getDate} from '@/utils/utils.js'
|
||||
const currentDate = getDate({format: true})
|
||||
// import {queryGroupQuality, queryBoxType} from '@/utils/mork2.js'
|
||||
import {queryGroupQuality, queryBoxType, confirmBox} from '@/utils/getData2.js'
|
||||
// import {queryGroupQuality, queryNowVehicle} from '@/utils/mork2.js'
|
||||
import {queryGroupQuality, queryNowVehicle, confirmBox} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -129,8 +129,7 @@
|
||||
date: currentDate,
|
||||
options1: [],
|
||||
index1: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
boxType: null,
|
||||
materialData: {},
|
||||
suppData: {},
|
||||
pcsn: null,
|
||||
@@ -151,7 +150,6 @@
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryGroupQuality()
|
||||
this._queryBoxType()
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
@@ -164,6 +162,26 @@
|
||||
}
|
||||
},
|
||||
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) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/General/${name}`
|
||||
@@ -185,23 +203,11 @@
|
||||
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 () {
|
||||
this.vehicleCode = ''
|
||||
this.date = currentDate
|
||||
this.index1 = ''
|
||||
this.index2 = ''
|
||||
this.boxType = null
|
||||
this.materialData = {}
|
||||
this.suppData = {}
|
||||
this.pcsn = null
|
||||
@@ -215,7 +221,7 @@
|
||||
return
|
||||
}
|
||||
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) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
let res = await getInvInfoQty(this.val1)
|
||||
this.kcqty = res.data.ivt_qty
|
||||
this.materialData.qty1 = res.data.ivt_qty
|
||||
this.materialData.fac_qty = this.kcqty
|
||||
},
|
||||
async _materialBoxInventoryConfirm () {
|
||||
this.disabled = true
|
||||
|
||||
@@ -24,14 +24,6 @@
|
||||
/>
|
||||
</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 class="zd-row submit-bar">
|
||||
@@ -46,7 +38,6 @@
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {bindEmptyVehicle, unBindEmptyVehicle} from '@/utils/getData1.js'
|
||||
import {queryVehicleType} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -58,7 +49,6 @@
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [],
|
||||
index: '2',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
@@ -66,28 +56,11 @@
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._queryVehicleType()
|
||||
},
|
||||
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 () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _bindEmptyVehicle () {
|
||||
|
||||
@@ -56,6 +56,12 @@ export const queryVehicleType = (time, search) => request({
|
||||
url:'api/pdaGeneralPublic/queryVehicleType',
|
||||
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({
|
||||
url:'api/pdaInGroupBox/confirmBox',
|
||||
|
||||
@@ -136,4 +136,11 @@ export const updatePointqueryPointInfo = (time, search) => {
|
||||
]
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const queryNowVehicle = () => {
|
||||
let res = {
|
||||
message: 'ok',
|
||||
data: {box_type: 'aa'}
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user