空载具堆叠
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 空载具堆叠 -->
|
||||
<nav-bar :title="title" :inner="true"></nav-bar>
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
|
||||
@@ -12,14 +12,6 @@
|
||||
<search-box v-model="val1"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">载具类型</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">载具库区</span>
|
||||
@@ -40,7 +32,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index || !index2 || !num}" :disabled="disabled" @tap="_callEmptyVehicle">呼叫出库</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index2 || !num}" :disabled="disabled" @tap="_callEmptyVehicle">呼叫出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -58,9 +50,7 @@
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
num: null,
|
||||
options: [],
|
||||
index: '',
|
||||
num: 1,
|
||||
options2: [{text: '原料区', value: 1}, {text: '辅料区', value: 2}, {text: '批料室', value: 3}, {text: '内包材区', value: 4}],
|
||||
index2: '',
|
||||
disabled: false
|
||||
@@ -85,19 +75,18 @@
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.index = ''
|
||||
this.index2 = ''
|
||||
this.num = null
|
||||
this.num = 1
|
||||
this.disabled = false
|
||||
},
|
||||
async _callEmptyVehicle () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index || !this.index2 || !this.num) {
|
||||
if (!this.val1 || !this.index2 || !this.num) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callEmptyVehicle(this.index2, this.val1, this.index, this.num)
|
||||
let res = await callEmptyVehicle(this.index2, this.val1, this.num)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 托盘叫料 -->
|
||||
<!-- 料桶叫料 -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
@@ -22,7 +22,7 @@
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" @tap="_queryPointInDtl">查询</button>
|
||||
<button class="mini-btn" type="primary" @tap="_getBucketGroupInfo">查询</button>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
@@ -30,7 +30,7 @@
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -76,7 +76,7 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">确认叫料</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val2 || !dataList.length}" :disabled="disabled" @tap="_confirmCallBucketMaterial">确认叫料</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -84,7 +84,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
|
||||
import {getBucketGroupInfo, confirmCallBucketMaterial} from '@/utils/getData3.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -93,19 +93,22 @@
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
num: null,
|
||||
index: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
materialData: {},
|
||||
dataList: [],
|
||||
dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryPointInDownload()
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.materialData = this.$store.getters.publicObj
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toJump (name) {
|
||||
@@ -115,30 +118,14 @@
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.num = null
|
||||
this.dataList = []
|
||||
this.checkedArr = []
|
||||
this.allCheck = false
|
||||
this.disabled = false
|
||||
},
|
||||
async _queryPointInDownload () {
|
||||
async _getBucketGroupInfo () {
|
||||
try {
|
||||
let res = await queryPointInDownload()
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
async _queryPointInDtl () {
|
||||
try {
|
||||
let res = await queryPointInDtl(this.val1)
|
||||
let res = await getBucketGroupInfo(this.materialData.material_code, this.val1)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
@@ -148,15 +135,14 @@
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _packInConfirm () {
|
||||
async _confirmCallBucketMaterial () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.index || !this.dataList.length) {
|
||||
if (!this.val2 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
|
||||
try {
|
||||
let res = await packInConfirm(this.val1, this.index, this.num, this.dataList)
|
||||
let res = await confirmCallBucketMaterial(this.val2, this.dataList)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
|
||||
@@ -108,9 +108,9 @@ export const getSectList = (code) => request({
|
||||
})
|
||||
// 空载具出库
|
||||
// 呼叫出库
|
||||
export const callEmptyVehicle = (scode, pcode, vtype, vnum) => request({
|
||||
export const callEmptyVehicle = (scode, pcode, vnum) => request({
|
||||
url:'api/pdaCommon/callEmptyVehicle',
|
||||
data: {sect_code: scode, point_code: pcode, vehicle_type: vtype, vehicle_num: vnum}
|
||||
data: {sect_code: scode, point_code: pcode, vehicle_num: vnum}
|
||||
})
|
||||
// 空载具堆叠(空载具管理)共 (2) 个
|
||||
// 查询明细列表
|
||||
@@ -289,6 +289,18 @@ export const receivedIn = (pcode, vcode, scode, rows) => request({
|
||||
data: {point_code: pcode, vehicle_code: vcode, sect_code: scode, rows: rows}
|
||||
})
|
||||
|
||||
// 料桶叫料
|
||||
// 获取料桶组盘信息
|
||||
export const getBucketGroupInfo = (mid, pcsn) => request({
|
||||
url:'api/pdaProduction/getBucketGroupInfo',
|
||||
data: {material_id: mid, pcsn: pcsn}
|
||||
})
|
||||
// 确认叫料
|
||||
export const confirmCallBucketMaterial = (pcode, rows) => request({
|
||||
url:'/api/pdaProduction/confirmCallBucketMaterial',
|
||||
data: {point_code: pcode, rows: rows}
|
||||
})
|
||||
|
||||
/**
|
||||
* 通用功能
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user