Files
hht-ynhl-one-uni/pages/SecondPhase/DeliveryUnbindConfirm.vue
2026-01-21 11:27:09 +08:00

192 lines
5.5 KiB
Vue

<template>
<view class="zd_container">
<nav-bar title="发货区解绑" :inner="true" :show="false"></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.box-no')}}</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" @handleChange="handleChange"/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">单据号</view>
<view class="filter_input_wraper">
<input type="text" class="filter_input filter_input_disabled" v-model="val2" disabled>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th class="fontcol2">{{$t('filter.box-no')}}</th>
<th>{{$t('grid.point-code')}}</th>
<th>点位名称</th>
<th>{{$t('grid.weight')}}</th>
<th>{{$t('grid.product-code')}}</th>
<th>产品名称</th>
<th>{{$t('grid.order-number')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @tap="_twoPdaIvtbBoxDtlQuery(e.package_box_sn)">
<td class="fontcol2">{{e.package_box_sn}}</td>
<td>{{e.point_code}}</td>
<td>{{e.point_name}}</td>
<td>{{e.box_weight}}</td>
<td>{{e.product_name}}</td>
<td>{{e.product_description}}</td>
<td>{{e.sale_order_name}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-5 btn-submit btn-default letter-30" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': dataList.length === 0}" :disabled="disabled" @tap="handleConfirm">{{$t('button.confirm')}}</button>
<button class="zd-col-8 btn-submit btn-success letter-30" @tap="_twoPdaIvtDtlQuery(val1)">{{$t('button.search')}}</button>
</view>
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content pdb110">
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>{{$t('filter.box-no')}}</th>
<th>{{$t('grid.sub-roll-number')}}</th>
<th>sap批次</th>
<th>净重</th>
<th>状态</th>
<th>{{$t('grid.order-number')}}</th>
<th>客户编码</th>
<th>{{$t('grid.customer-name')}}</th>
<th>幅宽</th>
<th>厚度</th>
<th>长度</th>
<th>客户要求幅宽</th>
<th>物料标准厚度</th>
<th>保质期</th>
<th>制造完成日期</th>
<th>入库日期</th>
</tr>
</thead>
<tbody>
<tr v-for="e in dtlList" :key="e.package_box_sn">
<td>{{e.package_box_sn}}</td>
<td>{{e.container_name}}</td>
<td>{{e.sap_pcsn}}</td>
<td>{{e.net_weight}}</td>
<td>{{e.status}}</td>
<td>{{e.sale_order_name}}</td>
<td>{{e.customer_name}}</td>
<td>{{e.customer_description}}</td>
<td>{{e.width}}</td>
<td>{{e.thickness}}</td>
<td>{{e.length}}</td>
<td>{{e.width_standard}}</td>
<td>{{e.thickness_request}}</td>
<td>{{e.quality_guaran_period}}</td>
<td>{{e.date_of_production}}</td>
<td>{{e.date_of_fG_inbound}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-22 btn-submit btn-success letter-30" @tap.stop="show = false">返回</button>
</view>
</view>
<view v-if="show" class="msg_mask"></view>
<up-top ref="UT" :scrollTop="top"></up-top>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import UpTop from '@/components/upTop.vue'
import { confirmAction } from '@/utils/utils.js'
import {twoPdaIvtDtlQuery, twoPdaIvtbBoxDtlQuery, twoPdaOutConfirm} from '@/utils/getData3.js'
// import {twoPdaIvtDtlQuery, twoPdaIvtbBoxDtlQuery} from '@/utils/mork2.js'
export default {
components: {
NavBar,
SearchBox,
UpTop
},
data() {
return {
top: 0,
val1: '',
val2: '',
dataList: [],
dtlList: [],
show: false,
disabled: false
};
},
onLoad (options) {
this.val2 = options.code
},
onPageScroll(e) {
this.$refs.UT.topData(e.scrollTop)
},
methods: {
handleChange (e) {
this._twoPdaIvtDtlQuery(e)
},
async _twoPdaIvtDtlQuery (e) {
let res = await twoPdaIvtDtlQuery(e, this.val2)
this.dataList = [...res.data]
},
async _twoPdaIvtbBoxDtlQuery (e) {
let res = await twoPdaIvtbBoxDtlQuery(e)
this.dtlList = [...res.data]
this.show = true
},
async handleConfirm() {
if (this.dataList.length === 0) {
return
}
const isConfirmed = await confirmAction(this.$t('toast.prompt'), this.$t('toast.sure-perform-operation'))
if (isConfirmed) {
this._twoPdaOutConfirm()
}
},
async _twoPdaOutConfirm () {
this.disabled = true
try {
let res = await twoPdaOutConfirm(this.val1)
uni.showToast({
title: res.message,
icon: 'none'
})
this.val1 = ''
this.dataList = []
this.disabled = false
} catch (e) {
this.disabled = false
}
},
clearUp () {
this.val1 = ''
this.dataList = []
}
}
}
</script>
<style lang="stylus" scoped>
.pdb110
padding-bottom 110rpx
</style>