|
@@ -3,7 +3,7 @@
|
|
|
<view class="header_box">
|
|
|
<view class="headerName u-flex">
|
|
|
<text class="barBox"></text>
|
|
|
- <view class="shelfName u-line-1">{{ shelfName }}对方的观点和个人就一个人国服日服固定板</view>
|
|
|
+ <view class="shelfName u-line-1">{{ shelfName }}</view>
|
|
|
<view class="screeningBox" @click="chooseShow = true">
|
|
|
<text>滞销天数</text>
|
|
|
<u-icon color="#666666" size="36" name="shaixuan" custom-prefix="iscm-icon"></u-icon>
|
|
@@ -27,34 +27,35 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="backOrderCon">
|
|
|
- <scroll-view scroll-y class="scroll-view">
|
|
|
- <view class="partList-list-box">
|
|
|
+ <scroll-view scroll-y class="scroll-view" v-if="recallBillList && recallBillList.length>0" >
|
|
|
+ <u-checkbox-group :wrap="true" @change="checkGroupChange">
|
|
|
+ <view class="partList-list-box" v-for="(item,index) in recallBillList" :key="item.id">
|
|
|
<view class="product flex align_center">
|
|
|
- <view class="checkbox"><u-checkbox v-model="checked" name="A" @change="checkChange" size="40" shape="circle"></u-checkbox></view>
|
|
|
+ <view class="checkbox"><u-checkbox v-model="item.isChecked" :name="item.id" size="40" shape="circle"></u-checkbox></view>
|
|
|
<view class="flex align_center flex_1">
|
|
|
<view class="pimgs">
|
|
|
<u-image src="`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
|
|
|
</view>
|
|
|
<view class="pinfo">
|
|
|
<view class="pname">
|
|
|
- <text>A01</text>
|
|
|
- JQ-21026E
|
|
|
+ <text>{{item.shelfPlaceCode}}</text>
|
|
|
+ {{item.productCode}}
|
|
|
</view>
|
|
|
<view class="productName u-line-1">
|
|
|
- 名i嘻嘻嘻嘻嘻嘻
|
|
|
+ {{item.productName}}
|
|
|
</view>
|
|
|
<view class="ptxt flex align_center">
|
|
|
<view>
|
|
|
最大库容
|
|
|
- <text class="pnums">100</text>
|
|
|
+ <text class="pnums">{{item.maxQty}}</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
/货架库存
|
|
|
- <text class="pnums">20</text>
|
|
|
+ <text class="pnums">{{item.qty}}</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
/滞销
|
|
|
- <text class="pnums">12个月23天</text>
|
|
|
+ <text class="pnums">{{item.unsalableDays}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -62,38 +63,39 @@
|
|
|
</view>
|
|
|
<view class="ptools flex align_center justify_between">
|
|
|
<view class="ptools_l u-flex">
|
|
|
- <view>
|
|
|
+ <view v-if="item.replenishBillQty && item.replenishBillQty!=0">
|
|
|
补货在途
|
|
|
- <text class="pnums">1</text>
|
|
|
+ <text class="pnums">{{item.replenishBillQty}}</text>
|
|
|
</view>
|
|
|
- <view>
|
|
|
- /调回在途
|
|
|
- <text class="pnums">2</text>
|
|
|
+ <view v-if="item.recallBillQty && item.recallBillQty!=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" :input-height="60" bg-color="#fff" v-model="shifa" :min="0" :max="10"></u-number-box></view>
|
|
|
+ <view class="u-ninput"><u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.confirmQty" :min="0" :max="item.qty"></u-number-box></view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <!-- <u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="240" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty> -->
|
|
|
+ </u-checkbox-group>
|
|
|
</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>
|
|
|
<view class="backOrderFooter u-flex">
|
|
|
<view class="checkBox">
|
|
|
- <u-checkbox-group><u-checkbox label-size="24" icon-size="26" v-model="allChecked" shape="circle">全选</u-checkbox></u-checkbox-group>
|
|
|
+ <u-checkbox-group><u-checkbox label-size="24" 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>2</text>
|
|
|
+ <text>{{chooseArr.length}}</text>
|
|
|
款/
|
|
|
- <text>15</text>
|
|
|
+ <text>{{totalNum}}</text>
|
|
|
件
|
|
|
</view>
|
|
|
- <view class="middle_r" @click="detailFlag=true">
|
|
|
+ <view class="middle_r" @click="seeDetail">
|
|
|
<text>查看明细</text>
|
|
|
<u-icon name="arrow-up" color="#999" size="28"></u-icon>
|
|
|
</view>
|
|
@@ -117,12 +119,13 @@
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
<!-- 查看明细弹窗 -->
|
|
|
- <detailModal :detailShow="detailFlag" @close="detailFlag=false"></detailModal>
|
|
|
+ <detailModal @clearList='clearOneList' @clearAllList="clearAll" :detailShow="detailFlag" :chooseData="chooseArr" @close="detailFlag=false"></detailModal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { reportPage } from '@/api/vinLog';
|
|
|
+import { controlQueryList } from '@/api/shelf';
|
|
|
import detailModal from './detailModal'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -130,7 +133,15 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- detailFlag:false,
|
|
|
+ shelfSn: '',
|
|
|
+ shelfName: '',
|
|
|
+ recallBillList:[],//回调单列表
|
|
|
+ chooseArr:[],
|
|
|
+ noDataText: '暂无调回单',
|
|
|
+ totalNum: 0,
|
|
|
+
|
|
|
+ detailFlag:false,//查看详情
|
|
|
+
|
|
|
chooseShow: false,
|
|
|
checked: true,
|
|
|
keyword: '',
|
|
@@ -150,13 +161,10 @@ export default {
|
|
|
],
|
|
|
isSortFlag: 0,
|
|
|
list: [],
|
|
|
- shelfSn: '',
|
|
|
- shelfName: '',
|
|
|
- pageNo: 1,
|
|
|
- pageSize: 10,
|
|
|
- noDataText: '暂无数据',
|
|
|
+
|
|
|
+
|
|
|
status: 'loading',
|
|
|
- totalNum: 0,
|
|
|
+
|
|
|
total: 0,
|
|
|
theme: '',
|
|
|
customBtnStyle: {
|
|
@@ -175,9 +183,7 @@ export default {
|
|
|
this.shelfSn = options.shelfSn;
|
|
|
this.shelfName = options.shelfName;
|
|
|
let ajaxData = {
|
|
|
- pageNo: this.pageNo,
|
|
|
- pageSize: this.pageSize,
|
|
|
- shelfSn: this.shelfSn
|
|
|
+ shelfSn: options.shelfSn
|
|
|
};
|
|
|
this.loadData(ajaxData);
|
|
|
},
|
|
@@ -188,32 +194,89 @@ export default {
|
|
|
return true;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
methods: {
|
|
|
// 获取数字货架列表
|
|
|
loadData(params) {
|
|
|
const _this = this;
|
|
|
_this.status = 'loading';
|
|
|
- reportPage(params).then(res => {
|
|
|
+ controlQueryList(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
- if (this.pageNo > 1) {
|
|
|
- this.list = this.list.concat(res.data.list || []);
|
|
|
- } else {
|
|
|
- this.list = res.data.list || [];
|
|
|
- }
|
|
|
- this.totalNum = res.data.count || 0;
|
|
|
- } else {
|
|
|
- this.list = [];
|
|
|
- this.totalNum = 0;
|
|
|
- this.noDataText = res.message;
|
|
|
+ res.data.forEach(item=>{
|
|
|
+ item.isChecked= false
|
|
|
+ item.confirmQty = item.qty
|
|
|
+ })
|
|
|
+ this.recallBillList=res.data;
|
|
|
}
|
|
|
- this.status = 'loadmore';
|
|
|
});
|
|
|
},
|
|
|
- chooseSort(i) {
|
|
|
- this.isSortFlag = i;
|
|
|
- this.handelSort();
|
|
|
+
|
|
|
+ checkGroupChange(e){
|
|
|
+ let newArr=[];
|
|
|
+ e.forEach(item=>{
|
|
|
+ this.recallBillList.map(info =>{
|
|
|
+ if(item == info.id) {
|
|
|
+ newArr.push(info);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.chooseArr = newArr;
|
|
|
+ let flag = this.recallBillList.every(con => con.isChecked )
|
|
|
+ if(flag){
|
|
|
+ this.allChecked = true
|
|
|
+ }else{
|
|
|
+ this.allChecked = false
|
|
|
+ }
|
|
|
+ this.calculateTotal()
|
|
|
+ },
|
|
|
+ // 全选
|
|
|
+ allCheckedChange(e){
|
|
|
+ if(e.value){
|
|
|
+ this.recallBillList.map(item=>{
|
|
|
+ item.isChecked = true;
|
|
|
+ })
|
|
|
+ this.chooseArr = this.recallBillList;
|
|
|
+ }else{
|
|
|
+ this.recallBillList.map(item=>{
|
|
|
+ item.isChecked = false;
|
|
|
+ })
|
|
|
+ this.chooseArr =[]
|
|
|
+ }
|
|
|
+ this.calculateTotal()
|
|
|
+ },
|
|
|
+ // 计算选中总件数
|
|
|
+ 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.chooseArr = []
|
|
|
},
|
|
|
+
|
|
|
reset() {
|
|
|
this.isSortFlag = 0;
|
|
|
this.pageNo = 1;
|
|
@@ -343,7 +406,11 @@ export default {
|
|
|
.backOrderCon {
|
|
|
width: 100%;
|
|
|
height: calc(100vh - 280rpx);
|
|
|
+ .scroll-view{
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
.partList-list-box {
|
|
|
+ width: 700rpx;
|
|
|
padding: 10px 0;
|
|
|
border-bottom: 2rpx solid #f5f5f5;
|
|
|
&:last-child {
|
|
@@ -402,6 +469,11 @@ export default {
|
|
|
.ptools_l{
|
|
|
font-size: 24rpx;
|
|
|
color: #999;
|
|
|
+ view{
|
|
|
+ :nth-child(2)::before{
|
|
|
+ content: '/';
|
|
|
+ }
|
|
|
+ }
|
|
|
.pnums {
|
|
|
color: #ff5500;
|
|
|
padding: 0 4rpx;
|
|
@@ -434,6 +506,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
.backOrderFooter {
|
|
|
height: 98rpx;
|