Files
hht-tongbo/pages/WarehouseManage/XuniDeliveryConfirm.vue

144 lines
3.7 KiB
Vue
Raw Normal View History

2022-10-20 11:31:21 +08:00
<template>
<view class="zd_container">
2022-11-16 14:36:48 +08:00
<nav-bar :inner2="true" @goIn="goIn" title="虚拟区发货确认"></nav-bar>
2022-10-20 11:31:21 +08:00
<view class="zd_content">
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">木箱</span>
</view>
<view class="filter_input_wraper">
2023-08-25 22:08:49 +08:00
<!-- <search-box v-model="val1" :focused="true" @handleChange="handleChange1" -->
<search-box v-model="val1" :focused="focusedStatus" @handleChange="handleChange1"
2022-10-20 11:31:21 +08:00
/>
</view>
</view>
2023-08-25 22:08:49 +08:00
<!-- <view class="filter_item">
2022-10-20 11:31:21 +08:00
<view class="filter_label_wraper">
2022-10-31 14:25:51 +08:00
<span class="filter_label">物料</span>
2022-10-20 11:31:21 +08:00
</view>
<view class="filter_input_wraper">
<search-box v-model="val2" />
</view>
2023-08-25 22:08:49 +08:00
</view> -->
2023-08-25 16:35:34 +08:00
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">总净重</span>
</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input filter_input_disabled" v-model="net_weight_num" disabled>
</view>
</view>
2022-10-20 11:31:21 +08:00
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
2022-10-28 10:57:45 +08:00
<th>木箱码</th>
<th>子卷号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>重量kg</th>
<th>更换外包</th>
<th>更换内包</th>
2022-10-20 11:31:21 +08:00
</tr>
</thead>
<tbody>
2022-10-31 14:25:51 +08:00
<tr v-for="(e, i) in dataList" :key="i" :class="{'bgyellow': e.colro_flag === '1'}">
2022-11-17 11:28:37 +08:00
<td>{{e.package_box_sn}}</td>
2022-10-20 11:31:21 +08:00
<td>{{e.container_name}}</td>
2022-10-28 10:57:45 +08:00
<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>
2022-10-20 11:31:21 +08:00
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="submit-bar">
2022-10-31 14:25:51 +08:00
<button class="submit-button" :class="{'btn-disabled': !dataList.length}" :disabled="disabled1" @tap="_virtualoutConfirm">出库确认</button>
2022-11-16 14:36:48 +08:00
<button class="submit-button" @tap="_virtualivtQuery">查询</button>
2022-10-20 11:31:21 +08:00
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
2022-10-31 14:25:51 +08:00
import {virtualivtQuery, virtualoutConfirm} from '@/utils/getData1.js'
2022-10-20 11:31:21 +08:00
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
2023-08-25 22:08:49 +08:00
focusedStatus: true,
2022-10-20 11:31:21 +08:00
val1: '',
val2: '',
2022-10-31 14:25:51 +08:00
billCode: '',
2022-10-20 11:31:21 +08:00
dataList: [],
2023-08-25 16:35:34 +08:00
disabled1: false,
net_weight_num: ''
2022-10-20 11:31:21 +08:00
};
},
2022-10-31 14:25:51 +08:00
onLoad (option) {
2022-11-28 14:59:47 +08:00
this.billCode = option.billcode
this._virtualivtQuery()
2022-10-20 11:31:21 +08:00
},
methods: {
2023-08-25 22:08:49 +08:00
handleChange1 (e) {
this._virtualivtQuery()
},
2022-11-16 14:36:48 +08:00
goIn () {
uni.navigateTo({
url: `/pages/WarehouseManage/XuniDelivery`
})
},
2022-10-20 11:31:21 +08:00
handleChange (e) {
// console.log(e)
},
/** 初始化查询 */
2022-10-31 14:25:51 +08:00
async _virtualivtQuery () {
let res = await virtualivtQuery(this.val1, this.val2, this.billCode)
2023-08-25 16:35:34 +08:00
this.dataList = [...res.data]
this.net_weight_num = res.net_weight_num
2022-10-20 11:31:21 +08:00
},
2022-10-31 14:25:51 +08:00
async _virtualoutConfirm () {
2023-08-31 10:33:12 +08:00
this.focusedStatus = false
2023-08-25 22:08:49 +08:00
if (!this.dataList.length) {
return
}
2022-10-20 11:31:21 +08:00
this.disabled1 = true
try {
2022-10-31 14:25:51 +08:00
let res = await virtualoutConfirm(this.dataList, this.val1)
2022-11-11 18:22:26 +08:00
this.disabled1 = false
2022-11-28 14:59:47 +08:00
this.val1 = ''
2022-11-28 17:25:24 +08:00
this.val2 = ''
this._virtualivtQuery()
2022-10-20 11:31:21 +08:00
uni.showToast({
title: res.message,
icon: 'none'
})
2023-08-31 10:33:12 +08:00
this.focusedStatus = true
2022-10-28 10:57:45 +08:00
} catch (e) {
this.disabled1 = false
}
2022-10-20 11:31:21 +08:00
}
}
}
</script>
<style lang="stylus">
.zd_content
2022-10-28 10:57:45 +08:00
padding-bottom 77rpx
2022-10-28 11:12:43 +08:00
.slide_new table td:nth-child(1), .slide_new table th:nth-child(1)
2022-10-20 11:31:21 +08:00
box-shadow 1px 0 2px rgba(0,0,0,.12)
2022-10-28 10:57:45 +08:00
.bgyellow td
background-color #E9B451
2022-10-20 11:31:21 +08:00
</style>