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

138 lines
3.4 KiB
Vue
Raw Normal View History

2022-10-20 11:31:21 +08:00
<template>
<view class="zd_container">
2023-04-19 16:16:02 +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="focusedStatus" @handleChange="handleChange1"
2022-10-20 11:31:21 +08:00
/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
2023-04-19 16:16:02 +08:00
<th>木箱号</th>
2023-08-25 16:56:17 +08:00
<th>木箱毛重</th>
<th>木箱净重</th>
<th>产品名称</th>
<!-- <th>序号</th> -->
2023-04-19 16:16:02 +08:00
<th>点位编码</th>
<th>点位名称</th>
<th>产品编码</th>
<th>订单号</th>
2022-10-20 11:31:21 +08:00
</tr>
</thead>
<tbody>
2023-04-19 16:16:02 +08:00
<tr v-for="(e, i) in dataList" :key="i">
2023-04-20 09:35:51 +08:00
<td style="text-decoration: underline;" @tap="toXq(e.package_box_sn)">{{e.package_box_sn}}</td>
2023-08-25 16:56:17 +08:00
<td>{{e.box_weight}}</td>
<td>{{e.net_weight_num}}</td>
<td>{{e.product_description}}</td>
<!-- <td>{{Number(i) + 1}}</td> -->
2023-04-19 16:16:02 +08:00
<td>{{e.point_code}}</td>
<td>{{e.point_name}}</td>
2022-10-28 10:57:45 +08:00
<td>{{e.product_name}}</td>
2023-04-19 16:16:02 +08:00
<td>{{e.sale_order_name}}</td>
2022-10-20 11:31:21 +08:00
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="submit-bar">
2023-08-31 10:33:12 +08:00
<!-- <button class="submit-button" @tap="handleTest">Test</button> -->
2023-04-19 16:16:02 +08:00
<button class="submit-button" :class="{'btn-disabled': !val1}" :disabled="disabled1" @tap="_stoutConfirm">出库确认</button>
<button class="submit-button" @tap="_stivtDtlQuery">查询</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'
2023-04-19 16:16:02 +08:00
import {stivtDtlQuery, stoutConfirm} 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: '',
2023-04-19 16:16:02 +08:00
billCode: '',
2022-10-20 11:31:21 +08:00
dataList: [],
2023-04-19 16:16:02 +08:00
disabled1: false
2022-10-20 11:31:21 +08:00
};
},
2023-04-19 16:16:02 +08:00
onLoad (option) {
this.billCode = option.billcode
this._stivtDtlQuery()
2022-10-20 11:31:21 +08:00
},
methods: {
2023-08-25 16:44:45 +08:00
handleChange1 (e) {
2023-08-25 16:56:17 +08:00
this._stivtDtlQuery()
2023-08-25 16:44:45 +08:00
},
2023-04-19 16:16:02 +08:00
goIn () {
uni.navigateTo({
url: `/pages/WarehouseManage/ProdDelivery`
})
2022-11-30 12:28:31 +08:00
},
2023-04-19 16:16:02 +08:00
toXq (code) {
uni.navigateTo({
2023-04-21 16:06:43 +08:00
url: '/pages/WarehouseManage/ProdDeliveryDtl?boxno=' + code + '&billcode=' + this.billCode
2023-04-19 16:16:02 +08:00
})
2022-10-20 11:31:21 +08:00
},
2023-08-31 10:33:12 +08:00
// handleTest () {
// this.focusedStatus = false
// this.val1 = ''
// setTimeout(()=>{
// uni.showToast({
// title: 'toast',
// icon: 'none'
// })
// this.focusedStatus = true
// },3000)
// },
2022-10-20 11:31:21 +08:00
/** 初始化查询 */
2023-04-19 16:16:02 +08:00
async _stivtDtlQuery () {
let res = await stivtDtlQuery(this.val1, this.billCode)
2022-10-20 11:31:21 +08:00
this.dataList = [...res.data]
},
2022-10-28 10:57:45 +08:00
async _stoutConfirm () {
2023-08-31 10:33:12 +08:00
this.focusedStatus = false
2022-10-20 11:31:21 +08:00
this.disabled1 = true
try {
2023-04-19 16:16:02 +08:00
let res = await stoutConfirm(this.val1)
2022-10-28 10:57:45 +08:00
this.disabled1 = false
2023-04-19 16:16:02 +08:00
this.val1 = ''
this._stivtDtlQuery()
2022-11-11 18:22:26 +08:00
uni.showToast({
title: res.message,
icon: 'none'
})
2023-08-31 10:33:12 +08:00
this.focusedStatus = true
2022-10-20 11:31:21 +08:00
} catch (e) {
this.disabled1 = false
}
}
}
}
</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>