组盘管理
This commit is contained in:
@@ -3,26 +3,15 @@
|
||||
<!-- 来料入库 -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">托盘/点位码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="zd-row">
|
||||
<!-- <view class="zd_wrapper">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-19">
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<button class="mini-btn" size="mini" style="display: block; margin-top: 9px;" type="primary" @tap="handleAdd">添加</button>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="zd_wrapper" v-if="flag">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
@@ -70,7 +59,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>删除选择</th>
|
||||
<th>选择</th>
|
||||
<th>点位码</th>
|
||||
<th>托盘码</th>
|
||||
<th>批次号</th>
|
||||
@@ -98,8 +87,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !checkedArr.length}" @tap="toDel()">删除选中行</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !dataList.length}" @tap="_zwConfirmIn">全部提交</button>
|
||||
<button class="zd-col-22 button-primary" :class="{'button-info': !checkedArr.length}" @tap="_zwConfirmIn">提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -107,7 +95,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getFormDataList, getPlate, inCheck, zwConfirmIn} from '@/utils/getData4.js'
|
||||
import {getFormDataList, getPlate, getInBillList, zwConfirmIn} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -115,11 +103,9 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
singleDate: '',
|
||||
title: '',
|
||||
id: '',
|
||||
code: '',
|
||||
val1: '',
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
dataList: [],
|
||||
@@ -146,17 +132,10 @@
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._getInBillList()
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._inCheck()
|
||||
}
|
||||
},
|
||||
handleAdd () {
|
||||
if (!this.val1) {
|
||||
return
|
||||
}
|
||||
this.dataList.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
@@ -181,9 +160,6 @@
|
||||
// } catch (e) {
|
||||
// }
|
||||
// },
|
||||
toDel () {
|
||||
this.dataList = this.dataList.filter(el => el.checked === false)
|
||||
},
|
||||
toChek (e) {
|
||||
this.pkId = this.pkId === e.site_code ? '' : e.site_code
|
||||
this.pkObj = this.pkId === e.site_code ? e : {}
|
||||
@@ -202,9 +178,9 @@
|
||||
this.dataList = []
|
||||
this.checkedArr = []
|
||||
},
|
||||
async _inCheck () {
|
||||
async _getInBillList () {
|
||||
try {
|
||||
let res = await inCheck(this.val1)
|
||||
let res = await getInBillList()
|
||||
if (res.code === '200') {
|
||||
this.dataList = [...this.dataList, ...res.data]
|
||||
this.handleAdd()
|
||||
@@ -219,12 +195,12 @@
|
||||
},
|
||||
async _zwConfirmIn () {
|
||||
this.disabled = true
|
||||
if (!this.dataList.length) {
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await zwConfirmIn(this.dataList)
|
||||
let res = await zwConfirmIn(this.checkedArr)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -225,6 +225,9 @@
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.currentData = {}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
|
||||
@@ -238,6 +238,11 @@ export const inCheck = (svcode) => request({
|
||||
url:'api/pda/iosIn/inCheck',
|
||||
data: {site_vehicle_code: svcode}
|
||||
})
|
||||
// 查询来料入库清单
|
||||
export const getInBillList = () => request({
|
||||
url:'api/pda/iosIn/getInBillList',
|
||||
data: {}
|
||||
})
|
||||
|
||||
// 空载具出入库
|
||||
// 载具编码下拉框
|
||||
|
||||
Reference in New Issue
Block a user