152 lines
4.3 KiB
Vue
152 lines
4.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 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>
|
|
<th>盘点结果</th>
|
|
<th>盘点人</th>
|
|
<th>盘点时间</th>
|
|
<th>单据号</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(el, i) in dataList" :key="i" :class="{'checked': el.checked}">
|
|
<td><span class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}" @tap="toCheck(e)"></span></td>
|
|
<td @tap="toXq(el.storagevehicle_code)"><a>{{el.storagevehicle_code}}</a></td>
|
|
<td>{{el.status}}</td>
|
|
<!-- <td>{{el.base_qty}}</td>
|
|
<td><input type="number" class="sin_input" :min="0" v-model="el.fac_qty" @blur="e => {if (e.target.value === '') {el.fac_qty=0}}" v-enter-number></td> -->
|
|
<td>{{el.sect_name}}</td>
|
|
<td>{{el.struct_name}}</td>
|
|
<td>{{el.material_code}}</td>
|
|
<td>{{el.material_name}}</td>
|
|
<td><input type="text" class="sin_input" v-model="el.remark"></td>
|
|
<td>{{el.check_result}}</td>
|
|
<td>{{el.check_optname}}</td>
|
|
<td>{{el.check_time}}</td>
|
|
<td>{{el.check_code}}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="submit-bar">
|
|
<!-- <button class="submit-button" :class="{'btn-disabled': !dataList.length}" :disabled="disabled1" @tap="_saveCheck">保存</button> -->
|
|
<!-- <button class="submit-button" :class="{'btn-disabled': !dataList.length}" :disabled="disabled1" @tap="_confirmCheck">确认</button> -->
|
|
<button class="submit-button" :class="{'btn-disabled': !dataList.length}" :disabled="disabled1" @tap="_checkexception">异常</button>
|
|
<button class="submit-button" :class="{'btn-disabled': !dataList.length}" :disabled="disabled1" @tap="_checknormal">正常</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import NavBar from '@/components/NavBar.vue'
|
|
import {checkQueryDtl, checkexception, checknormal} from '@/utils/getData1.js'
|
|
export default {
|
|
components: {
|
|
NavBar,
|
|
},
|
|
data() {
|
|
return {
|
|
value: '1',
|
|
checkCode: '',
|
|
dataList: [],
|
|
checkArr: [],
|
|
disabled1: false
|
|
};
|
|
},
|
|
created () {
|
|
},
|
|
onLoad (option) {
|
|
this.checkCode = option.checkcode
|
|
this._checkQueryDtl()
|
|
},
|
|
methods: {
|
|
goIn () {
|
|
uni.navigateTo({
|
|
url: `/pages/WarehouseManage/CheckList`
|
|
})
|
|
},
|
|
handleChange (e) {
|
|
// console.log(e)
|
|
},
|
|
toXq (code) {
|
|
uni.navigateTo({
|
|
url: '/pages/WarehouseManage/Details?storagevehicle_code=' + code
|
|
})
|
|
},
|
|
toCheck (e) {
|
|
e.checked = !e.checked
|
|
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
|
},
|
|
/** 初始化查询 */
|
|
async _checkQueryDtl () {
|
|
let res = await checkQueryDtl(this.checkCode)
|
|
res.data.map(el => {
|
|
this.$set(el, 'checked', false)
|
|
})
|
|
this.dataList = [...res.data]
|
|
},
|
|
async _checkexception () {
|
|
this.disabled1 = true
|
|
try {
|
|
let res = await checkexception(this.dataList, this.checkCode)
|
|
this.disabled1 = false
|
|
this.checkArr = []
|
|
this._checkQueryDtl()
|
|
uni.showToast({
|
|
title: res.message,
|
|
icon: 'none'
|
|
})
|
|
} catch (e) {
|
|
this.disabled1 = false
|
|
}
|
|
},
|
|
async _checknormal () {
|
|
this.disabled1 = true
|
|
try {
|
|
let res = await checknormal(this.dataList, this.checkCode)
|
|
this.disabled1 = false
|
|
this.checkArr = []
|
|
this._checkQueryDtl()
|
|
uni.showToast({
|
|
title: res.message,
|
|
icon: 'none'
|
|
})
|
|
} catch (e) {
|
|
this.disabled1 = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</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)
|
|
.slide_new table td:first-child, .slide_new table th:first-child
|
|
width 92rpx
|
|
.slide_new table td:nth-child(2), .slide_new table th:nth-child(2)
|
|
position sticky
|
|
left 89rpx
|
|
z-index 102
|
|
box-shadow 1px 0 2px rgba(0,0,0,.12)
|
|
</style>
|