维修作业
This commit is contained in:
@@ -46,8 +46,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar">
|
<view class="submit-bar">
|
||||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="toSure1">开始维修</button>
|
<button class="submit-button" :class="{'btn-disabled': !pkId || pkObj.invstatus !== '02'}" :disabled="disabled" @tap="toSure1">开始维修</button>
|
||||||
<button class="submit-button" :class="{'btn-disabled': !pkId}" @tap="toJump">结束维修</button>
|
<button class="submit-button" :class="{'btn-disabled': !pkId || pkObj.invstatus !== '03'}" @tap="toJump">结束维修</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -105,6 +105,14 @@
|
|||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.pkObj.invstatus !== '02') {
|
||||||
|
this.disabled = false
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择提交状态行数据',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let res = await deviceRepairBegin(this.pkObj)
|
let res = await deviceRepairBegin(this.pkObj)
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
@@ -124,12 +132,20 @@
|
|||||||
this.pkObj = this.pkId === e.device_code ? e : {}
|
this.pkObj = this.pkId === e.device_code ? e : {}
|
||||||
},
|
},
|
||||||
toJump () {
|
toJump () {
|
||||||
if (this.pkId) {
|
if (!this.pkId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.pkObj.invstatus !== '03') {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请选择维修开始状态行数据',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/device/RepairFill'
|
url: '/pages/device/RepairFill'
|
||||||
})
|
})
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user