|
|
@@ -71,11 +71,11 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="button-area">
|
|
|
- <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn()">锁定</view>
|
|
|
+ <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn(orderInfo)">锁定</view>
|
|
|
<view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="modifyItem(orderInfo)">修改</view>
|
|
|
<view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn()">完成</view>
|
|
|
<view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn(orderInfo)">打印</view>
|
|
|
- <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn()">取消</view>
|
|
|
+ <view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn(orderInfo)">取消</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 选数量金额 -->
|
|
|
@@ -125,14 +125,18 @@ export default {
|
|
|
},
|
|
|
methods:{
|
|
|
printFn(item){
|
|
|
- print({id:item.id}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- this.$msg(res.msg)
|
|
|
- }
|
|
|
- })
|
|
|
+ if(item.status ==1){
|
|
|
+ print({id:item.id}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.$msg(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
- lockFn(){
|
|
|
- this.$refs.lockWorkRef.open('center')
|
|
|
+ lockFn(info){
|
|
|
+ if(info.stockLock == 0){
|
|
|
+ this.$refs.lockWorkRef.open('center')
|
|
|
+ }
|
|
|
},
|
|
|
confirmLock(){
|
|
|
uni.showLoading({mask:true})
|
|
|
@@ -144,8 +148,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- cancelFn(){
|
|
|
- this.$refs.cancelWorkRef.open('center')
|
|
|
+ cancelFn(info){
|
|
|
+ if(info.status == 0){
|
|
|
+ this.$refs.cancelWorkRef.open('center')
|
|
|
+ }
|
|
|
},
|
|
|
confirmCancel(){
|
|
|
uni.showLoading({mask:true})
|
|
|
@@ -175,8 +181,10 @@ export default {
|
|
|
cancelWastageSelectNum(){
|
|
|
this.$refs.wastageSelectNumRef.close()
|
|
|
},
|
|
|
- finishFn(){
|
|
|
- this.$refs.finishRef.open('center')
|
|
|
+ finishFn(info){
|
|
|
+ if(info.status == 0){
|
|
|
+ this.$refs.finishRef.open('center')
|
|
|
+ }
|
|
|
},
|
|
|
confirmFinish(){
|
|
|
uni.showLoading({mask:true})
|
|
|
@@ -193,8 +201,10 @@ export default {
|
|
|
this.$refs.finishWorkRef.close()
|
|
|
},
|
|
|
modifyItem(info){
|
|
|
- this.$util.hitVoice()
|
|
|
- this.$util.pageTo({url:'/pages/home/modify',query: { id:info.id }})
|
|
|
+ if(info.stockLock == 0){
|
|
|
+ this.$util.hitVoice()
|
|
|
+ this.$util.pageTo({url:'/pages/home/modify',query: { id:info.id }})
|
|
|
+ }
|
|
|
},
|
|
|
getStatus(status) {
|
|
|
status = Number(status)
|