|
@@ -1,5 +1,11 @@
|
|
|
<template>
|
|
|
- <view class="modal-box">
|
|
|
+ <view class="content">
|
|
|
+ <u-navbar back-text="新增调回单" :border-bottom="false">
|
|
|
+ <view slot='right' style="padding: 0 30upx;" v-if="recallBillList.length" @click="toChooseProduct">
|
|
|
+ <u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
|
|
|
+ <text style="margin-left: 6rpx;">选择产品</text>
|
|
|
+ </view>
|
|
|
+ </u-navbar>
|
|
|
<view class="headerName u-flex">
|
|
|
<text class="barBox"></text>
|
|
|
<view class="shelfName u-line-1">{{ shelfName }}</view>
|
|
@@ -58,13 +64,17 @@
|
|
|
</view>
|
|
|
<view class="pcurnums flex align_center">
|
|
|
<text>调回数量</text>
|
|
|
- <view class="u-ninput"><u-number-box color="#000" bg-color="#fff" :input-height="60" v-model="item.confirmQty" :min="1" :max="item.qty" @minus="minus" @plus="plus" @change="numberBoxChange"></u-number-box></view>
|
|
|
+ <view class="u-ninput"><u-number-box color="#000" bg-color="#fff" :input-height="60" v-model="item.confirmQty" :min="1" :max="item.qty"></u-number-box></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
- <view style="padding-top:100rpx;" @click="toChooseProduct" v-else>
|
|
|
- <u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="200" :text="noDataText" img-width="120" ></u-empty>
|
|
|
+ <view @click="toChooseProduct" class="nodata" v-else>
|
|
|
+ <image :src="`/static/${$config('themePath')}/def_no_data@3x.png`"></image>
|
|
|
+ <view class="nodataTip">
|
|
|
+ 暂无产品,请点击
|
|
|
+ <text @click="toChooseProduct">选择产品</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="backOrderFooter u-flex" :style="{zIndex:(detailFlag? 99999:11)}">
|
|
@@ -76,7 +86,7 @@
|
|
|
款/<text>{{totalQty}}</text>件
|
|
|
</view>
|
|
|
<view class="middle_r" @click="clearList">
|
|
|
- <text>清空列表</text>
|
|
|
+ 清空列表
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="footerBox_r"><u-button type="primary" shape="circle" @click="addBackOrder">新增调回单</u-button></view>
|
|
@@ -89,6 +99,7 @@
|
|
|
import { reportPage } from '@/api/vinLog';
|
|
|
import { controlQueryList,insert } from '@/api/shelf';
|
|
|
import productList from './productList.vue'
|
|
|
+import { clzConfirm } from '@/libs/tools'
|
|
|
export default {
|
|
|
components: {
|
|
|
productList
|
|
@@ -161,47 +172,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 获取列表
|
|
|
- loadData(params) {
|
|
|
- // const _this = this;
|
|
|
- // uni.showLoading({
|
|
|
- // mask:true,
|
|
|
- // title:"正在加载..."
|
|
|
- // })
|
|
|
- // controlQueryList(params).then(res => {
|
|
|
- // if (res.status == 200) {
|
|
|
- // res.data.forEach(item=>{
|
|
|
- // item.isChecked= false
|
|
|
- // item.confirmQty = item.qty
|
|
|
- // })
|
|
|
- // this.recallBillList=res.data;
|
|
|
- // }
|
|
|
- // setTimeout(()=>{
|
|
|
- // uni.hideLoading()
|
|
|
- // },this.recallBillList.length*40)
|
|
|
- // });
|
|
|
- },
|
|
|
toChooseProduct(){
|
|
|
let nowData={
|
|
|
shelfSn:this.shelfSn,
|
|
|
shelfName:this.shelfName,
|
|
|
chooseKey :this.chooseKey
|
|
|
}
|
|
|
-
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/shuntBackManage/chooseProduct??data="+encodeURIComponent(JSON.stringify(nowData))
|
|
|
})
|
|
|
},
|
|
|
- checkGroupChange(e){
|
|
|
- let flag = this.recallBillList.every(con => con.isChecked )
|
|
|
- if(flag){
|
|
|
- this.allChecked = true
|
|
|
- }else{
|
|
|
- this.allChecked = false
|
|
|
- }
|
|
|
- this.calculateTypeTotal()
|
|
|
- this.calculateTotal()
|
|
|
- },
|
|
|
//清空列表
|
|
|
clearList(){
|
|
|
const _this = this
|
|
@@ -227,149 +207,6 @@ export default {
|
|
|
this.clearChoose()
|
|
|
}
|
|
|
},
|
|
|
- // 全选
|
|
|
- allCheckedChange(e){
|
|
|
- if(e.value){
|
|
|
- this.recallBillList.map(item=>{
|
|
|
- item.isChecked = true;
|
|
|
- })
|
|
|
-
|
|
|
- }else{
|
|
|
- this.recallBillList.map(item=>{
|
|
|
- item.isChecked = false;
|
|
|
- })
|
|
|
- }
|
|
|
- this.calculateTotal()
|
|
|
- this.calculateTypeTotal()
|
|
|
- },
|
|
|
- // 计算选中总款数
|
|
|
- calculateTypeTotal(){
|
|
|
- this.chooseArr = this.recallBillList.filter(item=>{
|
|
|
- return item.isChecked
|
|
|
- })
|
|
|
- },
|
|
|
- // 计算选中总件数
|
|
|
- calculateTotal(){
|
|
|
- this.totalNum = this.recallBillList.filter(item=>{
|
|
|
- return item.isChecked
|
|
|
- }).reduce((pre,cur)=>{
|
|
|
- return pre + cur.confirmQty
|
|
|
- },0)
|
|
|
- },
|
|
|
- //查看选中详情
|
|
|
- seeDetail(){
|
|
|
- if(this.chooseArr.length == 0){
|
|
|
- uni.showToast({
|
|
|
- title:'请先选择调回产品',
|
|
|
- icon:'none'
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.detailFlag = true;
|
|
|
- }
|
|
|
- },
|
|
|
- // 详情删除其中一条选中数据
|
|
|
- clearOneList(id){
|
|
|
- let i = this.recallBillList.findIndex(val =>{
|
|
|
- return val.id == id;
|
|
|
- })
|
|
|
- this.recallBillList[i].isChecked = false
|
|
|
- this.calculateTotal();
|
|
|
- },
|
|
|
- clearAll(){
|
|
|
- this.recallBillList.map(item=>{
|
|
|
- item.isChecked = false;
|
|
|
- })
|
|
|
- this.allChecked =false;
|
|
|
- this.chooseArr = []
|
|
|
- this.calculateTotal();
|
|
|
- },
|
|
|
- //进步器change事件
|
|
|
- numberBoxChange(){
|
|
|
- this.calculateTotal();
|
|
|
- },
|
|
|
- minus(){
|
|
|
- this.calculateTotal();
|
|
|
- },
|
|
|
- plus(){
|
|
|
- this.calculateTotal();
|
|
|
- },
|
|
|
- // 详情改变重新计算总件数
|
|
|
- recount(){
|
|
|
- this.calculateTotal();
|
|
|
- },
|
|
|
- // 重置
|
|
|
- reset() {
|
|
|
- let ajaxData = {
|
|
|
- shelfSn:this.shelfSn,
|
|
|
- productCode: undefined,
|
|
|
- productName: undefined,
|
|
|
- unsalableDaysBegin: undefined,
|
|
|
- unsalableDaysEnd: undefined,
|
|
|
- queryWord:undefined
|
|
|
- };
|
|
|
- this.queryParam = ajaxData;
|
|
|
- this.loadData(ajaxData);
|
|
|
- },
|
|
|
- handelFilter(){
|
|
|
- if(this.checkValueRange()){
|
|
|
- this.queryParam.shelfSn = this.shelfSn;
|
|
|
- this.chooseShow =false;
|
|
|
- this.loadData(this.queryParam);
|
|
|
- }
|
|
|
- },
|
|
|
- // 搜索
|
|
|
- getSearchCon() {
|
|
|
- var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
|
|
|
- if(!this.queryParam.queryWord){
|
|
|
- if (reg.test(this.keyword)) {
|
|
|
- //包含汉字
|
|
|
- this.queryParam.productName = this.keyword.trim()
|
|
|
- } else {
|
|
|
- this.queryParam.productCode=this.keyword.trim()
|
|
|
- }
|
|
|
- }
|
|
|
- this.queryParam.shelfSn = this.shelfSn
|
|
|
- this.loadData(this.queryParam);
|
|
|
- },
|
|
|
- // 清空搜索内容
|
|
|
- clearSearch() {
|
|
|
- this.keyword = '';
|
|
|
- this.reset();
|
|
|
- },
|
|
|
- // 扫描
|
|
|
- handleScanCode(){
|
|
|
- this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
|
|
|
- this.mpaasScanModule.scan(
|
|
|
- {
|
|
|
- "scanMode":"Customized",
|
|
|
- "scanStyle":{
|
|
|
- "scanFrameSizePlus":{"width":250,"height":250},
|
|
|
- "scanFrameSize":200,
|
|
|
- "scanLight":"visible",
|
|
|
- "scanText":"对准条形码/二维码进行识别",
|
|
|
- "scanTitle":"扫码搜索货位产品",
|
|
|
- }
|
|
|
- },
|
|
|
- (result) => {
|
|
|
- if(result.scanStatus == 1){
|
|
|
- this.scanResult(result)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 扫描结果
|
|
|
- scanResult(data){
|
|
|
- // 二维码
|
|
|
- if(data.scanType == 'QRCODE'){
|
|
|
- const ret = data.scanValue.split("&")
|
|
|
- this.queryParam.queryWord = ret[1] // 产品编码
|
|
|
- this.keyword= ret[1]
|
|
|
- }else{
|
|
|
- this.queryParam.queryWord = data.scanValue;
|
|
|
- this.keyword= data.scanValue
|
|
|
- }
|
|
|
- this.queryParam.shelfSn = this.shelfSn
|
|
|
- this.loadData(this.queryParam);
|
|
|
- },
|
|
|
addBackOrder(){
|
|
|
const arr = []
|
|
|
const arrInd = []
|
|
@@ -381,7 +218,7 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.recallBillList.forEach((item, index) => {
|
|
|
- if (item.confirmQty) {
|
|
|
+ if (item.confirmQty * 1>0) {
|
|
|
arr.push({
|
|
|
shelfSn: item.shelfSn,
|
|
|
shelfPlaceSn: item.shelfPlaceSn,
|
|
@@ -415,7 +252,7 @@ export default {
|
|
|
title:res.message
|
|
|
})
|
|
|
setTimeout(()=>{
|
|
|
- uni.navigateTo({
|
|
|
+ uni.redirectTo({
|
|
|
url:'/pages/shuntBackManage/cancellingStocks?sn='+res.data
|
|
|
})
|
|
|
},800)
|
|
@@ -464,14 +301,15 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
-.modal-box {
|
|
|
+.content {
|
|
|
background: #ffffff;
|
|
|
- padding: 20rpx;
|
|
|
+ padding:0 20rpx;
|
|
|
width: 100%;
|
|
|
height: 100vh;
|
|
|
box-sizing: border-box;
|
|
|
.headerName {
|
|
|
- padding-bottom: 15rpx;
|
|
|
+ padding-bottom: 16rpx;
|
|
|
+ padding-top: 20rpx;
|
|
|
color: #222;
|
|
|
font-size: 30rpx;
|
|
|
.barBox {
|
|
@@ -498,10 +336,9 @@ export default {
|
|
|
}
|
|
|
.backOrderCon {
|
|
|
width: 100%;
|
|
|
- height: calc(100vh - 200rpx);
|
|
|
+ height: calc(100vh - 338rpx);
|
|
|
.scroll-view{
|
|
|
height: 100%;
|
|
|
-
|
|
|
.partList-list-box {
|
|
|
width: 700rpx;
|
|
|
padding: 10px 0;
|
|
@@ -597,6 +434,23 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .nodata{
|
|
|
+ text-align: center;
|
|
|
+ image{
|
|
|
+ width: 280rpx;
|
|
|
+ height: 280rpx;
|
|
|
+ margin-top: 100rpx;
|
|
|
+ }
|
|
|
+ .nodataTip{
|
|
|
+
|
|
|
+ text{
|
|
|
+ color: #00aaff;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
.backOrderFooter {
|
|
|
height: 98rpx;
|
|
@@ -610,7 +464,7 @@ export default {
|
|
|
.footerBox_m {
|
|
|
.middle_l {
|
|
|
text {
|
|
|
- color: #ff5500;
|
|
|
+ color: red;
|
|
|
margin: 0 6rpx;
|
|
|
}
|
|
|
}
|
|
@@ -618,6 +472,7 @@ export default {
|
|
|
font-size: 24rpx;
|
|
|
color: #999;
|
|
|
margin-left: 10rpx;
|
|
|
+ color: red;
|
|
|
}
|
|
|
}
|
|
|
.footerBox_r {
|