Files
hht-ynhl-one-uni/pages/SecondPhase/DeliveryUnbind.vue
2025-06-06 16:05:31 +08:00

128 lines
3.7 KiB
Vue

<template>
<view class="zd_container">
<!-- <nav-bar title="发货区解绑"></nav-bar> -->
<nav-bar :title="title"></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" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">{{$t('filter.bill-code')}}</view>
<view class="filter_input_wraper">
<input type="text" class="filter_input" v-model="val2">
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>{{$t('filter.bill-code')}}</th>
<th>{{$t('filter.state')}}</th>
<th>{{$t('grid.total-weight')}}</th>
<th>{{$t('grid.details')}}</th>
<th>{{$t('grid.customer-code')}}</th>
<th>{{$t('grid.customer-name')}}</th>
<th>{{$t('grid.delivery-note')}}</th>
<th>{{$t('filter.remark')}}</th>
<th>{{$t('grid.create-man')}}</th>
<th>{{$t('grid.create-time')}}</th>
<th>{{$t('grid.assign-person')}}</th>
<th>{{$t('grid.allocate-time')}}</th>
<th>{{$t('grid.confirm-man')}}</th>
<th>{{$t('grid.confirm-time')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.bill_code === pkId}">
<td>{{e.bill_code}}</td>
<td>{{e.bill_status}}</td>
<td>{{e.total_qty}}</td>
<td>{{e.detail_count}}</td>
<td>{{e.cust_code}}</td>
<td>{{e.cust_name}}</td>
<td>{{e.source_id}}</td>
<td>{{e.remark}}</td>
<td>{{e.input_optname}}</td>
<td>{{e.input_time}}</td>
<td>{{e.dis_optname}}</td>
<td>{{e.dis_time}}</td>
<td>{{e.confirm_optname}}</td>
<td>{{e.confirm_time}}</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': !pkId}" @tap="toSure">{{$t('button.confirm')}}</button>
<button class="zd-col-8 btn-submit btn-success letter-30" @tap="_twoPdaIvtQuery">{{$t('button.search')}}</button>
</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 {twoPdaIvtQuery} from '@/utils/getData3.js'
// import {twoPdaIvtQuery} from '@/utils/mork2.js'
export default {
components: {
NavBar,
SearchBox,
UpTop
},
data() {
return {
title: '',
top: 0,
val1: '',
val2: '',
dataList: [],
pkId: '',
pkObj: {}
};
},
onPageScroll(e) {
this.$refs.UT.topData(e.scrollTop)
},
onLoad (options) {
this._twoPdaIvtQuery()
this.title = options.title
},
methods: {
async _twoPdaIvtQuery () {
let res = await twoPdaIvtQuery(this.val1, this.val2)
this.dataList = [...res.data]
},
toCheck (e) {
this.pkId = this.pkId === e.bill_code ? '' : e.bill_code
this.pkObj = this.pkId === e.bill_code ? e : {}
},
toSure () {
if (this.pkId) {
uni.navigateTo({
url: '/pages/SecondPhase/DeliveryUnbindConfirm?code=' + this.pkObj.bill_code
})
}
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.dataList = []
this.pkId = ''
}
}
}
</script>