Commit 4f4553f0 by LJM

js

parent 73dc07ac
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
} }
} }
.search-bar { .search-bar {
position: relative;
width: calc(100% - 164rpx); width: calc(100% - 164rpx);
.icon-juxing1 { .icon-juxing1 {
font-size: 30rpx; font-size: 30rpx;
...@@ -38,6 +39,11 @@ ...@@ -38,6 +39,11 @@
.icon-a-juxing11 { .icon-a-juxing11 {
font-size: 30rpx; font-size: 30rpx;
color: #c6c7cc; color: #c6c7cc;
margin-left: 15rpx;
}
.icon-juxing3 {
font-size: 30rpx;
color: #c6c7cc;
} }
} }
.text { .text {
......
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
.icon-a-juxing11 { .icon-a-juxing11 {
font-size: 30rpx; font-size: 30rpx;
color: #c6c7cc; color: #c6c7cc;
margin-left: 15rpx;
}
.icon-juxing3 {
font-size: 30rpx;
color: #c6c7cc;
} }
} }
.text { .text {
......
...@@ -33,7 +33,10 @@ ...@@ -33,7 +33,10 @@
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_name" @input="handleInput(4, $event)" /> <input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_name" @input="handleInput(4, $event)" />
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_contaion"></text> <view>
<text class="iconfont icon-juxing3" @click="createTallyContainer()"></text>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_contaion"></text>
</view>
</view> </view>
</view> </view>
<view class="list row bothSide" v-if="list.length > 0"> <view class="list row bothSide" v-if="list.length > 0">
...@@ -275,6 +278,23 @@ export default { ...@@ -275,6 +278,23 @@ export default {
this.getData(); this.getData();
}, },
/** /**
*刷新容器
*/
createTallyContainer() {
this.request(API.createTallyContainer, 'GET', {}, false).then(res => {
if (res.code === 0) {
this.searchParams.container_name = res.data.container_sn;
this.searchParams.container_id = res.data.id;
this.formParams.container_id = res.data.id;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 单号搜索 * 单号搜索
* @param {Object} event * @param {Object} event
*/ */
......
...@@ -33,7 +33,10 @@ ...@@ -33,7 +33,10 @@
<text class="iconfont icon-juxing1"></text> <text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" v-model="searchParams.container_name" @input="handleInput(4, $event)" /> <input class="uni-input" placeholder="请输入容器编码" placeholder-style="color:#919399" v-model="searchParams.container_name" @input="handleInput(4, $event)" />
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_contaion"></text> <view>
<text class="iconfont icon-juxing3" @click="createTallyContainer()"></text>
<text class="iconfont icon-a-juxing11" @click="clearInput(2)" v-if="input_contaion"></text>
</view>
</view> </view>
</view> </view>
<view class="section"> <view class="section">
...@@ -228,11 +231,6 @@ export default { ...@@ -228,11 +231,6 @@ export default {
console.log('picker发送选择改变,携带值为', e.detail.value); console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value; this.index = e.detail.value;
}, },
bindPickerContainChange(e) {
this.indexContainer = e.detail.value;
this.formParams.container_id = this.tallyContainer[e.detail.value].id;
this.searchParams.container_id = this.tallyContainer[e.detail.value].id;
},
/** /**
* 监听理货数量 * 监听理货数量
*/ */
...@@ -285,6 +283,22 @@ export default { ...@@ -285,6 +283,22 @@ export default {
this.getData(); this.getData();
}, },
/** /**
*刷新容器
*/
createTallyContainer() {
this.request(API.createTallyContainer, 'GET', {}, false).then(res => {
if (res.code === 0) {
this.searchParams.container_name = res.data.container_sn;
this.searchParams.container_id = res.data.id;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 单号搜索 * 单号搜索
* @param {Object} event * @param {Object} event
*/ */
...@@ -375,10 +389,8 @@ export default { ...@@ -375,10 +389,8 @@ export default {
} }
}); });
this.searchParams.container_id = id[0].id; this.searchParams.container_id = id[0].id;
this.formParams.container_id = id[0].id;
} else { } else {
this.searchParams.container_id = ''; this.searchParams.container_id = '';
this.formParams.container_id = '';
} }
} else { } else {
uni.showToast({ uni.showToast({
......
...@@ -70,7 +70,10 @@ ...@@ -70,7 +70,10 @@
<text class="text">全选</text> <text class="text">全选</text>
</view> </view>
<view class="btn3 row rowCenter verCenter" @click="cancelTallyReceive(1)">取消理货</view> <view class="btn3 row rowCenter verCenter" @click="cancelTallyReceive(1)">取消理货</view>
<view class="btn2 row rowCenter verCenter" style="width: calc(100% - 308rpx);">批量打印入库标签</view> <view class="row verCenter" style="width: calc(100% - 308rpx);">
<view class="btn2 row rowCenter verCenter" style="width: 50%;border-right: 1px solid #fff;" @click="submitTallyReceive()">提交</view>
<view class="btn2 row rowCenter verCenter" style="width: 50%;">批量打印入库标签</view>
</view>
</view> </view>
<!-- 理货详情弹窗 --> <!-- 理货详情弹窗 -->
<uni-drawer ref="showRight" mode="right"> <uni-drawer ref="showRight" mode="right">
...@@ -310,6 +313,36 @@ export default { ...@@ -310,6 +313,36 @@ export default {
}); });
}, },
/** /**
* 提交
*/
submitTallyReceive() {
if (this.filter_id.length == 0) {
uni.showToast({
title: '请选择货品',
icon: 'error'
});
return false;
}
this.request(API.cancelTallyReceive, 'POST', { tally_id: tally_id }, true).then(res => {
if (res.code === 0) {
uni.showToast({
title: '提交成功',
icon: 'success'
});
setTimeout(() => {
this.getData();
this.filter_id = [];
}, 2000);
} else {
uni.showModal({
title: '提示',
content: res.msg,
showCancel: false
});
}
});
},
/**
* 取消理货 * 取消理货
*/ */
cancelTallyReceive(type, ids) { cancelTallyReceive(type, ids) {
......
...@@ -44,10 +44,18 @@ const API = { ...@@ -44,10 +44,18 @@ const API = {
* */ * */
cancelTallyReceive: API_BASE + '/api/stockIn/tallyReceive/cancelTallyReceive', cancelTallyReceive: API_BASE + '/api/stockIn/tallyReceive/cancelTallyReceive',
/** /**
* 提交
* */
submitTallyReceive: API_BASE + '/api/stockIn/tallyReceive/submitTallyReceive',
/**
* 获取容器下拉列表 * 获取容器下拉列表
* */ * */
getTallyContainer: API_BASE + '/api/stockIn/tallyReceive/getTallyContainer', getTallyContainer: API_BASE + '/api/stockIn/tallyReceive/getTallyContainer',
/** /**
* 创建新容器
* */
createTallyContainer: API_BASE + '/api/stockIn/tallyReceive/createTallyContainer',
/**
* 新增理货 * 新增理货
* */ * */
createTallyReceive: API_BASE + '/api/stockIn/tallyReceive/createTallyReceive', createTallyReceive: API_BASE + '/api/stockIn/tallyReceive/createTallyReceive',
......
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