出入库
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="confirm-button-wrap confirm-button-wrap-c">
|
||||
<button class="confirm-button" @tap="toSearch">点位解绑</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !val1 || !index1}" :disabled="disabled" @tap="toSure">全部解绑</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !val1 || !index1}" :disabled="disabled1" @tap="toSure1">点位解绑</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !val1 || !index1}" :disabled="disabled2" @tap="toSure2">全部解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -31,7 +31,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
|
||||
import {getCacheLine, releasepoint} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -39,12 +39,12 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
|
||||
index1: 'A1',
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled: false
|
||||
disabled1: false,
|
||||
disabled2: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -52,67 +52,37 @@
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
toSearch () {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this._inOutExceptionInstQuery()
|
||||
toSure1 () {
|
||||
this.disabled1 = true
|
||||
if (!this.index1 || !this.val1) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
this._releasepoint('one')
|
||||
},
|
||||
async _getCacheLine (id) {
|
||||
let res = await getCacheLine(id)
|
||||
this.options2 = [...res]
|
||||
toSure2 () {
|
||||
this.disabled2 = true
|
||||
if (!this.index1 || !this.val1) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
this._releasepoint('all')
|
||||
},
|
||||
async _inOutExceptionInstQuery () {
|
||||
let res = await inOutExceptionInstQuery(this.index2)
|
||||
this.dataList = [...res]
|
||||
},
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
uni.showToast({
|
||||
title: '请选择',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index2) {
|
||||
uni.showToast({
|
||||
title: '请选择缓存线',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index3) {
|
||||
uni.showToast({
|
||||
title: '请选择位置类型',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.val1) {
|
||||
uni.showToast({
|
||||
title: '请扫满箱码',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
async _releasepoint (type) {
|
||||
try {
|
||||
let res = await inOutExceptionInstConfirm(this.index2, this.val1, this.pkId, this.index3)
|
||||
this.disabled = false
|
||||
this.toSearch()
|
||||
let res = await inOutExceptionInstConfirm(this.index1, this.val1, type)
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.position_code ? '' : e.position_code
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,16 +19,15 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="confirm-button-wrap">
|
||||
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSelect">选择订单</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId || !index2 || !val1 || !index3}" :disabled="disabled" @tap="toSure">入库确认</button>
|
||||
<button class="confirm-button" @tap="toDelect">清空</button>
|
||||
<button class="confirm-button" @tap="toSelect">选择订单</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !index1 || !val1 || dataList.length === 0}" :disabled="disabled" @tap="toSure">入库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid-wrap">
|
||||
<table class="grid-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th>订单行号</th>
|
||||
<th>规格</th>
|
||||
<th>入库数量</th>
|
||||
@@ -37,15 +36,12 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.position_code" @click="toRadio(e)">
|
||||
<td>
|
||||
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.position_code}"></view>
|
||||
</td>
|
||||
<td>{{e.cacheline_code}}</td>
|
||||
<td>{{e.position_code}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.order_line_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.in_qty}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -56,7 +52,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
|
||||
import {getCacheLine, InstoreOrder} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -72,21 +68,20 @@
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
onLoad() {
|
||||
if (this.$store.getters.publicArr) {
|
||||
this.dataList = this.$store.getters.publicArr
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 选择器1 */
|
||||
selectChange1(e) {
|
||||
this.index1 = e
|
||||
},
|
||||
toSearch () {
|
||||
toDelect () {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this._inOutExceptionInstQuery()
|
||||
},
|
||||
async _getCacheLine (id) {
|
||||
let res = await getCacheLine(id)
|
||||
this.options2 = [...res]
|
||||
this.$store.dispatch('setPublicArr', '')
|
||||
},
|
||||
async _inOutExceptionInstQuery () {
|
||||
let res = await inOutExceptionInstQuery(this.index2)
|
||||
@@ -94,42 +89,36 @@
|
||||
},
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
if (!this.index1) {
|
||||
uni.showToast({
|
||||
title: '请选择',
|
||||
title: '请选择入库点',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index2) {
|
||||
uni.showToast({
|
||||
title: '请选择缓存线',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index3) {
|
||||
uni.showToast({
|
||||
title: '请选择位置类型',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.val1) {
|
||||
uni.showToast({
|
||||
title: '请扫满箱码',
|
||||
title: '请输入载具号',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (this.dataList.length === 0) {
|
||||
uni.showToast({
|
||||
title: '请选择订单信息',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await inOutExceptionInstConfirm(this.index2, this.val1, this.pkId, this.index3)
|
||||
let res = await InstoreOrder(this.index1, this.val1, this.dataList)
|
||||
this.disabled = false
|
||||
this.toSearch()
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.toDelect()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
@@ -138,15 +127,10 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.position_code ? '' : e.position_code
|
||||
},
|
||||
toSelect () {
|
||||
if (!this.pkId) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/management/MaterList'
|
||||
})
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/management/MaterList'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</view>
|
||||
<view class="search-item search-item-btns">
|
||||
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId || !index2 || !val1}" :disabled="disabled" @tap="toSure">确认</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr.length === 0}" :disabled="disabled" @tap="toSure">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -29,27 +29,28 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.position_code" @click="toRadio(e)">
|
||||
<tr v-for="e in dataList" :key="e.sale_code" :class="{'checked': e.checked}">
|
||||
<td>
|
||||
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.position_code}"></view>
|
||||
<view class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}" @tap="toCheck(e)"></view>
|
||||
</td>
|
||||
<td>{{e.cacheline_code}}</td>
|
||||
<td>{{e.position_code}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{e.order_line_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.sale_qty}}</td>
|
||||
<td><input type="number" class="search-input-l" :class="{'bgr': e.bgr === true}" v-model="e.in_qty"></td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
|
||||
import {orderSearch} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -60,71 +61,79 @@
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled: false
|
||||
disabled: false,
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
checkArr: []
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toSearch () {
|
||||
this.dataList = []
|
||||
this.pkId = ''
|
||||
this._inOutExceptionInstQuery()
|
||||
this.pageNum = 1
|
||||
this._orderSearch()
|
||||
},
|
||||
async _getCacheLine (id) {
|
||||
let res = await getCacheLine(id)
|
||||
this.options2 = [...res]
|
||||
/** 初始化查询 */
|
||||
async _orderSearch () {
|
||||
let res = await orderSearch(this.val1, this.pageNum + '', this.pageSize + '')
|
||||
this.totalCount = res.totalElements
|
||||
if (res.totalElements > 0) {
|
||||
res.content.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'bgr', false)
|
||||
this.$set(el, 'in_qty', '0.000')
|
||||
})
|
||||
const dataMap = res.content
|
||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||
this.reload = false
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
if (this.totalCount == this.dataList.length) {
|
||||
this.reload = false
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
async _inOutExceptionInstQuery () {
|
||||
let res = await inOutExceptionInstQuery(this.index2)
|
||||
this.dataList = [...res]
|
||||
onReachBottom () {
|
||||
if (this.totalCount > this.dataList.length) {
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
this.pageNum++
|
||||
this._orderSearch()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
async toSure () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
uni.showToast({
|
||||
title: '请选择',
|
||||
icon: 'none'
|
||||
let flag = false
|
||||
this.dataList.map(el => {
|
||||
if (el.checked && (Number(el.in_qty) < 0 || el.in_qty === '')) {
|
||||
this.$set(el, 'bgr', true)
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index2) {
|
||||
uni.showToast({
|
||||
title: '请选择缓存线',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.index3) {
|
||||
uni.showToast({
|
||||
title: '请选择位置类型',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.val1) {
|
||||
uni.showToast({
|
||||
title: '请扫满箱码',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await inOutExceptionInstConfirm(this.index2, this.val1, this.pkId, this.index3)
|
||||
this.disabled = false
|
||||
this.toSearch()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
if (flag) {
|
||||
return
|
||||
}
|
||||
if (this.checkArr.length) {
|
||||
this.$store.dispatch('setPublicArr', this.checkArr)
|
||||
uni.redirectTo({
|
||||
url: '/pages/management/FinishedInStore'
|
||||
})
|
||||
}
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.position_code ? '' : e.position_code
|
||||
toCheck (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||
},
|
||||
goIn () {
|
||||
uni.redirectTo({
|
||||
|
||||
Reference in New Issue
Block a user