diff --git a/src/api/request2.js b/src/api/request2.js
index 8dc5ef33..c20c616f 100644
--- a/src/api/request2.js
+++ b/src/api/request2.js
@@ -568,7 +568,7 @@ export function getBasicItemByCodeSenior(itemCode) {
}],
pageNo: 1,
pageSize: 1000
- }
+ }
return request({
url: baseApi + "/wms/itembasic/senior",
method: "post",
@@ -4114,6 +4114,21 @@ export function getBalanceByFilter(param) {
});
}
+
+
+/**
+ * 查询库存事务
+ * @param {*}
+ *
+ */
+export function getTransactionByFilter(param) {
+ return request({
+ url: baseApi + "/wms/transaction/senior",
+ method: "post",
+ data: param,
+ });
+}
+
/**
* 查询管理精度,多个物料,多个库位
* @param {*}
@@ -4492,4 +4507,31 @@ export function fgChangeCommit(params) {
method: "post",
data: params,
});
-}
\ No newline at end of file
+}
+
+/**
+ * 查询物料与库位关系
+ */
+export function checkItemCodeAndLocation(params) {
+ return request({
+ url: baseApi + "/wms/location/checkRecommendLocation",
+ method: "post",
+ data: params,
+ });
+}
+
+/**
+ * 库存余额根据业务类型汇总接口
+ */
+export function getBalanceByBusinessType(params) {
+ return request({
+ url: baseApi + "/wms/balance/summaryByBusinessType",
+ method: "get",
+ data: params,
+ });
+}
+
+
+
+
+
diff --git a/src/common/record.js b/src/common/record.js
index df840606..6cbcb38b 100644
--- a/src/common/record.js
+++ b/src/common/record.js
@@ -39,7 +39,7 @@ export function createDetailInfo(balance, pack) {
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
- detail.packQty = pack.packQty?new Decimal(pack.packQty).toNumber():0
+ detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber();
detail.package = pack;
@@ -49,6 +49,21 @@ export function createDetailInfo(balance, pack) {
return detail;
}
+
+export function createDetailByPackInfo(pack) {
+
+ // data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
+ // data.inventoryStatus = data.inventoryStatus;
+ let detail = deepCopyData(pack); detail.scaned = true;
+ detail.balanceQty = new Decimal(detail.qty).toNumber()
+ detail.qty = new Decimal(detail.qty).toNumber();
+ detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
+ detail.packUnit = pack.packUnit
+ detail.handleQty = new Decimal(detail.qty).toNumber();
+ detail.package = pack;
+ return detail;
+}
+
//计算实际数量
export function calcHandleQty(detailSource) {
for (let item of detailSource) {
diff --git a/src/mycomponents/balance/balance.vue b/src/mycomponents/balance/balance.vue
index b4ed53fb..fc5582ab 100644
--- a/src/mycomponents/balance/balance.vue
+++ b/src/mycomponents/balance/balance.vue
@@ -2,7 +2,8 @@
-
+
@@ -91,6 +92,10 @@
type: Boolean,
default: false
},
+ isShowParentPack: {
+ type: Boolean,
+ default: true
+ },
},
watch: {
diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue
index 4dcd4b84..32d1546f 100644
--- a/src/mycomponents/job/jobFilter.vue
+++ b/src/mycomponents/job/jobFilter.vue
@@ -198,6 +198,8 @@
return params;
},
reset(){
+ this.checkedTodayModel = false
+ this.checkedWaitModel = false
this.productionLineCode = ''
this.fromLocationCode = ''
this.fromAreaCode = ''// 来源库区
diff --git a/src/mycomponents/query/balanceQuery.vue b/src/mycomponents/query/balanceQuery.vue
index 0a3bee4d..3e138217 100644
--- a/src/mycomponents/query/balanceQuery.vue
+++ b/src/mycomponents/query/balanceQuery.vue
@@ -39,28 +39,28 @@
-
-
+
+
- 序号
批次
- 库位
+ 库位
状态
数量
- {{index+1}}
{{item.batch}}
{{item.locationCode}}
{{statusDesc(item.inventoryStatus)}}
- {{item.qty}}
+ {{item.totalQty}}
-
+
+
-
+
+
+
+
\ No newline at end of file
diff --git a/src/pages.json b/src/pages.json
index fa471c6d..a9689c54 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -629,6 +629,41 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "pages/issue/job/issueJob0816",
+ "style": {
+ "navigationBarTitleText": "发料任务0816",
+ "enablePullDownRefresh": true,
+ "titleNView": {
+ "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "path": "pages/issue/job/issueDetail0816",
+ "style": {
+ "navigationBarTitleText": "发料任务详情0816",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "pages/issue/record/issueRecord",
"style": {
@@ -784,7 +819,25 @@
"navigationBarTitleText": "直接补料",
"enablePullDownRefresh": false,
"titleNView": {
- "autoBackButton": "true"
+ "autoBackButton": "true",
+ "buttons": [
+ // 右边按钮
+ {
+
+ "float": "right",
+ "fontSize": "58rpx", //按钮上文字的大小
+ "text": "\ue696",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+
+ },
+ {
+
+ "float": "right",
+ "fontSize": "52rpx", //按钮上文字的大小
+ "text": "\ue6e2",
+ "fontSrc": "/static/ali_icon/iconfont.ttf"
+ }
+ ]
}
}
},
diff --git a/src/pages/fg/receiptByPlan.vue b/src/pages/fg/receiptByPlan.vue
index 74c31bcc..ad34b963 100644
--- a/src/pages/fg/receiptByPlan.vue
+++ b/src/pages/fg/receiptByPlan.vue
@@ -273,30 +273,43 @@ import { nextTick } from 'vue';
console.log(JSON.stringify(params))
let list = []
- var planData = await planReceiptSubmit(params)
- if (planData.data) {
-
- planData.data.forEach(item => {
- list.push({
- itemCode: item.itemCode, // 物品代码
- itemName: item.itemName, // 物品名称
- packName: item.packName, // 包装名称
- packageCode: item.toPackingNumber, // 包装号
- batch: item.toBatch, //批次
- parentNumber: item.parentNumber, //父包装号
- itemType: item.itemType, //物料类型
- asnNumber: item.asnNumber, //ASN
- supplierCode: item.supplierCode, // 供应商
- qty: item.qty, // 数量
- printTimes: getCurrDateTime(), // 打印时间
- productionLineCode: item.productionLineCode, //生产线
- barcodeString: item.barcodeString, // 标签信息
- barcodeBase64: '',
- requestNumber: item.requestNumber
+ try{
+ var planData = await planReceiptSubmit(params)
+ console.log('planData',planData)
+ if (planData.data) {
+
+ planData.data.forEach(item => {
+ list.push({
+ itemCode: item.itemCode, // 物品代码
+ itemName: item.itemName, // 物品名称
+ packName: item.packName, // 包装名称
+ packageCode: item.toPackingNumber, // 包装号
+ batch: item.toBatch, //批次
+ parentNumber: item.parentNumber, //父包装号
+ itemType: item.itemType, //物料类型
+ asnNumber: item.asnNumber, //ASN
+ supplierCode: item.supplierCode, // 供应商
+ qty: item.qty, // 数量
+ printTimes: getCurrDateTime(), // 打印时间
+ productionLineCode: item.productionLineCode, //生产线
+ barcodeString: item.barcodeString, // 标签信息
+ barcodeBase64: '',
+ requestNumber: item.requestNumber
+ })
})
- })
- } else {
- throw new Error("提交失败")
+ } else {
+ throw new Error("提交失败")
+ }
+ }catch(error){
+ console.log('异常',error)
+ if(error.indexOf('请返回开工阶段')>-1){
+ uni.hideLoading()
+ this.showErrorMessage('计划已完成')
+ this.clearData()
+ this.openFg();
+ return
+ }
+
}
//装配收货记录 生成后 创建 制品上架申请
diff --git a/src/pages/inventoryMove/coms/comMoveJob.vue b/src/pages/inventoryMove/coms/comMoveJob.vue
index fd6ab5f2..4e77583f 100644
--- a/src/pages/inventoryMove/coms/comMoveJob.vue
+++ b/src/pages/inventoryMove/coms/comMoveJob.vue
@@ -1,9 +1,9 @@
-
+ :checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter">
@@ -67,7 +67,15 @@
title: {
type: String,
default: ""
- }
+ },
+ isShowItemCode: {
+ type: Boolean,
+ default: false
+ },
+ isShowQurery: {
+ type: Boolean,
+ default: false
+ },
},
data() {
return {
@@ -82,7 +90,8 @@
status: '1,2', //待处理 、进行中
detailOptions: [],
detailGiveupOptions: [],
- titleName:""
+ titleName:"",
+ filterItemCode:''
};
},
@@ -172,6 +181,15 @@
value: this.status
})
+ if(this.filterItemCode){
+ // 物料代码
+ filters.push({
+ column: "itemCode",
+ action: "like",
+ value: this.filterItemCode
+ })
+ }
+
filters.push({
column: "accept_user_id",
action: "==",
@@ -194,14 +212,14 @@
uni.stopPullDownRefresh();
}
- var list = res.data.list;
+ let list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
+ this.jobList = type === "refresh" ? list : this.jobList.concat(list);
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
- this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
this.updateTitle();
}).catch(error => {
@@ -260,6 +278,27 @@
this.showMessage(error)
})
},
+ getListByFilter(params) {
+ console.log('getListByFilter',params)
+ if (params.itemCode) {
+ // 物料代码
+ this.filterItemCode = params.itemCode
+ }else{
+ this.filterItemCode = ''
+ }
+ if (params.status) {
+ this.status = params.status
+
+ }else{
+ this.status = "1,2"
+ }
+ if(params.creationTime==""){
+ this.checkedToday = false;
+ }
+ this.todayTime = params.creationTime
+
+ this.getList('refresh')
+ },
switchChangeToday(state, creationTime) {
this.checkedToday = state;
diff --git a/src/pages/inventoryMove/job/okToHoldMoveJob.vue b/src/pages/inventoryMove/job/okToHoldMoveJob.vue
index bded74f7..43d7e0b5 100644
--- a/src/pages/inventoryMove/job/okToHoldMoveJob.vue
+++ b/src/pages/inventoryMove/job/okToHoldMoveJob.vue
@@ -1,6 +1,6 @@
-
+
diff --git a/src/pages/issue/coms/comScanIssuePack.vue b/src/pages/issue/coms/comScanIssuePack.vue
index 67204f8a..816e70bf 100644
--- a/src/pages/issue/coms/comScanIssuePack.vue
+++ b/src/pages/issue/coms/comScanIssuePack.vue
@@ -10,6 +10,7 @@
+
@@ -178,7 +179,7 @@
fontSize: "100rpx"
},
bussinessCode: 'Issue',
- toLocationAreaTypeList:[]
+ toLocationAreaTypeList: []
}
},
created() {
@@ -234,7 +235,7 @@
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode;
- that.toLocationAreaTypeList=getDirectoryItemArray(this.jobContent.toAreaTypes)
+ that.toLocationAreaTypeList = getDirectoryItemArray(this.jobContent.toAreaTypes)
// that.fromLocationList = that.getFromLocationList();
}
},
@@ -317,9 +318,9 @@
"库区 [" + areaType + "] \n" +
"未查找到库存余额"
this.showErrorMessage(hint,
- res => {
- that.getfocus();
- })
+ res => {
+ that.getfocus();
+ })
} else if (res.data.length == 1) {
result.balance = res.data[0]
@@ -337,15 +338,15 @@
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error,
- res => {
- that.getfocus();
- })
+ res => {
+ that.getfocus();
+ })
})
}
} catch (e) {
- this.showErrorMessage(e.stack,res => {
- that.getfocus();
- })
+ this.showErrorMessage(e.stack, res => {
+ that.getfocus();
+ })
uni.hideLoading();
}
},
@@ -427,7 +428,7 @@
}
}
},
-
+
//查询到目标库位的库存余额
getToLocationBalance(result) {
uni.showLoading({
@@ -449,7 +450,7 @@
value: result.package.number
})
}
-
+
filters.push({
column: "itemCode",
action: "==",
@@ -460,14 +461,14 @@
action: "==",
value: result.package.batch
})
-
+
filters.push({
column: "areaType",
action: "in",
value: this.toLocationAreaTypeList.join(',')
})
-
-
+
+
var params = {
filters: filters,
pageNo: 1,
@@ -486,7 +487,7 @@
this.showErrorMessage(err.message);
})
},
-
+
selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo);
},
@@ -500,7 +501,7 @@
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
that.fromLocationCode = balance.locationCode;
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
- if (fromLocation != undefined) {
+ if (fromLocation &&!fromLocation.isNewAdd) {
let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) {
if (batch.Records == undefined) {
@@ -530,7 +531,7 @@
} else {
that.addRecord(batch, label, balance, packageInfo)
}
- that.$emit("afterScan");
+
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
res => {
@@ -550,6 +551,7 @@
batch.detail = fromLocation.Batchs[0].detail;
}
fromLocation.Batchs.unshift(batch);
+ this.getfocus();
that.$emit("afterScan");
}
})
@@ -561,8 +563,22 @@
}
}
} else {
- let locaion = that.createLocationInfo(label, balance, packageInfo);
- item.Locations.push(locaion);
+
+ if (this.jobContent.allowModifyLocation == "TRUE") {
+ this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
+ "】与推荐的库位不一致,是否要继续发料?", res => {
+ if (res) {
+ let locaion = that.createLocationInfo(label, balance, packageInfo);
+ item.Locations.push(locaion);
+ this.getfocus();
+ that.$emit("afterScan");
+ }
+ })
+
+ } else {
+ this.showErrorMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
+ "】与推荐的库位不一致,不允许继续发料?")
+ }
}
} catch (e) {
that.showErrorMessage(e.stack,
@@ -573,18 +589,19 @@
}
},
- //增加实际扫描的明细
+ //增加不是任务中的库位,实际扫描的明细
createLocationInfo(label, balance, packageInfo) {
let location = {
fromLocationCode: balance.locationCode,
qty: balance.qty,
uom: balance.uom,
handleQty: 0,
+ isNewAdd:true,
Batchs: []
}
let batch = this.createBatchInfo(label, balance, packageInfo);
batch.detail = balance;
- batch.detail.fromLocationCode=balance.locationCode;
+ batch.detail.fromLocationCode = balance.locationCode;
location.Batchs.push(batch);
return location;
},
@@ -615,8 +632,8 @@
batch: label.batch,
// qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
- qty: Number(balance.qty),
- handleQty: Number(balance.qty),
+ qty: Number(balance.qty),
+ handleQty: Number(balance.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
@@ -644,6 +661,7 @@
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.getfocus();
+ this.$emit("afterScan");
},
getfocus() {
@@ -691,7 +709,6 @@
this.issueRecord.splice(index, 1)
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
-
if (item != undefined) {
item.Locations.forEach(l => {
diff --git a/src/pages/issue/coms/comScanIssuePack0816.vue b/src/pages/issue/coms/comScanIssuePack0816.vue
new file mode 100644
index 00000000..fc40c63f
--- /dev/null
+++ b/src/pages/issue/coms/comScanIssuePack0816.vue
@@ -0,0 +1,732 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/issue/job/issueDetail.vue b/src/pages/issue/job/issueDetail.vue
index 374ef22a..baabd9a2 100644
--- a/src/pages/issue/job/issueDetail.vue
+++ b/src/pages/issue/job/issueDetail.vue
@@ -32,7 +32,7 @@
-
+
@@ -449,9 +449,16 @@
afterScan() {
this.resizeCollapse();
- let str = ""
+ this.autoCommit()
+ },
+
+ autoCommit(){
+ let str=""
+ var totalQty =0;
+ var taskQty =0;
this.detailSource.forEach(detail => {
detail.Items.forEach(item => {
+ taskQty =calc.add(taskQty,item.qty)
item.Locations.forEach(lco => {
lco.Batchs.forEach(batch => {
batch.Records.forEach(record => {
@@ -466,16 +473,23 @@
str +=
`包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n`
}
-
}
+ if(record){
+ var hanleQty =record.qty?record.qty:0
+ totalQty = calc.add(totalQty,hanleQty)
+ }
+
})
})
})
})
})
-
- if (str) {
+
+ if(str){
str = '任务明细未全部完成,是否提交?\n' + str
+ }
+ if(totalQty!=taskQty){
+ str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交"
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
//防止重复点击
@@ -484,10 +498,9 @@
this.scanPopupGetFocus()
}
});
- } else {
+ }else {
//防止重复点击
this.$throttle(this.submit, 2000, this)()
-
}
},
diff --git a/src/pages/issue/job/issueDetail0816.vue b/src/pages/issue/job/issueDetail0816.vue
new file mode 100644
index 00000000..baabd9a2
--- /dev/null
+++ b/src/pages/issue/job/issueDetail0816.vue
@@ -0,0 +1,608 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue
index 5d5db6d8..38acf2ac 100644
--- a/src/pages/issue/job/issueJob.vue
+++ b/src/pages/issue/job/issueJob.vue
@@ -329,82 +329,91 @@
title: "加载中....",
mask: true
});
- var filters = []
- if (this.checkedToday) {
- filters.push({
- column: "create_time",
- action: "betweeen",
- value: this.todayTime
- })
+ // var filters = []
+ // if (this.checkedToday) {
+ // filters.push({
+ // column: "create_time",
+ // action: "betweeen",
+ // value: this.todayTime
+ // })
+ // }
+
+ // filters.push({
+ // column: "status",
+ // action: "in",
+ // value: this.status
+ // })
+ if (params.status) {
+ this.status = params.status
+
+ }else{
+ this.status = "1,2"
+ }
+ if(params.creationTime==""){
+ this.checkedToday = false;
}
- filters.push({
- column: "status",
- action: "in",
- value: this.status
- })
-
if (params.fromLocationCode) {
// 来源库位
this.fromLocation = params.fromLocationCode
- filters.push({
- column: "fromLocationCode",
- action: "==",
- value: params.fromLocationCode
- })
+ // filters.push({
+ // column: "fromLocationCode",
+ // action: "==",
+ // value: params.fromLocationCode
+ // })
}else{
this.fromLocation = ''
}
if (params.productionLineCode) {
// 生产线
this.productionLine = params.productionLineCode
- filters.push({
- column: "productionLineCode",
- action: "==",
- value: params.productionLineCode
- })
+ // filters.push({
+ // column: "productionLineCode",
+ // action: "==",
+ // value: params.productionLineCode
+ // })
}else{
this.productionLine = ''
}
if (params.itemCode) {
// 物料代码
this.filterItemCode = params.itemCode
- filters.push({
- column: "itemCode",
- action: "like",
- value: params.itemCode
- })
+ // filters.push({
+ // column: "itemCode",
+ // action: "like",
+ // value: params.itemCode
+ // })
}else{
this.filterItemCode = ''
}
if (params.fromAreaCode) {
// 来源库区
this.fromAreaCode = params.fromAreaCode
- filters.push({
- column: "fromAreaCode",
- action: "==",
- value: params.fromAreaCode
- })
+ // filters.push({
+ // column: "fromAreaCode",
+ // action: "==",
+ // value: params.fromAreaCode
+ // })
}else{
this.fromAreaCode = ''
}
if (params.toAreaCode) {
// 到库区
this.toAreaCode = params.toAreaCode
- filters.push({
- column: "toAreaCode",
- action: "==",
- value: params.toAreaCode
- })
+ // filters.push({
+ // column: "toAreaCode",
+ // action: "==",
+ // value: params.toAreaCode
+ // })
}else{
this.toAreaCode = ''
}
- var params = {
- filters: filters,
- pageNo: 1,
- pageSize: 100,
- }
+ // var params = {
+ // filters: filters,
+ // pageNo: 1,
+ // pageSize: 100,
+ // }
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
// getIssueJobList(params).then(res => {
diff --git a/src/pages/issue/job/issueJob0816.vue b/src/pages/issue/job/issueJob0816.vue
new file mode 100644
index 00000000..a3017f95
--- /dev/null
+++ b/src/pages/issue/job/issueJob0816.vue
@@ -0,0 +1,746 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/issue/record/directIssue.vue b/src/pages/issue/record/directIssue.vue
index ec0e2955..f1ba1da2 100644
--- a/src/pages/issue/record/directIssue.vue
+++ b/src/pages/issue/record/directIssue.vue
@@ -48,7 +48,7 @@
-
+
@@ -99,7 +99,7 @@
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
- // import balanceQuery from '@/mycomponents/query/balanceQuery.vue'
+ import balanceQuery from '@/mycomponents/query/balanceQuery.vue'
export default {
@@ -114,7 +114,7 @@
recordDetailCard,
balanceSelect,
winComScanBalance,
- // balanceQuery
+ balanceQuery
},
data() {
return {
@@ -166,8 +166,8 @@
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
- // this.$refs.refBalanceQuery.showDrawer();
- // this.closeScanPopup();
+ this.$refs.refBalanceQuery.showDrawer();
+ this.closeScanPopup();
}
},
//拦截返回按钮事件
@@ -178,10 +178,6 @@
mounted() {},
methods: {
- // showDrawer() {
- // this.$refs.showRight.open();
- // },
-
getBusinessType() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
@@ -247,15 +243,71 @@
}
})
if (detail == undefined) {
- let newDetail = createDetailInfo(balance, pack);
- newDetail.parentNumber = pack.parentNumber;
- newDetail.packingNumber = pack.number
- newDetail.packUnit = pack.packUnit;
- newDetail.packQty = pack.packQty;
- if (balance.lableQty) {
- newDetail.handleQty = balance.lableQty
+ //如果最开始扫父,在扫子,提示已经扫描父包装
+ //如果扫子在扫父,提示扫描的是父包装,是否移除子包装,是移除子包装,显示父包装
+ //扫描的是子包装,
+ if (pack.parentNumber) {
+ var checkData = item.subList.find(r => {
+ if (r.packingNumber == pack.parentNumber &&
+ r.batch == balance.batch) {
+ return r;
+ }
+ })
+ if (checkData) {
+ //提示已经扫描
+ this.showErrorMessage("扫描箱码[" + pack.number + "]批次[" + balance.batch +
+ "]的父包装已经扫描")
+ console.log("父包装已经扫描")
+ } else {
+ let newDetail = createDetailInfo(balance, pack);
+ newDetail.parentNumber = pack.parentNumber;
+ newDetail.packingNumber = pack.number
+ newDetail.packUnit = pack.packUnit;
+ newDetail.packQty = pack.packQty;
+ if (balance.lableQty) {
+ newDetail.handleQty = balance.lableQty
+ }
+ item.subList.push(newDetail);
+ }
+ } else {
+ //扫描的是父包装
+ var checkData = item.subList.find(r => {
+ if (r.parentNumber == pack.number &&
+ r.batch == balance.batch) {
+ return r;
+ }
+ })
+ if (checkData) {
+ //是否移除
+ this.$refs.comMessage.showQuestionMessage("箱码[" + checkData.parentNumber+"]" + "批次[" + balance
+ .batch + "]是父包装,是否移除子包装", res => {
+ if (res) {
+ item.subList = [];
+ let newDetail = createDetailInfo(balance, pack);
+ newDetail.parentNumber = pack.parentNumber;
+ newDetail.packingNumber = pack.number
+ newDetail.packUnit = pack.packUnit;
+ newDetail.packQty = pack.packQty;
+ if (balance.lableQty) {
+ newDetail.handleQty = balance.lableQty
+ }
+ item.subList.push(newDetail);
+ }
+ })
+ console.log("扫描的是父包装,是否移除子包装")
+ } else {
+ let newDetail = createDetailInfo(balance, pack);
+ newDetail.parentNumber = pack.parentNumber;
+ newDetail.packingNumber = pack.number
+ newDetail.packUnit = pack.packUnit;
+ newDetail.packQty = pack.packQty;
+ if (balance.lableQty) {
+ newDetail.handleQty = balance.lableQty
+ }
+ item.subList.push(newDetail);
+ }
}
- item.subList.push(newDetail);
+
this.scanPopupGetFocus()
} else {
if (detail.scaned == true) {
@@ -390,11 +442,11 @@
// },
commit() {
- if(this.positionInfo=='请选择生产线'||!this.positionInfo){
+ if (this.positionInfo == '请选择生产线' || !this.positionInfo) {
this.showErrorMessage("请选择生产线")
return
}
-
+
uni.showLoading({
title: "提交中....",
mask: true
diff --git a/src/pages/issue/record/directIssue0816.vue b/src/pages/issue/record/directIssue0816.vue
index 8efa0038..d1d4b493 100644
--- a/src/pages/issue/record/directIssue0816.vue
+++ b/src/pages/issue/record/directIssue0816.vue
@@ -18,9 +18,8 @@
+ @removePack="removePack" :isShowParentPack="false">
-
@@ -45,9 +44,10 @@
-
-
-
+
+
+
@@ -57,7 +57,7 @@
import {
issueRecordSubmit,
getWorkShopLineStation,
- getBalanceByFilter
+ getTransactionByFilter
} from '@/api/request2.js';
import {
@@ -79,6 +79,7 @@
getBusinessType,
createItemInfo,
createDetailInfo,
+ createDetailByPackInfo,
calcTreeHandleQty,
calcHandleQty
} from '@/common/record.js';
@@ -100,7 +101,7 @@
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
// import balanceQuery from '@/mycomponents/query/balanceQuery.vue'
-
+ import winScanParentPackage from '@/mycomponents/scan/winScanParentPackage.vue'
export default {
components: {
@@ -114,6 +115,7 @@
recordDetailCard,
balanceSelect,
winComScanBalance,
+ winScanParentPackage
// balanceQuery
},
data() {
@@ -181,7 +183,6 @@
// showDrawer() {
// this.$refs.showRight.open();
// },
-
getBusinessType() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
@@ -197,72 +198,117 @@
getScanResult(result) {
let pack = result.package;
- let balance = result.balance;
+ let childBalance = result.balance.childBalance;
+ let parentBalance = result.balance.parentBalance[0];
+ //1.先判断是否重复扫描
+ if (this.itemCode) {
+ var item = this.detailSource.find(res => res.itemCode == pack.itemCode)
+ if (item == undefined) {
+ this.showErrorMessage("请扫描物料为【" + this.itemCode + "】不在此次发料记录中")
+ return;
+ }
+ if (item.subList.length > 0) {
+ var detail = item.subList.find(r => {
+ if (r.packingNumber == pack.number &&
+ r.batch == pack.batch) {
+ return r;
+ }
+ })
- if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
- this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
- .fromLocationCode + "]没有库存余额")
- return;
+ if (detail && detail.scaned) {
+ this.showErrorMessage("箱码[" + pack.number + "批次[" + pack.batch + "]重复扫描")
+ return;
+ }
+ }
}
+ //2.向列表中增加明细
//扫描的是子包装
if (pack.parentNumber) {
- this.setPackageData(result);
+ //子包装没有库存
+ if (childBalance.length == 0) {
+ this.getTransactionList(pack.number, transactionRes => {
+ if (transactionRes.length == 0) {
+ this.setPackageData(parentBalance, pack);
+ } else {
+ this.showErrorMessage("箱码[" + pack.number + "批次[" + pack.batch +
+ "]已经发过料")
+ }
+ });
+ } else { //子包装有库存
+ this.setPackageData(childBalance[0], pack);
+ }
} else {
- this.setContainerData(result);
+ //扫描的是没有父包装的,自己就是子包装
+ if(pack.subList.length==0){
+ this.getTransactionList(pack.number, transactionRes => {
+ if (transactionRes.length == 0) {
+ this.setPackageData(childBalance[0], pack);
+ } else {
+ this.showErrorMessage("箱码[" + pack.number + "批次[" + pack.batch +
+ "]已经发过料")
+ }
+ });
+ }else {
+ let packparams = '';
+ pack.subList.forEach(pack => {
+ packparams = packparams + pack.number + ','
+ })
+ packparams = packparams.trimEnd(',');
+ this.getTransactionList(packparams, transactionRes => {
+ //扫描的是父包装,要过滤掉不在超市的库存,加上没有的库存
+ pack.subList.forEach(sub => {
+ let subBalance = childBalance.find(r => r.packingNumber == sub.number);
+ if (subBalance) {
+ //校验父包装和子包装是否在一个库位
+ if (subBalance.locationCode == parentBalance.locationCode) {
+ this.setPackageData(subBalance, sub);
+ } else {
+ //不在一个库位暂时先不加
+ }
+
+ } else {
+ //如果子包装没有库存,取父包装库存
+ //查询是不是已经出过库,在发料任务中产生了出库库存事务
+ let transaction = transactionRes.find(p => p.packingNumber == sub
+ .number)
+ if (!transaction) {
+ this.setPackageData(parentBalance, sub);
+ }
+ }
+ })
+ })
+ }
+
}
},
- setPackageData(result) {
- let balance = result.balance;
- let label = result.label;
- let pack = result.package;
-
+ setPackageData(balance, pack) {
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
- if (this.itemCode != "" && this.itemCode != balance.itemCode) {
- this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码")
- return;
- }
- if (this.fromWarehouseCode == '') {
- this.fromWarehouseCode = balance.warehouseCode;
- }
var itemp = createItemInfo(balance, pack);
- let newDetail = createDetailInfo(balance, pack); //
- newDetail.parentNumber = pack.parentNumber;
- newDetail.packingNumber = pack.number
- newDetail.packUnit = pack.packUnit;
- newDetail.packQty = pack.packQty;
- if (balance.lableQty) {
- newDetail.handleQty = balance.lableQty
- }
+ let newDetail = this.createPackageDetail(balance, pack);
itemp.subList.push(newDetail);
- this.detailSource.push(itemp)
+ this.detailSource.push(itemp);
this.itemCode = balance.itemCode;
- this.fromLocationCode = balance.locationCode
+ this.fromLocationCode = balance.locationCode;
+ this.fromWarehouseCode = balance.warehouseCode;
this.scanPopupGetFocus()
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
- r.batch == balance.batch &&
- r.locationCode == balance.locationCode &&
+ r.batch == pack.batch &&
+ r.locationCode == pack.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
- let newDetail = createDetailInfo(balance, pack);
- newDetail.parentNumber = pack.parentNumber;
- newDetail.packingNumber = pack.number
- newDetail.packUnit = pack.packUnit;
- newDetail.packQty = pack.packQty;
- if (balance.lableQty) {
- newDetail.handleQty = balance.lableQty
- }
+ let newDetail = this.createPackageDetail(balance, pack);
item.subList.push(newDetail);
this.scanPopupGetFocus()
} else {
@@ -274,73 +320,55 @@
calcHandleQty(this.detailSource);
},
- setContainerData(result) {
- //1.查询托和箱所有的库存
- this.getBalance(result, resList => {
-
- });
- },
-
- getBalance(result, callback) {
- let packageInfo = result.package;
- let filters = [{
- column: "itemCode",
- action: "==",
- value: packageInfo.itemCode
- }, {
- column: "batch",
- action: "==",
- value: packageInfo.batch
- }];
- if (this.businessType.outInventoryStatuses != null) {
- filters.push({
- column: "inventoryStatus",
- action: "in",
- value: this.businessType.outInventoryStatuses
- })
- }
- if (this.businessType.outAreaTypes != null) {
- filters.push({
- column: "areaType",
+ //查询发料的业务类型
+ getTransactionList(packingNumbers, callback) {
+ let params = {
+ filters: [{
+ column: "businessType",
+ action: "==",
+ value: "发料"
+ }, {
+ column: "packingNumber",
action: "in",
- value: this.businessType.outAreaTypes
- })
- }
-
-
- let packingNumber = packageInfo.number;
- packageInfo.subList.forEach(sub => {
- packingNumber = packingNumber + ',' + sub.number
- })
- packingNumber = packingNumber.trimEnd(',');
- filters.push({
- column: "packingNumber",
- action: "in",
- value: packingNumber
- })
- var params = {
- filters: filters,
+ value: packingNumbers
+ }, {
+ column: "inventoryAction",
+ action: "==",
+ value: "OUT"
+ }],
+ pageSize: 20,
pageNo: 1,
- pageSize: 100,
+ sort: "",
+ by: "ASC"
}
- getBalanceByFilter(params).then(res => {
- if (res.data.list.length > 0) {
- res.data.list.forEach(r => {
- // if (packageInfo.parentNumber !== null) {
- // r.parentPackingNumber = packageInfo.parentNumber
- // } else {
- // r.parentPackingNumber = packageInfo.number
- // }
- })
- callback(res.data.list)
- } else {
- }
+ getTransactionByFilter(params).then(res => {
+ callback(res.data.list);
}).catch(err => {
- this.showErrorMessage(err.message);
+ callback([]);
})
},
+
+ createPackageDetail(balance, pack) {
+ let newDetail = {};
+ if (balance.packingNumber != pack.number) {
+ newDetail = createDetailByPackInfo(pack);
+ newDetail.inventoryStatus = balance.inventoryStatus;
+ } else {
+ newDetail = createDetailInfo(balance, pack);
+ if (balance.lableQty) {
+ newDetail.handleQty = balance.lableQty
+ }
+ }
+ newDetail.parentNumber = pack.parentNumber;
+ newDetail.packingNumber = pack.number
+ newDetail.packUnit = pack.packUnit;
+ newDetail.packQty = pack.packQty;
+ return newDetail;
+ },
+
+
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@@ -432,12 +460,18 @@
this.updateData();
},
+ // openScanPopup() {
+ // if (this.businessType) {
+ // this.$refs.scanPopup.openScanPopup(this.businessType);
+ // } else {
+ // this.getBusinessType()
+ // }
+ // },
+
openScanPopup() {
- if (this.businessType) {
- this.$refs.scanPopup.openScanPopup(this.businessType);
- } else {
- this.getBusinessType()
- }
+ setTimeout(r => {
+ this.$refs.scanPopup.openScanPopupByBusinessType(this.businessType);
+ })
},
showFromLocationPopup() {
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 71ac4b30..f6c8f562 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -157,18 +157,21 @@
}
},
- onLoad() {
- getCaptchaImage().then(res => {
- if (res) {
- var code = res.data.img;
- let base64 = 'data:image/jpeg;base64,' + code
- // console.log("图标", base64)
- this.imageSrc = base64.replace(/[\r\n]/g, "")
- this.uuid = res.data.uuid
- }
- }).catch(error => {
- this.showErrorMessage(error);
- })
+ onLoad() {
+ if(this.needCode){
+ getCaptchaImage().then(res => {
+ if (res) {
+ var code = res.data.img;
+ let base64 = 'data:image/jpeg;base64,' + code
+ // console.log("图标", base64)
+ this.imageSrc = base64.replace(/[\r\n]/g, "")
+ this.uuid = res.data.uuid
+ }
+ }).catch(error => {
+ this.showErrorMessage(error);
+ })
+ }
+
this.getAppVersion()
},
methods: {
diff --git a/src/pages/productPutaway/record/productPutawayRecord.vue b/src/pages/productPutaway/record/productPutawayRecord.vue
index d3362b7d..f2dab7c8 100644
--- a/src/pages/productPutaway/record/productPutawayRecord.vue
+++ b/src/pages/productPutaway/record/productPutawayRecord.vue
@@ -10,6 +10,7 @@
@@ -147,6 +148,7 @@
getScanResult(result) {
let label = result.label;
let pack = result.package;
+ let errorHint=""
result.balance.forEach(
balance => {
let item = this.detailSource.find(res => {
@@ -180,14 +182,19 @@
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
- this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch +
- "]重复扫描")
+ errorHint+="箱码[" + balance.packingNumber + "批次[" + balance.batch +
+ "]重复扫描\n"
}
}
}
this.calcHandleQty();
}
)
+ if(errorHint){
+ this.showErrorMessage(errorHint)
+ }else {
+ this.scanPopupGetFocus()
+ }
},
getRecommendLocation(balance) {
@@ -251,9 +258,6 @@
this.$forceUpdate();
},
- updateData() {
- this.calcHandleQty();
- },
removeItem(index, item) {
this.removeRecommendLocation([item.expectinNumber]);
this.detailSource.splice(index, 1)
@@ -423,13 +427,6 @@
if (res) {}
});
},
- showErrorMessage(message) {
- this.$refs.comMessage.showErrorMessage(message, res => {
- if (res) {
-
- }
- });
- },
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
diff --git a/src/pages/productReceipt/job/fgProductReceiptDetail.vue b/src/pages/productReceipt/job/fgProductReceiptDetail.vue
index fbfe4c8a..c702a838 100644
--- a/src/pages/productReceipt/job/fgProductReceiptDetail.vue
+++ b/src/pages/productReceipt/job/fgProductReceiptDetail.vue
@@ -231,7 +231,14 @@
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
- that.productionLineCode = that.subList[0].productionLineCode;
+ that.productionLineCode = that.subList[0].productionLineCode;
+ var valiDate = getSwitchInfoByCode("fgProductReceipCommitValidate")
+ if(valiDate){
+ that.jobContent.allowModifyLocation = 'TRUE'
+
+ }else{
+ that.jobContent.allowModifyLocation = 'FALSE'
+ }
// if (that.jobContent.allowModifyLocation == 'FALSE') {
// that.toLocationCode = that.subList[0].toLocationCode
// }
diff --git a/src/pages/productReceipt/job/productReceiptDetail.vue b/src/pages/productReceipt/job/productReceiptDetail.vue
index 1c6c3cb3..6cf39a85 100644
--- a/src/pages/productReceipt/job/productReceiptDetail.vue
+++ b/src/pages/productReceipt/job/productReceiptDetail.vue
@@ -226,11 +226,16 @@
that.subList = res.data.subList;
that.jobStatus = res.data.status;
that.jobToLocationCode = that.subList[0].toLocationCode;
- that.productionLineCode = that.jobContent.subList[0].productionLineCode;
-
- if (that.jobContent.allowModifyLocation == 'FALSE') {
- that.toLocationCode = that.subList[0].toLocationCode
+ that.productionLineCode = that.jobContent.subList[0].productionLineCode;
+ var valiDate = getSwitchInfoByCode("semiProductReceipCommitValidate")
+ if(valiDate){
+ that.jobContent.allowModifyLocation = 'TRUE'
+ }else{
+ that.jobContent.allowModifyLocation = 'FALSE'
}
+ // if (that.jobContent.allowModifyLocation == 'FALSE') {
+ // that.toLocationCode = that.subList[0].toLocationCode
+ // }
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
if (that.scanMessage) {
diff --git a/src/pages/productionReceipt/job/productionReceiptDetail.vue b/src/pages/productionReceipt/job/productionReceiptDetail.vue
index 3968605d..56c41363 100644
--- a/src/pages/productionReceipt/job/productionReceiptDetail.vue
+++ b/src/pages/productionReceipt/job/productionReceiptDetail.vue
@@ -34,7 +34,7 @@
:locationAreaTypeList="toLocationAreaTypeList">
-
+
diff --git a/src/pages/productionReceipt/job/productionReceiptJob.vue b/src/pages/productionReceipt/job/productionReceiptJob.vue
index fe5f82a4..a78c388d 100644
--- a/src/pages/productionReceipt/job/productionReceiptJob.vue
+++ b/src/pages/productionReceipt/job/productionReceiptJob.vue
@@ -460,6 +460,17 @@
}else{
this.filterItemCode = ''
}
+ if (params.status) {
+ this.status = params.status
+
+ }else{
+ this.status = "1,2"
+ }
+ if(params.creationTime==""){
+ this.checkedToday = false;
+ }
+ this.todayTime = params.creationTime
+
this.getList('refresh', this.productionLine, this.filterItemCode)
},
diff --git a/src/pages/putaway/record/putawayRecord.vue b/src/pages/putaway/record/putawayRecord.vue
index 9662d144..5fc5f1d9 100644
--- a/src/pages/putaway/record/putawayRecord.vue
+++ b/src/pages/putaway/record/putawayRecord.vue
@@ -5,10 +5,11 @@