Files
hht-xzhy-uni/pages/General/warehouse-box.vue

182 lines
4.9 KiB
Vue
Raw Normal View History

2025-09-03 09:57:06 +08:00
<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">
2025-09-03 17:08:48 +08:00
<view class="zd-col-6">
<span class="filter_label">载具编码</span>
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<view class="zd-col-18">
<search-box v-model="code1"/>
2025-09-03 09:57:06 +08:00
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
2025-09-03 17:08:48 +08:00
<span class="filter_label">物料编码</span>
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<view class="zd-col-13">
<search-box v-model="code2"/>
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<button class="mini-btn" type="primary" size="mini" @tap="toJump('material?title=物料维护')">查询</button>
2025-09-03 09:57:06 +08:00
</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">
2025-09-03 17:08:48 +08:00
<input type="text" class="filter_input filter_input_disabled" disabled>
2025-09-03 09:57:06 +08:00
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
2025-09-03 17:08:48 +08:00
<span class="filter_label">供应商编码</span>
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<view class="zd-col-13">
<search-box v-model="code3"/>
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<button class="mini-btn" type="primary" size="mini" @tap="toJump('supplier?title=供应商维护')">查询</button>
2025-09-03 09:57:06 +08:00
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
2025-09-03 17:08:48 +08:00
<span class="filter_label filter_input_disabled">供应商名称</span>
2025-09-03 09:57:06 +08:00
</view>
<view class="zd-col-18">
2025-09-03 17:08:48 +08:00
<input type="text" class="filter_input filter_input_disabled" disabled>
2025-09-03 09:57:06 +08:00
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
2025-09-03 17:08:48 +08:00
<span class="filter_label">批次</span>
2025-09-03 09:57:06 +08:00
</view>
<view class="zd-col-18">
2025-09-03 17:08:48 +08:00
<input type="text" class="filter_input">
2025-09-03 09:57:06 +08:00
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
2025-09-03 17:08:48 +08:00
<span class="filter_label">生产日期</span>
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<view class="zd-col-18 filter_picker">
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="uni-input">{{date}}</view>
</picker>
2025-09-03 09:57:06 +08:00
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
2025-09-03 17:08:48 +08:00
<span class="filter_label">重量</span>
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<view class="zd-col-16">
<input type="number" class="filter_input">
2025-09-03 09:57:06 +08:00
</view>
2025-09-03 17:08:48 +08:00
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
2025-09-03 09:57:06 +08:00
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6">
2025-09-03 17:08:48 +08:00
<span class="filter_label">品质类型</span>
2025-09-03 09:57:06 +08:00
</view>
<view class="zd-col-18 filter_select">
2025-09-03 17:08:48 +08:00
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
2025-09-03 09:57:06 +08:00
</view>
</view>
2025-09-03 17:08:48 +08:00
<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" class="filter_input">
2025-09-03 09:57:06 +08:00
</view>
</view>
</view>
</view>
2025-09-03 17:08:48 +08:00
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="toEmpty">清空</button>
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">确认组箱</button>
<button class="zd-col-9 button-primary" :class="{'button-info': !code1}" :disabled="disabled">标签打印</button>
</view>
2025-09-03 09:57:06 +08:00
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
2025-09-03 17:08:48 +08:00
import {getDate} from '@/utils/utils.js'
2025-09-03 09:57:06 +08:00
import {getStructCount, inStorageOrder, getBillNoInfo, storList, inStorageConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
2025-09-03 17:08:48 +08:00
const currentDate = getDate({
format: true
})
2025-09-03 09:57:06 +08:00
return {
title: '',
2025-09-03 17:08:48 +08:00
code1: '',
code2: '',
code3: '',
date: currentDate,
2025-09-03 09:57:06 +08:00
options: [],
index: '',
2025-09-03 17:08:48 +08:00
disabled: false
2025-09-03 09:57:06 +08:00
};
},
2025-09-03 17:08:48 +08:00
computed: {
startDate() {
return getDate('start');
},
endDate() {
return getDate('end');
}
},
2025-09-03 09:57:06 +08:00
onLoad (options) {
this.title = options.title
},
methods: {
2025-09-03 17:08:48 +08:00
toJump (name) {
uni.navigateTo({
url: `/pages/General/${name}`
})
},
bindDateChange: function(e) {
this.date = e.detail.value
},
2025-09-03 09:57:06 +08:00
/** 下拉框*/
async _inStorageOrder () {
let res = await inStorageOrder()
this.options1 = [...res]
},
handleChange1 (e) {
if (e) {
this._getBillNoInfo(e)
}
},
toEmpty () {
2025-09-03 17:08:48 +08:00
this.code1 = ''
2025-09-03 09:57:06 +08:00
},
async _inStorageConfirm () {
this.disabled = true
2025-09-03 17:08:48 +08:00
if (!this.index) {
2025-09-03 09:57:06 +08:00
this.disabled = false
return
}
try {
2025-09-03 17:08:48 +08:00
let res = await inStorageConfirm()
2025-09-03 09:57:06 +08:00
if (res.code === '200') {
this.index = ''
}
this.disabled = false
uni.showToast({
title: res.msg,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
2025-09-03 17:08:48 +08:00
</script>