分切下料弹窗

This commit is contained in:
2024-07-24 17:24:38 +08:00
parent 2abcde585f
commit 68dd8eee47
21 changed files with 2122 additions and 7 deletions

View File

@@ -23,8 +23,11 @@
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">清空</button>
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !index}" :disabled="disabled" @tap="_downRolls">确认</button>
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !index}" @tap="toSure">确认</button>
</view>
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog type="info" cancelText="关闭" confirmText="确定" title="提示" content="确认是否创建下卷桁架任务?" @confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
@@ -45,7 +48,6 @@
index: '',
options2: [],
index2: '',
disabled: false,
obj: {up: '-', down: '-', msg: '-'}
};
},
@@ -81,21 +83,24 @@
this.obj = {up: '-', down: '-', msg: '-'}
}
},
async _downRolls () {
this.disabled = true
toSure () {
if (!this.index) {
this.disabled = false
return
}
this.$refs.alertDialog.open()
},
dialogConfirm () {
this._downRolls()
},
async _downRolls () {
try {
let res = await downRolls(this.index)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
} catch (e) {
this.disabled = false
console.log(e)
}
},
clearUp () {