Commit ddb60012 by 施宇

1

parent 73ebf580
{"ignoreds":["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"],"folderInfo":{"./":{"mtimeMs":1588039958728.2603,"children":["app.js","app.json","app.wxss","project.config.json","sitemap.json"]},"pages/":{"mtimeMs":1588045516900.1838,"children":[]},"res/":{"mtimeMs":1587987929535.54,"children":[]},"res/css/":{"mtimeMs":1587468648224.7944,"children":["res/css/base.wxss"]},"res/img/":{"mtimeMs":1587693859514.1584,"children":["res/img/arrow-left.png","res/img/arrow-right.png","res/img/ck-icon-a.png","res/img/ck-icon.png","res/img/close-icon.png","res/img/kc-icon-a.png","res/img/kc-icon.png","res/img/login-img.png","res/img/login-text.png","res/img/nav-arrow-down.png","res/img/question-icon.png","res/img/search-icon.png","res/img/sh-icon-a.png","res/img/sh-icon.png","res/img/sj-icon-a.png","res/img/sj-icon.png","res/img/sz-icon-a.png","res/img/sz-icon.png","res/img/warn-icon.png"]},"utils/":{"mtimeMs":1588040145835.5574,"children":["utils/api.js","utils/axios.js","utils/md5.js","utils/util.js"]},".git/":{"mtimeMs":1588045754162.6826,"children":[]},".wechatide/":{"mtimeMs":1587519550088.0625,"children":[".wechatide/fileCache.cfg"]},"pages/home/":{"mtimeMs":1587536014892.4702,"children":["pages/home/home.js","pages/home/home.json","pages/home/home.wxml","pages/home/home.wxss"]},"pages/login/":{"mtimeMs":1587535974795.0686,"children":["pages/login/login.js","pages/login/login.json","pages/login/login.wxml","pages/login/login.wxss"]},"components/":{"mtimeMs":1587538211879.0247,"children":[]},"components/navC/":{"mtimeMs":1587538221287.4016,"children":["components/navC/navC.js","components/navC/navC.json","components/navC/navC.wxml","components/navC/navC.wxss"]},"pages/receivinggoods/":{"mtimeMs":1587538742321.587,"children":["pages/receivinggoods/receivinggoods.js","pages/receivinggoods/receivinggoods.json","pages/receivinggoods/receivinggoods.wxml","pages/receivinggoods/receivinggoods.wxss"]},"pages/upperShelf/":{"mtimeMs":1587622056930.153,"children":["pages/upperShelf/upperShelf.js","pages/upperShelf/upperShelf.json","pages/upperShelf/upperShelf.wxml","pages/upperShelf/upperShelf.wxss"]},"pages/outbound/":{"mtimeMs":1587626008346.8442,"children":["pages/outbound/outbound.js","pages/outbound/outbound.json","pages/outbound/outbound.wxml","pages/outbound/outbound.wxss"]},"pages/scanDelivery/":{"mtimeMs":1587627596586.3196,"children":["pages/scanDelivery/scanDelivery.js","pages/scanDelivery/scanDelivery.json","pages/scanDelivery/scanDelivery.wxml","pages/scanDelivery/scanDelivery.wxss"]},"pages/picking/":{"mtimeMs":1587631234329.3645,"children":["pages/picking/picking.js","pages/picking/picking.json","pages/picking/picking.wxml","pages/picking/picking.wxss"]},"pages/cardBoard/":{"mtimeMs":1587632724321.1174,"children":["pages/cardBoard/cardBoard.js","pages/cardBoard/cardBoard.json","pages/cardBoard/cardBoard.wxml","pages/cardBoard/cardBoard.wxss"]},"pages/changeWarehouse/":{"mtimeMs":1587635396534.957,"children":["pages/changeWarehouse/changeWarehouse.js","pages/changeWarehouse/changeWarehouse.json","pages/changeWarehouse/changeWarehouse.wxml","pages/changeWarehouse/changeWarehouse.wxss"]},"pages/systemSettings/":{"mtimeMs":1587637181028.4365,"children":["pages/systemSettings/systemSettings.js","pages/systemSettings/systemSettings.json","pages/systemSettings/systemSettings.wxml","pages/systemSettings/systemSettings.wxss"]},"pages/printer/":{"mtimeMs":1587637593187.5686,"children":["pages/printer/printer.js","pages/printer/printer.json","pages/printer/printer.wxml","pages/printer/printer.wxss"]},"pages/inventoryQuery/":{"mtimeMs":1587639536186.8396,"children":["pages/inventoryQuery/inventoryQuery.js","pages/inventoryQuery/inventoryQuery.json","pages/inventoryQuery/inventoryQuery.wxml","pages/inventoryQuery/inventoryQuery.wxss"]},"pages/startPage/":{"mtimeMs":1588045543126.067,"children":["pages/startPage/startPage.js","pages/startPage/startPage.json","pages/startPage/startPage.wxml","pages/startPage/startPage.wxss"]}},"cacheVersion":1}
\ No newline at end of file
{"ignoreds":["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"],"folderInfo":{"./":{"mtimeMs":1588039958728.2603,"children":["app.js","app.json","app.wxss","project.config.json","sitemap.json"]},"pages/":{"mtimeMs":1588045516900.1838,"children":[]},"res/":{"mtimeMs":1587987929535.54,"children":[]},"res/css/":{"mtimeMs":1587468648224.7944,"children":["res/css/base.wxss"]},"res/img/":{"mtimeMs":1587693859514.1584,"children":["res/img/arrow-left.png","res/img/arrow-right.png","res/img/ck-icon-a.png","res/img/ck-icon.png","res/img/close-icon.png","res/img/kc-icon-a.png","res/img/kc-icon.png","res/img/login-img.png","res/img/login-text.png","res/img/nav-arrow-down.png","res/img/question-icon.png","res/img/search-icon.png","res/img/sh-icon-a.png","res/img/sh-icon.png","res/img/sj-icon-a.png","res/img/sj-icon.png","res/img/sz-icon-a.png","res/img/sz-icon.png","res/img/warn-icon.png"]},"utils/":{"mtimeMs":1588040145835.5574,"children":["utils/api.js","utils/axios.js","utils/md5.js","utils/util.js"]},".git/":{"mtimeMs":1588145892497.218,"children":[]},".wechatide/":{"mtimeMs":1587519550088.0625,"children":[".wechatide/fileCache.cfg"]},"pages/home/":{"mtimeMs":1587536014892.4702,"children":["pages/home/home.js","pages/home/home.json","pages/home/home.wxml","pages/home/home.wxss"]},"pages/login/":{"mtimeMs":1587535974795.0686,"children":["pages/login/login.js","pages/login/login.json","pages/login/login.wxml","pages/login/login.wxss"]},"components/":{"mtimeMs":1587538211879.0247,"children":[]},"components/navC/":{"mtimeMs":1587538221287.4016,"children":["components/navC/navC.js","components/navC/navC.json","components/navC/navC.wxml","components/navC/navC.wxss"]},"pages/receivinggoods/":{"mtimeMs":1587538742321.587,"children":["pages/receivinggoods/receivinggoods.js","pages/receivinggoods/receivinggoods.json","pages/receivinggoods/receivinggoods.wxml","pages/receivinggoods/receivinggoods.wxss"]},"pages/upperShelf/":{"mtimeMs":1587622056930.153,"children":["pages/upperShelf/upperShelf.js","pages/upperShelf/upperShelf.json","pages/upperShelf/upperShelf.wxml","pages/upperShelf/upperShelf.wxss"]},"pages/outbound/":{"mtimeMs":1587626008346.8442,"children":["pages/outbound/outbound.js","pages/outbound/outbound.json","pages/outbound/outbound.wxml","pages/outbound/outbound.wxss"]},"pages/scanDelivery/":{"mtimeMs":1587627596586.3196,"children":["pages/scanDelivery/scanDelivery.js","pages/scanDelivery/scanDelivery.json","pages/scanDelivery/scanDelivery.wxml","pages/scanDelivery/scanDelivery.wxss"]},"pages/picking/":{"mtimeMs":1587631234329.3645,"children":["pages/picking/picking.js","pages/picking/picking.json","pages/picking/picking.wxml","pages/picking/picking.wxss"]},"pages/cardBoard/":{"mtimeMs":1587632724321.1174,"children":["pages/cardBoard/cardBoard.js","pages/cardBoard/cardBoard.json","pages/cardBoard/cardBoard.wxml","pages/cardBoard/cardBoard.wxss"]},"pages/changeWarehouse/":{"mtimeMs":1587635396534.957,"children":["pages/changeWarehouse/changeWarehouse.js","pages/changeWarehouse/changeWarehouse.json","pages/changeWarehouse/changeWarehouse.wxml","pages/changeWarehouse/changeWarehouse.wxss"]},"pages/systemSettings/":{"mtimeMs":1587637181028.4365,"children":["pages/systemSettings/systemSettings.js","pages/systemSettings/systemSettings.json","pages/systemSettings/systemSettings.wxml","pages/systemSettings/systemSettings.wxss"]},"pages/printer/":{"mtimeMs":1587637593187.5686,"children":["pages/printer/printer.js","pages/printer/printer.json","pages/printer/printer.wxml","pages/printer/printer.wxss"]},"pages/inventoryQuery/":{"mtimeMs":1587639536186.8396,"children":["pages/inventoryQuery/inventoryQuery.js","pages/inventoryQuery/inventoryQuery.json","pages/inventoryQuery/inventoryQuery.wxml","pages/inventoryQuery/inventoryQuery.wxss"]},"pages/startPage/":{"mtimeMs":1588045543126.067,"children":["pages/startPage/startPage.js","pages/startPage/startPage.json","pages/startPage/startPage.wxml","pages/startPage/startPage.wxss"]}},"cacheVersion":1}
\ No newline at end of file
{
"pages": [
"pages/receivinggoods/receivinggoods",
"pages/startPage/startPage",
"pages/changeWarehouse/changeWarehouse",
"pages/receivinggoods/receivinggoods",
"pages/home/home",
"pages/login/login",
"pages/inventoryQuery/inventoryQuery",
"pages/printer/printer",
"pages/systemSettings/systemSettings",
"pages/changeWarehouse/changeWarehouse",
"pages/cardBoard/cardBoard",
"pages/picking/picking",
"pages/scanDelivery/scanDelivery",
......
......@@ -14,6 +14,11 @@ Component({
type: String,
value: '供应链仓储管理系统'
},
store:{//仓库名称
type: String,
value: ''
}
},
/**
......@@ -21,6 +26,7 @@ Component({
*/
data: {
userInfo:wx.getStorageSync('userInfo'),
storeInfo:wx.getStorageSync('storeInfo'),
drop1:false,
drop2:false,
index:0,
......@@ -29,11 +35,15 @@ Component({
// 在组件实例进入页面节点树时执行
let me = this;
me.judgePagePath()
if(me.data.userInfo){
me.triggerEvent('getInfo', me.data.userInfo.engName)
return
};
if(!me.data.userInfo){
this.getUserData();
}
if(!me.data.storeInfo){
this.getStoreInfo();
}else{
me.triggerEvent('getInfo', me.store||me.data.storeInfo.store_name)
}
},
......@@ -84,9 +94,6 @@ Component({
drop2:false
})
},
test:function(){
console.log(111)
},
drop1Fun:function(){
this.setData({
drop1:true,
......@@ -133,7 +140,7 @@ Component({
data: data.userId
});
me.triggerEvent('getInfo', data.engName)
} else {
wx.showToast({
......@@ -144,6 +151,31 @@ Component({
}
}, false,true)
},
getStoreInfo:function(){
let me = this;
getData(apis.get_store_list, 'post', {}, function(res) {
if (res.errcode === 0) {
let data = res.data;
if(data.current_store){
me.setData({
storeInfo:data.current_store
});
wx.setStorage({
key: "storeInfo",
data: data.current_store
});
me.triggerEvent('getInfo', data.current_store.store_name)
}
} else {
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, false,true)
},
}
})
......@@ -44,7 +44,7 @@
</view>
</view>
<view class="html-title ellipsis">{{title}}</view>
<view class="nav-right">当前仓库:{{userInfo.engName}}</view>
<view class="nav-right">当前仓库:{{store||storeInfo.store_name||'--'}}</view>
</view>
<slot></slot>
</view>
\ No newline at end of file
// pages/changeWarehouse/changeWarehouse.js
import {
getData
} from '../../utils/axios.js';
import {
apis
} from '../../utils/api.js';
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
chooseObj:"",
isShow:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getList()
},
getList:function(){
let me = this;
getData(apis.get_store_list, 'post', {}, function(res) {
if (res.errcode === 0) {
let data = res.data;
if(data.current_store){
me.setData({
chooseObj:data.current_store
})
}
me.setData({
list:data.store_list
})
console.log(me.data.list)
} else {
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true,true)
},
changeIsShow:function(e){
let {type} = e.currentTarget.dataset;
let isShow = false;
isShow = (type == 1?true:false);
this.setData({
isShow:isShow
})
},
chooseStore:function(e){
let {item} = e.currentTarget.dataset;
this.setData({
isShow:false,
chooseObj:item
})
},
cancelFun:function(){
wx.navigateBack()
},
sureFun:function(){
let me = this;
let chooseObj = this.data.chooseObj;
if(!chooseObj){
wx.showToast({
title: '请选择仓库',
icon: 'none',
duration: 2000
});
return
}
let id = chooseObj['store_id'];
getData(apis.change_store, 'post', {"store_id":id}, function(res) {
if (res.errcode === 0) {
wx.showToast({
title:'操作成功',
icon: 'none',
duration: 2000,
success:function(){
// me.cancelFun();
}
});
wx.setStorage({
key: "storeInfo",
data: chooseObj
});
} else {
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true,true)
},
/**
......
<view class="change-warehouse-view width-854px nav-view borderBox">
<nav-c></nav-c>
<nav-c store="{{chooseObj.store_name}}">
<view class="change-warehouse-view width-854px nav-view borderBox" bindtap="changeIsShow" data-type="0">
<view class="change-warehouse-wrapper">
<view class="select-view Bflex aic">
<text>请选择仓库</text>
<view class="select-input borderBox">
<view class="select-input borderBox" catchtap="changeIsShow" data-type="1">
<view class="text ellipsis">{{chooseObj.store_name}}</view>
<image class="arrow-down" src="../../res/img/nav-arrow-down.png"></image>
<view class="select-items">
<view class="select-items" wx:if="{{isShow}}">
<block wx:if="{{!list.length}}">
<view class="select-item">
A号仓储
暂无数据
</view>
<view class="select-item">
A号仓储
</view>
<view class="select-item">
A号仓储
</view>
<view class="select-item">
A号仓储
</view>
<view class="select-item">
A号仓储
</view>
<view class="select-item">
A号仓储
</view>
<view class="select-item">
A号仓储
</view>
<view class="select-item">
A号仓储
</view>
<view class="select-item">
A号仓储
</block>
<block wx:else>
<view class="select-item" wx:for="{{list}}" wx:key="index" data-item="{{item}}" catchtap="chooseStore">
{{item.store_name}}
</view>
</block>
</view>
</view>
</view>
<view class="btn-group Bflex">
<view class="btn-item btn blue-btn ">
<view class="btn-item btn blue-btn" catchtap="sureFun">
确定
</view>
<view class="btn-item btn disbled-btn borderBox">
<view class="btn-item btn disbled-btn borderBox" catchtap="cancelFun">
取消
</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
</nav-c>
\ No newline at end of file
......@@ -44,7 +44,6 @@ page {
padding:11px 0;
max-height: 208px;
overflow-y: auto;
/* display: none; */
}
.select-item{
padding:4px 23px 8px;
......@@ -63,3 +62,10 @@ page {
.disbled-btn{
margin-left: 80px;
}
.select-input .text{
height:35px;
width:320px;
padding:0 10px;
line-height: 35px;
}
\ No newline at end of file
......@@ -18,26 +18,36 @@ Page({
isShowMask1:false,//是否展示弹窗(城市弹窗)
errorText:false,//是否显示错误信息(入仓号不存在)
list1:[],//头部的表格数据
errorArr:[],
list2:[],//底部左边的表格数据
list3:[],//底部右边的表格数据
leftChooseId:"",//左边表格选中的id
rightChooseId:"",//右边表格选中的id
formData:{
wldy:2,//物料打印 1为允许 2为禁止
jlpc:2,//记录批次/DC 1为允许 2为禁止
tm:"",//条码
xh:"",//型号
sl:"",//数量
pdx:"",//盘/袋/箱
pdx:"1",//盘/袋/箱
pc:"",//批次
pp:"",//品牌
cd:"",//产地
dc:""//dc
dc:"",//dc
zl:""//重量
},
searchByXh:"",//通过输入型号去获取单个入仓数据
countryList:[],//国家列表
xiangIndex:0,//装新箱或者合箱
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getMaskList()
this.getMaskList();
this.getCountryList()
},
/**
......@@ -91,10 +101,10 @@ Page({
addScan:function(e){
//加入扫描
let data = e.currentTarget.dataset;
this.setData({
chooseOrder:data.info,
});
this.getList1()
this.fillDataByScanXh(data.info,data.info.goods_name)
// this.setData({
// chooseOrder:data.info,
// });
},
closeMask:function(){
//关闭入仓数据选择弹窗
......@@ -105,6 +115,12 @@ Page({
})
}
},
closeMask1:function(){
//关闭城市选择弹窗
this.setData({
isShowMask1:false
})
},
changeIndex:function(e){
//改变弹窗的选择数据状态(入库数据弹窗)
let data = e.currentTarget.dataset;
......@@ -113,7 +129,10 @@ Page({
chooseOrder:data.info,
isShowMask:false,
});
this.getList1()
this.getList1();
this.getReceivingList(1);
// this.getReceivingList(2)
},
getMaskList:function(){
//获取弹窗数据(入仓)
......@@ -132,7 +151,9 @@ Page({
me.setData({
chooseOrder:data.data[0]
});
me.getList1()
me.getList1();
me.getReceivingList(1);
// me.getReceivingList(2)
}else{
me.setData({
maskList:data.data,
......@@ -154,7 +175,7 @@ Page({
duration: 2000
});
}
}, false,true)
}, true,true)
},
getList1:function(){
//获取头部的第一个列表数据
......@@ -193,39 +214,116 @@ Page({
//监听条码的input
let {value} = e.detail ;
let formData = this.data.formData;
if(formData.xh){
//型号已经扫描了
if(formData.sl){
//数量已经扫描了
if(!formData.xh){
//型号未扫描
this.scanXh(value)
}else{
if(!formData.sl){
//数量未扫描
this.scanNumber(value)
}
}else{
this.scanXh(value)
if(!formData.cd){
//产地未扫描
this.scanCd(value)
}else{
if(formData.jlpc == 1){
//判断是否可以填写批次和dc
if(!formData.pc){
//批次未扫描
this.scanPc(value)
}else{
if(!formData.dc){
//dc未扫描
this.scanDc(value)
}
}
}
}
}
}
},
formcdInput:function(e){
//监听产地的输入框
let {value} = e.detail ;
this.setData({
["formData.cd"]:value
})
},
formdcInput:function(e){
//监听dc的输入框
let {value} = e.detail ;
this.setData({
["formData.dc"]:value
})
},
formpcInput:function(e){
//监听批次的输入框
let {value} = e.detail ;
this.setData({
["formData.pc"]:value
})
},
formslInput:function(e){
//监听数量的输入框
let {value} = e.detail ;
this.setData({
["formData.sl"]:value
})
},
formpdxInput:function(e){
//监听盘袋箱的输入框
let {value} = e.detail ;
this.setData({
["formData.pdx"]:value
})
},
scanCd:function(val){
//通过条形码扫描产地
this.judgeCountry(val)
},
scanPc:function(val){
//通过条形码扫描批次
this.setData({
["formData.pc"]:val
});
this.dealErrorArr('批次扫描成功,请扫描DC')
},
scanDc:function(val){
//通过条形码扫描dc
this.setData({
["formData.dc"]:val
})
this.dealErrorArr('DC扫描成功,请确认信息并收货')
},
scanNumber:function(val){
//通过条形码扫描数量
if((typeof(Number(val))).toLowerCase()!=="number"){
let str = "";
if(!this.checkNum(val)){
wx.showToast({
title:'数量格式错误',
icon: 'none',
duration: 2000
});
str="数量格式错误"
}else{
if(Number(val)>Number(this.data.searchByXh.number)){
if(Number(val)>Number(this.data.searchByXh.wait_received)){
wx.showToast({
title:'实际收货量超出计划收货量',
icon: 'none',
duration: 2000
});
str="实际收货量超出计划收货量"
}else{
str="数量扫描成功"
this.setData({
["formData.sl"]:val
})
}
}
if(str){
this.dealErrorArr(str)
}
},
scanXh:function(val){
//通过条形码查询型号
......@@ -234,31 +332,338 @@ Page({
getData(apis.in_store_detail_list, 'post', {"in_store_id":chooseOrder.in_store_id,"goods_name":val}, function(res) {
if (res.errcode === 0) {
let data = res.data;
let str="";
let dataObj = "";
if(data.data){
let len = data.data.length;
if(!len){
dataObj = ""
str=`型号${val}在入仓单中找不到`
}else{
dataObj = data.data[0];
me.fillDataByScanXh(dataObj,val)
return;
}
}else{
dataObj = "";
str=`型号${val}在入仓单中找不到`
};
if(str){
me.dealErrorArr(str)
}
me.setData({
searchByXh:dataObj
})
} else {
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true,true)
},
checkNum:function(val) {
//判断是否是数字
  var re = /^[0-9]+.?[0-9]*$/; //判断字符串是否为数字
  if (!re.test(val)) {
    return false;
  }else{
return true
}
},
fbFun:function(){
//发布
let formData = this.data.formData;
let me = this;
if(!formData.xh){
this.showToastFunAndErrorArr('商品获取失败,无法收货')
}else if(!this.checkNum(formData.sl)||!this.checkNum(formData.pdx)){
this.showToastFunAndErrorArr('数量格式错误')
}else if(Number(formData.sl)>Number(this.data.searchByXh.wait_received)){
this.showToastFunAndErrorArr('实际收货量超出计划收货量')
}else if(!formData.cd){
//产地不存在
this.showToastFunAndErrorArr('产地不能为空')
}else{
//产地存在
if(formData.jlpc == 1){
//判断是否可以填写批次和dc
if(!formData.pc){
//批次未扫描
me.showToastFunAndErrorArr('批次不能为空')
}else{
if(!formData.dc){
//dc未扫描
me.showToastFunAndErrorArr('dc不能为空')
}else{
this.fbData()
}
}
}else{
this.fbData()
}
}
},
fbData:function(){
//发布数据组装
let me = this;
let formData = this.data.formData;
let detailId = this.data.searchByXh['in_store_detail_id'];
let storeId = this.data.chooseOrder['in_store_id'];
let obj = {
"in_store_detail_id":detailId,
"in_store_id":storeId,
"number":formData.sl,
"box_num":formData.pdx
};
if(formData.jlpc == 1){
obj['batch'] = formData.pc;
obj['dc'] = formData.dc;
};
this.judgeCountry(formData.cd,function(id){
obj['country_id'] = id;
me.fbAjax(obj)
})
},
fbAjax:function(obj){
//发布调用接口
let me = this;
getData(apis.receiving_goods, 'post', {...obj}, function(res) {
if (res.errcode === 0) {
wx.showToast({
title:'发布成功',
icon: 'none',
duration: 2000
});
me.getList1();
me.getReceivingList(1);
console.log('判断打印物料是否勾选进行蓝牙打印')
}else{
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true,true)
},
clearFun:function(){
//清除表单数据
this.clearForm(true)
},
clearForm:function(isBtn){
//如果是点击的就显示"清除成功,请扫型号条码"
let obj = this.data.formData;
for(let key in obj){
if(key == 'wldy' || key == 'jlpc'){
obj[key] = 2
}else if(key == 'pdx'){
obj[key] = 1
}else{
obj[key] = ''
}
}
this.setData({
formData:obj,
searchByXh:"",
});
if(isBtn){
this.setData({
errorArr:['清除成功,请扫型号条码']
});
}
},
dealErrorArr:function(errorText){
//处理错误日志
if(!errorText){
return
}
this.data.errorArr.unshift(errorText);
this.setData({
errorArr: this.data.errorArr
})
},
showToastFunAndErrorArr:function(errorText){
//处理错误的弹窗同时增加错误日志
if(!errorText){
return
}
this.dealErrorArr(errorText)
wx.showToast({
title:errorText,
icon: 'none',
duration: 2000
});
},
fillDataByScanXh:function(dataObj,val){
//通过扫描型号填充表单(手动扫描型号或者点击加入扫描);
this.clearForm()
this.setData({
["formData.xh"]:dataObj.goods_name,
["formData.pp"]:dataObj.brand_name,
["formData.cd"]:dataObj.country_name,
["formData.tm"]:dataObj.val,
["formData.tm"]:val,
["formData.wldy"]:dataObj.is_print,
["formData.jlpc"]:dataObj.is_record_batch_dc,
searchByXh:dataObj
});
this.dealErrorArr('型号查找成功,请扫描数量条码')
},
judgeCountry:function(val,callBack){
//判断国家是否存在
let me = this;
getData(apis.get_country, 'post', {"source":val}, function(res) {
if (res.errcode === 0) {
//存在
if(callBack){
callBack(res.data.country_id)
}else{
me.setData({
["formData.cd"]:val
});
me.dealErrorArr('产地获取成功')
}
}else if(res.errcode == '10001') {
//不存在
me.showToastFunAndErrorArr('产地不存在');
}else{
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, false,true)
},
getCountryList:function(){
//获取国家的列表
let me = this;
getData(apis.country_list, 'post', {}, function(res) {
if (res.errcode === 0) {
me.setData({
countryList:res.data
})
}else{
wx.showToast({
title:'国家列表获取失败',
icon: 'none',
duration: 2000
});
}
}, false,true)
},
showMask1Fun:function(){
//展示城市弹窗
if(this.data.countryList.length){
this.setData({
isShowMask1:true
})
}
},
chooseCountry:function(e){
//选择城市
let data = e.currentTarget.dataset;
this.setData({
["formData.cd"]:data.country,
isShowMask1:false
})
},
getReceivingList:function(type){
//获取收货列表
//type 为1表示左边的数据 为2表示右边的数据
let me = this;
let storeId = this.data.chooseOrder['in_store_id'];
let obj = {
"in_store_id":storeId,
status:type == 1?'1':'2'
}
if(type== 2){
obj['is_mager'] = true
}
getData(apis.receiving_list, 'post', {...obj}, function(res) {
if (res.errcode === 0) {
let data = res.data;
let dataArr = [];
if(data.data){
let len = data.data.length;
if(!len){
dataArr = []
}else{
dataArr = data.data
}
}else{
dataObj = ""
dataArr = []
};
let str = type == 1?'list2':'list3'
me.setData({
searchByXh:dataObj
[str]:dataArr
})
}else{
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, false,true)
},
upDataReceivingStatus:function(e){
let {type,check} = e.currentTarget.dataset
let storeId = this.data.chooseOrder['in_store_id'];
let obj = {
"status":type,
"in_store_id":storeId
};
if(check==1){
//表示单个处理
if(type == 1){
//将数据改为待处理的数据
if(!this.data.rightChooseId){
wx.showToast({
title: '请选择要处理的数据',
icon: 'none',
duration: 2000
});
}else{
obj['goods_id'] = this.data.rightChooseId
}
}else{
//将数据改为处理中的数据
if(!this.data.leftChooseId){
wx.showToast({
title: '请选择要处理的数据',
icon: 'none',
duration: 2000
});
}else{
obj['receiving_id'] = this.data.leftChooseId
}
}
}
this.upDataReceivingStatusAjax(obj)
} else {
},
upDataReceivingStatusAjax:function(obj){
let me = this;
getData(apis.update_receiving_status, 'post', {...obj}, function(res) {
if (res.errcode === 0) {
wx.showToast({
title: '操作成功',
icon: 'none',
duration: 2000
});
me.setData({
leftChooseId:"",
rightChooseId:"",
});
me.getReceivingList(1);
me.getReceivingList(2)
}else{
wx.showToast({
title: res.errmsg,
icon: 'none',
......@@ -266,5 +671,55 @@ Page({
});
}
}, true,true)
},
chooseLeft:function(e){
//选中左边表格的数据
let {id} = e.currentTarget.dataset;
this.setData({
leftChooseId:id,
rightChooseId:"",
})
},
chooseRight:function(e){
//选择右边表格的数据
let {id} = e.currentTarget.dataset;
this.setData({
rightChooseId:id,
leftChooseId:""
})
},
deleteReceiving:function(e){
let {id} = e.currentTarget.dataset;
let me = this;
getData(apis.delete_receiving, 'post', {"receiving_id":id}, function(res) {
if (res.errcode === 0) {
wx.showToast({
title: '清除成功',
icon: 'none',
duration: 2000
});
me.setData({
leftChooseId:"",
});
me.getReceivingList(1);
}else{
wx.showToast({
title: res.errmsg,
icon: 'none',
duration: 2000
});
}
}, true,true)
},
changeXiangIndex:function(e){
//装新箱还是合箱
let {index} = e.currentTarget.dataset;
this.setData({
xiangIndex:index
})
},
saveSaleTask:function(){
},
})
\ No newline at end of file
......@@ -4,7 +4,7 @@
<view class="view-top Bflex aic">
<text class="desc">入仓单号</text>
<input class="input input-border" ></input>
<input class="input input-border"></input>
<text class="error-text" wx:if="{{errorText}}">入仓号不存在</text>
<view class="number">
入仓号:
......@@ -33,7 +33,7 @@
</view>
</block>
<block wx:else>
<view class="body-data Bflex" wx:for="{{list1}}" wx:key="index" >
<view class="body-data Bflex" wx:for="{{list1}}" wx:key="index">
<view class="td-1 td borderBox Iflex jcc aic" data-info="{{item}}" catchtap="addScan"><text class="underline-text">加入扫描</text></view>
<view class="td-2 td borderBox Iflex jcc aic"><text>{{item.receiving_status}}</text></view>
<view class="td-2 td borderBox Iflex jcc aic td-94"><text>{{item.goods_name}}</text></view>
......@@ -83,7 +83,7 @@
</view>
<view class="form-bottom-center">
<view class="form-bottom-center-view">
<view class="clear-btn borderBox disbled-btn btn">清除</view>
<view class="clear-btn borderBox disbled-btn btn" catchtap="clearFun">清除</view>
</view>
<view class="form-bottom-center-view Bflex aic">
<text class="label">品牌</text>
......@@ -92,7 +92,7 @@
<view class="form-bottom-center-view Bflex aic">
<text class="label">产地</text>
<input class="input input-border address-input" bindinput="formcdInput" value="{{formData.cd}}"></input>
<image class="search-icon" src="../../res/img/search-icon.png"></image>
<image class="search-icon" src="../../res/img/search-icon.png" catchtap="showMask1Fun"></image>
</view>
<view class="form-bottom-center-view Bflex aic">
<text class="label">DC</text>
......@@ -103,9 +103,12 @@
<view class="form-bottom-right-top Bflex">
<text class="label">重量(KG)</text>
<view class="version-reslut">
<view class="version">1.2</view>
<view class="reslut">XXXXX型号在入仓单
中找不到。</view>
<view class="version">
<input class="zl-input" value="{{formData.zl}}" type="number"></input>
</view>
<view class="reslut borderBox">
<view wx:for="{{errorArr}}" wx:key="index">{{item}}</view>
</view>
</view>
</view>
<view class="form-bottom-right-bottom Bflex aic">
......@@ -114,92 +117,106 @@
</view>
</view>
</view>
<view class="receiving-btn btn blue-btn">发布</view>
<view class="receiving-btn btn blue-btn" catchtap="fbFun">发布</view>
</view>
<view class="bottom-form">
<view class="bottom-form-top Bflex aic">
<text>待处理数据</text>
<view class="Iflex checkBox aic xx-c">
<text class="box-icon"></text>
<view class="Iflex checkBox aic xx-c" catchtap="changeXiangIndex" data-index="1">
<text class="box-icon {{xiangIndex == 1 ?'checked':'' }}"></text>
<text>装新箱</text>
</view>
<view class="Iflex checkBox aic">
<text class="box-icon checked"></text>
<view class="Iflex checkBox aic" catchtap="changeXiangIndex" data-index="2">
<text class="box-icon {{xiangIndex == 2 ?'checked':'' }}"></text>
<text>合箱</text>
</view>
<input class="input input-border" ></input>
<input class="input input-border"></input>
</view>
<view class="bottom-table-view Bflex aic">
<view class="bottom-table-view Bflex">
<view class="left-table-view">
<view class="left-table bottom-table-data">
<view class="head Bflex">
<view class="td-1 td borderBox Iflex jcc aic"><text>选项</text></view>
<!-- <view class="td-1 td borderBox Iflex jcc aic"><text>选项</text></view> -->
<view class="td-2 td borderBox Iflex jcc aic"><text>型号</text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>品牌</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>数量</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>操作 </text></view>
</view>
<view class="body">
<block wx:if="{{!list2.length}}">
<view class="body-data Bflex">
<view class="td-1 td borderBox Iflex jcc aic"><text class="box-icon"></text></view>
<view class="td-2 td borderBox Iflex jcc aic"><text></text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>ahdgdy</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>1000</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>清除</text></view>
<view class="no-data-td ">暂无数据</view>
</view>
<view class="body-data Bflex">
<view class="td-1 td borderBox Iflex jcc aic"><text class="box-icon"></text></view>
<view class="td-2 td borderBox Iflex jcc aic"><text></text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>ahdgdy</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>1000</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>清除</text></view>
</block>
<block wx:else>
<view class="body-data Bflex {{leftChooseId == item.receiving_id ?'active':'' }}" wx:for="{{list2}}" wx:key="index" data-id="{{item.receiving_id}}" catchtap="chooseLeft">
<!-- <view class="td-1 td borderBox Iflex jcc aic"><text class="box-icon"></text></view> -->
<view class="td-2 td borderBox Iflex jcc aic"><text>{{item.goods_name}}</text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>{{item.brand_name}}</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>{{item.number}}</text></view>
<view class="td-5 td borderBox Iflex jcc aic" catchtap="deleteReceiving" data-id="{{item.receiving_id}} "><text class="underline-text">清除</text></view>
</view>
</block>
</view>
</view>
</view>
<view class="left-right-icon Bflex">
<image src="../../res/img/arrow-left.png" class="arrow-left"></image>
<image src="../../res/img/arrow-right.png" class="arrow-right"></image>
<view class="sigle-check" catchtap="upDataReceivingStatus" data-type="1" data-check="2">
<image src="../../res/img/all-check-left.png" class=" normal arrow-icon"></image>
<image src="../../res/img/all-check-left-a.png" class="active arrow-icon"></image>
</view>
<view class="sigle-check" catchtap="upDataReceivingStatus" data-type="1" data-check="1">
<image src="../../res/img/sigle-check-left.png" class=" normal arrow-icon"></image>
<image src="../../res/img/sigle-check-left-a.png" class="active arrow-icon"></image>
</view>
<view class="sigle-check" catchtap="upDataReceivingStatus" data-type="2" data-check="1">
<image src="../../res/img/sigle-check-right.png" class=" normal arrow-icon"></image>
<image src="../../res/img/sigle-check-right-a.png" class="active arrow-icon"></image>
</view>
<view class="sigle-check" catchtap="upDataReceivingStatus" data-type="2" data-check="2">
<image src="../../res/img/all-check-right.png" class="normal arrow-icon"></image>
<image src="../../res/img/all-check-right-a.png" class="active arrow-icon"></image>
</view>
</view>
<view class="right-table-view">
<view class="right-table bottom-table-data">
<view class="head Bflex">
<view class="td-1 td borderBox Iflex jcc aic"><text>选项</text></view>
<!-- <view class="td-1 td borderBox Iflex jcc aic"><text>选项</text></view> -->
<view class="td-2 td borderBox Iflex jcc aic"><text>型号</text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>品牌</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>箱号</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>数量 </text></view>
</view>
<view class="body">
<block wx:if="{{!list3.length}}">
<view class="body-data Bflex">
<view class="td-1 td borderBox Iflex jcc aic"><text class="box-icon"></text></view>
<view class="td-2 td borderBox Iflex jcc aic"><text></text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>ahdgdy</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>1000</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>清除</text></view>
</view>
<view class="body-data Bflex">
<view class="td-1 td borderBox Iflex jcc aic"><text class="box-icon"></text></view>
<view class="td-2 td borderBox Iflex jcc aic"><text></text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>ahdgdy</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>1000</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>清除</text></view>
<view class="no-data-td ">暂无数据</view>
</view>
<view class="body-data Bflex">
<view class="td-1 td borderBox Iflex jcc aic"><text class="box-icon"></text></view>
<view class="td-2 td borderBox Iflex jcc aic"><text></text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>ahdgdy</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>1000</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>清除</text></view>
</block>
<block wx:else>
<view class="body-data Bflex {{rightChooseId == item.goods_id ?'active':'' }}" wx:for="{{list3}}" wx:key="index" data-info="{{item}}" data-id="{{item.goods_id}}" catchtap="chooseRight">
<!-- <view class="td-1 td borderBox Iflex jcc aic"><text class="box-icon"></text></view> -->
<view class="td-2 td borderBox Iflex jcc aic"><text>{{item.goods_name}}</text></view>
<view class="td-3 td borderBox Iflex jcc aic"><text>{{item.brand_name}}</text></view>
<view class="td-4 td borderBox Iflex jcc aic"><text>{{item.number}}</text></view>
<view class="td-5 td borderBox Iflex jcc aic"><text>{{item.goods_name}}</text></view>
</view>
</block>
</view>
</view>
</view>
</view>
<view class="all_check-items">
<!-- <view class="all_check-items">
<view class="all-check-item Iflex aic">
<text class="box-icon"></text>
<text>全选</text>
......@@ -208,7 +225,7 @@
<text class="box-icon"></text>
<text>全选</text>
</view>
</view>
</view> -->
<view class="btn-group Bflex jcc">
<view class="btn-sigle blue-border-btn btn">生成上架任务</view>
<view class="btn-sigle zx-btn blue-border-btn btn">装箱</view>
......@@ -220,7 +237,7 @@
<!-- 城市选择弹框 -->
<view class="city-view mask" wx:if="{{isShowMask1}}">
<view class="city-wrapper mask-wrapper">
<image class="close-icon" src="../../res/img/close-icon.png"></image>
<image class="close-icon" src="../../res/img/close-icon.png" catchtap="closeMask1"></image>
<view class="city-content borderBox">
<view class="title">请选择产地</view>
<view class="often-address">
......@@ -237,82 +254,11 @@
<text class="fl">中国台湾</text>
</view>
</view>
<view class="address-items">
<view class="address-item Bflex">
<text class="letter">A</text>
<view class="more-address clr">
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
</view>
</view>
<view class="address-item Bflex">
<text class="letter">A</text>
<view class="more-address clr">
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
</view>
</view>
<view class="address-item Bflex">
<text class="letter">A</text>
<view class="more-address clr">
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
</view>
</view>
<view class="address-item Bflex">
<text class="letter">A</text>
<view class="address-items" wx:if="{{countryList.length}}">
<view class="address-item Bflex" wx:for="{{countryList}}" wx:key="index">
<text class="letter">{{item.first_letter}}</text>
<view class="more-address clr">
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl">爱尔兰</view>
<view class="sigle-address fl" wx:for="{{item.country_list}}" wx:key="country" wx:for-item="singleLetter" catchtap="chooseCountry" data-country="{{singleLetter.country}}">{{singleLetter.country}}</view>
</view>
</view>
</view>
......
......@@ -192,13 +192,19 @@ page {
}
.version {
padding: 10px 18px;
padding:0 18px;
height:40px;
font-size: 14px;
border-bottom: 1px solid #D1D1D1;
}
.zl-input{
height:100%;
width:100%;
}
.reslut {
padding: 10px 18px;
height:60px;
overflow-y: auto;
}
.form-bottom-right-bottom {
......@@ -240,6 +246,8 @@ page {
.bottom-table-view {
margin-top: 11px;
padding-bottom: 10px ;
border-bottom: 1px dashed #D1D1D1;
}
.bottom-table-data.left-table {
......@@ -263,23 +271,25 @@ page {
word-break: break-all;
}
.bottom-table-data .td-2,
/* .bottom-table-data .td-2, */
.bottom-table-data .td-3,
.bottom-table-data .td-4,
.bottom-table-data .td-5 {
border-left: 1px solid #D1D1D1;
}
.bottom-table-data .td-1 {
/* .bottom-table-data .td-1 {
width: 49px;
}
} */
.left-table .td-2 {
width: 94px;
/* width: 94px; */
width: 143px;
}
.right-table .td-2 {
width: 112px;
/* width: 112px; */
width:161px
}
.bottom-table-data .td-3 {
......@@ -316,15 +326,40 @@ page {
margin: 0 12px;
}
.left-right-icon image {
.left-right-icon .sigle-check{
height: 28px;
width: 28px;
position: relative;
margin-top:10px;
}
.arrow-right {
margin-top: 10px;
.left-right-icon .sigle-check:first-child{
margin:0;
}
.left-right-icon .sigle-check image {
height: 100%;
width: 100%;
position: absolute;
top:0;
left:0;
right:0;
bottom:0;
}
.sigle-check .normal{
display: block;
}
.sigle-check .active{
display: none;
}
.sigle-check:hover .normal{
display: none;
}
.sigle-check:hover .active{
display: block;
}
.body-data.active{
background-color: #F0F7FF;
}
.all_check {
margin-top: 6px;
}
......

949 Bytes | W: | H:

949 Bytes | W: | H:

res/img/arrow-left.png
res/img/all-check-left.png
res/img/arrow-left.png
res/img/all-check-left.png
  • 2-up
  • Swipe
  • Onion skin

933 Bytes | W: | H:

933 Bytes | W: | H:

res/img/arrow-right.png
res/img/all-check-right.png
res/img/arrow-right.png
res/img/all-check-right.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -6,4 +6,13 @@ export const apis = {
me:user_url+'/pwd/me',//获取用户信息
get_in_store_warehousing_sn:in_store_url+"/in_store/get_in_store_warehousing_sn",//根据入仓单号查找入库单
in_store_detail_list:in_store_url+'/in_store/in_store_detail_list',//获取入库单详情
get_country:in_store_url+'/country/get_country',//获取国家
country_list:in_store_url+'/country/country_list',//获取国家列表
receiving_goods:in_store_url+'/in_store/receiving_goods',//收货
receiving_list:in_store_url+'/in_store/receiving_list',//收货列表
update_receiving_status:in_store_url+'/in_store/update_receiving_status',//修改收货详情状态
delete_receiving:in_store_url+'/in_store/delete_receiving',//删除收货
save_sale_task:in_store_url+'/sale_task/save_sale_task',//生成上架任务与装箱
get_store_list:in_store_url+"/store_account/get_store_list",//获取仓库列表
change_store:in_store_url+'/store_account/change_store',//变更仓库
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment