解包管理
This commit is contained in:
@@ -27,30 +27,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>
|
||||
@@ -60,9 +51,32 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index2}" @tap="seachList">查询工单</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index2 || !pkId}" @tap="_callMaterial">开工</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index2 || !pkId}" @tap="handleSubmit">开工</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index2}" @tap="_callMaterialFinish">上料完成</button>
|
||||
</view>
|
||||
<!-- 弹窗(无遮罩) -->
|
||||
<view class="dialog" v-if="showDialog">
|
||||
<!-- 转运类型:横排不换行 -->
|
||||
<view class="form-line">
|
||||
<text class="label">转运类型:</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="btn-group">
|
||||
<button class="btn cancel" @click="closeDialog">取消</button>
|
||||
<button class="btn save" @click="save">保存</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -88,6 +102,8 @@
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false,
|
||||
showDialog: false, // 控制弹窗显示
|
||||
selectType: '0', // 选中的类型
|
||||
statusMap: {
|
||||
'1': '未开始',
|
||||
'3': '生产中',
|
||||
@@ -113,6 +129,22 @@
|
||||
this._regionList()
|
||||
},
|
||||
methods: {
|
||||
// 关闭弹窗
|
||||
closeDialog() {
|
||||
this.showDialog = false
|
||||
},
|
||||
// 保存并关闭
|
||||
save() {
|
||||
this._callMaterial()
|
||||
this.showDialog = false
|
||||
},
|
||||
handleSubmit () {
|
||||
if (!this.index2 || !this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this.showDialog = true
|
||||
},
|
||||
// 获取状态名称
|
||||
getStatusName (status) {
|
||||
return this.statusMap[status] || ''
|
||||
@@ -204,12 +236,8 @@
|
||||
},
|
||||
async _callMaterial () {
|
||||
this.disabled = true
|
||||
if (!this.index2 || !this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await callMaterial(this.pkId, this.index2, this.index)
|
||||
let res = await callMaterial(this.pkId, this.index2, this.index, this.selectType)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
@@ -255,3 +283,98 @@
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="stylus" scoped>
|
||||
/* 弹窗:居中 + 无遮罩 */
|
||||
.dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 90%;
|
||||
max-width: 600rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
z-index: 100;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 转运类型行 */
|
||||
.form-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 40rpx;
|
||||
padding-top: 50rpx;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 30rpx;
|
||||
width: 150rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 单选组:横排 + 不换行 */
|
||||
.radio-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.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; /* 强制不换行 */
|
||||
}
|
||||
|
||||
/* 底部按钮 */
|
||||
.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>
|
||||
Reference in New Issue
Block a user