Commit 964be966 by LJM

css

parent 900dbde3
......@@ -10,32 +10,32 @@
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入库位" placeholder-style="color:#919399" v-model="searchParams.position_name" @input="handleInput(1,searchParams.position_name)" />
<input class="uni-input" placeholder="请扫描或输入库位" placeholder-style="color:#919399" v-model="searchParams.position_name" @input="handleInput(1, searchParams.position_name)" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(1)" v-if="input_flag_position_name"></text>
</view>
</view>
<view class="right">
<template v-if="curr == 0">
<view class="title">入库批次号:</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入入库批次号" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput(2,searchParams.stock_in_batch_sn)" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_stock_in_batch_sn"></text>
</view>
</template>
<template v-else-if="curr == 1">
<view class="title">容器:</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入容器" placeholder-style="color:#919399" v-model="searchParams.container_sn" @input="handleInput(3,searchParams.container_sn)" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(3)" v-if="input_flag_container_sn"></text>
</view>
</template>
<template v-if="curr == 0">
<view class="title">入库批次号:</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入入库批次号" placeholder-style="color:#919399" v-model="searchParams.stock_in_batch_sn" @input="handleInput(2, searchParams.stock_in_batch_sn)" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_flag_stock_in_batch_sn"></text>
</view>
</template>
<template v-else-if="curr == 1">
<view class="title">容器:</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请扫描或输入容器" placeholder-style="color:#919399" v-model="searchParams.container_sn" @input="handleInput(3, searchParams.container_sn)" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput(3)" v-if="input_flag_container_sn"></text>
</view>
</template>
</view>
</view>
<!-- 按货品拣货列表 -->
......@@ -48,50 +48,50 @@
</view>
<view class="input-box row verCenter">
<text class="label">入库批次号:</text>
<text class="text"{{item.stock_in_batch_sn}}</text>
<text class="text">{{ item.stock_in_batch_sn }}</text>
</view>
<view class="bor"></view>
<view class="input-box row verCenter">
<text class="label">货品编码:</text>
<text class="text">{{item.goods_sn}}</text>
<text class="text">{{ item.goods_sn }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品名称:</text>
<text class="text">{{item.goods_name}}</text>
<text class="text">{{ item.goods_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">标准品牌:</text>
<text class="text">{{item.goods_name}}</text>
<text class="text">{{ item.goods_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">D / C:</text>
<text class="text">{{item.stock_in_batch_sn}}</text>
<text class="text">{{ item.stock_in_batch_sn }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">产 地:</text>
<text class="text">{{item.coo}}</text>
<text class="text">{{ item.coo }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品品质:</text>
<text class="text">{{item.quality_val}}</text>
<text class="text">{{ item.quality_val }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">入 仓 号:</text>
<text class="text">{{item.inhouse}}</text>
<text class="text">{{ item.inhouse }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">其他批次属性:</text>
<text class="text">{{item.other_batch_attr}}</text>
<text class="text">{{ item.other_batch_attr }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">应拣数量:</text>
<text class="text" style="color: #F98119;">{{item.lock_qty - item.pick_qty}}</text>
<text class="text" style="color: #F98119;">{{ item.lock_qty - item.pick_qty }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">销 售 员:</text>
<text class="text">{{item.sale_name}}</text>
<text class="text">{{ item.sale_name }}</text>
</view>
<view class="btn row rowCenter verCenter" @click="showDrawer(1,item)">拣货</view>
<view class="btn row rowCenter verCenter" @click="showDrawer(1, item)">拣货</view>
</view>
</view>
<!-- 无数据展示 -->
......@@ -101,51 +101,51 @@
</view>
</template>
<!-- 按容器拣货列表 -->
<template v-else-if="curr == 1">
<view class="list-style row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index">
<view class="input-box row verCenter">
<text class="label">库 位:</text>
<text class="tt">{{item.position_name}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">容 器:</text>
<text class="tt">{{item.container_sn}}</text>
</view>
<view class="bor"></view>
<view class="input-box row verCenter">
<text class="label">任 务 数:</text>
<text class="text">{{item.task_num}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">合计应拣数量:</text>
<text class="text">{{item.total_pick_num}}</text>
</view>
<view class="btn row rowCenter verCenter" @click="showDrawer(2,item)">选择</view>
</view>
</view>
<template v-else-if="curr == 1">
<view class="list-style row bothSide" v-if="list.length > 0">
<view class="box" v-for="(item, index) in list" :key="index">
<view class="input-box row verCenter">
<text class="label">库 位:</text>
<text class="tt">{{ item.position_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">容 器:</text>
<text class="tt">{{ item.container_sn }}</text>
</view>
<view class="bor"></view>
<view class="input-box row verCenter">
<text class="label">任 务 数:</text>
<text class="text">{{ item.task_num }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">合计应拣数量:</text>
<text class="text">{{ item.total_pick_num }}</text>
</view>
<view class="btn row rowCenter verCenter" @click="showDrawer(2, item)">选择</view>
</view>
</view>
<!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
</template>
</template>
</view>
<!-- 按货品拣货详情弹窗 -->
<uni-drawer ref="showRight" mode="right">
<view class="uni-drawer-picking" v-if="detail">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer(1)"></text>
<text class="text">{{stock_out_sn}}</text>
<text class="text">{{ stock_out_sn }}</text>
</view>
<view class="field-item row" style="margin-top: 39rpx;">
<view class="item row verCenter">
<text class="label">入库批次号:</text>
<text class="text">{{detail.stock_in_batch_sn}}</text>
<text class="text">{{ detail.stock_in_batch_sn }}</text>
</view>
<view class="item row verCenter">
<text class="label">库 位:</text>
<text class="text">{{detail.position_name}}</text>
<text class="text">{{ detail.position_name }}</text>
</view>
</view>
<view class="bor"></view>
......@@ -153,68 +153,68 @@
<view class="field-item row">
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">货品编码:</text>
<text class="tt" style="max-width: 100%;">{{detail.goods_sn}}</text>
<text class="tt" style="max-width: 100%;">{{ detail.goods_sn }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">货品名称:</text>
<text class="tt" style="max-width: 100%;">{{detail.goods_name}}</text>
<text class="tt" style="max-width: 100%;">{{ detail.goods_name }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">标准品牌:</text>
<text class="tt" style="max-width: 100%;">{{detail.brand_name}}</text>
<text class="tt" style="max-width: 100%;">{{ detail.brand_name }}</text>
</view>
<view class="item row verCenter">
<text class="label">D / C:</text>
<text class="tt">{{detail.date_code}}</text>
<text class="tt">{{ detail.date_code }}</text>
</view>
<view class="item row verCenter">
<text class="label">产 地:</text>
<text class="tt">{{detail.coo}}</text>
<text class="tt">{{ detail.coo }}</text>
</view>
<view class="item row verCenter">
<text class="label">货品品质:</text>
<text class="tt">{{detail.quality_val}}</text>
<text class="tt">{{ detail.quality_val }}</text>
</view>
<view class="item row verCenter">
<text class="label">入 仓 号:</text>
<text class="tt">{{detail.inhouse}}</text>
<text class="tt">{{ detail.inhouse }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;margin-bottom: 17rpx;">
<text class="label">其他批次属性:</text>
<text class="tt">{{detail.other_batch_attr}}</text>
<text class="tt">{{ detail.other_batch_attr }}</text>
</view>
</view>
<view class="bor"></view>
<view class="field-item row">
<view class="item row verCenter">
<text class="label">应拣数量:</text>
<text class="text">{{detail.lock_qty - detail.pick_qty}}</text>
<text class="text">{{ picked_num }}</text>
</view>
<view class="item row verCenter">
<text class="label">单 位:</text>
<text class="tt">{{detail.goods_unit}}</text>
<text class="tt">{{ detail.goods_unit }}</text>
</view>
</view>
<view class="form-input">
<view class="input-title"><text class="input-title-t1">拣货数量:</text></view>
<view class="input-box"><input type="number" class="uni-input" placeholder-style="color:#919399" placeholder="请输入" v-model="formParams.pick_qty"/></view>
<view class="input-box"><input type="number" class="uni-input" placeholder-style="color:#919399" placeholder="请输入" v-model="formParams.pick_qty" @input="handleInputNumber($event, detail.lock_qty - detail.pick_qty)" /></view>
</view>
<view class="bor"></view>
<view class="field-item row">
<view class="item row verCenter">
<text class="label">销 售 员:</text>
<text class="tt">{{detail.sale_name}}</text>
<text class="tt">{{ detail.sale_name }}</text>
</view>
<view class="item row verCenter">
<text class="label">采 购 员:</text>
<text class="tt">{{detail.pur_user_name}}</text>
<text class="tt">{{ detail.pur_user_name }}</text>
</view>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">收货客户:</text>
<text class="tt" style="max-width: 100%;">{{detail.customer_name}}</text>
<text class="tt" style="max-width: 100%;">{{ detail.customer_name }}</text>
</view>
</view>
<view class="btn row verCenter bothSide"><view class="btn1 row rowCenter verCenter" @click="pick(detail.lock_id,formParams.pick_qty,detail.stock_out_item_id)">拣 货</view></view>
<view class="btn row verCenter bothSide"><view class="btn1 row rowCenter verCenter" @click="pick(detail.lock_id, formParams.pick_qty, detail.stock_out_item_id)">拣 货</view></view>
</view>
</uni-drawer>
<!-- 按容器拣货详情弹窗 -->
......@@ -222,24 +222,24 @@
<view class="uni-drawer-picking">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer(2)"></text>
<text class="text">{{stock_out_sn}}</text>
<text class="text">{{ stock_out_sn }}</text>
</view>
<view class="field-item row" style="margin-top: 39rpx;">
<view class="item row verCenter">
<text class="label">库 位:</text>
<text class="text">{{detailContainer.position_name}}</text>
<text class="text">{{ detailContainer.position_name }}</text>
</view>
<view class="item row verCenter">
<text class="label">容器:</text>
<text class="text">{{detailContainer.container_sn}}</text>
<text class="text">{{ detailContainer.container_sn }}</text>
</view>
<view class="item row verCenter">
<text class="label">任 务 数:</text>
<text class="tt">{{detailContainer.task_num}}</text>
<text class="tt">{{ detailContainer.task_num }}</text>
</view>
<view class="item row verCenter">
<text class="label">合计应拣数量:</text>
<text class="tt">{{detailContainer.total_pick_num}}</text>
<text class="tt">{{ detailContainer.total_pick_num }}</text>
</view>
</view>
<view class="bor"></view>
......@@ -249,56 +249,56 @@
<view class="box row" v-for="(item, index) in detailContainer.list" :key="index">
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">入库批次号:</text>
<text class="tt">{{item.stock_in_batch_sn}}</text>
<text class="tt">{{ item.stock_in_batch_sn }}</text>
</view>
<view class="bor" style="flex: 0 0 100%;"></view>
<view class="input-box row verCenter">
<text class="label">货品编码:</text>
<text class="text">{{item.goods_sn}}</text>
<text class="text">{{ item.goods_sn }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品名称:</text>
<text class="text">{{item.goods_name}}</text>
<text class="text">{{ item.goods_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">标准品牌:</text>
<text class="text">{{item.brand_name}}</text>
<text class="text">{{ item.brand_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">D / C:</text>
<text class="text">{{item.date_code}}</text>
<text class="text">{{ item.date_code }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">产 地:</text>
<text class="text">{{item.coo}}</text>
<text class="text">{{ item.coo }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品品质:</text>
<text class="text">{{item.quality_val}}</text>
<text class="text">{{ item.quality_val }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">入 仓 号:</text>
<text class="text">{{item.inhouse}}</text>
<text class="text">{{ item.inhouse }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">其他批次属性:</text>
<text class="text">{{item.other_batch_attr}}</text>
<text class="text">{{ item.other_batch_attr }}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">拣货数量:</text>
<text class="text" style="color: #F98119;">{{item.pick_qty}}</text>
<text class="text" style="color: #F98119;">{{ item.pick_qty }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">销 售 员:</text>
<text class="text">{{item.sale_name}}</text>
<text class="text">{{ item.sale_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">采 购 员:</text>
<text class="text">{{item.pur_user_name}}</text>
<text class="text">{{ item.pur_user_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">收货客户:</text>
<text class="text">{{item.customer_name}}</text>
<text class="text">{{ item.customer_name }}</text>
</view>
</view>
</scroll-view>
......@@ -315,38 +315,39 @@ import debounce from 'lodash/debounce';
export default {
data() {
return {
stock_out_sn:'',//标题显示出库单号
lock_ids:[], //出库id集合
input_flag_position_name:false,
input_flag_stock_in_batch_sn:false,
input_flag_container_sn:false,
stock_out_sn: '', //标题显示出库单号
lock_ids: [], //出库id集合
input_flag_position_name: false,
input_flag_stock_in_batch_sn: false,
input_flag_container_sn: false,
page: 1,
limit: 1000,
curr: 0,
itemArr: ['按货品拣货', '按容器拣货'],
list: [],
detail:{},//按货品拣货详情
detailContainer:{},//按容器拣货详情
detail: {}, //按货品拣货详情
detailContainer: {}, //按容器拣货详情
picked_num: '', //应拣数量
searchParams: {
stock_out_id: '',
position_name: '',
stock_in_batch_sn: '',
container_sn:''
container_sn: ''
},
formParams:{
pick_qty:''
formParams: {
pick_qty: ''
}
};
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.navigateTo({
url: '/pages/picking/record?stock_out_sn='+this.stock_out_sn
url: '/pages/picking/record?stock_out_sn=' + this.stock_out_sn
});
}
},
onLoad(options) {
this.stock_out_sn=options.stock_out_sn || '';
this.stock_out_sn = options.stock_out_sn || '';
this.searchParams.stock_out_id = options.stock_out_id || '';
},
onShow() {
......@@ -357,15 +358,16 @@ export default {
this.curr = index;
this.getData();
},
showDrawer(type,data) {
showDrawer(type, data) {
if (type == 1) {
this.$refs.showRight.open();
this.detail=data;
this.formParams.pick_qty=Number(data.lock_qty) - Number(data.pick_qty)
this.detail = data;
this.picked_num = Number(data.lock_qty) - Number(data.pick_qty);
this.formParams.pick_qty = Number(data.lock_qty) - Number(data.pick_qty);
} else if (type == 2) {
this.$refs.showRightPack.open();
this.detailContainer=data;
this.lock_ids=data.list.map(function(item){
this.detailContainer = data;
this.lock_ids = data.list.map(function(item) {
return item.lock_id;
});
}
......@@ -378,18 +380,28 @@ export default {
}
},
/**
* 监听拣货数量
*/
handleInputNumber: debounce(function(event, num) {
var num = Number(num);
var val = event.target.value * 1;
if (val > num) {
this.formParams.pick_qty = num;
}
}, 500),
/**
* 获取列表数据
*/
getData() {
var URL='';
if(this.curr == 0){
URL=API.getLockedList;
}else if(this.curr == 1){
URL=API.getLockedContainerList;
var URL = '';
if (this.curr == 0) {
URL = API.getLockedList;
} else if (this.curr == 1) {
URL = API.getLockedContainerList;
}
uni.setNavigationBarTitle({
title: this.stock_out_sn+'拣货'
})
title: this.stock_out_sn + '拣货'
});
this.request(URL, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.list = res.data.list;
......@@ -414,24 +426,29 @@ export default {
} else if (type == 3) {
this.searchParams.container_sn = '';
this.input_flag_container_sn = false;
}
}
this.getData();
},
/**
* 按货品拣货提交
*/
pick(lock_id,pick_qty,stock_out_item_id){
this.request(API.pick, 'POST', { lock_id:lock_id,pick_qty:pick_qty,stock_out_item_id:stock_out_item_id}, true).then(res => {
pick(lock_id, pick_qty, stock_out_item_id) {
var num = Number(this.detail.lock_qty) - Number(this.detail.pick_qty);
var pick_qty_num = pick_qty * 1;
this.request(API.pick, 'POST', { lock_id: lock_id, pick_qty: pick_qty, stock_out_item_id: stock_out_item_id }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '拣货成功',
icon: 'success'
});
s;
setTimeout(() => {
this.getData();
this.closeDrawer(1);
}, 2000);
uni.showToast({
title: '拣货成功',
icon: 'success'
});
setTimeout(() => {
this.getData();
if (pick_qty_num == num) {
this.closeDrawer(1);
} else {
this.picked_num = Number(this.picked_num) - pick_qty_num;
}
}, 2000);
} else {
uni.showModal({
itle: '提示',
......@@ -444,17 +461,17 @@ export default {
/**
* 按容器拣货提交
*/
makeMultiPickingFinish(){
this.request(API.makeMultiPickingFinish, 'POST', { stock_out_id:this.searchParams.stock_out_id,lock_ids:this.lock_ids.join(',')}, true).then(res => {
makeMultiPickingFinish() {
this.request(API.makeMultiPickingFinish, 'POST', { stock_out_id: this.searchParams.stock_out_id, lock_ids: this.lock_ids.join(',') }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '拣货成功',
icon: 'success'
});
setTimeout(() => {
this.getData();
this.closeDrawer(2);
}, 2000);
uni.showToast({
title: '拣货成功',
icon: 'success'
});
setTimeout(() => {
this.getData();
this.closeDrawer(2);
}, 2000);
} else {
uni.showModal({
itle: '提示',
......@@ -476,7 +493,7 @@ export default {
this.input_flag_stock_in_batch_sn = true;
} else if (type == 3) {
this.input_flag_container_sn = true;
}
}
} else {
if (type == 1) {
this.input_flag_position_name = false;
......@@ -484,7 +501,7 @@ export default {
this.input_flag_stock_in_batch_sn = false;
} else if (type == 3) {
this.input_flag_container_sn = false;
}
}
}
this.getData();
}, 500)
......
......@@ -287,6 +287,7 @@ export default {
this.searchParams.container_name = res.data.container_sn;
this.searchParams.container_id = res.data.id;
this.formParams.container_id = res.data.id;
this.is_submit = true;
} else {
uni.showToast({
title: res.msg,
......
......@@ -122,7 +122,7 @@
<view class="pick-box">
<picker @change="bindPickerChange($event, 1)" :value="useOptionIndex" :range="useOption" :range-key="'country_cn'">
<view class="row verCenter">
<view class="uni-input">{{ useOptionIndex == -1 ? '请选择' : useOption[index].country_cn }}</view>
<view class="uni-input">{{ useOptionIndex == -1 ? '请选择' : useOption[useOptionIndex].country_cn }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
......@@ -238,6 +238,7 @@ export default {
console.log('picker发送选择改变,携带值为', e.detail.value);
if (type == 1) {
this.useOptionIndex = e.detail.value;
this.formParams.coo = this.useOption[e.detail.value].coo_en;
} else {
this.index = e.detail.value;
}
......@@ -299,6 +300,7 @@ export default {
createTallyContainer() {
this.request(API.createTallyContainer, 'GET', {}, false).then(res => {
if (res.code === 0) {
this.is_submit = true;
this.searchParams.container_name = res.data.container_sn;
this.searchParams.container_id = res.data.id;
} else {
......
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