PDA调整 按箱号入库及 出库修改

master
ZR20090193-陈敬勇 2 years ago
parent 5cc6c1a27b
commit 5566dbda94

@ -6,15 +6,15 @@ var Encrypt = require("../common/encrypt.js");
const tui = {
//接口地址
interfaceUrl: function() {
// return 'http://192.168.0.229:9002/api'
// return 'http://192.168.0.209:9002/api'
// return 'http://60.209.125.238:9992/api'
return 'http://118.190.210.123:9992/api'
// return 'http://118.190.210.123:9992/api'
},
//上传图片地址
uploadUrl: function() {
// return 'http://192.168.0.212:9991/api/VW_INFO_FILES/UploadDJZ'
// return 'http://192.168.0.209:9991/api/VW_OP_WMS_IN_PLAN/UploadHGTY'
// return 'http://60.209.125.238:9991/api/VW_INFO_FILES/UploadDJZ'
return 'http://118.190.210.123:9992/api/VW_INFO_FILES/UploadDJZ'
return 'http://118.190.210.123:9992/api/VW_OP_WMS_IN_PLAN/UploadHGTY'
},
//App升级地址
appUrl: function() {

@ -2,7 +2,7 @@
"name" : "华港PDA扫码",
"appid" : "__UNI__C95C318",
"description" : "",
"versionName" : "1.4.0",
"versionName" : "1.5.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */

@ -124,6 +124,24 @@
}
}
,{
"path" : "pages/stockin-handle/stockin-handle",
"style" :
{
"navigationBarTitleText": "入库核对",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/stockout-handle/stockout-handle",
"style" :
{
"navigationBarTitleText": "出库核对",
"enablePullDownRefresh": false
}
}
],
"easycom": {
"autoscan": true,

@ -0,0 +1,495 @@
<template>
<view class="container">
<tui-list-cell :lineLeft="false">
<view class="tui-item-box">
<view class="tui-msg-box">
<image src="../../static/scancode.png" class="tui-msg-pic" mode="widthFix"></image>
<view class="tui-msg-item">
<view class="tui-msg-name">请扫码或手动输入条码号</view>
</view>
</view>
</view>
</tui-list-cell>
<view class="tui-searchbox">
<view class="tui-search-input">
<icon type="search" :size='20' color='#333'></icon>
<input confirm-type="search" placeholder="请输入条码号后几位" :focus="false" ref="search"
placeholder-class="tui-input-plholder" class="tui-input" v-model.trim="code"
@confirm="getSearchInfo()" />
<icon type="clear" :size='20' color='#bcbcbc' @tap="cleanCNTRNO" v-show="code"></icon>
</view>
</view>
<view v-if="planinfo">
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" absolute="rightTop" size="default">
<uni-tag :inverted="true" :text="planinfo.OLD_CNTRNO" type="primary"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" :text="planinfo.StockInCount" absolute="rightTop"
size="small">
<uni-tag :inverted="true" text="已确认数" type="success"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" :text="planinfo.NoStockInCount"
absolute="rightTop" size="small">
<uni-tag :inverted="true" text="未确认数" @click="openNoStock" type="warning"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" :text="tableData.length" absolute="rightTop"
size="small">
<uni-tag :inverted="true" text="待执行信息" @click="openStocking" type="error"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" v-if="planinfo.WMSDOID"
:text="planinfo.FileCount" absolute="rightTop" size="small">
<uni-tag :inverted="true" text="拍照附件" @click="pickImage" type="error"></uni-tag>
</uni-badge>
</view>
<uni-card v-if="list" v-for="(item,index) in list" :title="item.GOODSNAME" :key="index">
<view class="example">
<uni-forms ref="form" label-position="left">
<uni-forms-item label="" name="">
<button @click="addTable(item)" type="primary">添加信息</button>
</uni-forms-item>
<uni-forms-item label="条码号" name="CNTRNO">
<uni-easyinput type="text" :disabled="true" v-model="item.CNTRNO" />
</uni-forms-item>
<uni-forms-item label="箱号" name="OLD_CNTRNO">
<uni-easyinput type="text" v-model="item.OLD_CNTRNO" :disabled="true" />
</uni-forms-item>
<uni-forms-item v-if="areaList" label="库位" name="AREACODE">
<uni-data-select v-model="item.AREACODE" :localdata="areaList" :modelValue="tempArea"
@change="change" label="库位选择">
</uni-data-select>
</uni-forms-item>
<uni-forms-item label="毛重(千克)" name="KGS">
<uni-easyinput type="number" v-model="item.KGS" placeholder="请输入毛重" />
</uni-forms-item>
<uni-forms-item label="净重(千克)" name="NETWEIGHT">
<uni-easyinput type="number" v-model="item.NETWEIGHT" placeholder="请输入净重" />
</uni-forms-item>
<uni-forms-item label="件数" name="PKGS">
<uni-easyinput type="number" v-model="item.PKGS" placeholder="请输入件数" />
</uni-forms-item>
<uni-forms-item label="计费数量" name="STORAGEUNITCOUNT">
<uni-easyinput type="number" v-model="item.STORAGEUNITCOUNT" placeholder="请输入计费数量" />
</uni-forms-item>
</uni-forms>
</view>
</uni-card>
<uni-drawer ref="showRight" mode="right" :mask-click="false">
<scroll-view style="height: 100%;" scroll-y="true">
<view style="text-align:center;">
<text>未确认的条码号</text>
</view>
<button @click="closeNoStock" type="primary" size="default">关闭</button>
<view v-for="item in noStockInlistCode" :key="item" style="text-align:center;">{{ item }}</view>
</scroll-view>
</uni-drawer>
<uni-drawer ref="showLeft" mode="left" :mask-click="false" :width=400>
<scroll-view style="height: 100%;" scroll-y="true">
<view style="text-align:center;">
<text>待执行的条码号</text>
</view>
<button @click="closeStocking" type="primary" size="default">关闭</button>
<view class="uni-container" v-if="tableData" style='margin-right: 5rpx;'>
<uni-table ref="table" border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th width="150" align="center">条码号</uni-th>
<uni-th width="150" align="center">毛重 + 件数</uni-th>
<uni-th width="150" align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td>
<view class="name">{{ item.CNTRNO }}</view>
</uni-td>
<uni-td align="center">
{{ item.KGS }}|{{ item.ACCEPT_PKGS == null? item.PKGS : item.ACCEPT_PKGS }}
</uni-td>
<uni-td>
<button class="uni-button" size="mini" type="warn" v-if="!item.ISEXECUTE"
@click="del(item)">删除</button>
</uni-td>
</uni-tr>
</uni-table>
</view>
<button @click="checkIn" type="primary" size="default">确认入库执行</button>
</scroll-view>
</uni-drawer>
</view>
</template>
<script>
export default {
data() {
return {
info: [],
loadData: [],
postData: {
WMSPLANID: uni.getStorageSync("WMSPLANID"),
CNTRNO: "",
// GOODSMODEL20: ""
},
pageIndex: 1,
scaninfo: null,
planinfo: null,
loadding: false,
pullUpOn: true,
isShow: false,
key: "",
list: [],
cache: '',
code: "",
scandata: {
code: ""
},
areaList: [],
noStockInlistCode: [],
tableData: [],
tempArea: '',
WMSDOID:'',
}
},
onShow() {
var _this = this
_this.list = ''
_this.code = ''
uni.$off('scancodedata') //
uni.$on('scancodedata', function(data) {
console.log(data)
// this.code = data
uni.setStorageSync("ScanCode", data)
_this.getScanInfo()
})
},
// onUnload() {
// //
// uni.$off('scancodedata')
// },
// onHide() {
// //
// uni.$off('scancodedata')
// },
onLoad: function(option) {
var _this = this
_this.getInfo()
},
watch: {
// ScanCode(newValue, oldValue) {
// }
},
methods: {
back: function() {
uni.navigateBack();
},
change(e) {
// console.log('e:',e);
var _this = this
// _this.$set(_this.info, 'AREACODE', e)
_this.tempArea = e
},
cleanCNTRNO: function() {
this.code = ''
},
openNoStock() {
this.$refs.showRight.open();
},
closeNoStock() {
this.$refs.showRight.close();
},
openStocking() {
this.$refs.showLeft.open();
},
closeStocking() {
this.$refs.showLeft.close();
},
getInfo: function() {
uni.showLoading()
this.tui.request("/StockIn/GetStockInPlanInfo", "POST", {
WMSPLANID: uni.getStorageSync("WMSPLANID"),
OLD_CNTRNO: uni.getStorageSync("OLD_CNTRNO"),
}, false, false,
false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.planinfo = res.Data
this.areaList = res.Data.AreaList
this.noStockInlistCode = res.Data.NoStockInlistCode
// this.WMSDOID = res.Data.WMSDOID
// console.log(this.list)
uni.hideLoading()
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
uni.hideLoading()
})
},
getScanInfo: function() {
uni.showLoading()
console.log('data', uni.getStorageSync("ScanCode"))
this.tui.request("/StockIn/GetStockInPlanGoodsByScan", "POST", {
WMSPLANID: uni.getStorageSync("WMSPLANID"),
OLD_CNTRNO: uni.getStorageSync("OLD_CNTRNO"),
CNTRNO: uni.getStorageSync("ScanCode")
}, false, false,
false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.list = res.Data
// console.log(this.list)
uni.hideLoading()
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
uni.hideLoading()
})
},
getSearchInfo: function() {
uni.showLoading()
this.tui.request("/StockIn/GetStockInPlanGoodsByScan", "POST", {
WMSPLANID: uni.getStorageSync("WMSPLANID"),
OLD_CNTRNO: uni.getStorageSync("OLD_CNTRNO"),
CNTRNO: this.code
}, false, false,
false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.list = res.Data
uni.hideLoading()
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
uni.hideLoading()
})
},
addTable: function(data) {
console.log('重复检测', data.CNTRNO)
let key = this.tableData.findIndex(item => {
if (item.CNTRNO == data.CNTRNO) {
return true
}
})
console.log('重复检测', key)
if (key == -1) {
this.tableData.push(data)
this.list = []
} else {
this.tui.toast('请勿重复添加', 2000, 'none')
}
},
del: function(data) {
let key = this.tableData.findIndex(item => {
if (item.CNTRNO == data.CNTRNO) {
return true
}
})
this.tableData.splice(key, 1)
},
checkIn: function() {
uni.showLoading()
// console.log('', res);
let postData = {
WMSPLANID: this.planinfo.WMSPLANID,
OLD_CNTRNO: this.planinfo.OLD_CNTRNO,
// InfoFiles: this.imgList,
Goods: this.tableData
}
this.tui.request("/StockIn/NewStockInBatch", "POST", postData, false, false, false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.tui.toast(res.Message, 2000, 'success')
this.tableData = []
this.$refs.showLeft.close();
this.getInfo()
// uni.navigateBack();
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
})
},
pickImage: function() {
console.log('==== picker ====')
uni.chooseImage({
count: 1, //9
sizeType: ['original'], //
sourceType: ['camera'], //使
success: (temp) => {
// const tempFilePaths = res.tempFilePaths;
const files = temp.tempFiles;
// console.log(files[0])
var path = files[0].path
var filename = path.replace(/(.*\/)*([^.]+).*/ig, "$2") + ".jpg"
uni.showLoading()
uni.uploadFile({
url: this.tui.uploadUrl(),
fileType: "image", //ZFB,
filePath: temp.tempFilePaths[0], //
name: 'files',
formData: {
'WMSDOID': this.planinfo.WMSDOID
},
success: res => {
this.tui.toast(res.Message, 2000, 'success')
this.getInfo()
uni.hideLoading();
},
fail(err) {
console.log(err)
// this.tui.toast('', 2000, 'none')
uni.hideLoading();
}
});
}
})
}
}
}
</script>
<style>
.example {
padding: 15px;
background-color: #fff;
}
.button-group {
margin-top: 15px;
display: flex;
justify-content: space-around;
}
.form-item {
display: flex;
align-items: center;
}
.button {
display: flex;
align-items: center;
height: 35px;
margin-left: 10px;
}
/* @import '../../static/style/thorui.css'; */
.tui-msg-box {
display: flex;
align-items: center;
}
.tui-msg-pic {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
display: block;
margin-right: 24rpx;
flex-shrink: 0;
}
.tui-msg-item {
max-width: 500rpx;
/* min-height: 100rpx; */
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.tui-msg-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 45rpx;
line-height: 2;
justify-content: space-between;
color: #262b3a;
}
.tui-item-box {
width: 100%;
display: flex;
align-items: center;
}
.tui-list-cell_name {
padding-left: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.tui-ml-auto {
margin-left: auto;
}
.tui-right {
margin-left: auto;
margin-right: 34rpx;
font-size: 26rpx;
color: #999;
}
.tui-logo {
height: 52rpx;
width: 52rpx;
flex-shrink: 0;
}
</style>
<style lang='scss'>
.tui-searchbox {
padding: 30rpx 0;
box-sizing: border-box;
display: flex;
align-items: center;
}
.tui-search-input {
width: 100%;
height: 66rpx;
border-radius: 35rpx;
padding: 0 30rpx;
box-sizing: border-box;
background: #f2f2f2;
display: flex;
align-items: center;
flex-wrap: nowrap;
}
.tui-input {
flex: 1;
color: #333;
padding: 0 16rpx;
font-size: 28rpx;
}
.tui-input-plholder {
font-size: 28rpx;
color: #b2b2b2;
}
.fr-btn {
float: right;
height: 60upx;
font-size: 28upx;
line-height: 60upx;
margin: 14upx 0;
}
</style>

@ -3,43 +3,46 @@
<view class="tui-searchbox">
<view class="tui-search-input">
<icon type="search" :size='20' color='#333'></icon>
<input confirm-type="search" placeholder="请输入提单号" :focus="true" auto-focus auto-blur
placeholder-class="tui-input-plholder" class="tui-input" v-model.trim="postData.MBLNO"
<input confirm-type="search" placeholder="请输入箱号最后几位" :focus="true" auto-focus auto-blur
placeholder-class="tui-input-plholder" class="tui-input" v-model.trim="postData.BoxCode"
@confirm="searchInfo" />
<icon type="clear" :size='20' color='#bcbcbc' @tap="cleanMBLNO" v-show="postData.MBLNO"></icon>
<icon type="clear" :size='20' color='#bcbcbc' @tap="cleanBoxCode" v-show="postData.BoxCode"></icon>
</view>
</view>
<uni-card v-if="list" v-for="(item,index) in list" :title="item.MBLNO" :key="index">
<uni-card v-if="list" v-for="(item,index) in list" :title="item.OLD_CNTRNO" :key="index">
<view class="example">
<uni-forms ref="form" :modelValue="item" label-position="left">
<uni-forms ref="form" :modelValue="item" label-position="left">
<uni-forms-item label="提单号" name="MBLNO">
<uni-easyinput type="text" :disabled="true" v-model="item.MBLNO" />
</uni-forms-item>
<uni-forms-item label="客户名称" name="CUSTOMERNAME">
<uni-easyinput type="text" :disabled="true" v-model="item.CUSTOMERNAME" />
</uni-forms-item>
</uni-forms-item>
<uni-forms-item label="货主" name="GOODSOWNER">
<uni-easyinput type="text" :disabled="true" v-model="item.GOODSOWNER" />
</uni-forms-item>
</uni-forms-item>
<uni-forms-item label="货物名称" name="GOODSNAME">
<uni-easyinput type="text" :disabled="true" v-model="item.GOODSNAME" />
</uni-forms-item>
</uni-forms-item>
<uni-forms-item label="毛重(千克)" name="KGS">
<uni-easyinput type="text" v-model="item.KGS" :disabled="true" />
</uni-forms-item>
<uni-forms-item label="件数" name="PKGS">
</uni-forms-item>
<uni-forms-item label="件数" name="PKGS">
<uni-easyinput type="text" v-model="item.PKGS" :disabled="true" />
</uni-forms-item>
<uni-forms-item label="仓库" name="STOREHOUSENAME">
<uni-easyinput type="text" :disabled="true" v-model="item.STOREHOUSENAME" />
</uni-forms-item>
</uni-forms-item>
<uni-forms-item label="未确认明细数" name="NoStockInCount">
<uni-easyinput type="text" v-model="item.NoStockInCount" :disabled="true" />
</uni-forms-item>
<uni-forms-item label="备注" name="REMARK">
<!-- <uni-forms-item label="备注" name="REMARK">
<uni-easyinput type="text" :disabled="true" v-model="item.REMARK" />
</uni-forms-item>
</uni-forms-item> -->
</uni-forms>
<button @click="skip(item.WMSPLANID)"></button>
<button @click="skip(item)"></button>
</view>
</uni-card>
</view>
@ -57,20 +60,20 @@
pullUpOn: true,
isShow: false,
postData: {
MBLNO: ""
BoxCode: ""
},
skipData: {
WMSPLANID: "",
},
key: "",
list: '',
type:''
type: ''
}
},
onShow() {
onLoad() {
this.list = ''
this.skipData.type = ''
this.postData.MBLNO = ''
// this.skipData.type = ''
this.postData.BoxCode = ''
},
// onLoad: function(option) {
// var _this = this
@ -81,17 +84,18 @@
back: function() {
uni.navigateBack();
},
cleanMBLNO: function() {
this.postData.MBLNO = ''
cleanBoxCode: function() {
this.postData.BoxCode = ''
},
searchInfo: function() {
uni.showLoading()
console.log(this.postData)
this.tui.request("/StockIn/GetStockInPlanInfo?mblNo=" + this.postData.MBLNO, "GET", null, false, false, false)
this.tui.request("/StockIn/GetStockInPlanInfoByBoxCode?boxCode=" + this.postData.BoxCode, "GET", null,
false, false, false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
if (res.Code == 0) {
this.list = res.Data
uni.hideLoading()
} else if (res.Code == -1) {
@ -103,10 +107,11 @@
uni.hideLoading()
})
},
skip: function(id) {
uni.setStorageSync("WMSPLANID", id)
skip: function(data) {
uni.setStorageSync("WMSPLANID", data.WMSPLANID)
uni.setStorageSync("OLD_CNTRNO",data.OLD_CNTRNO)
uni.navigateTo({
url: '../stockin-goods/stockin-goods'
url: '../stockin-handle/stockin-handle'
})
}
}

@ -0,0 +1,484 @@
<template>
<view class="container">
<tui-list-cell :lineLeft="false">
<view class="tui-item-box">
<view class="tui-msg-box">
<image src="../../static/scancode.png" class="tui-msg-pic" mode="widthFix"></image>
<view class="tui-msg-item">
<view class="tui-msg-name">请扫码或手动输入条码号</view>
</view>
</view>
</view>
</tui-list-cell>
<view class="tui-searchbox">
<view class="tui-search-input">
<icon type="search" :size='20' color='#333'></icon>
<input confirm-type="search" placeholder="请输入条码号后几位" :focus="false" ref="search"
placeholder-class="tui-input-plholder" class="tui-input" v-model.trim="code"
@confirm="getSearchInfo()" />
<icon type="clear" :size='20' color='#bcbcbc' @tap="cleanCNTRNO" v-show="code"></icon>
</view>
</view>
<view v-if="planinfo">
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" absolute="rightTop" size="default">
<uni-tag :inverted="true" :text="planinfo.MBLNO" type="primary"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" absolute="rightTop" size="default">
<uni-tag :inverted="true" :text="planinfo.TRUCKNO" type="primary"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" :text="planinfo.StockOutCount" absolute="rightTop"
size="small">
<uni-tag :inverted="true" text="已确认数" type="success"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" :text="planinfo.NoStockOutCount"
absolute="rightTop" size="small">
<uni-tag :inverted="true" text="未确认数" @click="openNoStock" type="warning"></uni-tag>
</uni-badge>
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" :text="tableData.length" absolute="rightTop"
size="small">
<uni-tag :inverted="true" text="待执行信息" @click="openStocking" type="error"></uni-tag>
</uni-badge>
</view>
<uni-card v-if="list" v-for="(item,index) in list" :title="item.GOODSNAME" :key="index">
<view class="example">
<uni-forms ref="form" label-position="left">
<uni-forms-item label="" name="">
<button @click="addTable(item)" type="primary">添加信息</button>
</uni-forms-item>
<uni-forms-item label="条码号" name="CNTRNO">
<uni-easyinput type="text" :disabled="true" v-model="item.CNTRNO" />
</uni-forms-item>
<!-- <uni-forms-item label="箱号" name="OLD_CNTRNO">
<uni-easyinput type="text" v-model="item.OLD_CNTRNO" :disabled="true" />
</uni-forms-item> -->
<uni-forms-item label="仓库" name="STOREHOUSENAME">
<uni-easyinput type="text" v-model="item.STOREHOUSENAME" :disabled="true" />
</uni-forms-item>
<uni-forms-item label="库位" name="AREANAME">
<uni-easyinput type="text" v-model="item.AREANAME" :disabled="true" />
</uni-forms-item>
<uni-forms-item label="毛重(千克)" name="KGS">
<uni-easyinput type="number" v-model="item.KGS" :disabled="true" />
</uni-forms-item>
<uni-forms-item label="净重(千克)" name="NETWEIGHT">
<uni-easyinput type="number" v-model="item.NETWEIGHT" :disabled="true" />
</uni-forms-item>
<uni-forms-item label="件数" name="PKGS">
<uni-easyinput type="number" v-model="item.PKGS" placeholder="请输入件数" />
</uni-forms-item>
<uni-forms-item label="计费数量" name="STORAGEUNITCOUNT">
<uni-easyinput type="number" v-model="item.STORAGEUNITCOUNT" :disabled="true" />
</uni-forms-item>
</uni-forms>
</view>
</uni-card>
<uni-drawer ref="showRight" mode="right" :mask-click="false">
<scroll-view style="height: 100%;" scroll-y="true">
<view style="text-align:center;">
<text>未确认的条码号</text>
</view>
<button @click="closeNoStock" type="primary" size="default">关闭</button>
<view v-for="item in noStockOutlistCode" :key="item" style="text-align:center;">{{ item }}</view>
</scroll-view>
</uni-drawer>
<uni-drawer ref="showLeft" mode="left" :mask-click="false" :width=400>
<scroll-view style="height: 100%;" scroll-y="true">
<view style="text-align:center;">
<text>待执行的条码号</text>
</view>
<button @click="closeStocking" type="primary" size="default">关闭</button>
<view class="uni-container" v-if="tableData" style='margin-right: 5rpx;'>
<uni-table ref="table" border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th width="150" align="center">条码号</uni-th>
<uni-th width="150" align="center">毛重 + 件数</uni-th>
<uni-th width="150" align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td>
<view class="name">{{ item.CNTRNO }}</view>
</uni-td>
<uni-td align="center">
{{ item.KGS }}|{{ item.ACCEPT_PKGS == null? item.PKGS : item.ACCEPT_PKGS }}
</uni-td>
<uni-td>
<button class="uni-button" size="mini" type="warn" v-if="!item.ISEXECUTE"
@click="del(item)">删除</button>
</uni-td>
</uni-tr>
</uni-table>
</view>
<button @click="checkIn" type="primary" size="default">确认出库执行</button>
</scroll-view>
</uni-drawer>
</view>
</template>
<script>
export default {
data() {
return {
info: [],
loadData: [],
postData: {
WMSPLANID: uni.getStorageSync("WMSPLANID"),
CNTRNO: "",
// GOODSMODEL20: ""
},
pageIndex: 1,
scaninfo: null,
planinfo: null,
loadding: false,
pullUpOn: true,
isShow: false,
key: "",
list: [],
cache: '',
code: "",
scandata: {
code: ""
},
areaList: [],
noStockOutlistCode: [],
tableData: [],
tempArea: '',
WMSDOID:'',
}
},
onShow() {
var _this = this
_this.list = ''
_this.code = ''
uni.$off('scancodedata') //
uni.$on('scancodedata', function(data) {
console.log(data)
// this.code = data
uni.setStorageSync("ScanCode", data)
_this.getScanInfo()
})
},
onLoad: function(option) {
var _this = this
_this.getInfo()
},
watch: {
// ScanCode(newValue, oldValue) {
// }
},
methods: {
// back: function() {
// uni.navigateBack();
// },
change(e) {
// console.log('e:',e);
var _this = this
// _this.$set(_this.info, 'AREACODE', e)
_this.tempArea = e
},
cleanCNTRNO: function() {
this.code = ''
},
openNoStock() {
this.$refs.showRight.open();
},
closeNoStock() {
this.$refs.showRight.close();
},
openStocking() {
this.$refs.showLeft.open();
},
closeStocking() {
this.$refs.showLeft.close();
},
getInfo: function() {
uni.showLoading()
// console.log(uni.getStorageSync("WMSOUTPLANID"))
this.tui.request("/StockOut/GetStockOutPlanSummaryInfo", "POST", {
WMSPLANID: uni.getStorageSync("WMSOUTPLANID"),
TRUCKID: uni.getStorageSync("TRUCKID"),
}, false, false,
false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.planinfo = res.Data
this.noStockOutlistCode = res.Data.NoStockOutlistCode
uni.hideLoading()
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
uni.hideLoading()
})
},
getScanInfo: function() {
uni.showLoading()
console.log('data', uni.getStorageSync("ScanCode"))
this.tui.request("/StockOut/GetStockOutPlanGoodsByScan", "POST", {
WMSOUTPLANID: uni.getStorageSync("WMSOUTPLANID"),
CNTRNO: uni.getStorageSync("ScanCode")
}, false, false,
false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.list = res.Data
// console.log(this.list)
uni.hideLoading()
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
uni.hideLoading()
})
},
getSearchInfo: function() {
uni.showLoading()
this.tui.request("/StockIn/GetStockOutPlanGoodsByScan", "POST", {
WMSOUTPLANID: uni.getStorageSync("WMSOUTPLANID"),
// OLD_CNTRNO: uni.getStorageSync("OLD_CNTRNO"),
CNTRNO: this.code
}, false, false,
false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.list = res.Data
uni.hideLoading()
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
uni.hideLoading()
})
},
addTable: function(data) {
console.log('重复检测', data.CNTRNO)
let key = this.tableData.findIndex(item => {
if (item.CNTRNO == data.CNTRNO) {
return true
}
})
console.log('重复检测', key)
if (key == -1) {
this.tableData.push(data)
this.list = []
} else {
this.tui.toast('请勿重复添加', 2000, 'none')
}
},
del: function(data) {
let key = this.tableData.findIndex(item => {
if (item.CNTRNO == data.CNTRNO) {
return true
}
})
this.tableData.splice(key, 1)
},
checkIn: function() {
uni.showLoading()
// console.log('', res);
let postData = {
WMSPLANID: this.planinfo.WMSPLANID,
TRUCKID:uni.getStorageSync("TRUCKID"),
// InfoFiles: this.imgList,
Goods: this.tableData
}
this.tui.request("/StockOut/StockOutGoods", "POST", postData, false, false, false)
.then((
res) => {
console.log(res)
if (res.Code == 0) {
this.tui.toast(res.Message, 2000, 'success')
this.tableData = []
this.$refs.showLeft.close();
this.getInfo()
// uni.navigateBack();
} else if (res.Code == -1) {
this.tui.toast(res.Message, 2000, 'none')
}
}).catch((err) => {
this.tui.toast('异常:' + err, 2000, 'none')
})
},
pickImage: function() {
console.log('==== picker ====')
uni.chooseImage({
count: 1, //9
sizeType: ['original'], //
sourceType: ['camera'], //使
success: (temp) => {
// const tempFilePaths = res.tempFilePaths;
const files = temp.tempFiles;
// console.log(files[0])
var path = files[0].path
var filename = path.replace(/(.*\/)*([^.]+).*/ig, "$2") + ".jpg"
uni.showLoading()
uni.uploadFile({
url: this.tui.uploadUrl(),
fileType: "image", //ZFB,
filePath: temp.tempFilePaths[0], //
name: 'files',
formData: {
'WMSDOID': this.planinfo.WMSDOID
},
success: res => {
this.tui.toast(res.Message, 2000, 'success')
this.getInfo()
uni.hideLoading();
},
fail(err) {
console.log(err)
// this.tui.toast('', 2000, 'none')
uni.hideLoading();
}
});
}
})
}
}
}
</script>
<style>
.example {
padding: 15px;
background-color: #fff;
}
.button-group {
margin-top: 15px;
display: flex;
justify-content: space-around;
}
.form-item {
display: flex;
align-items: center;
}
.button {
display: flex;
align-items: center;
height: 35px;
margin-left: 10px;
}
/* @import '../../static/style/thorui.css'; */
.tui-msg-box {
display: flex;
align-items: center;
}
.tui-msg-pic {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
display: block;
margin-right: 24rpx;
flex-shrink: 0;
}
.tui-msg-item {
max-width: 500rpx;
/* min-height: 100rpx; */
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.tui-msg-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 45rpx;
line-height: 2;
justify-content: space-between;
color: #262b3a;
}
.tui-item-box {
width: 100%;
display: flex;
align-items: center;
}
.tui-list-cell_name {
padding-left: 20rpx;
display: flex;
align-items: center;
justify-content: center;
}
.tui-ml-auto {
margin-left: auto;
}
.tui-right {
margin-left: auto;
margin-right: 34rpx;
font-size: 26rpx;
color: #999;
}
.tui-logo {
height: 52rpx;
width: 52rpx;
flex-shrink: 0;
}
</style>
<style lang='scss'>
.tui-searchbox {
padding: 30rpx 0;
box-sizing: border-box;
display: flex;
align-items: center;
}
.tui-search-input {
width: 100%;
height: 66rpx;
border-radius: 35rpx;
padding: 0 30rpx;
box-sizing: border-box;
background: #f2f2f2;
display: flex;
align-items: center;
flex-wrap: nowrap;
}
.tui-input {
flex: 1;
color: #333;
padding: 0 16rpx;
font-size: 28rpx;
}
.tui-input-plholder {
font-size: 28rpx;
color: #b2b2b2;
}
.fr-btn {
float: right;
height: 60upx;
font-size: 28upx;
line-height: 60upx;
margin: 14upx 0;
}
</style>

@ -108,7 +108,7 @@
uni.setStorageSync("TRUCKID", item.TRUCKID)
uni.setStorageSync("TRUCKNO", item.TRUCKNO)
uni.navigateTo({
url: '../stockout-goods/stockout-goods'
url: '../stockout-handle/stockout-handle'
})
}
}

Loading…
Cancel
Save