add 管芯入库/管芯出库/套轴绑定

This commit is contained in:
蔡玲
2024-09-05 11:23:55 +08:00
parent 0e030c7fb4
commit 9e0e2b208d
9 changed files with 503 additions and 282 deletions

View File

@@ -17,9 +17,9 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_startMoveWasteFoilv2">开始</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_resumeMoveWasteFoilv2('1')">确认</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_resumeMoveWasteFoilv2('2')">结束</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="toSure1">开始</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="toSure2('1')">确认</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="toSure2('2')">结束</button>
</view>
</view>
</template>
@@ -46,12 +46,26 @@
this.title = options.title
},
methods: {
async _startMoveWasteFoilv2 () {
async toSure1 () {
this.disabled = true
if (!this.val1) {
this.disabled = false
return
}
uni.showModal({
title: '提示',
content: '请开始废箔搬运',
confirmColor: '#ff6a00',
success: (res) => {
if (res.confirm) {
this._startMoveWasteFoilv2()
} else if (res.cancel) {
this.disabled = false
}
}
})
},
async _startMoveWasteFoilv2 () {
try {
let res = await startMoveWasteFoilv2(this.val1)
this.clearUp()
@@ -63,12 +77,30 @@
this.disabled = false
}
},
async _resumeMoveWasteFoilv2 (type) {
toSure2 (type) {
this.disabled = true
if (!this.val1) {
this.disabled = false
return
}
if (type === '1') {
uni.showModal({
title: '提示',
content: '请确认废箔搬运',
confirmColor: '#ff6a00',
success: (res) => {
if (res.confirm) {
this._resumeMoveWasteFoilv2(type)
} else if (res.cancel) {
this.disabled = false
}
}
})
} else {
this._resumeMoveWasteFoilv2(type)
}
},
async _resumeMoveWasteFoilv2 (type) {
try {
let res = await resumeMoveWasteFoilv2(type, this.val1)
this.clearUp()