Commit 06700c58 by LJM

自营仓标签、入库操作优化

parent 4bfcf2f8
......@@ -241,6 +241,9 @@
margin-bottom: 17rpx;
margin-top: 35rpx;
transition: all 0.2s ease;
&.pt{
margin-bottom: 35rpx;
}
text:first-child {
margin-right: 32rpx;
}
......
......@@ -11,6 +11,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-xialajiantou:before {
content: "\e638";
}
.icon-yichang:before {
content: "\e61b";
}
.icon-sanjiaoxing:before {
content: "\e6bd";
}
......
.putaway {
padding: 15rpx 22rpx;
.custom-switch {
width: 74rpx;
transform: scale(0.5);
}
.android-switch {
transform: scale(0.7);
}
.search-box {
height: 60rpx;
background: #ffffff;
......
......@@ -117,6 +117,15 @@
margin-left: 5rpx;
}
}
.pick-filter{
.uni-input {
font-size: 18rpx;
color: #292b33;
}
.iconfont {
font-size: 31rpx;
}
}
.list {
margin-top: 15rpx;
padding-bottom: 150rpx;
......
......@@ -46,7 +46,7 @@
<input class="uni-input" placeholder="请输入FedEx" placeholder-style="color:#919399" focus v-model="searchParams.tracking_no" @input="handleInput(3, $event)" style="width: 400rpx;" />
</template>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>s
</view>
<!-- 列表数据 -->
<view class="list row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index" :class="{ curr: filter_list[index] }">
......@@ -141,10 +141,13 @@
<text class="tt" style="max-width: 500rpx;">{{ detail.supplier_name }}</text>
</view>
</view>
<view class="pp" v-if="detail.stock_in_items">
<!-- 货品信息 && 其他信息 -->
<view class="pp" :class="{pt:detail.stock_in_items[0].sku_id > 0}" v-if="detail.stock_in_items">
<!-- 自营商品才展示 -->
<template v-if="detail.stock_in_items[0].sku_id > 0">
<text v-for="(v, index) in item" :key="index" :class="{ curr: curr == index }" @click="tab(index, detail.stock_in_sn)">{{ v }}</text>
</template>
<!-- 默认展示 -->
<template v-else>
<text>货品信息</text>
</template>
......@@ -283,7 +286,7 @@
</view>
</view>
</uni-drawer>
<!--到货登记(自营) -->
<!--到货登记(深圳自营)第一次入库 -->
<uni-drawer ref="showRightZyGoodsDat" mode="right">
<view class="uni-drawer-layer" v-if="zyGoodsData">
<view class="title row rowCenter verCenter">
......@@ -502,12 +505,12 @@
},
packingSet: [{ name: '编带', value: 5 }, { name: '袋', value: 6 }, { name: '盒', value: 7 }, { name: '管', value: 8 }, { name: '托盘', value: 9 }, { name: '卷', value: 10 }, { name: '其他', value: 11 }],
pickingModeSet: [{ name: '裁剪', value: 1 }, { name: '称重', value: 2 }, { name: '计数', value: 3 }],
standardSize: ['标准包装长宽高', '单位包装长宽高'],
standardSizeIndex: 0,
standardSize: ['标准包装长宽高', '单位长宽高'],
standardSizeIndex: 1,
netWeight: ['标准包装净重', '单位净重'],
netWeightIndex: 0,
netWeightIndex: 1,
grossWeight: ['标准包装毛重', '单位毛重'],
grossWeightIndex: 0,
grossWeightIndex: 1,
netWeightSize: ['kg', 'g'], //净重尺寸 1kg 2g
netWeightSizeIndex: 0,
grossWeightSize: ['kg', 'g'], //毛重尺寸 1kg 2g
......@@ -869,9 +872,32 @@
});
},
/**
* 修改自营数据
* 修改自营数据提交
*/
saveZyGoodsDataSubmit() {
const hasError = this.saveZyGoodsParams.filter(item => item.packing === 5).some(({ standard_length, unit_length }, index) => {
if (this.standardSizeIndex == 0 && !standard_length) {
uni.showModal({
title: '提示',
content: `第${index + 1}页,包装方式为编带的时候,标准包装长为必填`,
showCancel: false
});
return true;
} else if (this.standardSizeIndex == 1 && !unit_length) {
uni.showModal({
title: '提示',
content: `第${index + 1}页,包装方式为编带的时候,单位长为必填`,
showCancel: false
});
return true;
}
return false;
});
if (hasError) {
// 如果有错误,中止执行并返回false
return false;
}
this.request(API.saveZyGoodsData, 'POST', { list: JSON.stringify(this.saveZyGoodsParams) }, true).then(res => {
if (res.code === 0) {
this.request(API.addStockInRegister, 'POST', { stock_in_id: JSON.stringify(this.filter_id) }, true).then(res => {
......@@ -882,14 +908,14 @@
});
setTimeout(() => {
this.resetChange();
this.getData();
this.closeDrawer();
this.filter_id = [];
this.filter_id_warehouse_id = [];
this.getData();
this.closeDrawer();
}, 2000);
} else {
uni.showModal({
itle: '提示',
title: '提示',
content: res.msg,
showCancel: false
});
......@@ -945,8 +971,8 @@
});
},
/**
* 到货登记
* @param {Object} type 1无单号登记 2详情登记
* 到货登记提交
* @param {Object} type 1无单号登记提交 2详情弹窗的到货登记
* @param {Object} id
*/
addStockInRegister(type, id) {
......@@ -976,13 +1002,15 @@
//深圳自营仓
if (this.filter_id_warehouse_id[0] == 9) {
//先判断一下自营货品信息
//先判断一下自营货品信息判断是否是第一次入库
this.request(API.getZyGoodsData, 'GET', { stock_in_sn: this.filter_id_stock_in_sn.join(','), is_first_check: 1 }, true).then(res => {
if (res.code === 0) {
if (res.data.length > 0) {
//标记第一次入库
this.getOtherAttrList();
this.showDrawer(decodeURIComponent(this.filter_id_stock_in_sn.join(',')), 1);
} else {
//如果是第二次入库就直接登记成功
this.request(API.addStockInRegister, 'POST', { stock_in_id: JSON.stringify(stock_in_id) }, true).then(res => {
if (res.code === 0) {
uni.showToast({
......@@ -1014,6 +1042,7 @@
}
});
} else {
//非深圳自营直接登记
this.request(API.addStockInRegister, 'POST', { stock_in_id: JSON.stringify(stock_in_id) }, true).then(res => {
if (res.code === 0) {
uni.showToast({
......@@ -1039,21 +1068,30 @@
},
/**
* @param {Object} stock_in_sn
* @param {Object} type 1 第一次入库
* 打开弹窗
*/
showDrawer(stock_in_sn, type) {
this.curr = 0;
//区分深圳自营和非深圳自营
if (type) {
//深圳自营和第一次入库
this.getZyGoodsData(stock_in_sn);
this.$refs.showRightZyGoodsDat.open();
} else {
//非深圳自营
this.getDetail(stock_in_sn);
this.$refs.showRight.open();
}
},
/**
* 无单号登记打开弹窗
*/
showDrawers() {
this.$refs.showRightAdd.open();
},
/**
* 关闭弹窗
*/
closeDrawer() {
this.$refs.showRight.close();
this.$refs.showRightAdd.close();
......
......@@ -29,7 +29,7 @@
</view>
</view>
<view class="row verCenter">
<switch @change="switchChange" :checked="is_batch" color="#1969f9" style="transform:scale(0.8);width: 77rpx;" />
<switch @change="switchChange" :checked="is_batch" color="#1969f9" :class="isApp ? 'android-switch' : 'custom-switch'" />
<text style="font-size: 18rpx;white-space: nowrap;">批量扫描</text>
</view>
</view>
......@@ -127,7 +127,9 @@
<view class="pack">
<view class="h2">库位:</view>
<view class="row verCenter bothSide">
<view class="search row bothSide verCenter" :class="{ 'error-style': !is_submit }" style="width: 100%;"><input type="text" placeholder-style="color:#919399" style="width: 100%;text-indent: 1em;" class="uni-input" placeholder="请输入库位编码" @input="inputPositionCodeChange()" v-model="formParams.position_code" /></view>
<view class="search row bothSide verCenter" :class="{ 'error-style': !is_submit }" style="width: 100%;">
<input type="text" placeholder-style="color:#919399" style="width: 100%;text-indent: 1em;" class="uni-input" focus placeholder="请输入库位编码" @input="inputPositionCodeChange()" v-model="formParams.position_code" />
</view>
</view>
</view>
<view class="btn row verCenter bothSide">
......@@ -147,6 +149,7 @@
export default {
data() {
return {
isApp: uni.getSystemInfoSync().platform === 'android' || uni.getSystemInfoSync().platform === 'ios',
isFocus: true,
is_batch: false, //是否开启批量
history_id: [],
......@@ -248,7 +251,7 @@
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
}, 1000);
}, 800);
this.getData();
},
/**
......@@ -516,7 +519,14 @@
if (!this.formParams.position_code) {
uni.showToast({
title: '请输入库位编码',
icon: 'error'
icon: 'none'
});
return false;
}
if (!this.is_submit) {
uni.showToast({
title: '请输入正确的库位编码',
icon: 'none'
});
return false;
}
......@@ -528,10 +538,19 @@
});
setTimeout(() => {
this.filter_id = [];
this.formParams.position_code = ''; //清空每次输入的库位
this.formParams.position_code = ''; //清空一键上架输入的库位
this.is_submit = true;
this.search_keyword = '';
this.searchParams.search_keyword = '';
this.history_id = [];
this.closeDrawer();
this.getData();
//再次获取焦点
this.isFocus = false;
setTimeout(() => {
this.isFocus = true;
}, 500);
}, 2000);
} else {
uni.showModal({
......
......@@ -72,9 +72,10 @@
<text>货品信息</text>
</template>
</view>
<!-- 区分深圳自营和非深圳自营 -->
<!-- 非深圳自营 -->
<template v-if="curr == 0">
<view class="field-item row">
<!-- 展示自营货品ID -->
<template v-if="detail.sku_id > 0">
<view class="item row verCenter">
<text class="label">货品编码:</text>
......@@ -115,10 +116,14 @@
<text class="label">待理货数量:</text>
<text class="tt" style="color: #f98119;font-weight: bold;">{{ detail.wait_tally_qty }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<view class="item row verCenter">
<text class="label">是否质检:</text>
<text class="text" style="font-weight: bold;">{{ detail.is_qc_cn }}</text>
</view>
<view class="item row verCenter" v-if="detail.sku_id > 0">
<text class="label">包装:</text>
<text class="tt">{{detail.packing_cn}} - {{detail.mpq}}</text>
</view>
<view class="item row verCenter">
<text class="label">销售员:</text>
<text class="tt">{{ detail.sale_user }}</text>
......@@ -215,6 +220,7 @@
<view class="h2">理货备注:</view>
<view class="textarea-box"><textarea placeholder-style="color:#919399" placeholder="请输入理货备注" v-model="formParams.tally_remark" /></view>
</template>
<!-- 深圳自营 -->
<template v-else>
<view class="field-item row">
<view class="item row verCenter" style="flex: 0 0 100%;" v-if="detail.sku_id">
......@@ -238,6 +244,18 @@
<text class="tt">{{ detail.mpq }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label" style="width: 128rpx;">单位长宽高:</text>
<text class="tt" style="max-width: 100%;">{{ detail.unit_length }}&nbsp;*{{ detail.unit_width }}&nbsp;*{{ detail.unit_high }}</text>
</view>
<view class="item row verCenter">
<text class="label" style="width: 113rpx;">单位净重:</text>
<text class="tt">{{ detail.unit_net_weight }}</text>
</view>
<view class="item row verCenter">
<text class="label" style="width: 113rpx;">单位毛重:</text>
<text class="tt">{{ detail.unit_gross_weight }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label" style="width: 128rpx;">标准包装长宽高:</text>
<text class="tt" style="max-width: 100%;">{{ detail.standard_length }}&nbsp;*{{ detail.standard_width }}&nbsp;*{{ detail.standard_high }}</text>
</view>
......
......@@ -20,7 +20,7 @@
<!-- 全量搜索 -->
<view class="search-box row bothSide verCenter" style="margin-top: 15rpx;">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
<picker @change="bindPickerChange($event)" :value="index" :range="array">
<view class="row verCenter">
<view class="uni-input">{{ array[index] }}</view>
<view class="uni-arrow"></view>
......@@ -58,21 +58,31 @@
</radio-group>
</view>
<!-- 理货状态筛选 -->
<view class="radio-wrap row verCenter">
<radio-group name="radio" @change="radioChange($event, 2)">
<label>
<radio value="" style="transform:scale(0.7)" color="#1969f9" />
<text>全部</text>
</label>
<label>
<radio value="0" style="transform:scale(0.7)" color="#1969f9" checked />
<text>已理货</text>
</label>
<label>
<radio value="1" style="transform:scale(0.7)" color="#1969f9" />
<text>已提交</text>
</label>
</radio-group>
<view class="row bothSide verCenter">
<view class="radio-wrap row verCenter">
<radio-group name="radio" @change="radioChange($event, 2)">
<label>
<radio value="" style="transform:scale(0.7)" color="#1969f9" />
<text>全部</text>
</label>
<label>
<radio value="0" style="transform:scale(0.7)" color="#1969f9" checked />
<text>已理货</text>
</label>
<label>
<radio value="1" style="transform:scale(0.7)" color="#1969f9" />
<text>已提交</text>
</label>
</radio-group>
</view>
<view class="pick-filter">
<picker @change="bindPickerChange($event,1)" :value="watch_all_index" :range="watch_all_arr">
<view class="row verCenter">
<view class="uni-input row verCenter">{{ watch_all_arr[watch_all_index] }}</view>
<view class="iconfont icon-xialajiantou"></view>
</view>
</picker>
</view>
</view>
<!-- 列表 -->
<view class="list row bothSide" v-if="list.length > 0">
......@@ -270,10 +280,14 @@
<text class="label">单 位:</text>
<text class="tt">{{ detail.goods_unit }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<view class="item row verCenter">
<text class="label">理货数量:</text>
<text class="tt">{{ detail.tally_qty }}</text>
</view>
<view class="item row verCenter" v-if="detail.sku_id > 0">
<text class="label">包装:</text>
<text class="tt">{{detail.packing_cn}} - {{detail.mpq}}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">理货备注:</text>
<text class="tt">{{ detail.tally_remark }}</text>
......@@ -324,6 +338,18 @@
<text class="tt">{{ detail.mpq }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label" style="width: 128rpx;">单位长宽高:</text>
<text class="tt" style="max-width: 100%;">{{ detail.unit_length }}&nbsp;*{{ detail.unit_width }}&nbsp;*{{ detail.unit_high }}</text>
</view>
<view class="item row verCenter">
<text class="label" style="width: 113rpx;">单位净重:</text>
<text class="tt">{{ detail.unit_net_weight }}</text>
</view>
<view class="item row verCenter">
<text class="label" style="width: 113rpx;">单位毛重:</text>
<text class="tt">{{ detail.unit_gross_weight }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label" style="width: 128rpx;">标准包装长宽高:</text>
<text class="tt" style="max-width: 100%;">{{ detail.standard_length }}&nbsp;*{{ detail.standard_width }}&nbsp;*{{ detail.standard_high }}</text>
</view>
......@@ -397,6 +423,8 @@
image_list: [], //图片列表
maxNum: 10, //最大上传图片数量
purchase_type_filter: [false, false, false], //采购类型筛选状态标记
watch_all_index: 0,
watch_all_arr: ['我的理货', '全部理货'],
searchParams: {
create_time_begin: '', //起始日期
create_time_end: '', //结束日期
......@@ -404,7 +432,8 @@
stock_in_with_stock_in_items_inhouse: '', //入仓单号
container_id: '', //容器,
tally_status: 0, //默认显示已理货
stock_tally_with_stock_in_stock_in_type_in: '' //入库类型
stock_tally_with_stock_in_stock_in_type_in: '', //入库类型
watch_all: 0, //1查看所有,0查看自己
},
changeStockTallyImagesParams: {
tally_id: '',
......@@ -504,9 +533,22 @@
}
this.getData();
},
bindPickerChange: function(e) {
/**
* @param {Object} e 默认全量搜索
* @param {Object} type 1 我的理货,全部理货选择
*/
bindPickerChange: function(e, type) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
if (type) {
//我的理货,全部理货筛选
this.resetChange(); //先清空
this.watch_all_index = e.detail.value;
this.searchParams.watch_all = e.detail.value;
this.getData();
} else {
//全量搜索
this.index = e.detail.value;
}
},
/**
* 容器编辑弹窗
......@@ -659,7 +701,7 @@
} else {
uni.showToast({
title: res.msg,
icon: 'error'
icon: 'none'
});
}
});
......
No preview for this file type
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