Files
hht-tongbo-two/pages/WarehouseManage/ProdDeliveryConfirm.vue
2024-05-11 17:37:01 +08:00

128 lines
3.3 KiB
Vue

<template>
<view class="zd_container">
<nav-bar :inner2="true" @goIn="goIn" title="生产区发货确认"></nav-bar>
<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">
<search-box v-model="val1" :focused="focusedStatus" @handleChange="handleChange1"
/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>木箱号</th>
<th>木箱毛重</th>
<th>木箱净重</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">
<td style="text-decoration: underline;" @tap="toXq(e.package_box_sn)">{{e.package_box_sn}}</td>
<td>{{e.box_weight}}</td>
<td>{{e.net_weight_num}}</td>
<td>{{e.product_description}}</td>
<!-- <td>{{Number(i) + 1}}</td> -->
<td>{{e.point_code}}</td>
<td>{{e.point_name}}</td>
<td>{{e.product_name}}</td>
<td>{{e.sale_order_name}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submitbar">
<!-- <button class="submit-button" @tap="handleTest">Test</button> -->
<button class="zd-col-11 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled1" @tap="_stoutConfirm">出库确认</button>
<button class="zd-col-11 btn-submit btn-success letter-30" @tap="_stivtDtlQuery">查询</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {stivtDtlQuery, stoutConfirm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
focusedStatus: true,
val1: '',
billCode: '',
dataList: [],
disabled1: false
};
},
onLoad (option) {
this.billCode = option.billcode
this._stivtDtlQuery()
},
methods: {
handleChange1 (e) {
this._stivtDtlQuery()
},
goIn () {
uni.navigateTo({
url: `/pages/WarehouseManage/ProdDelivery`
})
},
toXq (code) {
uni.navigateTo({
url: '/pages/WarehouseManage/ProdDeliveryDtl?boxno=' + code + '&billcode=' + this.billCode
})
},
// handleTest () {
// this.focusedStatus = false
// this.val1 = ''
// setTimeout(()=>{
// uni.showToast({
// title: 'toast',
// icon: 'none'
// })
// this.focusedStatus = true
// },3000)
// },
/** 初始化查询 */
async _stivtDtlQuery () {
let res = await stivtDtlQuery(this.val1, this.billCode)
this.dataList = [...res.data]
},
async _stoutConfirm () {
this.focusedStatus = false
this.disabled1 = true
try {
let res = await stoutConfirm(this.val1)
this.disabled1 = false
this.val1 = ''
this._stivtDtlQuery()
uni.showToast({
title: res.message,
icon: 'none'
})
this.focusedStatus = true
} catch (e) {
this.disabled1 = false
}
}
}
}
</script>