空载具管理

This commit is contained in:
2026-01-05 17:01:08 +08:00
parent 124f3ca87e
commit b6272f3877
22 changed files with 3451 additions and 4 deletions

View File

@@ -564,3 +564,10 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
padding-right: 20rpx;
line-height: 50rpx;
}
.ftsize1 {
font-size 20rpx
background #fff
border-color #ff6a00
color #ff6a00
margin-top: 10rpx
}

View File

@@ -244,6 +244,132 @@
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/kzj/kzj-duidie",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/kzj/kzj-instore",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/kzj/kzj-outstore",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/ccgl/kn-hepan",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/ccgl/sh-instore",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/ccgl/zj-instore",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/ccgl/zj-outstore",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/zpgl/mater-zudai",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/zpgl/mater-zupan",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/zpgl/mater-zutong",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/cp-chuliao",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/lt-callmater",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/lt-weight",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/point-quhuo",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/sc-chuliao",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/sl-huiku",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/tp-callmater",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/scgl/yjg-chuliao",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -0,0 +1,233 @@
<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-24 filter_select">
<search-box
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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row">
<button class="zd-col-10 button-primary ftsize1" @tap="toScanAdd">扫码插入</button>
<button class="zd-col-10 button-primary ftsize1" @tap="toDel">删除行</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.unit}}</td>
<td>{{e.gys}}</td>
<td>{{e.leibie}}</td>
<td>{{e.guige}}</td>
<td>{{e.xinghao}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
num: null,
index: '',
val1: '',
val2: '',
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()
},
methods: {
toScanAdd () {
uni.scanCode({
success: (res) => {
// console.log('扫码成功:', res.result);
if (res.result.includes(';')) {
const parts = res.result.split(';')
if (parts.length !== 5) {
uni.showToast({
title: '二维码格式不正确,请扫描符合格式的二维码',
icon: 'none'
})
return
}
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: parts[0],
material_code: parts[1],
material_name: parts[2],
qty: parts[3],
measure_unit_id: parts[4],
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
} else {
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: res.result,
material_code: '',
material_name: '',
qty: '',
measure_unit_id: ''
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
}
},
fail: (err) => {
console.log('扫码失败:', err)
// uni.showToast({
// title: err + '扫码失败',
// icon: 'none'
// })
}
})
},
toDel () {
if (!this.pkId) {
return
}
this.dataList = this.dataList.filter(item => item.mid !== this.pkObj.mid)
},
toEmpty () {
this.val1 = ''
this.val2 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,163 @@
<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-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-7">
<span class="filter_label">载具</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
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-24 filter_select">
<search-box
v-model="val2"
/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.unit}}</td>
<td>{{e.gys}}</td>
<td>{{e.leibie}}</td>
<td>{{e.guige}}</td>
<td>{{e.xinghao}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
val1: '',
val2: '',
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()
},
methods: {
toEmpty () {
this.val1 = ''
this.val2 = ''
this.dataList = []
this.checkedArr = []
this.allCheck = false
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,225 @@
<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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row">
<button class="zd-col-11 button-primary ftsize1" @tap="toScanAdd">扫码插入</button>
<button class="zd-col-11 button-primary ftsize1" @tap="toDel">删除行</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>出库数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
num: null,
index: '',
val1: '',
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()
},
methods: {
toScanAdd () {
uni.scanCode({
success: (res) => {
// console.log('扫码成功:', res.result);
if (res.result.includes(';')) {
const parts = res.result.split(';')
if (parts.length !== 5) {
uni.showToast({
title: '二维码格式不正确,请扫描符合格式的二维码',
icon: 'none'
})
return
}
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: parts[0],
material_code: parts[1],
material_name: parts[2],
qty: parts[3],
measure_unit_id: parts[4],
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
} else {
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: res.result,
material_code: '',
material_name: '',
qty: '',
measure_unit_id: ''
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
}
},
fail: (err) => {
console.log('扫码失败:', err)
// uni.showToast({
// title: err + '扫码失败',
// icon: 'none'
// })
}
})
},
toDel () {
if (!this.pkId) {
return
}
this.dataList = this.dataList.filter(item => item.mid !== this.pkObj.mid)
},
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,214 @@
<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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row">
<button class="zd-col-11 button-primary ftsize1" @tap="toScanAdd">扫码插入</button>
<button class="zd-col-11 button-primary ftsize1" @tap="toDel">删除行</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>出库数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
num: null,
index: '',
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()
},
methods: {
toScanAdd () {
uni.scanCode({
success: (res) => {
// console.log('扫码成功:', res.result);
if (res.result.includes(';')) {
const parts = res.result.split(';')
if (parts.length !== 5) {
uni.showToast({
title: '二维码格式不正确,请扫描符合格式的二维码',
icon: 'none'
})
return
}
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: parts[0],
material_code: parts[1],
material_name: parts[2],
qty: parts[3],
measure_unit_id: parts[4],
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
} else {
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: res.result,
material_code: '',
material_name: '',
qty: '',
measure_unit_id: ''
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
}
},
fail: (err) => {
console.log('扫码失败:', err)
// uni.showToast({
// title: err + '扫码失败',
// icon: 'none'
// })
}
})
},
toDel () {
if (!this.pkId) {
return
}
this.dataList = this.dataList.filter(item => item.mid !== this.pkObj.mid)
},
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,98 @@
<template>
<view class="zd_container">
<!-- 空载具堆叠 -->
<nav-bar :title="title" :inner="true"></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-24 filter_select">
<search-box v-model="val1" @handleChange="handleChange"/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>堆叠位</th>
<th>当前托盘数</th>
<th>待堆叠</th>
<th>剩余可堆叠</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.supp_id === pkId}" @tap="toCheck(e)">
<td>{{i+1}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.remark}}</td>
<td>{{e.remark}}</td>
<td>{{e.remark}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-24 button-primary" :class="{'button-info': !pkId}" @tap="toSure">呼叫堆叠</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {querySupp} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
dataList: [],
pkId: '',
pkObj: {}
};
},
onLoad (options) {
this.title = options.title
},
methods: {
handleChange (e) {
if (e) {
this._querySupp()
}
},
async _querySupp () {
try {
let res = await querySupp(this.val1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
toCheck (e) {
this.pkId = this.pkId === e.supp_id ? '' : e.supp_id
this.pkObj = this.pkId === e.supp_id ? e : {}
},
toSure () {
if (this.pkId) {
this.$store.dispatch('setFormData', this.pkObj)
uni.navigateBack()
}
}
}
}
</script>

View File

@@ -0,0 +1,105 @@
<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-6">
<span class="filter_label">入库点</span>
</view>
<view class="zd-col-18">
<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">
<search-box v-model="val2"/>
</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>
</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 || !val2 || !index}" :disabled="disabled" @tap="_createTask">呼叫入库</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
// import {queryVehicleType} from '@/utils/mork2.js'
import {queryVehicleType, createTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
val2: '',
options: [],
index: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
this._queryVehicleType()
},
methods: {
/** 下拉框*/
async _queryVehicleType () {
try {
let res = await queryVehicleType()
if (res && res.data.length > 0) {
this.options = [...res.data]
} else {
this.options = []
}
} catch (e) {
this.options = []
}
},
toEmpty () {
this.val1 = ''
this.val2 = ''
this.index = ''
this.disabled = false
},
async _createTask () {
this.disabled = true
if (!this.val1 || !this.val2 || !this.index) {
this.disabled = false
return
}
try {
let res = await createTask(this.val1, this.val2, this.index)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,126 @@
<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-6">
<span class="filter_label">出库点</span>
</view>
<view class="zd-col-18">
<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>
</view>
<view class="zd-col-18 filter_select">
<uni-data-select v-model="index2" :localdata="options2"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">出库数量</span>
</view>
<view class="zd-col-18">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
</view>
</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}" :disabled="disabled" @tap="_createTask">呼叫出库</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
// import {queryVehicleType} from '@/utils/mork2.js'
import {queryVehicleType, createTask} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
num: null,
options: [],
index: '',
options2: [{text: '原料区', value: 1}, {text: '辅料区', value: 2}, {text: '批料室', value: 3}, {text: '内包材区', value: 4}],
index2: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
this._queryVehicleType()
},
methods: {
async _queryVehicleType () {
try {
let res = await queryVehicleType()
if (res && res.data.length > 0) {
this.options = [...res.data]
} else {
this.options = []
}
} catch (e) {
this.options = []
}
},
async _queryVehicleType2 () {
try {
let res = await queryVehicleType()
if (res && res.data.length > 0) {
this.options2 = [...res.data]
} else {
this.options2 = []
}
} catch (e) {
this.options2 = []
}
},
toEmpty () {
this.val1 = ''
this.index = ''
this.index2 = ''
this.disabled = false
},
async _createTask () {
this.disabled = true
if (!this.val1 || !this.index) {
this.disabled = false
return
}
try {
let res = await createTask(this.val1, this.index)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,154 @@
<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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>出库数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
val1: '',
num: null,
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()
},
methods: {
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,174 @@
<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-6">
<span class="filter_label">物料编码</span>
</view>
<view class="zd-col-13">
<search-box v-model="materialData.material_code"/>
</view>
<button class="mini-btn" type="primary" @tap="toJump('material?title=物料维护')">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">批号</span>
</view>
<view class="zd-col-14 filter_select">
<search-box
v-model="val1"
/>
</view>
<button class="mini-btn" type="primary" @tap="_queryPointInDtl">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">要料点</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>点位</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
num: null,
index: '',
val1: '',
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()
},
methods: {
toJump (name) {
uni.navigateTo({
url: `/pages/hdyy/wbc/${name}`
})
},
toEmpty () {
this.val1 = ''
this.num = null
this.dataList = []
this.checkedArr = []
this.allCheck = false
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !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)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,157 @@
<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-24 filter_select">
<search-box
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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>桶号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">入站</button>
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">出站</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
val1: '',
num: null,
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()
},
methods: {
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,227 @@
<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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row">
<button class="zd-col-11 button-primary ftsize1" @tap="toScanAdd">扫码插入</button>
<button class="zd-col-11 button-primary ftsize1" @tap="toDel">删除行</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>出库数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">取物料</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">取载具</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1 || !index || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">取货完成</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
val1: '',
num: null,
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()
},
methods: {
toScanAdd () {
uni.scanCode({
success: (res) => {
// console.log('扫码成功:', res.result);
if (res.result.includes(';')) {
const parts = res.result.split(';')
if (parts.length !== 5) {
uni.showToast({
title: '二维码格式不正确,请扫描符合格式的二维码',
icon: 'none'
})
return
}
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: parts[0],
material_code: parts[1],
material_name: parts[2],
qty: parts[3],
measure_unit_id: parts[4],
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
} else {
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: res.result,
material_code: '',
material_name: '',
qty: '',
measure_unit_id: ''
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
}
},
fail: (err) => {
console.log('扫码失败:', err)
// uni.showToast({
// title: err + '扫码失败',
// icon: 'none'
// })
}
})
},
toDel () {
if (!this.pkId) {
return
}
this.dataList = this.dataList.filter(item => item.mid !== this.pkObj.mid)
},
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,150 @@
<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-24 filter_select">
<search-box
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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>出库数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">呼叫agv</button>
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !dataList.length}" :disabled="disabled" @tap="_packInConfirm">出料</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
num: null,
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
},
methods: {
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
selectChange (e) {
this.index = e
},
async _queryPointInDtl () {
try {
let res = await queryPointInDtl(this.val1)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,154 @@
<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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>出库数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
val1: '',
num: null,
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()
},
methods: {
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,174 @@
<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-6">
<span class="filter_label">物料编码</span>
</view>
<view class="zd-col-13">
<search-box v-model="materialData.material_code"/>
</view>
<button class="mini-btn" type="primary" @tap="toJump('material?title=物料维护')">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">批号</span>
</view>
<view class="zd-col-14 filter_select">
<search-box
v-model="val1"
/>
</view>
<button class="mini-btn" type="primary" @tap="_queryPointInDtl">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">要料点</span>
</view>
<view class="zd-col-24 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>点位</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
num: null,
index: '',
val1: '',
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()
},
methods: {
toJump (name) {
uni.navigateTo({
url: `/pages/hdyy/wbc/${name}`
})
},
toEmpty () {
this.val1 = ''
this.num = null
this.dataList = []
this.checkedArr = []
this.allCheck = false
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !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)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,173 @@
<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-24 filter_select">
<search-box
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-24">
<input type="number" v-model="num" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">当前点位</span>
</view>
<view class="zd-col-24 filter_select">
<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>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>出库数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>点位</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.bag_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.qty_unit_name}}</td>
<td>{{e.supp_name}}</td>
<td>{{e.material_type_id}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.material_model}}</td>
<td>{{e.struct_code}}</td>
<td>{{e.vehicle_code}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
options: [{text:'原粉区', value: '1'}, {text:'批料室', value: '1'}, {text:'粉碎室1', value: 'f1'}, {text:'粉碎室2', value: 'f2'}],
index: '',
val1: '',
num: null,
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()
},
methods: {
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -37,21 +37,33 @@
<thead>
<tr>
<th>序号</th>
<th>点位</th>
<th>物料编码</th>
<th>物料名称</th>
<th>批号</th>
<th>数量</th>
<th>单位</th>
<th>供应商</th>
<th>类别</th>
<th>规格</th>
<th>型号</th>
<th>载具</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.point_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.unit}}</td>
<td>{{e.gys}}</td>
<td>{{e.leibie}}</td>
<td>{{e.guige}}</td>
<td>{{e.xinghao}}</td>
<td>{{e.zaiju}}</td>
</tr>
</tbody>
</table>

View File

@@ -0,0 +1,276 @@
<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-6">
<span class="filter_label">袋号</span>
</view>
<view class="zd-col-18">
<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-13">
<search-box v-model="materialData.material_code"/>
</view>
<button class="mini-btn" type="primary" @tap="toJump('material?title=物料维护')">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">物料名称</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_name" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">物料类别</span>
</view>
<view class="zd-col-18">
<input type="text" v-model="materialData.class_name" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">供应商编码</span>
</view>
<view class="zd-col-13">
<search-box v-model="suppData.supp_code"/>
</view>
<button class="mini-btn" type="primary" @tap="toJump('supplier?title=供应商维护')">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">供应商名称</span>
</view>
<view class="zd-col-18">
<input type="text" v-model="suppData.supp_name" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">批号</span>
</view>
<view class="zd-col-18">
<input type="text" v-model="pcsn" class="filter_input">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">数量</span>
</view>
<view class="zd-col-18">
<input type="number" v-model="num" class="filter_input">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">计量单位</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input" v-model="unit">
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || JSON.stringify(materialData) === '{}' || JSON.stringify(suppData) === '{}'}" :disabled="disabled" @tap="_packConfirmReturn">组袋并打印</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || JSON.stringify(materialData) === '{}' || JSON.stringify(suppData) === '{}'}" :disabled="disabled" @tap="_packConfirmReturn">确认组袋</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || JSON.stringify(materialData) === '{}' || JSON.stringify(suppData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {packConfirmReturn} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
materialData: {},
suppData: {},
num: '',
unit: 'KG',
disabled: false,
disabled1: false,
pcsn: ''
};
},
onLoad (options) {
this.title = options.title
},
onShow () {
if (this.$store.getters.publicObj !== '') {
this.materialData = this.$store.getters.publicObj
this.$store.dispatch('setPublicObj', '')
}
if (this.$store.getters.formData !== '') {
this.suppData = this.$store.getters.formData
this.$store.dispatch('setFormData', '')
}
},
methods: {
toJump (name) {
uni.navigateTo({
url: `/pages/hdyy/wbc/${name}`
})
},
toEmpty () {
this.val1 = ''
this.index1 = ''
this.materialData = {}
this.suppData = {}
this.pcsn = ''
this.num = ''
this.unit = 'KG'
this.disabled = false
this.disabled1 = false
},
async _packConfirmReturn () {
this.disabled = true
if (!this.val1 || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') {
this.disabled = false
return
}
try {
let res = await packConfirmReturn(this.val1, this.materialData.material_id, this.materialData.material_code, this.materialData.material_name, this.suppData.supp_code, this.suppData.supp_name, this.pcsn, this.num, this.mark)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
.input-container {
background-color: #fff;
border-radius: 16rpx;
padding: 30rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
margin-bottom: 40rpx;
}
.input-wrapper {
position: relative;
display: flex;
align-items: center;
// border: 2rpx solid #e0e0e0;
border-radius: 12rpx;
overflow: hidden;
transition: border-color 0.3s;
}
.input-wrapper:focus-within {
border-color: #007AFF;
}
.input-field {
flex: 1;
height: 80rpx;
// padding: 0 24rpx;
font-size: 28rpx;
color: #333;
}
.placeholder {
color: #999;
font-size: 28rpx;
}
.picker {
width: 80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #f8f8f8;
border-left: 2rpx solid #e0e0e0;
}
.picker-trigger {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.picker-text {
font-size: 24rpx;
color: #666;
}
.custom-dialog-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.custom-dialog {
width: 600rpx;
background: #fff;
border-radius: 16rpx;
overflow: hidden;
}
.dialog-title {
padding: 30rpx;
font-size: 32rpx;
text-align: center;
border-bottom: 1rpx solid #eee;
}
.dialog-body {
padding: 40rpx;
}
.dialog-input {
width: 100%;
height: 80rpx;
border: 1rpx solid #ddd;
border-radius: 8rpx;
padding: 0 20rpx;
text-align: center;
}
.dialog-footer {
display: flex;
border-top: 1rpx solid #eee;
}
.dialog-footer button {
flex: 1;
border-radius: 0;
margin: 0;
}
</style>

View File

@@ -0,0 +1,208 @@
<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-24 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="zd-row">
<button class="zd-col-11 button-primary ftsize1" @tap="toScanAdd">扫码插入</button>
<button class="zd-col-11 button-primary ftsize1" @tap="toDel">删除行</button>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>袋号</th>
<th>物料编码</th>
<th>物料名称</th>
<th>类别</th>
<th>批号</th>
<th>数量</th>
<th>单位</th>
<th>供应商</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.leibie}}</td>
<td>{{e.pcsn}}</td>
<td>{{e.qty}}</td>
<td>{{e.unit}}</td>
<td>{{e.gys}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</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>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInDownload, queryPointInDtl, packInConfirm} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
options: [],
index: '',
val1: '',
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()
},
methods: {
toScanAdd () {
uni.scanCode({
success: (res) => {
// console.log('扫码成功:', res.result);
if (res.result.includes(';')) {
const parts = res.result.split(';')
if (parts.length !== 5) {
uni.showToast({
title: '二维码格式不正确,请扫描符合格式的二维码',
icon: 'none'
})
return
}
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: parts[0],
material_code: parts[1],
material_name: parts[2],
qty: parts[3],
measure_unit_id: parts[4],
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
} else {
let currObj = {
mid: 'mid_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9),
container_code: res.result,
material_code: '',
material_name: '',
qty: '',
measure_unit_id: ''
}
// 检查是否已存在相同卷号
const exists = this.dataList.some(item => item.container_code === currObj.container_code)
if (exists) {
uni.showToast({
title: '已存在',
icon: 'none'
})
return
}
this.dataList.push(currObj)
}
},
fail: (err) => {
console.log('扫码失败:', err)
// uni.showToast({
// title: err + '扫码失败',
// icon: 'none'
// })
}
})
},
toDel () {
if (!this.pkId) {
return
}
this.dataList = this.dataList.filter(item => item.mid !== this.pkObj.mid)
},
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
async _queryPointInDownload () {
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)
if (res && res.data.length > 0) {
this.dataList = [...res.data]
} else {
this.dataList = []
}
} catch (e) {
this.dataList = []
}
},
async _packInConfirm () {
this.disabled = true
if (!this.val1 || !this.index || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await packInConfirm(this.val1, this.index, this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>

View File

@@ -0,0 +1,265 @@
<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-6">
<span class="filter_label">桶号</span>
</view>
<view class="zd-col-18">
<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-16">
<NumberInput v-model="qty" />
</view>
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">物料编码</span>
</view>
<view class="zd-col-13">
<search-box v-model="materialData.material_code"/>
</view>
<button class="mini-btn" type="primary" @tap="toJump('material?title=物料维护')">查询</button>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">物料名称</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_name" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label filter_input_disabled">物料类别</span>
</view>
<view class="zd-col-18">
<input type="text" v-model="materialData.class_name" class="filter_input filter_input_disabled" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">批号</span>
</view>
<view class="zd-col-18">
<input type="text" v-model="pcsn" class="filter_input">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">数量</span>
</view>
<view class="zd-col-18">
<input type="number" v-model="num" class="filter_input">
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">计量单位</span>
</view>
<view class="zd-col-18">
<input type="text" class="filter_input" v-model="unit">
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_packConfirmReturn">组桶并打印</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_packConfirmReturn">确认组桶</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import {packConfirmReturn} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox,
NumberInput
},
data() {
return {
title: '',
val1: '',
materialData: {},
qty: '',
num: '',
unit: 'KG',
disabled: false,
disabled1: false,
pcsn: ''
};
},
onLoad (options) {
this.title = options.title
},
onShow () {
if (this.$store.getters.publicObj !== '') {
this.materialData = this.$store.getters.publicObj
this.$store.dispatch('setPublicObj', '')
}
},
methods: {
toJump (name) {
uni.navigateTo({
url: `/pages/hdyy/wbc/${name}`
})
},
toEmpty () {
this.val1 = ''
this.index1 = ''
this.materialData = {}
this.pcsn = ''
this.num = ''
this.unit = 'KG'
this.disabled = false
this.disabled1 = false
},
async _packConfirmReturn () {
this.disabled = true
if (!this.val1 || JSON.stringify(this.materialData) === '{}') {
this.disabled = false
return
}
try {
let res = await packConfirmReturn(this.val1, this.materialData.material_id, this.materialData.material_code, this.materialData.material_name, this.pcsn, this.num, this.mark)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
this.disabled = false
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
.input-container {
background-color: #fff;
border-radius: 16rpx;
padding: 30rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
margin-bottom: 40rpx;
}
.input-wrapper {
position: relative;
display: flex;
align-items: center;
// border: 2rpx solid #e0e0e0;
border-radius: 12rpx;
overflow: hidden;
transition: border-color 0.3s;
}
.input-wrapper:focus-within {
border-color: #007AFF;
}
.input-field {
flex: 1;
height: 80rpx;
// padding: 0 24rpx;
font-size: 28rpx;
color: #333;
}
.placeholder {
color: #999;
font-size: 28rpx;
}
.picker {
width: 80rpx;
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #f8f8f8;
border-left: 2rpx solid #e0e0e0;
}
.picker-trigger {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.picker-text {
font-size: 24rpx;
color: #666;
}
.custom-dialog-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.custom-dialog {
width: 600rpx;
background: #fff;
border-radius: 16rpx;
overflow: hidden;
}
.dialog-title {
padding: 30rpx;
font-size: 32rpx;
text-align: center;
border-bottom: 1rpx solid #eee;
}
.dialog-body {
padding: 40rpx;
}
.dialog-input {
width: 100%;
height: 80rpx;
border: 1rpx solid #ddd;
border-radius: 8rpx;
padding: 0 20rpx;
text-align: center;
}
.dialog-footer {
display: flex;
border-top: 1rpx solid #eee;
}
.dialog-footer button {
flex: 1;
border-radius: 0;
margin: 0;
}
</style>

View File

@@ -42,7 +42,7 @@
return {
userName: '',
menuList: [
{title: '通用功能', path: 'RF06', sonTree: [
{title: '通用功能', path: 'RF07', sonTree: [
{title: '入库组箱', path: '/pages/General/warehouse-box'},
{title: '配送组箱', path: '/pages/General/distribution-box'},
{title: '点对点转运', path: '/pages/General/line-transfer'},
@@ -50,12 +50,12 @@
{title: '作业管理', path: '/pages/General/ops-mgmt'},
{title: '点位更新', path: '/pages/General/pt-update'}
]},
{title: '小料箱功能', path: 'RF03', sonTree: [
{title: '小料箱功能', path: 'RF08', sonTree: [
{title: '空载具出库', path: '/pages/Material/kzj-out-store'},
{title: '空载具入库', path: '/pages/Material/kzj-in-store'},
{title: '小料箱入库', path: '/pages/Material/xlx-in-store'}
]},
{title: '大料箱功能', path: 'RF04', sonTree: [
{title: '大料箱功能', path: 'RF09', sonTree: [
{title: '空载具出入库', path: '/pages/Material/kzj-inout-store'},
{title: '料箱入库', path: '/pages/Material/lx-in-store'},
{title: '物料入库', path: '/pages/Material/mater-in-store'},
@@ -70,7 +70,33 @@
{title: '外包材送入', path: '/pages/hdyy/wbc/wbc-enter'},
{title: '外包材领用', path: '/pages/hdyy/wbc/wbc-getuse'},
{title: '外包材还回', path: '/pages/hdyy/wbc/wbc-return'}
]}
]},
{title: '空载具管理', path: 'RF02', sonTree: [
{title: '空载具入库', path: '/pages/hdyy/kzj/kzj-instore'},
{title: '空载具出库', path: '/pages/hdyy/kzj/kzj-outstore'},
{title: '空载具堆叠', path: '/pages/hdyy/kzj/kzj-duidie'}
]},
{title: '仓储管理', path: 'RF03', sonTree: [
{title: '收货入库', path: '/pages/hdyy/ccgl/sh-instore'},
{title: '直接入库', path: '/pages/hdyy/ccgl/zj-instore'},
{title: '直接出库', path: '/pages/hdyy/ccgl/zj-outstore'},
{title: '库内合盘', path: '/pages/hdyy/ccgl/kn-hepan'}
]},
{title: '组盘管理', path: 'RF04', sonTree: [
{title: '物料组袋', path: '/pages/hdyy/zpgl/mater-zudai'},
{title: '物料组盘', path: '/pages/hdyy/zpgl/mater-zupan'},
{title: '物料组桶', path: '/pages/hdyy/zpgl/mater-zutong'}
]},
{title: '生产管理', path: 'RF05', sonTree: [
{title: '成品出料', path: '/pages/hdyy/scgl/cp-chuliao'},
{title: '料桶叫料', path: '/pages/hdyy/scgl/lt-callmater'},
{title: '料桶称重', path: '/pages/hdyy/scgl/lt-weight'},
{title: '点位取货', path: '/pages/hdyy/scgl/point-quhuo'},
{title: '生产出料', path: '/pages/hdyy/scgl/sc-chuliao'},
{title: '剩料回库', path: '/pages/hdyy/scgl/sl-huiku'},
{title: '托盘叫料', path: '/pages/hdyy/scgl/tp-callmater'},
{title: '预加工出料', path: '/pages/hdyy/scgl/yjg-chuliao'}
]},
],
show: false,
secM: [],