拣选作业修改

This commit is contained in:
蔡玲
2024-11-13 16:14:58 +08:00
parent 52b8cab3f7
commit f0cf644d5f
3 changed files with 76 additions and 78 deletions

View File

@@ -43,7 +43,7 @@
menuList: [ menuList: [
{title: '入库管理', path: 'RF01', sonTree: [{title: '物料组盘入库', path: '/pages/entry/mater-group-to-store'}, {title: '组盘入库', path: '/pages/entry/group-to-store'}, {title: '空托盘入库', path: '/pages/entry/empty-tray-to-store'}]}, {title: '入库管理', path: 'RF01', sonTree: [{title: '物料组盘入库', path: '/pages/entry/mater-group-to-store'}, {title: '组盘入库', path: '/pages/entry/group-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: 'RF02', sonTree: [{title: '托盘出库', path: '/pages/outbound/tray-out-store'}, {title: '出库确认', path: '/pages/outbound/out-store-confirm'}]},
{title: '在库管理', path: 'RF03', sonTree: [{title: '库存信息', path: '/pages/in/store-info'}]}, {title: '在库管理', path: 'RF03', sonTree: [{title: '库存信息', active: false, path: '/pages/in/store-info'}]},
{title: '拣选管理', path: 'RF04', sonTree: [{title: '拣选作业', path: '/pages/pick/pick-task'}]}, {title: '拣选管理', path: 'RF04', sonTree: [{title: '拣选作业', path: '/pages/pick/pick-task'}]},
{title: '盘点管理', path: 'RF05', sonTree: [{title: '盘点作业', path: '/pages/check/check-task'}]}, {title: '盘点管理', path: 'RF05', sonTree: [{title: '盘点作业', path: '/pages/check/check-task'}]},
{title: '任务管理', path: 'RF06', sonTree: [{title: '任务管理', path: '/pages/task/task-manage'}]}, {title: '任务管理', path: 'RF06', sonTree: [{title: '任务管理', path: '/pages/task/task-manage'}]},
@@ -72,6 +72,9 @@
}, },
toPage2 (e) { toPage2 (e) {
let url = e.path + '?title=' + e.title let url = e.path + '?title=' + e.title
if (e.active === false) {
return
}
uni.redirectTo({ uni.redirectTo({
url: url url: url
}) })

View File

@@ -5,114 +5,90 @@
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">拣选单据</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" @click="toJump" v-model="data.code">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">料箱编码</span> <span class="filter_label">料箱编码</span>
</view> </view>
<view class="zd-col-24"> <view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.vehicle_code"> <search-box
v-model="val1"
@handleChange="handleChange"
/>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">拣选单据</span>
</view>
<view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.code" disabled>
</view>
</view>
<view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-8">
<span class="filter_label">车间</span> <span class="filter_label">车间</span>
</view> </view>
<view class="zd-col-24"> <view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.product_area"> <input type="text" class="filter_input" v-model="data.product_area" disabled>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">拣选仓库</span> <span class="filter_label">拣选仓库</span>
</view> </view>
<view class="zd-col-24"> <view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.stor_code"> <input type="text" class="filter_input" v-model="data.stor_code" disabled>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">拣选站台</span> <span class="filter_label">拣选站台</span>
</view> </view>
<view class="zd-col-24"> <view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.point_code"> <input type="text" class="filter_input" v-model="data.point_code" disabled>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom filter_input_disabled">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">物料名称</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.material_name">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">物料数量</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.qty">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">拣选数量</span> <span class="filter_label">拣选数量</span>
</view> </view>
<view class="zd-col-24"> <view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.assign_qty"> <input type="number" class="filter_input" v-model="data.qty" disabled>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">移出料箱</span> <span class="filter_label">移出料箱</span>
</view> </view>
<view class="zd-col-24"> <view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.out_pick_vehicle"> <search-box
v-model="val2"
/>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">移出数量</span> <span class="filter_label">是否机械搬运</span>
</view> </view>
<view class="zd-col-24"> <view class="relative zd-col-16">
<input type="text" class="filter_input" v-model="data.out_qty"> <switch :checked="isChecked" color="#4e6ef2" style="transform:scale(0.8)"/>
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-8">
<span class="filter_label">是否人工搬运</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.is_move">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">移入料箱</span> <span class="filter_label">移入料箱</span>
</view> </view>
<view class="zd-col-24"> <view class="zd-col-16">
<input type="text" class="filter_input" v-model="data.in_pick_vehicle"> <search-box
</view> v-model="val3"
</view> />
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">移入数量</span>
</view>
<view class="zd-col-24">
<input type="text" class="filter_input" v-model="data.in_qty">
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="clearUp">清空</button> <button class="zd-col-6 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': JSON.stringify(data) === '{}'}" :disabled="disabled" @tap="_savePickTask">拣选确认</button> <button class="zd-col-15 button-primary" :class="{'button-info': !val1|| !val2 || !val3}" :disabled="disabled" @tap="_savePickTask">拣选确认</button>
</view> </view>
</view> </view>
</template> </template>
@@ -120,7 +96,7 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {savePickTask} from '@/utils/getData2.js' import {queryPick, savePickTask} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -128,6 +104,10 @@
}, },
data() { data() {
return { return {
val1: '',
val2: '',
val3: '',
isChecked: true,
data: {}, data: {},
disabled: false disabled: false
}; };
@@ -141,23 +121,33 @@
} }
}, },
methods: { methods: {
toJump () { handleChange (e) {
uni.navigateTo({ this._queryPick(e)
url: '/pages/pick/pick-list?title=拣选单列表' },
}) async _queryPick (e) {
let res = await queryPick('Picking', e)
this.data = res
},
setWStatus () {
this.isChecked = !this.isChecked
}, },
clearUp () { clearUp () {
this.data = {} this.data = {}
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.isChecked = true
this.disabled = false this.disabled = false
}, },
async _savePickTask () { async _savePickTask () {
this.disabled = true this.disabled = true
if (JSON.stringify(this.data) === '{}') { if (!this.val1|| !this.val2 || !this.val3) {
this.disabled = false this.disabled = false
return return
} }
try { try {
let res = await savePickTask(this.data) let obj = Object.assign({}, this.data, {is_move: this.isChecked, pick_vehicle_23: this.val2, pick_vehicle_13: this.val3})
let res = await savePickTask(obj)
if (res.code === '200') { if (res.code === '200') {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

View File

@@ -101,6 +101,11 @@ export const pmFormData2 = (page, size, form_type, status, code) => request({
method: 'GET', method: 'GET',
url:'api/pmFormData?page=' + page + '&size=' + size + '&form_type=' + form_type + '&status=' + status + '&vehicle_code=' + code url:'api/pmFormData?page=' + page + '&size=' + size + '&form_type=' + form_type + '&status=' + status + '&vehicle_code=' + code
}) })
// 扫载具查看拣选单信息
export const queryPick = (type, code) => request({
url:'api/pda/pick/queryPick',
data: {form_type: type, vehicle_code: code}
})
export const savePickTask = (data) => request({ export const savePickTask = (data) => request({
url:'api/pda/pick/savePickTask', url:'api/pda/pick/savePickTask',
data: data data: data