Browse Source

修改计划报工查询单据号

hella_online_20240821
lijuncheng 8 months ago
parent
commit
cfd75ddf93
  1. 4
      src/manifest.json
  2. 46
      src/pages/fg/receiptByPlan.vue

4
src/manifest.json

@ -3,8 +3,8 @@
"package" : "uni.UNI43932FE", "package" : "uni.UNI43932FE",
"appid" : "__UNI__C9CF4BF", "appid" : "__UNI__C9CF4BF",
"description" : "", "description" : "",
"versionName" : "1.0.66", "versionName" : "1.0.67",
"versionCode" : 66, "versionCode" : 67,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

46
src/pages/fg/receiptByPlan.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="page-wraper" style="background-color: #fff;"> <view class="page-wraper" style="background-color: #fff;">
<view class="header" > <view class="header">
<view class=""> <view class="">
<com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view> <com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view>
</view> </view>
@ -132,7 +132,9 @@
import { import {
Exception Exception
} from 'sass'; } from 'sass';
import { nextTick } from 'vue'; import {
nextTick
} from 'vue';
export default { export default {
components: { components: {
@ -273,9 +275,9 @@ import { nextTick } from 'vue';
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
let list = [] let list = []
try{ try {
var planData = await planReceiptSubmit(params) var planData = await planReceiptSubmit(params)
console.log('planData',planData) console.log('planData', planData)
if (planData.data) { if (planData.data) {
planData.data.forEach(item => { planData.data.forEach(item => {
@ -300,9 +302,9 @@ import { nextTick } from 'vue';
} else { } else {
throw new Error("提交失败") throw new Error("提交失败")
} }
}catch(error){ } catch (error) {
console.log('异常',error) console.log('异常', error)
if(error.indexOf('请返回开工阶段')>-1){ if (error.indexOf('请返回开工阶段') > -1) {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage('计划已完成') this.showErrorMessage('计划已完成')
this.clearData() this.clearData()
@ -333,21 +335,16 @@ import { nextTick } from 'vue';
var queryParams = { var queryParams = {
filters: [{ filters: [{
column: "plan_type",
action: "==",
value: "assemble"
},
{
column: "number", column: "number",
action: "==", action: "==",
value: this.dataContent.planNumber value: this.dataContent.planNumber
} }],
],
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
} }
let isAllSubmit = Number(Number(this.dataContent.goodQty)+ Number(this.showList.length))==Number(this.dataContent.planQty) let isAllSubmit = Number(Number(this.dataContent.goodQty) + Number(this.showList.length)) ==
Number(this.dataContent.planQty)
var planeInfo = await getPlanByNumber(queryParams); var planeInfo = await getPlanByNumber(queryParams);
if (planeInfo.data && planeInfo.data.list.length > 0) { if (planeInfo.data && planeInfo.data.list.length > 0) {
@ -370,16 +367,16 @@ import { nextTick } from 'vue';
// throw new Error("") // throw new Error("")
// } // }
uni.hideLoading() uni.hideLoading()
if(isAllSubmit){ if (isAllSubmit) {
this.clearData() this.clearData()
}else{ } else {
this.showList = []; this.showList = [];
this.allList = []; this.allList = [];
this.index = 1; this.index = 1;
this.dataContent.handleQty = 0; this.dataContent.handleQty = 0;
} }
nextTick(()=>{ nextTick(() => {
this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list)
}) })
@ -469,7 +466,8 @@ import { nextTick } from 'vue';
// this.dataContent.handleQty = this.allList.length; // this.dataContent.handleQty = this.allList.length;
// dataContent.noGoodQty // dataContent.noGoodQty
if (this.dataContent.handleQty == this.dataContent.packQty || (this.dataContent.noGoodQty<this.dataContent.packQty&&this.dataContent.handleQty == this.dataContent.noGoodQty)) { if (this.dataContent.handleQty == this.dataContent.packQty || (this.dataContent.noGoodQty < this
.dataContent.packQty && this.dataContent.handleQty == this.dataContent.noGoodQty)) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
} }
@ -487,7 +485,7 @@ import { nextTick } from 'vue';
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
} }
}, },
getH5BatchPrintingLable( number) { getH5BatchPrintingLable(number) {
let _this = this let _this = this
batchPrintingLable(number).then(resLable => { batchPrintingLable(number).then(resLable => {
console.log('batchPrintingLable', resLable) console.log('batchPrintingLable', resLable)
@ -503,7 +501,7 @@ import { nextTick } from 'vue';
_this.showErrorMessage(error) _this.showErrorMessage(error)
}) })
}, },
print(pointData){ print(pointData) {
let _this = this let _this = this
// #ifdef APP // #ifdef APP
@ -515,10 +513,10 @@ import { nextTick } from 'vue';
// #endif // #endif
// #ifdef H5 // #ifdef H5
let packingNumber = [] let packingNumber = []
pointData.forEach(item=>{ pointData.forEach(item => {
packingNumber.push(item.packageCode) packingNumber.push(item.packageCode)
}) })
if(packingNumber.length==0){ if (packingNumber.length == 0) {
_this.showErrorMessage('包装号不能为空!') _this.showErrorMessage('包装号不能为空!')
return return
} }
@ -555,8 +553,6 @@ import { nextTick } from 'vue';
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item { .item {
background-color: #fff; background-color: #fff;
} }

Loading…
Cancel
Save