<template>
|
<view>
|
<cu-custom bgColor="bg-white" :isBack="true">
|
<block slot="backText"> </block>
|
<block slot="content">盘点下发</block>
|
</cu-custom>
|
<u-form labelPosition="left" label-width="150rpx" :model="checkForm" ref="warehouseRef">
|
<u-row class="border_bottom margin_top10rpx background_fff padding_left25rpx ">
|
<u-col span="10">
|
<u-form-item label="盘点单号:" prop="orderNo" class="uFormItem">
|
<u-input v-model.trim="checkForm.orderNo" class="width" :clearable="false" placeholder="请输入单号"
|
@confirm="Status('', 1)"></u-input>
|
</u-form-item>
|
</u-col>
|
<u-col span="2" @tap="containerFocus">
|
<span class="fontSize15rpx">选择</span>
|
<u-icon name="arrow-right" size="14" class="fontSize15rpx"></u-icon>
|
</u-col>
|
<view class="boxList" v-show="modalshow" @click="modalshow = false" @touchmove.stop>
|
<view class="innerWrap">
|
<ul v-for="(item, eindex) in wolist" :key="eindex">
|
<li @click="confirm2(eindex)"> {{ item.text }}</li>
|
</ul>
|
</view>
|
</view>
|
</u-row>
|
<u-row class="border_bottom margin_top10rpx background_fff padding_left25rpx padding_right30rpx">
|
<u-col span="12" class="margin_top10rpx">
|
<u-form-item label="盘点阶段:" prop="checkStage" class="uFormItem">
|
<u-input v-model="checkForm.checkStageName" type="select" @click="showLeiBie = true"
|
placeholder="请选择盘点阶段" class="width">
|
</u-input>
|
</u-form-item>
|
</u-col>
|
</u-row>
|
</u-form>
|
<!-- <view class="background_fff margin_bottom25rpx margin_top25rpx content-item">
|
<u-row>
|
<u-col :span="3" style="text-align: center; padding: 25rpx 0" v-for="(item, index) in checklist"
|
:key="index" @click="Status(item.status,2)">
|
<view class="" style="border-right: 1px solid #efefef">
|
<view class="padding_bottom18">
|
{{ item.statusName }}
|
</view>
|
<view class="font_weight_bold fontSize36rpx" :class="item.statusName == '总数量'
|
? 'col-0d11c9'
|
: item.statusName == '盘点中'
|
? 'col-0ece3d'
|
: item.statusName == '未盘点'
|
? 'col-ff9d0b'
|
: 'col-0589ff'
|
">
|
{{ item.count }}
|
</view>
|
</view>
|
</u-col>
|
</u-row>
|
</view> -->
|
<view>
|
<view class="padding15 background_fff margin_bottom10rpx content-item" v-for="(item, index) in singlist"
|
:key="index" @click="skip(item)">
|
<u-row>
|
<u-col span="1">
|
<text class="flex justify-center align-center circkle06">{{ index + 1 }}</text>
|
</u-col>
|
<u-col :span="8">
|
<text class="font_weight_bold color_f18202 fontSize36rpx"> {{ item.orderNo }} </text>
|
<!-- <text class="subTitle"> {{ item.updatedTime }} </text> -->
|
</u-col>
|
<u-col :span="3">
|
<view class="text_align_center text_dot" :class="item.checkStageName == '初盘开启'
|
? 'inventory'
|
: item.checkStageName == '复盘开启'
|
? 'noinventory'
|
: 'haveinventory'
|
">
|
{{ item.checkStageName }}
|
</view>
|
</u-col>
|
</u-row>
|
<u-row>
|
<!-- <u-col span="6">
|
<view class="Wb_box">
|
<text class="el_batchNo"> 仓库: </text>
|
<text class="el_batchVal">{{ item.areaName }}</text>
|
</view>
|
</u-col> -->
|
<u-col span="6">
|
<view class="Wb_box">
|
<text class="el_batchNo"> 盘点方式: </text>
|
<text class="el_batchVal">{{ item.checkModeName }}</text>
|
</view>
|
</u-col>
|
<u-col span="6">
|
<view class="Wb_box">
|
<text class="el_batchNo"> 库区: </text>
|
<text class="el_batchVal"> {{ item.areaName }}</text>
|
</view>
|
</u-col>
|
</u-row>
|
|
<!-- <u-row>
|
<u-col span="6">
|
<view class="Wb_box">
|
<text class="el_batchNo"> 容器总数: </text>
|
<text class="el_batchVal">{{ item.locationCount }}</text></view>
|
</u-col>
|
<u-col span="6">
|
<view class="Wb_box">
|
<text class="el_batchNo"> 物料总数: </text>
|
<text class="el_batchVal"> {{ item.materialCount }}</text></view>
|
</u-col>
|
</u-row> -->
|
|
|
<!-- <u-row class="fontSize30rpx">
|
<u-col :span="7" style="padding: 18rpx">规则名称:{{ item.ruleName }}</u-col>
|
<u-col :span="5"> 库位数:{{ item.locationCount }} </u-col>
|
</u-row>
|
<u-row class="fontSize30rpx">
|
<u-col :span="12" class="text-gray" style="padding: 0 20rpx">创建日期:{{ item.updatedTime }}</u-col>
|
</u-row>
|
<u-row class="fontSize30rpx">
|
<u-col :span="12" class="text-gray" style="padding: 0 20rpx">父盘点单:{{ item.parentId }}</u-col>
|
</u-row> -->
|
</view>
|
</view>
|
<u-loadmore :status="status" :load-text="loadText" />
|
|
<u-select v-model="showLeiBie" :list="borrowLeiBieList" value-name="id" label-name="value"
|
@confirm="confirmLeiBie"></u-select>
|
</view>
|
</template>
|
|
<script>
|
import ButtonModal from "../../../components/buttonModal.vue";
|
import ModalCode from "../../../components/ModalCode.vue";
|
import { query, Status } from "@/api/check/check.js";
|
export default {
|
data() {
|
return {
|
renameFocus: false,
|
modalshow: false,
|
show: false,
|
rescode: 0,
|
resmessage: "",
|
operator: "",
|
active: null, //跳转样式
|
singlist: [], //物料详情
|
checklist: [], //盘点统计
|
checkForm: {
|
page: 1,
|
PageSize: 10,
|
orderNo: "",
|
checkStage: "",
|
CheckStageForPda: true
|
},
|
checkTotal: 0,
|
status: "loadmore",
|
loadText: {
|
loadmore: "上拉加载更多",
|
loading: "努力加载中",
|
nomore: "已经到底了",
|
},
|
showLeiBie: false,
|
borrowLeiBieList: [
|
{
|
id: 1,
|
value: "初盘开启",
|
},
|
{
|
id: 4,
|
value: "复盘开启",
|
}
|
],
|
warehouse: {
|
code: "",
|
ToolTypeCode: "",
|
customerCodeName: "",
|
borrowUserName: "",
|
taskType: "",
|
taskTypeName: "",
|
planNo: "",
|
remark: "",
|
returnTime: "",
|
},
|
wolist: [],
|
modalshow: false
|
};
|
},
|
components: {
|
ButtonModal,
|
ModalCode,
|
},
|
//下拉刷新
|
onPullDownRefresh() {
|
this.$nextTick(function () {
|
uni.stopPullDownRefresh(); //停止当前页面下拉刷新
|
});
|
},
|
// 触底事件
|
onReachBottom() {
|
if (this.checkTotal == this.singlist.length) {
|
return;
|
}
|
this.checkForm.page++;
|
this.Status('all');
|
},
|
onLoad() {
|
this.operator = JSON.parse(uni.getStorageSync("userInfo")).name;
|
// this.query();
|
this.Status('all', 'init');
|
|
|
},
|
methods: {
|
getLeiBieList() {
|
// GetWareToolTypeLst().then(res => {
|
// if(res.data.length == 0){
|
// return;
|
// }
|
// this.borrowLeiBieList = res.data;
|
// })
|
},
|
confirmLeiBie(con) {
|
console.log(con);
|
this.checkForm.checkStage = con[0].value;
|
this.checkForm.checkStageName = con[0].label;
|
this.Status('', 1);
|
},
|
//盘点统计
|
query() {
|
query().then((res) => {
|
this.checklist = res.data.list;
|
this.checklist.unshift({
|
count: "",
|
status: "",
|
statusName: "总数量",
|
});
|
this.checklist[0].count = this.checklist.reduce((prev, next) => {
|
return Number(prev) + Number(next.count);
|
}, 0);
|
});
|
},
|
//盘点单号
|
Status(callback, param) {
|
if (callback == "all") {
|
if (param == 'init') { //初始化
|
this.checkForm.Status = ''
|
}
|
Status(this.checkForm).then((res) => {
|
// if (res.data.rows.length == 0 && !callback) {
|
// this.status = "nomore";
|
// return;
|
// }
|
this.checkTotal = res.result?.total ?? [];
|
if (res.result.items && res.result.items.length > 0) {
|
this.singlist.push(...res.result.items);
|
}
|
// if (this.checkTotal == this.singlist.length) {
|
// this.status = "nomore";
|
// }
|
// callback && callback();
|
});
|
} else {
|
if (param == 1) { // 单号 任务类型入口
|
this.checkForm.page = 1;
|
}
|
if (param == 2) {// tab切换
|
this.checkForm.Status = callback;
|
this.checkForm.page = 1;
|
this.checkForm.planNo = '';
|
this.checkForm.taskTypeName = '';
|
}
|
|
this.singlist = []
|
Status(this.checkForm).then((res) => {
|
this.checkTotal = res.result?.total ?? [];
|
if (res.result.items && res.result.items.length > 0) {
|
this.singlist.push(...res.result.items);
|
}
|
});
|
}
|
},
|
//跳转
|
skip(item) {
|
uni.navigateTo({
|
url: `./check?item=${JSON.stringify(item)}`,
|
});
|
},
|
//类型聚焦事件
|
containerFocus() {
|
uni.hideKeyboard()
|
this.getVehicleType();
|
this.modalshow = true
|
},
|
//类型选择
|
confirm2(index) {
|
this.checkForm.orderNo = this.wolist[index].text;
|
this.Status('', 1);
|
// this.checkForm.orderNo = this.wolist[index].id;
|
},
|
|
//类型
|
getVehicleType() {
|
Status({
|
'page': 1,
|
'PageSize': 50,
|
'CheckStageForPda': true
|
}).then((res) => {
|
const dataT = res.result.items;
|
if (dataT && dataT.length == 0) {
|
this.rescode = 400
|
this.resmessage = '暂无数据'
|
this.$refs.resmodal.show = true
|
return
|
}
|
dataT.forEach(item => {
|
item.text = item.orderNo;
|
item.id = item.orderNo;
|
})
|
this.wolist = dataT
|
})
|
}
|
},
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
// 盘点中
|
.inventory {
|
border: 1px solid #08cd39;
|
border-radius: 40vh;
|
color: #08cd39;
|
background-color: #e6ffec;
|
// width: 60px;
|
font-size: 12px;
|
}
|
|
// 未盘点
|
.noinventory {
|
border: 1px solid #ff9d0c;
|
border-radius: 40vh;
|
color: #ff9d0c;
|
background-color: #fff7ea;
|
}
|
|
// 已盘点
|
.haveinventory {
|
border: 1px solid #0a8cff;
|
border-radius: 40vh;
|
color: #0a8cff;
|
background-color: #e7f5ff;
|
}
|
|
.col-0d11c9 {
|
color: #0d11c9;
|
}
|
|
.col-0ece3d {
|
color: #0ece3d;
|
}
|
|
.col-ff9d0b {
|
color: #ff9d0b;
|
}
|
|
.col-0589ff {
|
color: #0589ff;
|
}
|
|
.content-item {
|
width: 98%;
|
border-radius: 8rpx;
|
margin: 10rpx auto;
|
}
|
|
|
.boxList {
|
transition: all ease 2s;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
top: 0;
|
right: 0;
|
width: 100%;
|
height: 100%;
|
z-index: 999;
|
background: rgba(0, 0, 0, 0.6);
|
|
.innerWrap {
|
max-height: 50%;
|
overflow-y: auto;
|
background: white;
|
position: absolute;
|
bottom: 0;
|
left: 0;
|
width: 100%;
|
|
ul {
|
padding: 0;
|
margin: 0;
|
|
li {
|
padding: 0;
|
margin: 0;
|
border-bottom: 1px solid #e4e7ed;
|
list-style-type: none;
|
display: flex;
|
flex-direction: row;
|
line-height: 1;
|
justify-content: center;
|
align-items: center;
|
font-size: 13px;
|
padding: 14px 0;
|
flex-direction: column;
|
}
|
}
|
}
|
|
}
|
|
.text_dot{
|
font-size: 12px !important;
|
}
|
</style>
|