解包管理
This commit is contained in:
@@ -80,7 +80,31 @@
|
||||
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-primary" @tap="_getInBillList">刷新</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !checkedArr.length}" @tap="_zwConfirmIn">提交</button>
|
||||
<!-- <button class="zd-col-11 button-primary" :class="{'button-info': !checkedArr.length}" @click="showDialog = true" @tap="_zwConfirmIn">提交</button> -->
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !checkedArr.length}" @tap="handleSubmit">提交</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>
|
||||
@@ -112,7 +136,9 @@
|
||||
pkId: '',
|
||||
currentData: {},
|
||||
flag: false,
|
||||
disabled: false
|
||||
disabled: false,
|
||||
showDialog: false, // 控制弹窗显示
|
||||
selectType: '0' // 选中的类型
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -123,6 +149,22 @@
|
||||
this._getInBillList()
|
||||
},
|
||||
methods: {
|
||||
// 关闭弹窗
|
||||
closeDialog() {
|
||||
this.showDialog = false
|
||||
},
|
||||
// 保存并关闭
|
||||
save() {
|
||||
this._zwConfirmIn()
|
||||
this.showDialog = false
|
||||
},
|
||||
handleSubmit () {
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this.showDialog = true
|
||||
},
|
||||
// async _getPlate () {
|
||||
// try {
|
||||
// let res = await getPlate(this.val1)
|
||||
@@ -182,20 +224,17 @@
|
||||
async _zwConfirmIn () {
|
||||
this.disabled = true
|
||||
this.checkedArr = this.dataList.filter(el => el.checked === true)
|
||||
if (!this.checkedArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
// 去掉checked字段再上传
|
||||
this.checkedArr.forEach(item => delete item.checked);
|
||||
let res = await zwConfirmIn(this.checkedArr)
|
||||
let res = await zwConfirmIn(this.checkedArr, this.selectType)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
this._getInBillList()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
@@ -217,5 +256,98 @@
|
||||
// background-color: transparent;
|
||||
// color: #fff;
|
||||
}
|
||||
/* 弹窗:居中 + 无遮罩 */
|
||||
.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