解包管理

This commit is contained in:
x
2026-06-01 09:25:03 +08:00
parent 321d0fb40d
commit 274886d38b
5 changed files with 670 additions and 81 deletions

View File

@@ -45,15 +45,6 @@
<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="relative zd-col-24">
<switch :checked="isChecked" color="#4e6ef2" style="transform:scale(0.8); transform-origin: left;"/>
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
@@ -61,30 +52,21 @@
<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" @tap="toChek(e)" :class="{'checked': pkId === e.workorder_id}">
<td>{{e.workorder_code}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_name}}</td>
<!-- <td>{{e.workorder_status}}</td> -->
<td>{{e.pcsn}}</td>
<td>{{e.workorder_status_name}}</td>
<td>{{e.operator}}</td>
<td>{{e.create_name}}</td>
<td>{{e.plan_weight}}</td>
<td>{{e.real_weight}}</td>
<td>{{e.plan_qty}}</td>
<td>{{e.real_qty}}</td>
</tr>
</tbody>
</table>
@@ -94,7 +76,55 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2}" @tap="seachList">查询工单</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2 || !this.val3 || !this.val2 || !this.pkId}" @tap="xlconfirm">确认出桶</button>
<!-- <button class="zd-col-11 button-primary" :class="{'button-info': !this.index2 || !this.val3 || !this.val2 || !this.pkId}" @tap="xlconfirm">确认出桶</button> -->
<button class="zd-col-11 button-primary" :class="{'button-info': !this.index2 || !this.val3 || !this.val2 || !this.pkId}" @tap="handleSubmit">确认出桶</button>
</view>
<!-- 弹窗层级最高不会被覆盖 -->
<view class="dialog" v-if="showDialog">
<!-- 第一行转运类型不换行 -->
<view class="form-line">
<text class="label no-wrap">转运类型</text>
<view class="radio-group">
<view class="radio-item" :class="{active: selectType === '0'}" @click="selectType = '0'">
<view class="circle"><view class="dot" v-if="selectType === '0'"></view></view>
<text class="text">人工转运</text>
</view>
<view class="radio-item" :class="{active: selectType === '1'}" @click="selectType = '1'">
<view class="circle"><view class="dot" v-if="selectType === '1'"></view></view>
<text class="text">AGV转运</text>
</view>
</view>
</view>
<!-- 第二行库位信息带下拉箭头 -->
<view class="form-line">
<text class="label no-wrap">库位信息</text>
<view class="select-box" @click="openSelect">
<text class="select-text">{{ selectStructName || '请选择' }}</text>
<!-- 下拉箭头 -->
<view class="arrow-down"></view>
</view>
</view>
<!-- 按钮组 -->
<view class="btn-group">
<button class="btn cancel" @click="closeDialog">取消</button>
<button class="btn save" @click="save">保存</button>
</view>
</view>
<!-- 库位选择弹窗最高层级 -->
<view class="select-popup" v-if="showSelect" @click="showSelect = false">
<view class="select-content" @click.stop>
<view
class="select-item"
v-for="item in structList"
:key="item.struct_code"
@click="selectStruct(item)"
>
{{ item.struct_name }}
</view>
</view>
</view>
</view>
</template>
@@ -102,7 +132,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {regionList, pointList, getWeight, jbGetVehicleCode, getOrderList, downMaterial} from '@/utils/getData4.js'
import {regionList, pointList, getWeight, jbGetVehicleCode, getOrderList, downMaterial, structListByWorkId} from '@/utils/getData4.js'
export default {
components: {
NavBar,
@@ -127,7 +157,6 @@
dupWeight: '',
orgWeight: '',
standError: '',
isChecked: false,
disabled: false,
statusMap: {
'1': '未生产',
@@ -145,7 +174,18 @@
},
totalCount: 0,
pageNum: 1,
pageSize: 100
pageSize: 100,
showDialog: false,
selectType: '0',
showSelect: false,
selectStructName: '',
selectStructCode: '',
// structList: [
// { struct_code: 'A01', struct_name: 'A区01库位' },
// { struct_code: 'A02', struct_name: 'A区02库位' },
// { struct_code: 'B01', struct_name: 'B区01库位' },
// ]
structList: []
};
},
onLoad (options) {
@@ -156,6 +196,32 @@
this._pointList('DDJBQ')
},
methods: {
closeDialog() {
this.showDialog = false
},
save() {
this.xlconfirm()
this.showDialog = false
},
handleSubmit () {
if (!this.index2 || !this.val3 || !this.val2 || !this.pkId) {
this.disabled = false
return
}
this.showDialog = true
},
openSelect() {
if (!this.pkId) {
return
}
this._structListByWorkId()
this.showSelect = true
},
selectStruct(item) {
this.selectStructCode = item.struct_code
this.selectStructName = item.struct_name
this.showSelect = false
},
handleBlur () {
if (this.val3) {
if (this.val3 < 0) {
@@ -190,6 +256,12 @@
// })
}
},
async _structListByWorkId () {
let res = await structListByWorkId(this.pkId)
if (res.code === '200') {
this.structList = res.data
}
},
async _regionList () {
try {
let res = await regionList()
@@ -282,10 +354,12 @@
this.index2 = ''
this.val2 = ''
this.val3 = ''
this.isChecked = false
this.dataList = []
this.pageNum = 1
this.pkId = ''
this.selectStructName = ''
this.selectStructCode = ''
this.structList = []
},
async _getWeight () {
if (!this.index2) {
@@ -364,8 +438,7 @@
},
async _downMaterial () {
try {
let check = this.isChecked ? '1' : '0'
let res = await downMaterial(this.pkId, 'DDJBQ', this.val3, this.index2, this.val1, this.val2, check)
let res = await downMaterial(this.pkId, 'DDJBQ', this.val3, this.index2, this.val1, this.val2, this.selectType, this.selectStructCode, this.selectStructName)
if (res.code === '200') {
uni.showToast({
title: res.message,
@@ -382,10 +455,139 @@
} catch (e) {
this.disabled = false
}
},
setWStatus () {
this.isChecked = !this.isChecked
}
}
}
</script>
<style lang="stylus" scoped>
/* 弹窗最高层级 永远在最上层 */
.dialog {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
max-width: 650rpx;
background: #fff;
border-radius: 16rpx;
z-index: 9999 !important; /* 最高层级 */
overflow: hidden;
}
.form-line {
display: flex;
align-items: center;
padding: 30rpx 40rpx;
}
.label {
font-size: 30rpx;
width: 140rpx;
flex-shrink: 0;
}
.no-wrap {
white-space: nowrap;
}
/* 单选样式 */
.radio-group {
display: flex;
align-items: center;
}
.radio-item {
display: flex;
align-items: center;
margin-right: 50rpx;
}
.circle {
width: 36rpx;
height: 36rpx;
border: 2rpx solid #ccc;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
}
.dot {
width: 20rpx;
height: 20rpx;
background: #007aff;
border-radius: 50%;
}
.radio-item.active .circle {
border-color: #007aff;
}
.text {
font-size: 30rpx;
white-space: nowrap;
}
/* 下拉框 + 箭头 */
.select-box {
flex: 1;
padding: 20rpx;
border: 2rpx solid #eee;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.select-text {
font-size: 28rpx;
color: #666;
}
/* 下拉箭头 */
.arrow-down {
width: 0;
height: 0;
border-left: 8rpx solid transparent;
border-right: 8rpx solid transparent;
border-top: 10rpx solid #999;
}
/* 库位选择弹层(比主弹窗更高) */
.select-popup {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.2);
z-index: 99999 !important;
display: flex;
align-items: center;
justify-content: center;
}
.select-content {
width: 70%;
max-width: 500rpx;
background: #fff;
border-radius: 12rpx;
overflow: hidden;
}
.select-item {
padding: 28rpx;
font-size: 30rpx;
text-align: center;
border-bottom: 1rpx solid #eee;
}
/* 按钮 */
.btn-group {
display: flex;
border-top: 1rpx solid #eee;
}
.btn {
flex: 1;
height: 90rpx;
line-height: 90rpx;
font-size: 30rpx;
border: none;
background: #fff;
}
.cancel {
border-right: 1rpx solid #eee;
color: #666;
}
.save {
color: #007aff;
font-weight: 500;
}
</style>