2024-04-25 14:29:54 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="zd_container">
|
2024-07-16 15:20:42 +08:00
|
|
|
<!-- <nav-bar title="虚拟区发货"></nav-bar> -->
|
|
|
|
|
<nav-bar :title="title"></nav-bar>
|
2024-04-25 14:29:54 +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">
|
2024-05-13 17:09:27 +08:00
|
|
|
<search-box ref="scanChild" v-model="val1" @handleChange="handleChange1"
|
2024-04-25 14:29:54 +08:00
|
|
|
/>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label_wraper">
|
|
|
|
|
<span class="filter_label">单据号</span>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<search-box v-model="val2" @handleChange="handleChange2"/>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">单据类型</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
|
|
|
|
</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>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.bill_code === pkId, 'bgyellow': e.colro_flag === '1'}">
|
|
|
|
|
<td>{{e.bill_code}}</td>
|
|
|
|
|
<td>{{e.bill_type_name}}</td>
|
|
|
|
|
<td>{{e.source_bill_code}}</td>
|
|
|
|
|
<td>{{e.biz_date}}</td>
|
|
|
|
|
<td>{{e.person_name}}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row submitbar">
|
|
|
|
|
<button class="zd-col-15 btn-submit btn-success letter-30" :class="{'btn-info': !pkId}" :disabled="disabled1" @tap="toSure">确认</button>
|
|
|
|
|
<button class="zd-col-6 btn-submit btn-success letter-30" @tap="_virtualbillQuery(val1, val2)">查询</button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
|
|
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
|
|
|
import {virtualbillQuery, virtualbillType} from '@/utils/getData1.js'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
NavBar,
|
|
|
|
|
SearchBox
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-07-16 15:20:42 +08:00
|
|
|
title: '',
|
2024-04-25 14:29:54 +08:00
|
|
|
val1: '',
|
|
|
|
|
val2: '',
|
|
|
|
|
options: [],
|
|
|
|
|
index: '',
|
|
|
|
|
dataList: [],
|
|
|
|
|
pkId: '',
|
|
|
|
|
pkObj: {},
|
|
|
|
|
disabled1: false
|
|
|
|
|
};
|
|
|
|
|
},
|
2024-07-16 15:20:42 +08:00
|
|
|
onLoad (options) {
|
|
|
|
|
this.title = options.title
|
|
|
|
|
},
|
2024-04-25 14:29:54 +08:00
|
|
|
created () {
|
|
|
|
|
this._virtualbillQuery(this.val1, this.val2)
|
|
|
|
|
this._virtualbillType()
|
|
|
|
|
},
|
2024-05-13 17:09:27 +08:00
|
|
|
mounted () {
|
|
|
|
|
this.$refs.scanChild.handleFocus()
|
|
|
|
|
},
|
2024-04-25 14:29:54 +08:00
|
|
|
methods: {
|
|
|
|
|
handleChange1 (e) {
|
|
|
|
|
this._virtualbillQuery(e, this.val2)
|
|
|
|
|
},
|
|
|
|
|
handleChange2 (e) {
|
|
|
|
|
this._virtualbillQuery(this.val1, e)
|
|
|
|
|
},
|
|
|
|
|
/** 选择器 */
|
|
|
|
|
selectChange(e) {
|
|
|
|
|
this.index = e
|
|
|
|
|
},
|
|
|
|
|
/** 下拉框查询 */
|
|
|
|
|
async _virtualbillType () {
|
|
|
|
|
let res = await virtualbillType()
|
|
|
|
|
this.options = [...res.data]
|
|
|
|
|
},
|
|
|
|
|
/** 初始化查询 */
|
|
|
|
|
async _virtualbillQuery (val1, val2) {
|
|
|
|
|
let res = await virtualbillQuery(val1, val2, this.index)
|
|
|
|
|
this.dataList = [...res.data]
|
|
|
|
|
},
|
|
|
|
|
toSure () {
|
|
|
|
|
if (this.pkId) {
|
|
|
|
|
uni.navigateTo({
|
2024-07-16 15:20:42 +08:00
|
|
|
url: '/pages/WarehouseManage/XuniDeliveryConfirm?billcode=' + this.pkObj.bill_code + '&title=' + this.title
|
2024-04-25 14:29:54 +08:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
toCheck (e) {
|
|
|
|
|
this.pkId = this.pkId === e.bill_code ? '' : e.bill_code
|
|
|
|
|
this.pkObj = this.pkId === e.bill_code ? e : {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|