物料入库
This commit is contained in:
@@ -28,7 +28,15 @@
|
||||
<span class="filter_label">订单号</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="number" class="filter_input" v-model="val3">
|
||||
<input type="text" class="filter_input" v-model="val3" @input="_handheldGetRegionCode">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">物料号</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="text" class="filter_input" v-model="val4">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -36,7 +44,7 @@
|
||||
<span class="filter_label">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="number" class="filter_input" v-model="val4">
|
||||
<input type="number" class="filter_input" v-model="val5">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
@@ -44,42 +52,14 @@
|
||||
<span class="filter_label">目的地</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<input type="number" class="filter_input" v-model="val5">
|
||||
<input type="text" class="filter_input" v-model="val6">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="fontcol1">载具编码</th>
|
||||
<th>载具类型</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>点位</th>
|
||||
<th>物料数量</th>
|
||||
<th>配盘批次</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<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>
|
||||
<td class="fontcol2">{{e.material_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_fullVehicleIn">入库确认</button>
|
||||
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || !val6 || !val2 || !val3 || !val4 || !val5}" :disabled="disabled" @tap="_handheldBlanking">入库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -87,7 +67,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {fullVehicleIn} from '@/utils/getData2.js'
|
||||
import {handheldGetRegionCode, handheldBlanking} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -96,15 +76,12 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
val5: '',
|
||||
val6: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
@@ -112,39 +89,29 @@
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
async _handheldGetRegionCode () {
|
||||
let res = await handheldGetRegionCode(this.val3)
|
||||
if (res.content.length > 0) {
|
||||
this.val6 = res.content[0].region_code
|
||||
}
|
||||
},
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.val3 = ''
|
||||
this.val4 = ''
|
||||
this.val5 = ''
|
||||
this.val6 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList1.filter(i => { return i.checked === true })
|
||||
},
|
||||
toChose (e) {
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
this.pkObj = this.pkId === e.point_code ? e : {}
|
||||
},
|
||||
/** 入库 */
|
||||
async _fullVehicleIn () {
|
||||
async _handheldBlanking () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
if (!this.val1 || !this.val6 || !this.val2 || !this.val3 || !this.val4 || !this.val5) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleIn(this.pkId)
|
||||
let res = await handheldBlanking(this.val1, this.val6, this.val2, {order_code: this.val3, material_code: this.val4, material_qty: this.val5})
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
|
||||
@@ -46,21 +46,25 @@ export const handheldTranshipment = (code, vcode) => request({
|
||||
data: {device_code: code, vehicle_code: vcode}
|
||||
})
|
||||
// 载具类型列表
|
||||
// export const vehicleType = () => request({
|
||||
// url:'api/fab/vehicleType',
|
||||
// data: {}
|
||||
// })
|
||||
export const vehicleType = () => {
|
||||
let res = {
|
||||
content: [{ label: 'aa', value: '11'}, { label: 'bb', value: '22'}]
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const vehicleType = () => request({
|
||||
url:'api/fab/vehicleType',
|
||||
data: {}
|
||||
})
|
||||
// 补空框
|
||||
export const handheldStorehouse = (code, type) => request({
|
||||
url:'api/handheld/storehouse',
|
||||
data: {device_code: code, vehicle_type: type}
|
||||
})
|
||||
//
|
||||
// 工序下料
|
||||
export const handheldGetRegionCode = (code) => request({
|
||||
url:'api/handheld/getRegionCode',
|
||||
data: {orderCode: code}
|
||||
})
|
||||
export const handheldBlanking = (code, rcode, vcode, material) => request({
|
||||
url:'api/handheld/blanking',
|
||||
data: {device_code: code, region_code: rcode, vehicle_code: vcode, material: material}
|
||||
})
|
||||
|
||||
/**
|
||||
* 空托盘出库
|
||||
|
||||
Reference in New Issue
Block a user