138 lines
3.8 KiB
Vue
138 lines
3.8 KiB
Vue
<template>
|
|
<view class="zd_container">
|
|
<!-- <nav-bar :inner2="true" @goIn="goIn" title="虚拟区发货确认"></nav-bar> -->
|
|
<nav-bar :title="title" :inner="true"></nav-bar>
|
|
<view class="zd_content">
|
|
<view class="zd_wrapper">
|
|
<view class="filter_item">
|
|
<view class="filter_label_wraper">
|
|
<span class="filter_label">{{$t('filter.woodenbox')}}</span>
|
|
</view>
|
|
<view class="filter_input_wraper">
|
|
<search-box ref="scanChild" v-model="val1" @handleChange="handleChange1"
|
|
/>
|
|
</view>
|
|
</view>
|
|
<!-- <view class="filter_item">
|
|
<view class="filter_label_wraper">
|
|
<span class="filter_label">物料</span>
|
|
</view>
|
|
<view class="filter_input_wraper">
|
|
<search-box v-model="val2" />
|
|
</view>
|
|
</view> -->
|
|
<view class="filter_item">
|
|
<view class="filter_label_wraper">
|
|
<span class="filter_label">{{$t('grid.total-net-weight')}}</span>
|
|
</view>
|
|
<view class="filter_input_wraper">
|
|
<input type="number" class="filter_input filter_input_disabled" v-model="net_weight_num" disabled>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="zd_wrapper grid-wraper">
|
|
<view class="slide_new">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>{{$t('grid.woodenboxcode')}}</th>
|
|
<th>{{$t('grid.sub-roll-number')}}</th>
|
|
<th>{{$t('grid.material-code')}}</th>
|
|
<th>{{$t('grid.material-name')}}</th>
|
|
<th>{{$t('grid.weight')}}</th>
|
|
<th>{{$t('grid.replace-outsourcing')}}</th>
|
|
<th>{{$t('grid.replace-insourcing')}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'bgyellow': e.colro_flag === '1'}">
|
|
<td>{{e.package_box_sn}}</td>
|
|
<td>{{e.container_name}}</td>
|
|
<td>{{e.product_name}}</td>
|
|
<td>{{e.product_description}}</td>
|
|
<td>{{e.net_weight}}</td>
|
|
<td>{{e.change_out}}</td>
|
|
<td>{{e.change_in}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="zd-row submitbar">
|
|
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !dataList.length}" :disabled="disabled1" @tap="_virtualoutConfirm">{{$t('button.outstore-confirm')}}</button>
|
|
<button class="zd-col-6 btn-submit btn-success letter-30" @tap="_virtualivtQuery">{{$t('button.search')}}</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import NavBar from '@/components/NavBar.vue'
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
import {virtualivtQuery, virtualoutConfirm} from '@/utils/getData1.js'
|
|
export default {
|
|
components: {
|
|
NavBar,
|
|
SearchBox
|
|
},
|
|
data() {
|
|
return {
|
|
title: '',
|
|
val1: '',
|
|
val2: '',
|
|
billCode: '',
|
|
dataList: [],
|
|
disabled1: false,
|
|
net_weight_num: ''
|
|
};
|
|
},
|
|
onLoad (option) {
|
|
this.billCode = option.billcode
|
|
this.title = option.title
|
|
this._virtualivtQuery()
|
|
},
|
|
mounted () {
|
|
this.$refs.scanChild.handleFocus()
|
|
},
|
|
methods: {
|
|
handleChange1 (e) {
|
|
this._virtualivtQuery()
|
|
},
|
|
goIn () {
|
|
uni.navigateTo({
|
|
url: '/pages/WarehouseManage/XuniDelivery?title=' + this.title
|
|
})
|
|
},
|
|
handleChange (e) {
|
|
// console.log(e)
|
|
},
|
|
/** 初始化查询 */
|
|
async _virtualivtQuery () {
|
|
let res = await virtualivtQuery(this.val1, this.val2, this.billCode)
|
|
this.dataList = [...res.data]
|
|
this.net_weight_num = res.net_weight_num
|
|
},
|
|
async _virtualoutConfirm () {
|
|
if (!this.dataList.length) {
|
|
return
|
|
}
|
|
this.disabled1 = true
|
|
try {
|
|
let res = await virtualoutConfirm(this.dataList, this.val1)
|
|
this.disabled1 = false
|
|
this.val1 = ''
|
|
this.val2 = ''
|
|
this.dataList = []
|
|
this._virtualivtQuery()
|
|
uni.showToast({
|
|
title: res.message,
|
|
icon: 'none'
|
|
})
|
|
this.$refs.scanChild.handleFocus()
|
|
} catch (e) {
|
|
this.disabled1 = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script> |