|
|
@@ -3,8 +3,8 @@
|
|
|
<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="领料" background-color="#F7F9FA"
|
|
|
color="#404446" @clickLeft="back"></uni-nav-bar>
|
|
|
<u-button type="success" size="small" class="u-reset-button-ii" v-if="clientEnvironmentId == 21"
|
|
|
- @click="undatePicking()" text="刷新库存"></u-button>
|
|
|
-
|
|
|
+ @click="undatePicking()" text="刷新库存"></u-button>
|
|
|
+
|
|
|
<view class="list_box">
|
|
|
<u-list @scrolltolower="scrolltolower">
|
|
|
|
|
|
@@ -24,6 +24,8 @@
|
|
|
|
|
|
</view>
|
|
|
|
|
|
+ <view class="select" @click="selectAll(item.bomList)">全选/取消</view>
|
|
|
+
|
|
|
<view class="material rx-ss" v-for="(mate, idx) in item.bomList" :key="idx">
|
|
|
<view class="left rx-ss" @click="mate.checked = !mate.checked">
|
|
|
<view class="zdy_check rx-cc" :class="{ check_active: mate.checked }">
|
|
|
@@ -164,6 +166,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isType: true,
|
|
|
+
|
|
|
idsList: [],
|
|
|
List: [],
|
|
|
pagination: {},
|
|
|
@@ -272,10 +276,31 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ selectAll(list) {
|
|
|
+ if (Array.isArray(list) && list.length) {
|
|
|
+ // let a = list.some(v=>v.checked = true)
|
|
|
+ // ture 就是取消 false 就是选中
|
|
|
+ if (this.isType) {
|
|
|
+ list.map(d => {
|
|
|
+ d.checked = false
|
|
|
+ })
|
|
|
+ this.isType = false;
|
|
|
+
|
|
|
+ } else {
|
|
|
+ list.map(d => {
|
|
|
+ d.checked = true
|
|
|
+ })
|
|
|
+ this.isType = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(list, 'list');
|
|
|
+ },
|
|
|
+
|
|
|
//刷新库存
|
|
|
|
|
|
-
|
|
|
- async undatePicking(){
|
|
|
+
|
|
|
+ async undatePicking() {
|
|
|
uni.showLoading({
|
|
|
title: '加载中...',
|
|
|
});
|
|
|
@@ -347,7 +372,7 @@ export default {
|
|
|
// ids: ,
|
|
|
workId: this.idsList[0]
|
|
|
}).then(res => {
|
|
|
-
|
|
|
+
|
|
|
if (res?.length) {
|
|
|
let List = res.map(m => {
|
|
|
m.workOrderId = m.id
|
|
|
@@ -595,7 +620,19 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.u-reset-button-ii{
|
|
|
+.select {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ padding: 5rpx 0;
|
|
|
+ width: 150rpx;
|
|
|
+ background-color: #157A2C;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 24rpx;
|
|
|
+ border-radius: 5rpx;
|
|
|
+}
|
|
|
+
|
|
|
+.u-reset-button-ii {
|
|
|
position: relative;
|
|
|
right: -251rpx;
|
|
|
width: 200rpx;
|