多个功能修改
This commit is contained in:
204
pages/entry/check-to-store.vue
Normal file
204
pages/entry/check-to-store.vue
Normal file
@@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 盘点入库 -->
|
||||
<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="vehicleCode" @handleChange="handleChange"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="currentData.material_code" @tap="toJump">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料名称</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料规格</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">单位</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料单重</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<NumberInput v-model="sWeight" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料批次</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input" v-model="pcsn">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<NumberInput v-model="qty" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">仓库编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="storCode" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}' || !vehicleCode || !sWeight || !pcsn || !qty}" :disabled="disabled" @tap="_checkMaterConfirm">盘点确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {storList, queryMaterByVehicleCode} from '@/utils/mork2.js'
|
||||
import {checkMaterConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
NumberInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
vehicleCode: '',
|
||||
currentData: {},
|
||||
sWeight: null,
|
||||
pcsn: null,
|
||||
qty: null,
|
||||
storCode: null,
|
||||
options: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._storList()
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.currentData.material_id = this.$store.getters.publicObj.material_id
|
||||
this.currentData.material_code = this.$store.getters.publicObj.material_code
|
||||
this.currentData.material_name = this.$store.getters.publicObj.material_name
|
||||
this.currentData.material_spec = this.$store.getters.publicObj.material_spec
|
||||
this.currentData.unit_name = this.$store.getters.publicObj.unit_name
|
||||
this.sWeight = null
|
||||
this.pcsn = null
|
||||
this.qty = null
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async _storList () {
|
||||
let res = await storList()
|
||||
if (res.code === '200') {
|
||||
this.options = [...res.content]
|
||||
this.options.map(el => {
|
||||
this.$set(el, 'text', el.label)
|
||||
})
|
||||
}
|
||||
},
|
||||
toJump () {
|
||||
if (!this.vehicleCode) {
|
||||
uni.showToast({
|
||||
title: '请先扫描载具编码',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/common/mater-list?title=查询物料'
|
||||
})
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._queryMaterByVehicleCode(e)
|
||||
}
|
||||
},
|
||||
async _queryMaterByVehicleCode (e) {
|
||||
try {
|
||||
let res = await queryMaterByVehicleCode(e)
|
||||
if (res && res.code === '200') {
|
||||
this.currentData = res.content[0]
|
||||
this.sWeight = this.currentData.single_weight
|
||||
this.pcsn = this.currentData.pcsn
|
||||
this.qty = this.currentData.qty
|
||||
this.options.map(el => {
|
||||
if (el.value === this.currentData.stor_code) {
|
||||
this.storCode = el.text
|
||||
}
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.currentData = {}
|
||||
this.vehicleCode = ''
|
||||
this.storCode = null
|
||||
this.disabled = false
|
||||
},
|
||||
async _checkMaterConfirm () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}' || !this.vehicleCode || !this.sWeight || !this.pcsn || !this.qty) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let obj = Object.assign(this.currentData, {single_weight: this.sWeight, pcsn: this.pcsn, qty: this.qty})
|
||||
let res = await checkMaterConfirm(obj)
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -33,7 +33,7 @@
|
||||
<span class="filter_label filter_input_disabled">单位</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_id" disabled>
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.unit_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -41,7 +41,7 @@
|
||||
<span class="filter_label">物料单重</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<input type="number" class="filter_input" v-model="currentData.single_weight">
|
||||
<NumberInput v-model="currentData.single_weight" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -57,7 +57,7 @@
|
||||
<span class="filter_label">物料数量</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<input type="number" class="filter_input" v-model="currentData.qty">
|
||||
<NumberInput v-model="currentData.qty" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
@@ -89,11 +89,13 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {storList, groupMaterIn} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
SearchBox,
|
||||
NumberInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
return {
|
||||
userName: '',
|
||||
menuList: [
|
||||
{title: '入库管理', path: 'RF01', sonTree: [{title: '物料组盘入库', path: '/pages/entry/mater-group-to-store'}, {title: '合格证入库', path: '/pages/entry/qualified-to-store'}, {title: '单据入库', path: '/pages/entry/bill-to-store'}, {title: '空托盘入库', path: '/pages/entry/empty-tray-to-store'}]},
|
||||
{title: '出库管理', path: 'RF02', sonTree: [{title: '空托盘出库', path: '/pages/outbound/tray-out-store'}, {title: '出库确认', path: '/pages/outbound/out-store-confirm'}, {title: '单据出库', path: '/pages/outbound/bill-list'}, {title: '库存出库', path: '/pages/outbound/stock-out-store'}]},
|
||||
{title: '入库管理', path: 'RF01', sonTree: [{title: '物料组盘入库', path: '/pages/entry/mater-group-to-store'}, {title: '合格证入库', path: '/pages/entry/qualified-to-store'}, {title: '单据入库', path: '/pages/entry/bill-to-store'}, {title: '盘点入库', path: '/pages/entry/check-to-store'}, {title: '空托盘入库', path: '/pages/entry/empty-tray-to-store'}]},
|
||||
{title: '出库管理', path: 'RF02', sonTree: [{title: '空托盘出库', path: '/pages/outbound/tray-out-store'}, {title: '出库确认', path: '/pages/outbound/out-store-confirm'}, {title: '单据出库', path: '/pages/outbound/bill-list'}, {title: '盘点出库', path: '/pages/outbound/stock-out-store'}]},
|
||||
{title: '拣选管理', path: 'RF04', sonTree: [{title: '拣选作业', path: '/pages/pick/pick-task'}]},
|
||||
{title: '设备操控', path: 'RF07', sonTree: [{title: '切换出入库模式', path: '/pages/mode/switch-in-out'}, {title: '拣选工位启停模式', path: '/pages/mode/pick'}, {title: '下发输送线运动命令', path: '/pages/mode/command'}]},
|
||||
{title: '产线叫料', path: 'RF10', sonTree: [{title: '二楼生产出库', path: '/pages/outbound/produce-out-store-2nd'}, {title: '二楼取货确认', path: '/pages/outbound/pick-confirm-2nd'}, {title: '二楼货架绑定', path: '/pages/outbound/shelf-bind-2nd'}]},
|
||||
@@ -208,7 +208,7 @@
|
||||
&:nth-child(5n+3) .menu-name_inner
|
||||
background linear-gradient(to right, rgba(0, 228, 153,0.8) 0%, rgba(0, 241, 197,0.8) 100%)
|
||||
&:nth-child(5n+4) .menu-name_inner
|
||||
background linear-gradient(to right, rgba(162, 86, 171,0.8) 0%, rgba(183,120,190,0.8) 100%)
|
||||
background linear-gradient(to right, rgba(196, 5, 219,0.8) 0%, rgba(183,120,190,0.8) 100%)
|
||||
&:nth-child(5n+5) .menu-name_inner
|
||||
background linear-gradient(to right, rgba(146, 94, 52,0.8) 0%, rgba(162, 116, 79,0.8) 100%)
|
||||
.menu-name_inner
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<th>站点编码</th>
|
||||
<th>站点名称</th>
|
||||
<th>绑定状态</th>
|
||||
<th>任务锁定</th>
|
||||
<th>绑定货架号</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -42,6 +43,7 @@
|
||||
<td>{{e.code}}</td>
|
||||
<td>{{e.name}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{$getStatusText({ '00': '未锁定', '10': '入库锁', '20': '出库锁' }, e.lock_type)}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -50,10 +52,11 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type === '00'" class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('1')">绑定</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type !== '00'" class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('0')">解绑</button>
|
||||
<button v-if="!dataList.length" class="zd-col-16 button-primary button-info">绑定/解绑</button>
|
||||
<button class="zd-col-5 button-primary" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_pointUnbind">CTU站点解绑</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type === '00'" class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('1')">货架绑定</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type !== '00'" class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('0')">货架解绑</button>
|
||||
<button v-if="!dataList.length" class="zd-col-8 button-primary button-info">货架绑定/解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -61,7 +64,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getPointStatus, bindOrUnbind} from '@/utils/getData2.js'
|
||||
import {getPointStatus, bindOrUnbind, pointUnbind} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -86,10 +89,14 @@
|
||||
}
|
||||
},
|
||||
async _getPointStatus (e) {
|
||||
let res = await getPointStatus(e)
|
||||
this.dataList = []
|
||||
this.dataList.push(res)
|
||||
this.val2 = res.vehicle_code
|
||||
try {
|
||||
let res = await getPointStatus(e)
|
||||
this.dataList = []
|
||||
this.dataList.push(res)
|
||||
this.val2 = res.vehicle_code
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
@@ -119,6 +126,26 @@
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _pointUnbind () {
|
||||
try {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
let res = await pointUnbind(this.val1, this.val2)
|
||||
if (res.code === '200') {
|
||||
this._getPointStatus(this.val1)
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,18 +8,42 @@
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">仓库</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<view class="zd-col-17 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">仓位编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val4">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料批次</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val3">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
@@ -71,7 +95,10 @@
|
||||
title: '',
|
||||
val1: '',
|
||||
options: [{value: 'FStockPallet', text: '托盘库'}, {value: 'FStockId', text: '料箱库'}],
|
||||
index: '',
|
||||
index: 'FStockId',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
@@ -97,7 +124,7 @@
|
||||
this._structattrPage()
|
||||
},
|
||||
async _structattrPage () {
|
||||
let res = await structattrPage(this.pageNum + '', this.pageSize + '', this.index, this.val1, true)
|
||||
let res = await structattrPage(this.pageNum + '', this.pageSize + '', this.index, this.val1, true, this.val2, this.val3, this.val4)
|
||||
if (res.code === '200') {
|
||||
this.totalCount = res.totalElements
|
||||
if (res.totalElements > 0) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 库存出库 -->
|
||||
<!-- 盘点出库 -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
@@ -46,7 +46,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_outStorageMaterConfirm">出库确认</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_outStorageMaterConfirm">确认出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -80,6 +80,9 @@
|
||||
} else if (this.currentData.stor_code === 'FStockId') {
|
||||
this.val1 = '料箱库'
|
||||
}
|
||||
if (!this.currentData.product_area) {
|
||||
this.currentData.product_area = 'A1'
|
||||
}
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user