121 lines
3.1 KiB
Vue
121 lines
3.1 KiB
Vue
<template>
|
|
<view class="zd_container">
|
|
<nav-bar title="盘点管理"></nav-bar>
|
|
<view class="zd_content">
|
|
<view class="zd_wrapper">
|
|
<view class="filter_item">
|
|
<view class="filter_label">单据编码</view>
|
|
<view class="filter_input_wraper">
|
|
<input type="text" class="filter_input" v-model="val1">
|
|
</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>
|
|
<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.check_code === pkId}">
|
|
<td>{{e.check_code}}</td>
|
|
<td>{{e.check_type}}</td>
|
|
<td>{{e.stor_name}}</td>
|
|
<td>{{e.dtl_num}}</td>
|
|
<td>{{e.status}}</td>
|
|
<td>{{e.is_nok}}</td>
|
|
<td>{{e.input_optname}}</td>
|
|
<td>{{e.input_time}}</td>
|
|
<td>{{e.confirm_optname}}</td>
|
|
<td>{{e.confirm_time}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="submit-bar">
|
|
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="toPandian">盘点</button>
|
|
<button class="submit-button" @tap="_checkQuery">查询</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import NavBar from '@/components/NavBar.vue'
|
|
import {checkQuery, checkgetStor} from '@/utils/getData1.js'
|
|
export default {
|
|
components: {
|
|
NavBar,
|
|
},
|
|
data() {
|
|
return {
|
|
val1: '',
|
|
dataList: [],
|
|
pkId: '',
|
|
pkObj: {},
|
|
options: [],
|
|
index: '1582991156504039424', // 默认兰州仓库
|
|
disabled1: false
|
|
};
|
|
},
|
|
created () {
|
|
this._checkgetStor()
|
|
this._checkQuery()
|
|
},
|
|
methods: {
|
|
/** 初始化查询 */
|
|
async _checkQuery () {
|
|
let res = await checkQuery(this.val1, this.index)
|
|
this.dataList = [...res.data]
|
|
},
|
|
/** 选择器 */
|
|
selectChange(e) {
|
|
this.index = e
|
|
},
|
|
/** 仓库下拉框查询 */
|
|
async _checkgetStor () {
|
|
let res = await checkgetStor()
|
|
this.options = [...res.data]
|
|
},
|
|
toPandian () {
|
|
if (this.pkId) {
|
|
uni.navigateTo({
|
|
url: '/pages/WarehouseManage/CheckDtl?checkcode=' + this.pkObj.check_code + '&checknum=' + this.pkObj.check_num + '&unchecknum=' + this.pkObj.uncheck_num
|
|
})
|
|
}
|
|
},
|
|
toCheck (e) {
|
|
this.pkId = this.pkId === e.check_code ? '' : e.check_code
|
|
this.pkObj = this.pkId === e.check_code ? e : {}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus">
|
|
.zd_content
|
|
padding-bottom 77rpx
|
|
.slide_new table td:nth-child(1), .slide_new table th:nth-child(1)
|
|
box-shadow 1px 0 2px rgba(0,0,0,.12)
|
|
.bgyellow td
|
|
background-color #E9B451
|
|
</style>
|