|
@@ -77,7 +77,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-modal :show="logoutShow" showCancelButton :title="title" :content='content' @cancel="cancel"
|
|
<u-modal :show="logoutShow" showCancelButton :title="title" :content='content' @cancel="cancel"
|
|
- @confirm="confirm"></u-modal>
|
|
|
|
|
|
+ @confirm="confirm(200)"></u-modal>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -198,7 +198,7 @@
|
|
this.content = res.msg
|
|
this.content = res.msg
|
|
this.logoutShow = true
|
|
this.logoutShow = true
|
|
} else if (res.code == 1201) {
|
|
} else if (res.code == 1201) {
|
|
- this.confirm()
|
|
|
|
|
|
+ this.confirm(1201)
|
|
} else {
|
|
} else {
|
|
uni.$u.toast(res.msg)
|
|
uni.$u.toast(res.msg)
|
|
}
|
|
}
|
|
@@ -209,44 +209,51 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 确定
|
|
// 确定
|
|
- confirm() {
|
|
|
|
- this.logoutShow = false
|
|
|
|
|
|
+ confirm(event) {
|
|
if (this.userInfo.dept) {
|
|
if (this.userInfo.dept) {
|
|
if (!this.userInfo.dept.isOutStorage) {
|
|
if (!this.userInfo.dept.isOutStorage) {
|
|
- this.loading = true
|
|
|
|
- // 出库
|
|
|
|
- this.$api.post('/api/ice-raft/out-storage', {
|
|
|
|
- code: this.list,
|
|
|
|
- coolerBoxId: this.incubator.id,
|
|
|
|
- suitableForCold: Number(this.suitableForCold),
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.code == 200) {
|
|
|
|
- this.list = []
|
|
|
|
- this.suitableForCold = null
|
|
|
|
- this.frequencyCoding = ''
|
|
|
|
- this.incubator.id = null
|
|
|
|
- this.incubator.name = ''
|
|
|
|
- uni.showToast({
|
|
|
|
- icon: 'none',
|
|
|
|
- title: res.msg,
|
|
|
|
- duration: 3000
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- icon: 'none',
|
|
|
|
- title: res.msg,
|
|
|
|
- duration: 3000
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- this.loading = false
|
|
|
|
- })
|
|
|
|
|
|
+ this.getOutStorage()
|
|
} else {
|
|
} else {
|
|
- uni.$u.toast('冰排暂未到达冷冻要求')
|
|
|
|
|
|
+ if (event == 200) {
|
|
|
|
+ this.$message.error('冰排暂未到达冷冻要求');
|
|
|
|
+ } else if (event == 1201) {
|
|
|
|
+ this.getOutStorage()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- uni.$u.toast('当前账户无公司信息')
|
|
|
|
|
|
+ this.$message.error('当前账户无公司信息');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ getOutStorage() {
|
|
|
|
+ this.logoutShow = false
|
|
|
|
+ this.loading = true
|
|
|
|
+ // 出库
|
|
|
|
+ this.$api.post('/api/ice-raft/out-storage', {
|
|
|
|
+ code: this.list,
|
|
|
|
+ coolerBoxId: this.incubator.id,
|
|
|
|
+ suitableForCold: Number(this.suitableForCold),
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.list = []
|
|
|
|
+ this.suitableForCold = null
|
|
|
|
+ this.frequencyCoding = ''
|
|
|
|
+ this.incubator.id = null
|
|
|
|
+ this.incubator.name = ''
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: res.msg,
|
|
|
|
+ duration: 3000
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: res.msg,
|
|
|
|
+ duration: 3000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 取消
|
|
// 取消
|
|
cancel() {
|
|
cancel() {
|
|
this.logoutShow = false
|
|
this.logoutShow = false
|