空载具堆叠
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="zd_container">
|
<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_content">
|
||||||
<view class="zd_wrapper">
|
<view class="zd_wrapper">
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
|
|||||||
@@ -12,14 +12,6 @@
|
|||||||
<search-box v-model="val1"/>
|
<search-box v-model="val1"/>
|
||||||
</view>
|
</view>
|
||||||
</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-row border-bottom">
|
||||||
<view class="zd-col-6">
|
<view class="zd-col-6">
|
||||||
<span class="filter_label">载具库区</span>
|
<span class="filter_label">载具库区</span>
|
||||||
@@ -40,7 +32,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -58,9 +50,7 @@
|
|||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
num: null,
|
num: 1,
|
||||||
options: [],
|
|
||||||
index: '',
|
|
||||||
options2: [{text: '原料区', value: 1}, {text: '辅料区', value: 2}, {text: '批料室', value: 3}, {text: '内包材区', value: 4}],
|
options2: [{text: '原料区', value: 1}, {text: '辅料区', value: 2}, {text: '批料室', value: 3}, {text: '内包材区', value: 4}],
|
||||||
index2: '',
|
index2: '',
|
||||||
disabled: false
|
disabled: false
|
||||||
@@ -85,19 +75,18 @@
|
|||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
this.index = ''
|
|
||||||
this.index2 = ''
|
this.index2 = ''
|
||||||
this.num = null
|
this.num = 1
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
},
|
},
|
||||||
async _callEmptyVehicle () {
|
async _callEmptyVehicle () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.index || !this.index2 || !this.num) {
|
if (!this.val1 || !this.index2 || !this.num) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
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) {
|
if (res) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="zd_container">
|
<view class="zd_container">
|
||||||
<!-- 托盘叫料 -->
|
<!-- 料桶叫料 -->
|
||||||
<nav-bar :title="title"></nav-bar>
|
<nav-bar :title="title"></nav-bar>
|
||||||
<view class="zd_content">
|
<view class="zd_content">
|
||||||
<view class="zd_wrapper">
|
<view class="zd_wrapper">
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
v-model="val1"
|
v-model="val1"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" @tap="_queryPointInDtl">查询</button>
|
<button class="mini-btn" type="primary" @tap="_getBucketGroupInfo">查询</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
<view class="zd-col-7">
|
<view class="zd-col-7">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-col-24 filter_select">
|
<view class="zd-col-24 filter_select">
|
||||||
<search-box
|
<search-box
|
||||||
v-model="val1"
|
v-model="val2"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -84,7 +84,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 {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
|
import {getBucketGroupInfo, confirmCallBucketMaterial} from '@/utils/getData3.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -93,19 +93,22 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
options: [],
|
|
||||||
num: null,
|
num: null,
|
||||||
index: '',
|
|
||||||
val1: '',
|
val1: '',
|
||||||
|
val2: '',
|
||||||
materialData: {},
|
materialData: {},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
dataList: [{material_code: 'm001', qty: 100, checked: false, initialQty: 100}, {material_code: 'm002', qty: 200, checked: false, initialQty: 200}],
|
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
this._queryPointInDownload()
|
},
|
||||||
|
onShow () {
|
||||||
|
if (this.$store.getters.publicObj !== '') {
|
||||||
|
this.materialData = this.$store.getters.publicObj
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toJump (name) {
|
toJump (name) {
|
||||||
@@ -115,30 +118,14 @@
|
|||||||
},
|
},
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.val1 = ''
|
this.val1 = ''
|
||||||
|
this.val2 = ''
|
||||||
this.num = null
|
this.num = null
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this.checkedArr = []
|
|
||||||
this.allCheck = false
|
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
},
|
},
|
||||||
async _queryPointInDownload () {
|
async _getBucketGroupInfo () {
|
||||||
try {
|
try {
|
||||||
let res = await queryPointInDownload()
|
let res = await getBucketGroupInfo(this.materialData.material_code, this.val1)
|
||||||
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)
|
|
||||||
if (res && res.data.length > 0) {
|
if (res && res.data.length > 0) {
|
||||||
this.dataList = [...res.data]
|
this.dataList = [...res.data]
|
||||||
} else {
|
} else {
|
||||||
@@ -148,15 +135,14 @@
|
|||||||
this.dataList = []
|
this.dataList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async _packInConfirm () {
|
async _confirmCallBucketMaterial () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.index || !this.dataList.length) {
|
if (!this.val2 || !this.dataList.length) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.num = this.dataList.reduce((sum, item) => sum + Number(item.qty), 0)
|
|
||||||
try {
|
try {
|
||||||
let res = await packInConfirm(this.val1, this.index, this.num, this.dataList)
|
let res = await confirmCallBucketMaterial(this.val2, this.dataList)
|
||||||
if (res) {
|
if (res) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
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',
|
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) 个
|
// 空载具堆叠(空载具管理)共 (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}
|
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