You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
2.7 KiB
119 lines
2.7 KiB
<template> |
|
<ifrm ref="ifrm"> |
|
<!-- 大仓派活 --> |
|
<uni-forms ref="form"> |
|
<uni-forms-item |
|
><input |
|
type="text" |
|
v-model="cradNo" |
|
@confirm="cradConfirm" |
|
class="uni-input-border" |
|
placeholder="请扫描流程卡" |
|
/></uni-forms-item> |
|
</uni-forms> |
|
<!-- <t-table style="margin-top:20rpx"> |
|
<t-tr> |
|
<t-td>厂内生产</t-td> |
|
<t-td> |
|
<switch :checked="unFsBool" @change="switchChange" /> |
|
</t-td> |
|
</t-tr> |
|
<t-tr> |
|
<t-td>流程卡</t-td> |
|
<t-td>{{ cradNoText }}</t-td> |
|
</t-tr> |
|
<t-tr> |
|
<t-td>处理班组/供应商</t-td> |
|
<t-td>{{ makeTeam }}</t-td> |
|
</t-tr> |
|
</t-table> --> |
|
</ifrm> |
|
</template> |
|
|
|
<script> |
|
import ifrm from "@/pages/index/ifrm"; |
|
import tTable from "@/components/t-table/t-table.vue"; |
|
import tTh from "@/components/t-table/t-th.vue"; |
|
import tTr from "@/components/t-table/t-tr.vue"; |
|
import tTd from "@/components/t-table/t-td.vue"; |
|
import scan from "../../mixin/scan.js"; |
|
export default { |
|
mixins: [scan], |
|
components: { |
|
ifrm, |
|
tTable, |
|
tTh, |
|
tTr, |
|
tTd, |
|
}, |
|
data() { |
|
return { |
|
cradNo: "", |
|
makeTeam: "", |
|
cradNoText: "", |
|
unFsBool: false, |
|
getDataFun: true, |
|
}; |
|
}, |
|
methods: { |
|
switchChange(e) { |
|
this.unFsBool = e.target.value; |
|
}, |
|
cradConfirm(e) { |
|
this.getBarCode(e.target.value); |
|
}, |
|
getBarCode(code, isConfirm = false) { |
|
if (this.getDataFun) { |
|
this.getData(code); |
|
} |
|
}, |
|
getData(code) { |
|
this.cradNo = code; |
|
this.cradNoText = code; |
|
if (!this.cradNo) return; |
|
this.getDataFun = false; |
|
this.$u.api |
|
.yieldOrderConfirm() |
|
.then((res) => { |
|
let data = res.data |
|
this.makeTeam = data; |
|
uni.showToast({ |
|
title: "操作成功", |
|
}); |
|
this.cradNo = ""; |
|
this.unFsBool = false; |
|
}) |
|
.catch((err) => { |
|
this.getDataFun = true; |
|
}); |
|
// this.$ajax.request({ |
|
// url: 'pdaLoad/loadBigWmsSend/' + code + '/' + this.unFsBool, |
|
// method: 'GET', |
|
// success: data => { |
|
// this.makeTeam = data; |
|
// uni.showToast({ |
|
// title: '派活成功' |
|
// }); |
|
// this.cradNo = '' |
|
// this.unFsBool = false |
|
// }, |
|
// complete: () => { |
|
// this.getDataFun = true |
|
// } |
|
// }); |
|
}, |
|
}, |
|
onNavigationBarButtonTap(btn) { |
|
this.$refs.ifrm.topMenuClick(btn); |
|
}, |
|
}; |
|
</script> |
|
|
|
<style scoped> |
|
.tabsBox { |
|
margin-top: 40rpx; |
|
} |
|
|
|
.contentBox { |
|
} |
|
</style> |