|
@@ -3,117 +3,85 @@
|
|
|
<view class="headerName u-flex">
|
|
|
<text class="barBox"></text>
|
|
|
<view class="shelfName u-line-1">{{ shelfName }}</view>
|
|
|
- <view class="screeningBox" @click="chooseShow = true">
|
|
|
+ <!-- <view class="screeningBox" @click="chooseShow = true">
|
|
|
<text>滞销天数</text>
|
|
|
<u-icon color="#666666" size="36" name="shaixuan" custom-prefix="iscm-icon"></u-icon>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<view class="backOrderCon">
|
|
|
<scroll-view scroll-y class="scroll-view" v-if="recallBillList && recallBillList.length>0" >
|
|
|
- <div class="cpb_cart-list">
|
|
|
- <view
|
|
|
- v-for="(item, index) in recallBillList"
|
|
|
- :key="'cpb_'+item.id"
|
|
|
- >
|
|
|
- <view class="nav-right-item flex align_center">
|
|
|
- <view class="uni-col-1" @click="delDetail(item,index)">
|
|
|
- <u-icon name="close-circle" color="#999" size="35"></u-icon>
|
|
|
- </view>
|
|
|
- <view class="uni-col-9 flex">
|
|
|
- <view class="item-imgs">
|
|
|
- <u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="120" height="120" border-radius="10"></u-image>
|
|
|
+ <view class="partList-list-box" v-for="(item,index) in recallBillList" :key="item.id">
|
|
|
+ <view class="product flex align_center">
|
|
|
+ <view class="uni-col-1" @click="delDetail(item,index)">
|
|
|
+ <u-icon name="close-circle" color="#999" size="35"></u-icon>
|
|
|
</view>
|
|
|
- <view class="item-info">
|
|
|
- <view class="item-name">
|
|
|
- <text>{{item.shelfPlaceCode}}</text>
|
|
|
- {{item.productCode}}
|
|
|
+ <view class="flex flex_1">
|
|
|
+ <view class="pimgs">
|
|
|
+ <u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="120" height="120" border-radius="10"></u-image>
|
|
|
</view>
|
|
|
- <view class="item-name">
|
|
|
- {{item.productName}}
|
|
|
- </view>
|
|
|
- <view class="item-detail">
|
|
|
- <view class="item-detail-info align_center flex justify_between">
|
|
|
- <view></view>
|
|
|
- <view class="flex justify_end">
|
|
|
- <view class="item-detail-text">
|
|
|
- 最大库容:<text class="pnums">{{item.maxQty||0}}</text>
|
|
|
- 货架库存:<text class="pnums">{{item.qty||0}}</text>
|
|
|
- 门店库存:<text class="pnums">{{item.qplsStockQty||0}}</text>
|
|
|
- </view>
|
|
|
+ <view class="pinfo">
|
|
|
+ <view class="pname item-name">
|
|
|
+ <text>{{item.shelfPlaceCode}}</text>
|
|
|
+ {{item.productCode}}
|
|
|
+ </view>
|
|
|
+ <view class="productName u-line-2">
|
|
|
+ {{item.productName}}
|
|
|
+ </view>
|
|
|
+ <view class="ptxt flex align_center">
|
|
|
+ <view>
|
|
|
+ 最大库容
|
|
|
+ <text class="pnums">{{item.maxQty}}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ /货架库存
|
|
|
+ <text class="pnums">{{item.qty}}</text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ /滞销
|
|
|
+ <text class="pnums">{{!item.unsalableDays || (item.unsalableDays&&item.unsalableDays) == 0 ?'--天':item.unsalableDays}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </u-checkbox>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="nav-right-item">
|
|
|
- <view class="item-detail">
|
|
|
- <view class="item-detail-info">
|
|
|
- <view class="flex justify_between">
|
|
|
- <view class="item-detail-text flex">
|
|
|
- <view v-if="item.replenishBillQty">补货在途:<text class="pnums1">{{item.replenishBillQty||0}}</text></view>
|
|
|
- <view v-if="item.recallBillQty">调回在途:<text class="pnums1">{{item.recallBillQty||0}}</text></view>
|
|
|
- </view>
|
|
|
- <view class="item-detail-text">
|
|
|
- 补货数量:
|
|
|
- <u-number-box
|
|
|
- v-model="item.replenishQty"
|
|
|
- :index="'cart_'+item.id"
|
|
|
- :min="1"
|
|
|
- @change="numsChange(item)"
|
|
|
- :max="999999"></u-number-box>
|
|
|
- </view>
|
|
|
+ <view class="ptools flex align_center u-row-between">
|
|
|
+ <view class="ptools_l u-flex">
|
|
|
+ <view v-if="item.replenishBillQty && item.replenishBillQty!=0">
|
|
|
+ 补货在途
|
|
|
+ <text class="pnums">{{item.replenishBillQty}}</text>
|
|
|
+ </view>
|
|
|
+ <view v-if="item.recallBillQty && item.recallBillQty!=0">
|
|
|
+ {{item.replenishBillQty && item.replenishBillQty!=0 ? '/':''}}调回在途
|
|
|
+ <text class="pnums">{{item.recallBillQty}}</text>
|
|
|
</view>
|
|
|
</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>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view v-if="recallBillList.length==0">
|
|
|
- <view class="nodata">
|
|
|
- 暂无产品,请点击
|
|
|
- <view>
|
|
|
- <text @click="toChooseProduct">选择产品</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </div>
|
|
|
</scroll-view>
|
|
|
- <u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="200" :text="noDataText" img-width="120" v-else></u-empty>
|
|
|
+ <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>
|
|
|
</view>
|
|
|
<view class="backOrderFooter u-flex" :style="{zIndex:(detailFlag? 99999:11)}">
|
|
|
- <view class="checkBox">
|
|
|
- <u-checkbox-group><u-checkbox v-model="allChecked" shape="circle" @change="allCheckedChange">全选</u-checkbox></u-checkbox-group>
|
|
|
- </view>
|
|
|
<view class="footerBox u-flex u-row-between">
|
|
|
<view class="footerBox_m u-flex">
|
|
|
<view class="middle_l">
|
|
|
已选
|
|
|
- <text>{{chooseArr.length}}</text>
|
|
|
- 款
|
|
|
+ <text>{{totalCategory}}</text>
|
|
|
+ 款/<text>{{totalQty}}</text>件
|
|
|
</view>
|
|
|
- <view class="middle_r" @click="seeDetail">
|
|
|
- <text>查看明细</text>
|
|
|
- <u-icon name="arrow-up" color="#999" size="28"></u-icon>
|
|
|
+ <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>
|
|
|
+ <view class="footerBox_r"><u-button type="primary" shape="circle" @click="addBackOrder">新增调回单</u-button></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- 弹窗 -->
|
|
|
- <u-popup v-model="chooseShow" mode="right" width="60%">
|
|
|
- <view class="choosePopup">
|
|
|
- <view class="chooseTit">滞销天数</view>
|
|
|
- <view class="chooseDay u-flex">
|
|
|
- <u-input v-model="queryParam.unsalableDaysBegin" input-align="center" placeholder="起始天数" type="number" />
|
|
|
- <text>至</text>
|
|
|
- <u-input v-model="queryParam.unsalableDaysEnd" input-align="center" placeholder="截止天数" type="number" />
|
|
|
- </view>
|
|
|
- <view class="butBox u-flex">
|
|
|
- <u-button hover-class="none" shape="circle" size="medium" @click="reset">重置</u-button>
|
|
|
- <u-button hover-class="none" :custom-style="customBtnStyle" size="medium" shape="circle" @click="handelFilter">查询</u-button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -131,7 +99,7 @@ export default {
|
|
|
shelfName: '',
|
|
|
recallBillList:[],//回调单列表
|
|
|
chooseArr:[],
|
|
|
- noDataText: '暂无调回单',
|
|
|
+ noDataText: '暂无产品,请点击选择产品',
|
|
|
totalNum: 0,
|
|
|
detailFlag:false,//查看详情
|
|
|
chooseShow: false,//滞销天数弹窗
|
|
@@ -155,14 +123,16 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
+ const _this = this
|
|
|
this.theme = getApp().globalData.theme;
|
|
|
this.shelfSn = options.shelfSn;
|
|
|
this.shelfName = options.shelfName;
|
|
|
this.queryParam.shelfSn = options.shelfSn
|
|
|
- let ajaxData = {
|
|
|
- shelfSn: options.shelfSn
|
|
|
- };
|
|
|
- this.loadData(ajaxData);
|
|
|
+ uni.$on("chooseBackProduct",function(data){
|
|
|
+ _this.recallBillList = _this.recallBillList.concat(data).sort(function(a,b){
|
|
|
+ return (a.shelfPlaceCode+'').localeCompare(b.shelfPlaceCode+'');
|
|
|
+ });
|
|
|
+ })
|
|
|
},
|
|
|
onBackPress(e) {
|
|
|
if (this.sortShow) {
|
|
@@ -171,26 +141,56 @@ export default {
|
|
|
return true;
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ totalCategory () {
|
|
|
+ return this.recallBillList.length
|
|
|
+ },
|
|
|
+ totalQty () {
|
|
|
+ let ret = 0
|
|
|
+ this.recallBillList.map(item => {
|
|
|
+ ret = ret + item.confirmQty
|
|
|
+ })
|
|
|
+ return ret
|
|
|
+ },
|
|
|
+ chooseKey(){
|
|
|
+ let ret = []
|
|
|
+ this.recallBillList.map(item => {
|
|
|
+ ret.push(item.id)
|
|
|
+ })
|
|
|
+ return ret
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 获取列表
|
|
|
loadData(params) {
|
|
|
- const _this = this;
|
|
|
- uni.showLoading({
|
|
|
- mask:true,
|
|
|
- title:"正在加载..."
|
|
|
+ // 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))
|
|
|
})
|
|
|
- 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)
|
|
|
- });
|
|
|
},
|
|
|
checkGroupChange(e){
|
|
|
let flag = this.recallBillList.every(con => con.isChecked )
|
|
@@ -202,6 +202,31 @@ export default {
|
|
|
this.calculateTypeTotal()
|
|
|
this.calculateTotal()
|
|
|
},
|
|
|
+ //清空列表
|
|
|
+ clearList(){
|
|
|
+ const _this = this
|
|
|
+ clzConfirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认要清空列表吗?',
|
|
|
+ success (ret) {
|
|
|
+ if (ret.confirm || ret.index == 0) {
|
|
|
+ _this.clearChoose()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ clearChoose(){
|
|
|
+ this.recallBillList = []
|
|
|
+ },
|
|
|
+ //删除调回单列表
|
|
|
+ delDetail(item,i){
|
|
|
+ const index = this.recallBillList.findIndex(k => k.id == item.id)
|
|
|
+ this.recallBillList.splice(index,1)
|
|
|
+ // 全部清空
|
|
|
+ if(this.recallBillList.length==0){
|
|
|
+ this.clearChoose()
|
|
|
+ }
|
|
|
+ },
|
|
|
// 全选
|
|
|
allCheckedChange(e){
|
|
|
if(e.value){
|
|
@@ -348,14 +373,14 @@ export default {
|
|
|
addBackOrder(){
|
|
|
const arr = []
|
|
|
const arrInd = []
|
|
|
- if(this.chooseArr.length == 0){
|
|
|
+ if(this.recallBillList.length == 0){
|
|
|
uni.showToast({
|
|
|
title:'请先选择调回产品',
|
|
|
icon:'none'
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
|
- this.chooseArr.forEach((item, index) => {
|
|
|
+ this.recallBillList.forEach((item, index) => {
|
|
|
if (item.confirmQty) {
|
|
|
arr.push({
|
|
|
shelfSn: item.shelfSn,
|
|
@@ -385,7 +410,6 @@ export default {
|
|
|
detailList: arr
|
|
|
}
|
|
|
insert(params).then(res => {
|
|
|
-
|
|
|
if (res.status == 200) {
|
|
|
uni.showToast({
|
|
|
title:res.message
|
|
@@ -460,7 +484,7 @@ export default {
|
|
|
}
|
|
|
.shelfName {
|
|
|
font-weight: bold;
|
|
|
- width: calc(100% - 166rpx);
|
|
|
+ width: calc(100% - 16rpx);
|
|
|
}
|
|
|
.screeningBox {
|
|
|
font-size: 26rpx;
|
|
@@ -474,7 +498,7 @@ export default {
|
|
|
}
|
|
|
.backOrderCon {
|
|
|
width: 100%;
|
|
|
- height: calc(100vh - 280rpx);
|
|
|
+ height: calc(100vh - 200rpx);
|
|
|
.scroll-view{
|
|
|
height: 100%;
|
|
|
|
|
@@ -581,11 +605,8 @@ export default {
|
|
|
vertical-align: top;
|
|
|
position: relative;
|
|
|
background-color: #fff;
|
|
|
- .checkBox {
|
|
|
- width: 20%;
|
|
|
- }
|
|
|
.footerBox {
|
|
|
- width: 80%;
|
|
|
+ width: 100%;
|
|
|
.footerBox_m {
|
|
|
.middle_l {
|
|
|
text {
|
|
@@ -608,25 +629,5 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // 弹窗样式
|
|
|
- .choosePopup {
|
|
|
- padding: 30rpx 20rpx;
|
|
|
- box-sizing: border-box;
|
|
|
- .chooseTit {
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
- .chooseDay {
|
|
|
- margin: 60rpx 0;
|
|
|
- .u-input {
|
|
|
- border-bottom: 1rpx solid #e0e0e0;
|
|
|
- }
|
|
|
- }
|
|
|
- .butBox {
|
|
|
- margin-top: 100rpx;
|
|
|
- .u-size-medium {
|
|
|
- padding: 0 60rpx !important;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
</style>
|