<template>
|
<view class="overflow">
|
<cu-custom bgColor="bg-white" :isBack="true">
|
<block slot="backText"> </block>
|
<block slot="content">盘点下发</block>
|
</cu-custom>
|
<view
|
class="flex justify-end align-center padding_right30rpx padding_top12rpx"
|
>
|
盘点单号:{{ checkForm.orderNum }}
|
</view>
|
<u-form
|
labelPosition="left"
|
label-width="150rpx"
|
:model="checkForm"
|
ref="warehouseRef"
|
>
|
|
</u-form>
|
|
<modal-code :rescode="rescode" :resmessage="resmessage" ref="resmodal" />
|
<u-empty
|
text="暂无出库物料"
|
mode="list"
|
v-if="singlist.length == 0"
|
class="height300rpx padding_top12rpx"
|
></u-empty>
|
<!-- <view class="" v-if="singlist.length>0">
|
<view class="width margin_auto background_fff">
|
<view class="flex align-center height80rpx padding border border_radius box_sizing justify-between">
|
<view class="fontSize34rpx iconfont icon-zhanghao col-0d11c9">出库口</view>
|
<view class="">
|
<text>{{loca}}</text>
|
<u-icon name="arrow-down" style="color: #b5b5b5;" @click="outlist">
|
</u-icon>
|
</view>
|
</view>
|
<u-select v-model="accshow" :list="accList" @confirm="confirm"></u-select>
|
</view> -->
|
<scroll-view scroll-y="true" style="height: 74vh; margin-top: 10rpx">
|
<view
|
class="background_fff margin_bottom25rpx"
|
v-for="(item, index) in singlist"
|
:key="index"
|
@tap="pitch(item)"
|
:class="item.edit ? 'clickactive' : ''"
|
>
|
<view style="border-bottom: 1px solid #c6bfb6" class="padding">
|
<view class="flex justify-between width">
|
<view class="fontSize32rpx color_f18202"
|
>容器编号:{{ item.containerCode }}</view
|
>
|
|
<u-col :span="2">
|
<view
|
class="text_align_center"
|
:class="
|
item.checkStatusName == '盘点中'
|
? 'inventory'
|
: item.checkStatusName == '未盘点'
|
? 'noinventory'
|
: 'haveinventory'
|
"
|
>
|
{{ item.checkStatusName }}
|
</view>
|
</u-col>
|
|
<view
|
class="fontSize32rpx color_1989FA"
|
@click.stop="opendetails(item, $event)"
|
>
|
{{ item.detailsFlag ? "隐藏物料" : "查看物料" }}
|
</view>
|
</view>
|
<!-- <u-row style='padding: 12rpx 7rpx 5rpx;' class='fontSize26rpx'>
|
<u-col :span='4' class=''>库区:{{item.wareRgionName}}</u-col>
|
<u-col :span='4' class=''>货架:{{item.wareShelvesName}}</u-col>
|
<u-col :span='4' class=''>库位:{{item.wareLocationName}}</u-col>
|
</u-row> -->
|
</view>
|
<view v-if="item.detailsFlag">
|
<view
|
class="item u-border-bottom"
|
v-for="(eitem, eindex) in item.partList"
|
:key="eindex"
|
>
|
<!-- 此层wrap在此为必写的,否则可能会出现标题定位错误 -->
|
<view class="title-wrap">
|
<view
|
:key="index + 'singlist'"
|
class="fontSize32rpx width margin_auto padding15 padding_bottom border_radius relative box_sizing transition"
|
style="border-bottom: 1px solid #ccc"
|
:class="item.edit ? 'clickactive' : ''"
|
>
|
<u-row>
|
<u-col span="5" class="flex">
|
<view class="flex justify-center align-center circkle06">
|
{{ eindex + 1 }}
|
</view>
|
<view class="color_f18202 padding_left10rpx">
|
{{ eitem.materialCode }}
|
</view>
|
</u-col>
|
<u-col span="3" class="color_80">
|
{{ eitem.checkResultName }}
|
</u-col>
|
<u-col span="3" class="color_80">
|
数量:{{ eitem.quantity }}
|
</u-col>
|
</u-row>
|
<!-- <u-row>
|
<u-col span="6">
|
<view class="Wb_box">
|
<text class="el_batchNo"> 仓库: </text>
|
<text class="el_batchVal">{{ item.wareHouse }}</text>
|
</view>
|
</u-col>
|
<u-col span="6">
|
<view class="Wb_box">
|
<text class="el_batchNo"> 库区: </text>
|
<text class="el_batchVal">
|
{{ item.regionName }}</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> -->
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</scroll-view>
|
|
<u-select
|
v-model="showLeiBie"
|
:list="borrowLeiBieList"
|
value-name="id"
|
label-name="value"
|
@confirm="confirmLeiBie"
|
></u-select>
|
|
<!-- <view
|
class="background_fff fixed width flex align-center justify-between padding10 font_weight_bold fontSize32rpx">
|
<view class="">
|
全部{{singlist.length}}
|
</view>
|
<view class="">
|
已选{{arr.length}}
|
</view>
|
</view> -->
|
<!-- <button-modal :subShow="true" garmenTitle="确认出库" @submit="submit" /> -->
|
<button-modal
|
:empTytowerShow="true"
|
cleaningTitle="返回"
|
garmenTitle="确认"
|
@submit="submit"
|
@reset="back"
|
/>
|
</view>
|
</template>
|
|
<script>
|
import ButtonModal from "../../../components/buttonModal.vue";
|
import ModalCode from "../../../components/ModalCode.vue";
|
import { OrderSearch, material, submit } from "@/api/check/check.js";
|
import { outlist } from "@/api/putIn/three.js";
|
export default {
|
data() {
|
return {
|
modalshow: false,
|
accshow: false,
|
show: false,
|
rescode: 0,
|
resmessage: "",
|
operator: "",
|
active: null, //跳转样式
|
singlist: [], //容器列表
|
arr: [], //选中的数组
|
accList: [],
|
loca: "", //出库口
|
ware: "", //出库口传参
|
options: [
|
{
|
text: "详情",
|
style: {
|
backgroundColor: "#fc9f35",
|
},
|
},
|
],
|
detailshow: false,
|
statusName: "",
|
OrderId: "", //单号id
|
partList: [], //物料列表
|
materList: [], //详情列表
|
showLeiBie: false,
|
checkForm: {
|
Status: "",
|
PageNo: 1,
|
PageSize: 10,
|
orderNum: "",
|
taskTypeName: "",
|
},
|
borrowLeiBieList: [
|
{
|
id: "0",
|
value: "初盘",
|
},
|
{
|
id: "1",
|
value: "复盘",
|
},
|
],
|
};
|
},
|
components: {
|
ButtonModal,
|
ModalCode,
|
},
|
onLoad(options) {
|
let parse = JSON.parse(options.item);
|
if (parse) {
|
this.orderNo = parse.orderNo;
|
this.statusName = parse.statusName;
|
this.checkForm.orderNum = parse.orderNo;
|
this.checkForm.OrderId = parse.id;
|
this.checkForm.checkOperatorClassify = parse.checkStage;
|
this.OrderSearch();
|
}
|
},
|
mounted() {
|
// this.operator = JSON.parse(uni.getStorageSync('userInfo')).name
|
},
|
methods: {
|
confirmLeiBie(con) {
|
console.log(con);
|
this.checkForm.taskType = con[0].value;
|
this.checkForm.taskTypeName = con[0].label;
|
this.OrderSearch(1);
|
},
|
//显示隐藏物料详情
|
opendetails(e, event) {
|
//防止穿透
|
event.stopPropagation();
|
//根据容器查询物料
|
e.detailsFlag = !e.detailsFlag;
|
if (e.partList.length > 0) {
|
this.$forceUpdate();
|
return;
|
}
|
material({
|
OrderNo: this.checkForm.orderNum,
|
ContainerCode: e.containerCode,
|
checkStatus: e.checkStatus,
|
CheckSendForpda:"1"
|
}).then((res) => {
|
if (res.code == 200) {
|
e.partList = res.result?.items ?? [];
|
this.singlist.forEach((item) => {
|
if (item.containerCode !== e.partList[0].containerCode) {
|
item.detailsFlag = false;
|
}
|
});
|
this.$forceUpdate();
|
} else {
|
this.$refs.resmodal.show = true;
|
this.resmessage = res.message;
|
this.rescode = res.code;
|
}
|
});
|
},
|
//选中
|
pitch(e) {
|
e.edit = !e.edit;
|
this.arr = this.singlist.filter((item) => item.edit);
|
this.$forceUpdate();
|
},
|
//容器详情
|
OrderSearch(param) {
|
if (param) {
|
this.checkForm.PageNo = 1;
|
}
|
OrderSearch({
|
orderNo: this.orderNo,
|
PageNo: 1,
|
taskType: this.checkForm.taskType,
|
}).then((res) => {
|
if (res.code == 200) {
|
this.singlist = res.result.items;
|
this.singlist.forEach((item) => {
|
item.detailsFlag = false;
|
item.partList = [];
|
});
|
}
|
});
|
},
|
//出库口
|
outlist() {
|
let params = {
|
PageNo: 1,
|
PageSize: 999,
|
};
|
outlist(params).then((res) => {
|
if (res.code == 200) {
|
this.accshow = true;
|
this.accList = res.data.rows.filter((item) => {
|
if (item.siteTypeName == "出库" || item.siteTypeName == "出入库") {
|
return item;
|
}
|
});
|
this.accList.forEach((item, index) => {
|
item.label = item.name;
|
item.value = index + 1;
|
});
|
if (this.accList.length == 0) {
|
this.accshow = false;
|
this.rescode = 500;
|
this.resmessage = "暂无出库口";
|
this.$refs.resmodal.show = true;
|
}
|
}
|
});
|
},
|
//选择出库口
|
confirm(e) {
|
this.loca = e[0].label;
|
this.ware = this.accList[e[0].value - 1].code;
|
},
|
// //删除详情
|
// longpress(index, eindex) {
|
// this.materlist = this.partList[index]
|
// this.detailshow = true
|
// },
|
// // 如果打开一个的时候,不需要关闭其他,则无需实现本方法
|
// open(index) {
|
// // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
|
// // 原本为'false',再次设置为'false'会无效
|
// this.singlist[index].show = true;
|
// this.singlist.map((val, idx) => {
|
// if (index != idx) this.singlist[idx].show = false;
|
// })
|
// },
|
//确认出库
|
submit() {
|
// if (this.singlist.length == 0) {
|
// this.rescode = 400;
|
// this.resmessage = "无出库详情";
|
// this.$refs.resmodal.show = true;
|
// return;
|
// }
|
submit({
|
orderId: this.checkForm.OrderId,
|
checkOperatorClassify: this.checkForm.checkOperatorClassify,
|
}).then((res) => {
|
this.$refs.resmodal.show = true;
|
this.rescode = res.code;
|
this.resmessage = res.message;
|
if (res.code == 200) {
|
this.rescode = 200;
|
this.resmessage = "出库成功";
|
this.$refs.resmodal.show = true;
|
setTimeout(() => {
|
uni.redirectTo({
|
url: `./index`,
|
});
|
}, 3000);
|
}
|
});
|
},
|
back(param) {
|
uni.navigateTo({
|
url: `/pages/check/check/index`,
|
});
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss">
|
// 盘点中
|
.inventory {
|
border: 1px solid #08cd39;
|
border-radius: 40vh;
|
color: #08cd39;
|
background-color: #e6ffec;
|
}
|
|
// 未盘点
|
.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;
|
}
|
|
.overflow {
|
padding-bottom: 100px;
|
}
|
</style>
|