|
@@ -2,27 +2,27 @@
|
|
|
<view class="content-box">
|
|
<view class="content-box">
|
|
|
<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="出库单" background-color="#F7F9FA"
|
|
<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="出库单" background-color="#F7F9FA"
|
|
|
color="#404446" @clickLeft="back"></uni-nav-bar>
|
|
color="#404446" @clickLeft="back"></uni-nav-bar>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <view class="top-wrapper">
|
|
|
|
|
- <view class="searchBox rx-bc">
|
|
|
|
|
- <input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
|
|
|
|
|
-
|
|
|
|
|
- <view class="rx-sc">
|
|
|
|
|
-
|
|
|
|
|
- <u-button @click="doSearch" type="success" size="small" class="u-reset-button" text="搜索">
|
|
|
|
|
- </u-button>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <view class="top-wrapper">
|
|
|
|
|
+ <view class="searchBox rx-bc">
|
|
|
|
|
+ <input v-model="keyWord" placeholder="请输入关键字搜索" class="searchInput" />
|
|
|
|
|
+
|
|
|
|
|
+ <view class="rx-sc">
|
|
|
|
|
+
|
|
|
|
|
+ <u-button @click="doSearch" type="success" size="small" class="u-reset-button" text="搜索">
|
|
|
|
|
+ </u-button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<view class="list_box">
|
|
<view class="list_box">
|
|
|
<u-list @scrolltolower="scrolltolower">
|
|
<u-list @scrolltolower="scrolltolower">
|
|
|
|
|
|
|
|
- <checkbox-group v-for="(item, index) in list" :key="index" @change="e => selectVal(e, item, index)">
|
|
|
|
|
|
|
+ <checkbox-group v-for="(item, index) in newList" :key="index" @change="e => selectVal(e, item, index)">
|
|
|
<label class="listBox rx-bs">
|
|
<label class="listBox rx-bs">
|
|
|
|
|
|
|
|
<view class="listBox-sel">
|
|
<view class="listBox-sel">
|
|
@@ -41,19 +41,15 @@
|
|
|
class="items" v-if="!itm.formatter">
|
|
class="items" v-if="!itm.formatter">
|
|
|
<text>{{ itm.label }}</text>{{ item[itm.prop] }}
|
|
<text>{{ itm.label }}</text>{{ item[itm.prop] }}
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view
|
|
|
|
|
- v-if="[1,2, 9].includes(item.rootCategoryLevelId)"
|
|
|
|
|
- class="items">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view v-if="[1,2, 9].includes(item.rootCategoryLevelId)" class="items">
|
|
|
<text>物料代号</text> {{item.extInfo.materielCode }}
|
|
<text>物料代号</text> {{item.extInfo.materielCode }}
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view
|
|
|
|
|
- v-if="[1,2, 9].includes(item.rootCategoryLevelId)"
|
|
|
|
|
- class="items">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view v-if="[1,2, 9].includes(item.rootCategoryLevelId)" class="items">
|
|
|
<text>刻码</text> {{item.extInfo.engrave }}
|
|
<text>刻码</text> {{item.extInfo.engrave }}
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -95,10 +91,11 @@
|
|
|
taskId: null,
|
|
taskId: null,
|
|
|
id: null,
|
|
id: null,
|
|
|
list: [],
|
|
list: [],
|
|
|
|
|
+ newList: [],
|
|
|
memoList: [],
|
|
memoList: [],
|
|
|
|
|
|
|
|
storageKey: null,
|
|
storageKey: null,
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
keyWord: ''
|
|
keyWord: ''
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -147,7 +144,7 @@
|
|
|
taskId: this.taskId
|
|
taskId: this.taskId
|
|
|
}
|
|
}
|
|
|
feedOutInOrder(param).then(res => {
|
|
feedOutInOrder(param).then(res => {
|
|
|
- this.list.push(
|
|
|
|
|
|
|
+ this.newList.push(
|
|
|
...res.map(i => {
|
|
...res.map(i => {
|
|
|
const checked =
|
|
const checked =
|
|
|
this.memoList.findIndex(itm => itm.id === i.id) > -1
|
|
this.memoList.findIndex(itm => itm.id === i.id) > -1
|
|
@@ -160,26 +157,48 @@
|
|
|
})
|
|
})
|
|
|
)
|
|
)
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
|
|
+ this.list = this.newList
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
doSearch() {
|
|
doSearch() {
|
|
|
- console.log(this.list)
|
|
|
|
|
|
|
+ let _arr = []
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ _arr = this.list.filter(obj => {
|
|
|
|
|
+ if (obj.name.includes(this.keyWord) || obj.code.includes(this.keyWord) || obj.extInfo && obj
|
|
|
|
|
+ .extInfo.engrave.includes(this.keyWord) || obj.extInfo && obj.extInfo.materielCode
|
|
|
|
|
+ .includes(this.keyWord)) {
|
|
|
|
|
+ return true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ this.newList = _arr
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
tableH(type) {
|
|
tableH(type) {
|
|
|
return tableHeader(type)
|
|
return tableHeader(type)
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
selectVal(e, val, index) {
|
|
selectVal(e, val, index) {
|
|
|
- this.list[index].checked = !this.list[index].checked
|
|
|
|
|
|
|
+ this.newList[index].checked = !this.newList[index].checked
|
|
|
|
|
|
|
|
const idx = this.memoList.findIndex(
|
|
const idx = this.memoList.findIndex(
|
|
|
- item => item.id === this.list[index].id
|
|
|
|
|
|
|
+ item => item.id === this.newList[index].id
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- if (this.list[index].checked) {
|
|
|
|
|
|
|
+ if (this.newList[index].checked) {
|
|
|
if (idx === -1) {
|
|
if (idx === -1) {
|
|
|
- this.memoList.push(this.list[index])
|
|
|
|
|
|
|
+ this.memoList.push(this.newList[index])
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
if (idx > -1) {
|
|
if (idx > -1) {
|
|
@@ -205,18 +224,18 @@
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
background-color: $page-bg;
|
|
background-color: $page-bg;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.searchBox {
|
|
.searchBox {
|
|
|
background-color: #dedede;
|
|
background-color: #dedede;
|
|
|
height: 90rpx;
|
|
height: 90rpx;
|
|
|
padding: 0 20rpx;
|
|
padding: 0 20rpx;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
.menu_icon {
|
|
.menu_icon {
|
|
|
width: 60rpx;
|
|
width: 60rpx;
|
|
|
height: 60rpx;
|
|
height: 60rpx;
|
|
|
margin-right: 20rpx;
|
|
margin-right: 20rpx;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
input {
|
|
input {
|
|
|
height: 70rpx;
|
|
height: 70rpx;
|
|
|
width: 480rpx;
|
|
width: 480rpx;
|
|
@@ -224,7 +243,7 @@
|
|
|
padding-left: 10rpx;
|
|
padding-left: 10rpx;
|
|
|
border-radius: 5rpx;
|
|
border-radius: 5rpx;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|