|
@@ -55,6 +55,8 @@
|
|
|
</view>
|
|
|
<view class="btn uni-row" style="margin-top: 48rpx;" @click.stop="handleConfirm">确定</view>
|
|
|
</view>
|
|
|
+ <dialog-processInspection ref='selectProcessInspection'
|
|
|
+ @handleSelectProcessInspection='handleSelectProcessInspection'></dialog-processInspection>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -90,6 +92,7 @@
|
|
|
const userId = ref(null)
|
|
|
const equipment = ref(null)
|
|
|
const lot = ref({})
|
|
|
+ const selectProcessInspection = ref(null)
|
|
|
const query = ref({})
|
|
|
// 页面生命周期函数
|
|
|
const handleScanCode = () => {
|
|
@@ -196,7 +199,7 @@
|
|
|
)
|
|
|
} else {
|
|
|
const result = {
|
|
|
- carrierCode: '300027',
|
|
|
+ carrierCode: '100273',
|
|
|
deptId: store.curDeptDetails.deptId
|
|
|
}
|
|
|
getCarrierInfo(result).then(response => {
|
|
@@ -297,6 +300,53 @@
|
|
|
console.log(userList.value)
|
|
|
userId.value = userList.value[0].value
|
|
|
}
|
|
|
+ //选择批号弹窗带回
|
|
|
+ function handleSelectProcessInspection(data) {
|
|
|
+ console.log("带回", data)
|
|
|
+ query.value.lotCode = data
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
+ getFirstInspectionLotInfo(query.value).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ console.log(res)
|
|
|
+
|
|
|
+ if (res.data.dayworkItemList.length == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: "该批次当天没有报工",
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ console.log("888")
|
|
|
+ getUser(res.data.dayworkItemList)
|
|
|
+ getEquipment(res.data.dayworkItemList)
|
|
|
+ lot.value = {
|
|
|
+ ...lot.value,
|
|
|
+ ...res.data
|
|
|
+ };
|
|
|
+ lot.value.carrierCode = query.value.carrierCode
|
|
|
+ carrierCode.value = query.value.carrierCode;
|
|
|
+ // console.log("res", res);
|
|
|
+ uni.hideLoading();
|
|
|
+ // 判断是否批次号和检查箱码都扫完
|
|
|
+ checkSave()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.msg,
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: err.message,
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
function checkSave() {
|
|
|
if (lot.value.lotCode == '' || lot.value.lotCode == null) {
|