This commit is contained in:
2023-07-18 16:16:43 +08:00
parent 2544cfb097
commit 999c76bc9e

View File

@@ -63,7 +63,7 @@
</div> -->
<div class="search-item_2">
<button class="button button--primary" :disabled="disabled1" @click="_washweighing">称重</button>
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value1 === '' || value2 === '' || material_spec === '' || material_code === '' || material_name === ''}" @click="toSure">确认</button>
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value2 === '' || deviceinstor_weight === '' || material_code === '' || material_spec === '' || material_name === ''}" @click="toSure">确认</button>
<button class="button button--primary" @click="toCancel">取消</button>
</div>
</div>
@@ -161,18 +161,19 @@ export default {
// 确认
async toSure () {
this.disabled2 = true
if (this.value1 === '' || this.value2 === '' || this.material_spec === '' || this.material_code === '' || this.material_name === '') {
if (this.value2 === '' || this.deviceinstor_weight === '' || this.material_code === '' || this.material_spec === '' || this.material_name === '') {
this.disabled2 = false
return
}
try {
let res = await washweighingFinish(this.value1, this.value2, this.material_spec, this.material_code, this.material_name)
let res = await washweighingFinish(this.value2, this.deviceinstor_weight, this.material_code, this.material_spec, this.material_name)
if (res.code === 200) {
this.toast(res.msg)
this.value1 = ''
this.value2 = ''
this.material_spec = ''
this.deviceinstor_weight = ''
this.material_code = ''
this.material_spec = ''
this.material_name = ''
this.$store.dispatch('setMaterObj', '')
}